[Reproducible-builds] Bug#792986: uruk: please make the build reproducible

Maria Valentina Marin marivalenm at gmail.com
Mon Jul 20 11:41:06 UTC 2015


Source: uruk
Version:20150401-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 uruk 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. Once applied, uruk can be
built reproducibly in our current experimental framework.


Cheers,
akira

[1]: https://wiki.debian.org/ReproducibleBuilds


-------------- next part --------------
diff -Nru uruk-20150401/debian/changelog uruk-20150401/debian/changelog
--- uruk-20150401/debian/changelog	2015-05-12 21:21:41.000000000 +0200
+++ uruk-20150401/debian/changelog	2015-07-14 15:07:03.000000000 +0200
@@ -1,3 +1,10 @@
+uruk (20150401-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marivalenm at gmail.com>  Tue, 14 Jul 2015 15:06:27 +0200
+
 uruk (20150401-1) unstable; urgency=low
 
   * New upstream release: The Gorp en Roovert Release (missed: uruk version
diff -Nru uruk-20150401/debian/rules uruk-20150401/debian/rules
--- uruk-20150401/debian/rules	2015-05-12 21:21:41.000000000 +0200
+++ uruk-20150401/debian/rules	2015-07-14 15:03:38.000000000 +0200
@@ -17,6 +17,8 @@
 package=uruk
 docdir = debian/$(package)/usr/share/doc/$(package)
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 define checkdir
 	test -f debian/rules
 endef
@@ -89,6 +91,8 @@
         done
 	chown -R root.root debian/$(package)
 	chmod -R go=rX debian/$(package)
+	find debian/$(package) -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/$(package) ..
 
 binary-arch: checkroot build


More information about the Reproducible-builds mailing list