Source: chiark-utils Version: 4.4.2 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 chiark-utils 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 -Nru chiark-utils-4.4.2/debian/changelog chiark-utils-4.4.2+nmu1/debian/changelog --- chiark-utils-4.4.2/debian/changelog 2014-12-21 16:14:10.000000000 +0100 +++ chiark-utils-4.4.2+nmu1/debian/changelog 2015-07-17 00:14:23.000000000 +0200 @@ -1,3 +1,10 @@ +chiark-utils (4.4.2+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix mtimes before building binary packages to produce reproducible output + + -- akira <[email protected]> Fri, 17 Jul 2015 00:14:00 +0200 + chiark-utils (4.4.2) unstable; urgency=low Copyright licencing fixes: diff -Nru chiark-utils-4.4.2/debian/rules chiark-utils-4.4.2+nmu1/debian/rules --- chiark-utils-4.4.2/debian/rules 2014-10-26 15:20:47.000000000 +0100 +++ chiark-utils-4.4.2+nmu1/debian/rules 2015-07-17 00:13:56.000000000 +0200 @@ -9,6 +9,8 @@ packages_arch= chiark-rwbuffer chiark-really chiark-utils-bin packages= $(packages_indep) $(packages_arch) +BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) + cwd= $(shell pwd) d= $(cwd)/debian t= $d/tmp @@ -113,6 +115,8 @@ chown -R root.root debian/tmp chmod -R g-ws debian/tmp debian/rules binary-hook-$p + find $t/$p -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build $t/$p .. binary-indep: checkroot build binary-prep

