[Reproducible-builds] Bug#793006: dropbear: please make build reproducible

Maria Valentina Marin marivalenm at gmail.com
Mon Jul 20 11:55:35 UTC 2015


Source: dropbear
Version:  2014.65-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 dropbear 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 dropbear-2014.65/debian/changelog dropbear-2014.65/debian/changelog
--- dropbear-2014.65/debian/changelog
+++ dropbear-2014.65/debian/changelog
@@ -1,3 +1,10 @@
+dropbear (2014.65-1.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 17:44:26 +0200
+
 dropbear (2014.65-1) unstable; urgency=low
 
   [ Matt Johnston ]
diff -u dropbear-2014.65/debian/rules dropbear-2014.65/debian/rules
--- dropbear-2014.65/debian/rules
+++ dropbear-2014.65/debian/rules
@@ -27,6 +27,8 @@
 
 DIR =$(shell pwd)/debian/dropbear
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 patch: deb-checkdir patch-stamp
 patch-stamp:
 	for i in `ls -1 debian/diff/*.diff || :`; do \
@@ -117,6 +119,8 @@
 	  dpkg-shlibdeps '$(DIR)'/usr/sbin/* '$(DIR)'/usr/bin/* \
 	    '$(DIR)'/usr/lib/dropbear/*
 	dpkg-gencontrol -isp -pdropbear -P'$(DIR)'
+	find '$(DIR)' -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg -b '$(DIR)' ..
 
 binary: binary-arch binary-indep


More information about the Reproducible-builds mailing list