Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist: add reproducible dir entries to tarballs #13322

Closed
wants to merge 3 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Apr 9, 2024

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-restore option, when
extracting 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

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.
@vszakats vszakats added the build label Apr 9, 2024
maketgz Outdated Show resolved Hide resolved
@vszakats
Copy link
Member Author

vszakats commented Apr 9, 2024

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).

@vszakats vszakats closed this in b6a4f9a Apr 9, 2024
@vszakats vszakats deleted the tarball-dirs branch April 9, 2024 08:38
@vszakats vszakats added the dist label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants