[Reproducible-builds] Bug#792972: libjama: please make the build reproducible

Maria Valentina Marin marivalenm at gmail.com
Mon Jul 20 11:28:26 UTC 2015


Source: libjama
Version: 1.2.4-2
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 libjama 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 libjama-1.2.4/debian/changelog libjama-1.2.4/debian/changelog
--- libjama-1.2.4/debian/changelog
+++ libjama-1.2.4/debian/changelog
@@ -1,3 +1,10 @@
+libjama (1.2.4-2.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 16:33:43 +0200
+
 libjama (1.2.4-2) unstable; urgency=low
 
   * Fixed include path to TNT, closes: #383466.
diff -u libjama-1.2.4/debian/rules libjama-1.2.4/debian/rules
--- libjama-1.2.4/debian/rules
+++ libjama-1.2.4/debian/rules
@@ -4,6 +4,8 @@
 
 binary: binary-arch binary-indep
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 binary-arch:
 
 binary-indep: build
@@ -25,6 +27,8 @@
 	chmod 644 debian/tmp/usr/share/doc/libjama-dev/html-jama.tar.gz
 
 	dpkg-gencontrol -isp
+	find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/tmp ..
 
 build:


More information about the Reproducible-builds mailing list