Source: enemies-of-carlotta
Version: 1.2.6-4
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]
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
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 <[email protected]> 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)