[Reproducible-builds] Bug#792963: erc: please make the build reproducible
Maria Valentina Marin
marivalenm at gmail.com
Mon Jul 20 11:23:39 UTC 2015
Source: erc
Version: 5.3-1
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 erc 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 erc-5.3/debian/rules erc-5.3/debian/rules
--- erc-5.3/debian/rules
+++ erc-5.3/debian/rules
@@ -13,6 +13,8 @@
configure-stamp:
touch configure-stamp
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
build: configure-stamp build-stamp
build-stamp:
# Comply with Debian vote 2006-1
@@ -87,6 +89,9 @@
find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
## Generate DEBIAN/control
dpkg-gencontrol -isp -p${PACKAGE} -P${PKGDIR}
+## Fix mtimes before building binary packages
+ find ${PKGDIR} -newermt '$(BUILD_DATE)' -print0 | \
+ xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
## Build the binary package
dpkg --build ${PKGDIR} ..
diff -u erc-5.3/debian/changelog erc-5.3/debian/changelog
--- erc-5.3/debian/changelog
+++ erc-5.3/debian/changelog
@@ -1,3 +1,10 @@
+erc (5.3-1.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 22:06:13 +0200
+
erc (5.3-1) unstable; urgency=low
* debian/control:
More information about the Reproducible-builds
mailing list