You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/pages/output_files.rst
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ Top level structure
21
21
22
22
output/
23
23
├── build_log/
24
+
├── buildspec/
24
25
├── git_repos/
25
26
├── reports/
26
27
├── debug.log
@@ -43,8 +44,8 @@ The report files of Macaron (from using the :ref:`analyze command <analyze-comma
43
44
Unique result path
44
45
''''''''''''''''''
45
46
46
-
For each target software component, Macaron creates a directory under ``reports`` to store the report files. This directory
47
-
path is formed from the PURL string of that component. The final path is created using the following template:
47
+
For each target software component, Macaron creates a directory under ``reports`` to store the report. These directory
48
+
paths are formed from the PURL string of that component. The final path is created using the following template:
48
49
49
50
.. code-block::
50
51
@@ -131,6 +132,25 @@ to the directory:
131
132
132
133
.. note:: Please see :ref:`pages/using:analyzing a repository on the local file system` to know how to set the directory for analyzing local repositories.
133
134
135
+
.. _output_files_macaron_build_spec-Gen:
136
+
137
+
--------------------------------------
138
+
Output files of macaron gen-build-spec
139
+
--------------------------------------
140
+
141
+
As part of the ``gen-build-spec`` command, Macaron generates build spec files to help rebuilding artifacts from source. For each target software component, Macaron creates a dedicated directory under ``buildspec`` to store the generated build specification file. These directory paths are derived from the component's PURL (Package URL) string. The resulting path structure follows this template:
Copy file name to clipboardExpand all lines: docs/source/pages/tutorials/rebuild_third_party_artifacts.rst
+46-6Lines changed: 46 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ These buildspecs help document and automate the build process for packages, enab
16
16
17
17
* - Currently Supported packages
18
18
* - Maven packages built with Gradle or Maven
19
+
* - Python packages built with the built-in ``build`` module and various build tools, like Poetry
19
20
20
21
.. contents:: :local:
21
22
@@ -31,9 +32,9 @@ Addressing this lack of transparency is critical for improving supply chain secu
31
32
Background
32
33
**********
33
34
34
-
A build specification is a file that describes all necessary information to rebuild a package from source. This includes metadata such as the build tool, the specific build command to run, the language version, e.g., JDK for Java, and artifact coordinates. Macaron can now generate this file automatically for supported ecosystems, greatly simplifying build from source.
35
+
A build specification is a file that describes all necessary information to rebuild a package from source. This includes metadata such as the build tool, the specific build command to run, the language version, e.g., Python or JDK for Java, and artifact coordinates. Macaron can now generate this file automatically for supported ecosystems, greatly simplifying build from source.
35
36
36
-
The generated buildspec will be stored in an ecosystem- and PURL-specific path under the ``output/`` directory (see more under :ref:`Output Files Guide <output_files_guide>`).
37
+
The generated buildspec will be stored in an ecosystem- and PURL-specific path under the ``output/`` directory (see more under :ref:`Output Files Guide <output_files_macaron_build_spec-Gen>`).
37
38
38
39
******************************
39
40
Installation and Prerequisites
@@ -101,7 +102,46 @@ In the example above, the buildspec is located at:
101
102
Step 3: Review and Use the Buildspec File
102
103
*****************************************
103
104
104
-
The generated buildspec uses the `Reproducible Central buildspec <https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/doc/BUILDSPEC.md>`_ format, for example:
105
+
By default we generate the buildspec in JSON format as follows:
If you use the ``rc-buildspec`` output format, the generated buildspec follows the `Reproducible Central buildspec <https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/doc/BUILDSPEC.md>`_ format. For example, you can generate it with:
The resulting file will be saved as ``output/buildspec/maven/org_apache_hugegraph/computer-k8s/reproducible_central.buildspec``, and will look like this:
105
145
106
146
.. code-block:: ini
107
147
@@ -136,18 +176,18 @@ The ``gen-build-spec`` works as follows:
136
176
137
177
- Extracts metadata and build information from Macaron’s local SQLite database.
138
178
- Parses and modifies build commands from CI/CD configurations to ensure compatibility with rebuild systems.
139
-
- Identifies the JDK version by parsing CI/CD configurations or extracting it from the ``META-INF/MANIFEST.MF`` file in Maven Central artifacts.
179
+
- Identifies the language version, e.g., JDK version by parsing CI/CD configurations or extracting it from the ``META-INF/MANIFEST.MF`` file in Maven Central artifacts.
140
180
- Ensures that only the major JDK version is included, as required by the build specification format.
141
181
142
182
143
-
This feature is described in more detail in our accepted ASE 2025 Industry ShowCase paper: `Unlocking Reproducibility: Automating the Re-Build Process for Open-Source Software <https://arxiv.org/pdf/2509.08204>`_.
183
+
The Java support for this feature is described in more detail in our accepted ASE 2025 Industry ShowCase paper: `Unlocking Reproducibility: Automating the Re-Build Process for Open-Source Software <https://arxiv.org/pdf/2509.08204>`_.
144
184
145
185
***********************************
146
186
Frequently Asked Questions (FAQs)
147
187
***********************************
148
188
149
189
*Q: What formats are supported for buildspec output?*
150
-
A: Currently, only ``rc-buildspec`` is supported.
190
+
A: Currently, a default JSON spec and optional ``rc-buildspec`` are supported.
151
191
152
192
*Q: Do I need to analyze the package every time before generating a buildspec?*
153
193
A: No, you only need to analyze the package once unless you want to update the database with newer information.
0 commit comments