[Reproducible-builds] Bug#792969: flowscan: please make the build reproducible

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


Source: flowscan
Version: 1.006-13.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 flowscan 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 flowscan-1.006/debian/rules flowscan-1.006/debian/rules
--- flowscan-1.006/debian/rules
+++ flowscan-1.006/debian/rules
@@ -9,6 +9,8 @@
 
 binary: binary-arch binary-indep
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 binary-arch:
 
 binary-indep: build
@@ -59,6 +61,8 @@
 
 	dpkg-shlibdeps debian/tmp/usr/bin/*
 	dpkg-gencontrol -isp
+	find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/tmp ..
 
 build:
diff -u flowscan-1.006/debian/changelog flowscan-1.006/debian/changelog
--- flowscan-1.006/debian/changelog
+++ flowscan-1.006/debian/changelog
@@ -1,3 +1,10 @@
+flowscan (1.006-13.3) 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:20:28 +0200
+
 flowscan (1.006-13.2) unstable; urgency=low
 
   * Non-maintainer upload.


More information about the Reproducible-builds mailing list