dist: add reproducible dir entries to tarballs - #13322
Closed
vszakats wants to merge 3 commits into
Closed
Conversation
This has an issue where untaring will mess up the extracted dir entry timestamps in a few cases, where our manual sort skews entry order. This can be avoided by using `--delay-directory-restore` on extraction.
bagder
reviewed
Apr 9, 2024
Member
Author
|
old-linux failure is unrelated. Not sure why it affects this PR though (this is not based on the commit that seems to be causing it). |
bagder
approved these changes
Apr 9, 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.
In the initial implementation of reproducible tarballs, they were
missing directory entries, while .zip archives had them. It meant
that on extracting the tarball, on-disk directory entries got the
current timestamp.
This patch fixes this by including directory entries in the tarball,
with reproducible timestamps. It also moves sorting inside tar,
to ensure reproducible directory entry timestamps on extract
(without the need of
--delay-directory-restoreoption, whenextracting with GNU tar. BSD tar got that right by default.)
--sort=option was introduced in GNU tar 1.28 (2014-07-28)Ref: #13299 (comment)
Follow-up to 860cd5f #13299
Closes #13322
/cc @bagder