diff options
| author | Tomi Ollila <tomi.ollila@iki.fi> | 2017-12-12 08:39:20 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-12-28 10:12:21 -0400 |
| commit | d11311212e8dbb771e2ba14d764adca6e973a6ee (patch) | |
| tree | 905bed90e820420ba4e768385a0370d41a6230e1 /Makefile.local | |
| parent | b09025bce2b795f3d49b92cb3dac437b92831321 (diff) | |
make release archive: common (or no) timestamps
The appended file 'version' has the same timestamp as the files added
by `git archive`.
The original file name and time stamp are no longer saved to the
gzip header in resulting $(PACKAGE)-$(VERSION).tar.gz file.
When build environment is close enough to another, this may
provide mutually reproducible release archive files.
Diffstat (limited to 'Makefile.local')
| -rw-r--r-- | Makefile.local | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.local b/Makefile.local index 9505b7fe..1535c2ae 100644 --- a/Makefile.local +++ b/Makefile.local @@ -31,11 +31,12 @@ $(TAR_FILE): fi ; \ git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ $$ref > $(TAR_FILE).tmp echo $(VERSION) > version.tmp + ct=`git --no-pager log -1 --pretty=format:%ct $$ref` ; \ tar --owner root --group root --append -f $(TAR_FILE).tmp \ --transform s_^_$(PACKAGE)-$(VERSION)/_ \ - --transform 's_.tmp$$__' version.tmp + --transform 's_.tmp$$__' --mtime=@$$ct version.tmp rm version.tmp - gzip < $(TAR_FILE).tmp > $(TAR_FILE) + gzip -n < $(TAR_FILE).tmp > $(TAR_FILE) @echo "Source is ready for release in $(TAR_FILE)" $(SHA256_FILE): $(TAR_FILE) |
