mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
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.
This commit is contained in:
parent
b09025bce2
commit
d11311212e
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue