[Reproducible-builds] Bug#793713: rbootd: please make the mtimes reproducible

Maria Valentina Marin marivalenm at gmail.com
Sun Jul 26 17:48:10 UTC 2015


Source: rbootd
Version: 2.0-10
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 rbootd 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. Please also consider this
other bug from the reproducible builds team:
https://bugs.debian.org/776951

Cheers,
akira

[1]: https://wiki.debian.org/ReproducibleBuilds

-------------- next part --------------
diff -u rbootd-2.0/debian/changelog rbootd-2.0/debian/changelog
--- rbootd-2.0/debian/changelog
+++ rbootd-2.0/debian/changelog
@@ -1,3 +1,10 @@
+rbootd (2.0-10.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com>  Sat, 25 Jul 2015 14:12:03 +0200
+
 rbootd (2.0-10) unstable; urgency=low
 
   * New-Maintainer upload (closes: Bug#465907)
diff -u rbootd-2.0/debian/rules rbootd-2.0/debian/rules
--- rbootd-2.0/debian/rules
+++ rbootd-2.0/debian/rules
@@ -25,6 +25,8 @@
 
 export BASEDIR=$(shell pwd)/debian/tmp
 
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
+
 ## Note must use the special makefile to avoid needing BSD make
 
 build:
@@ -83,6 +85,8 @@
 	dpkg-gencontrol -isp
 	chown -R root.root debian/tmp
 	chmod -R go-ws debian/tmp
+	find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
+		xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
 	dpkg --build debian/tmp ..
 
 define checkdir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150726/df0cdb52/attachment.sig>


More information about the Reproducible-builds mailing list