[med-svn] [cain] 02/06: make build reproducible
Sascha Steinbiss
sascha at steinbiss.name
Fri May 27 11:04:13 UTC 2016
This is an automated email from the git hooks/post-receive script.
sascha-guest pushed a commit to branch master
in repository cain.
commit 12654a457505ba32ac2330f6008aafc4f0f3b583
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date: Fri May 27 10:40:03 2016 +0000
make build reproducible
---
debian/changelog | 4 ++++
debian/rules | 11 ++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 5bad2f4..c94cbae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ cain (1.10+dfsg-2) unstable; urgency=medium
* Team upload.
* Fix build by making sure directory exists.
+ * Make build reproducible.
+ - Use stable order for files in help HTB.
+ - Use consistent timezone.
+ - Use consistent file permissions.
-- Sascha Steinbiss <sascha at steinbiss.name> Fri, 27 May 2016 10:15:44 +0000
diff --git a/debian/rules b/debian/rules
index dfe9def..f396c11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,8 @@ debtmp := $(CURDIR)/debian/tmp
pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
VERSION := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d- -f1)
UVERSION := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d- -f1 | sed 's/\./_/g')
+BUILD_DATE := $(shell dpkg-parsechangelog | grep Date: | cut -d' ' -f2-7)
+export TZ=UTC
%:
dh $@ --with python2
@@ -15,7 +17,14 @@ UVERSION := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d-
override_dh_install-indep:
dh_install
rm -rf debian/$(pkg)/usr/share/cain/help/* debian/$(pkg)/usr/share/cain/gui/help.htm*
- cd help && zip ../debian/$(pkg)/usr/share/cain/help/cain.htb * -r -q -x *.htb *.htd
+ find help -type d | xargs chmod 755
+ find help -type f | xargs chmod 644
+ find help | xargs touch --no-dereference --date='$(BUILD_DATE)'
+ ls -Al help
+ cd help && (find . -type f -not \( -name "*.htb" -or -name "*.htd" \) -print0 | \
+ LC_ALL=C sort -z | \
+ xargs -0 zip ../debian/$(pkg)/usr/share/cain/help/cain.htb -X -r -q)
+ touch --no-dereference --date='$(BUILD_DATE)' debian/$(pkg)/usr/share/cain/help/cain.htb
if [ -d debian/$(pkg)/usr/share/cain/ ] ; then \
find debian/$(pkg)/usr/share/cain/ -type f -executable -exec chmod 644 {} + ; \
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/cain.git
More information about the debian-med-commit
mailing list