[Reproducible-builds] Bug#792983: gerstensaft: please make the build reproducible
Maria Valentina Marin
marivalenm at gmail.com
Mon Jul 20 11:33:33 UTC 2015
Source: gerstensaft
Version: 0.3-4
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 gerstensaft 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 gerstensaft-0.3/debian/rules gerstensaft-0.3/debian/rules
--- gerstensaft-0.3/debian/rules
+++ gerstensaft-0.3/debian/rules
@@ -17,6 +17,8 @@
#
SHELL=/bin/bash
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
# The name and version of the source
#
source = $(shell grep "^Source: " debian/control|head -1|sed 's/Source: \(.*\)/\1/g')
@@ -85,6 +87,8 @@
#
dpkg-shlibdeps debian/tmp/usr/bin/beer
dpkg-gencontrol -isp
+ find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+ xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
dpkg --build debian/tmp ..
binary: binary-indep binary-arch
diff -u gerstensaft-0.3/debian/changelog gerstensaft-0.3/debian/changelog
--- gerstensaft-0.3/debian/changelog
+++ gerstensaft-0.3/debian/changelog
@@ -1,3 +1,10 @@
+gerstensaft (0.3-4.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com> Sun, 19 Jul 2015 13:59:51 +0200
+
gerstensaft (0.3-4) unstable; urgency=low
* Properly separate homepage
More information about the Reproducible-builds
mailing list