Support SONiC reproduceable build for deb/py2/py3/web #5786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- Why I did it
Please add comments in #5718
Support SONiC Reproduceable Build, see design doc: sonic-net/SONiC#684
Features:
Collect the version information to the folder target/versions when building any targets
Sample commands:
make configure PLATFORM=broadcom
make target/sonic-aboot-broadcom.swi
Support to freeze the versions after build by command: make freeze
Sample 1: Initialize the versions or rebuild the versions
make freeze OPTIONS="-r"
Sample 2: Freeze and merge the versions to current distribution and the architecture
make freeze
Sample 3: Merge the current target versions to all distributions and all architectures
make freeze OPTIONS="-d -a"
You can add the version change by: git add files/build/versions
In most cases, simply run "make freeze" to freeze the versions.
Control the version in build, change the configuration file rules/config
SONIC_VERSION_CONTROL_COMPONENTS=all
To upgrade the version configuration, just build any targets, then freeze your versions.
Sample commands:
make configure SONIC_VERSION_CONTROL_COMPONENTS=none PLATFORM=broadcom
make SONIC_VERSION_CONTROL_COMPONENTS=none target/sonic-aboot-broadcom.swi
make freeze OPTIONS="-d -a"
- How I did it
- How to verify it
Sample commands:
make configure PLATFORM=broadcom
make target/sonic-aboot-broadcom.swi
make freeze
You can see no version change in files/build/versions, git status files/build/versions.
The version files are in target/versions, you can find and verify all the version changes for all the build targets.
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)