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

Create tar.gz in a reproducible way #97

Merged
merged 1 commit into from Nov 7, 2019
Merged

Create tar.gz in a reproducible way #97

merged 1 commit into from Nov 7, 2019

Conversation

bmwiedemann
Copy link
Contributor

Create tar.gz in a reproducible way
by sorting entries, overriding UID, mtime
and using gzip -n to not add a timestamp in .gz header

See https://reproducible-builds.org/ for why this is good.

by sorting entries, overriding UID, mtime
and using gzip -n to not add a timestamp

See https://reproducible-builds.org/ for why this is good.
@L1L1 L1L1 merged commit 75b1c44 into L1L1:master Nov 7, 2019
Copy link
Owner

@L1L1 L1L1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work on Ubuntu 18.04 (and probably others) and breaks the compilation. Some modifications will be needed.

@bmwiedemann
Copy link
Contributor Author

hmm. how does it fail? I guess, the tar is older and does not have the sort option?

@L1L1
Copy link
Owner

L1L1 commented Nov 8, 2019

During make I get:

  TAR      dot_cardpeek_dir
tar: --clamp-mtime needs a date specified using --mtime
Try 'tar --help' or 'tar --usage' for more information.

Removing --clamp-mtime fixes the problem

@bmwiedemann
Copy link
Contributor Author

try this instead: --mtime @1 --clamp-mtime

This has reproducible build results without influences from timestamps of dirs touched during build.

@bmwiedemann bmwiedemann deleted the tar branch November 8, 2019 09:32
@L1L1
Copy link
Owner

L1L1 commented Nov 8, 2019

OK that works on Ubuntu and MacOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants