L1L1 / cardpeek

Automatically exported from code.google.com/p/cardpeek
Other
454 stars 117 forks source link

Create tar.gz in a reproducible way #97

Closed bmwiedemann closed 5 years ago

bmwiedemann commented 6 years ago

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.

bmwiedemann commented 5 years ago

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

L1L1 commented 5 years ago

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 commented 5 years ago

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

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

L1L1 commented 5 years ago

OK that works on Ubuntu and MacOS.