[Reproducible-builds] Bug#792995: abook: please make the build reproducible
Maria Valentina Marin
marivalenm at gmail.com
Mon Jul 20 11:48:35 UTC 2015
Source: abook
Version: 0.6.0~pre2-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 abook 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 -Nru abook-0.6.0~pre2/debian/changelog abook-0.6.0~pre2/debian/changelog
--- abook-0.6.0~pre2/debian/changelog 2015-07-07 17:39:52.000000000 +0200
+++ abook-0.6.0~pre2/debian/changelog 2015-07-15 20:06:33.000000000 +0200
@@ -1,3 +1,10 @@
+abook (0.6.0~pre2-4.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com> Wed, 15 Jul 2015 20:06:12 +0200
+
abook (0.6.0~pre2-4) unstable; urgency=medium
[ Rhonda D'Vine ]
diff -Nru abook-0.6.0~pre2/debian/rules abook-0.6.0~pre2/debian/rules
--- abook-0.6.0~pre2/debian/rules 2015-07-06 18:34:40.000000000 +0200
+++ abook-0.6.0~pre2/debian/rules 2015-07-15 20:06:07.000000000 +0200
@@ -13,6 +13,8 @@
QUILT_STAMPFN = patch-stamp
include /usr/share/quilt/quilt.make
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
CFLAGS = -g -Wall -std=gnu89
INSTALL = install
INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644
@@ -101,6 +103,8 @@
-p$(PKG) -P$(TMP)
cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
xargs -r0 md5sum > DEBIAN/md5sums
+ find $(TMP) -newermt '$(BUILD_DATE)' -print0 | \
+ xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
dpkg --build $(TMP) ..
More information about the Reproducible-builds
mailing list