Allow for reproducible .vsix packages#1100
Merged
benibenj merged 4 commits intomicrosoft:mainfrom Dec 11, 2024
stevedlawrence:reproducible-vsix
Merged
Allow for reproducible .vsix packages#1100benibenj merged 4 commits intomicrosoft:mainfrom stevedlawrence:reproducible-vsix
benibenj merged 4 commits intomicrosoft:mainfrom
stevedlawrence:reproducible-vsix
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree company="Owl Cyber Defense" |
benibenj
reviewed
Dec 10, 2024
Contributor
benibenj
left a comment
There was a problem hiding this comment.
Could you add a test to make sure this works as expected. It will also make it easier for us to make sure we don't break this later on.
Running the same build produces .vsix package that have the same content, but are not bit for bit the same, making it somewhat complicated to verify reproducible builds. Two changes are needed to fix this: 1. The mtime of each file added to the .vsix archive is included in each archive entry, so builds that happen at different times will have different entry timestamps. To fix this, if the SOURCE_DATE_EPOCH environment variable is defined, it it now used as entry timestamp value instead. Builds will now be reproducible as long as they set the same SOURCE_DATE_EPOCH value. If the environment variable is not defined or is not an integer, the current behavior is used. 2. The order that files are collected in preparation for packaging into the .vsix file is non-deterministic, which can lead to archives with the same content but in different orders. To fix this, files are sorted by archive entry name prior to adding. Fixes #906
Contributor
Author
Done, I've also rebased this branch to ontop of the latest master. |
lszomoru
approved these changes
Dec 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Running the same build produces .vsix package that have the same content, but are not bit for bit the same, making it somewhat complicated to verify reproducible builds. Two changes are needed to fix this:
Fixes #906