[Reproducible-builds] Bug#792947: cvs-mailcommit: please make the build reproducible
Maria Valentina Marin
marivalenm at gmail.com
Mon Jul 20 11:10:33 UTC 2015
Source: cvs-mailcommit
Version: 1.19-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Hi!
While working on the “reproducible builds” effort [1], we have noticed
that cvs-mailcommit could not be built reproducibly.
The attached patch sets the mtimes of all files which are modified
during the built to the date of the last changelog entry in order to
produce files with reproducible metadata.
Cheers,
akira
[1]: https://wiki.debian.org/ReproducibleBuilds
-------------- next part --------------
diff -u cvs-mailcommit-1.19/debian/changelog cvs-mailcommit-1.19/debian/changelog
--- cvs-mailcommit-1.19/debian/changelog
+++ cvs-mailcommit-1.19/debian/changelog
@@ -1,3 +1,10 @@
+cvs-mailcommit (1.19-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com> Fri, 17 Jul 2015 16:35:27 +0200
+
cvs-mailcommit (1.19-2) unstable; urgency=medium
* Added the missing dependency to RCS *sigh*
diff -u cvs-mailcommit-1.19/debian/rules cvs-mailcommit-1.19/debian/rules
--- cvs-mailcommit-1.19/debian/rules
+++ cvs-mailcommit-1.19/debian/rules
@@ -24,6 +24,8 @@
version = $(shell grep "^$(source) " debian/changelog|head -n 1 |sed 's/.*(\(.*\)\-[^\-]*).*/\1/g')
revision = $(shell grep "^$(source) " debian/changelog|head -n 1 |sed 's/.*([^\-]*\-\(.*\)).*/\1/g')
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
installbin = install -g root -o root -m 755
installdoc = install -g root -o root -m 644
@@ -67,6 +69,8 @@
# dpkg-shlibdeps debian/tmp/usr/bin/*
dpkg-gencontrol -isp
chown root.root debian/tmp/DEBIAN/control
+ find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+ xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
dpkg --build debian/tmp ..
binary: binary-indep binary-arch
More information about the Reproducible-builds
mailing list