[Reproducible-builds] Bug#792961: enemies-of-carlotta: please make the build reproducible

Maria Valentina Marin marivalenm at gmail.com
Mon Jul 20 11:23:14 UTC 2015


Source: enemies-of-carlotta
Version: 1.2.6-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 enemies-of-carlotta 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 enemies-of-carlotta-1.2.6/debian/rules enemies-of-carlotta-1.2.6/debian/rules
--- enemies-of-carlotta-1.2.6/debian/rules
+++ enemies-of-carlotta-1.2.6/debian/rules
@@ -2,6 +2,8 @@
 
 package=enemies-of-carlotta
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 build:
 	$(MAKE) check
 
@@ -41,6 +43,8 @@
 	dpkg-gencontrol -isp
 	chown -R root.root debian/tmp
 	chmod -R o-s,go=u,go-ws debian/tmp
+	find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/tmp ..
 
 binary-arch:
diff -u enemies-of-carlotta-1.2.6/debian/changelog enemies-of-carlotta-1.2.6/debian/changelog
--- enemies-of-carlotta-1.2.6/debian/changelog
+++ enemies-of-carlotta-1.2.6/debian/changelog
@@ -1,3 +1,10 @@
+enemies-of-carlotta (1.2.6-4.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 18:02:51 +0200
+
 enemies-of-carlotta (1.2.6-4) unstable; urgency=high
 
   * Switched from deprecated md5 to hashlib (closes: #596623)


More information about the Reproducible-builds mailing list