Source: dpatch Version: 2.0.35 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 dpatch 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 dpatch-2.0.35/debian/changelog dpatch-2.0.35+nmu1/debian/changelog --- dpatch-2.0.35/debian/changelog 2012-02-07 10:09:06.000000000 +0100 +++ dpatch-2.0.35+nmu1/debian/changelog 2015-07-17 17:32:07.000000000 +0200 @@ -1,3 +1,10 @@ +dpatch (2.0.35+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix mtimes before building binary packages to produce reproducible output + + -- akira <[email protected]> Fri, 17 Jul 2015 17:31:49 +0200 + dpatch (2.0.35) unstable; urgency=low * Mark the package Multi-Arch: foreign, thanks Riku Voipio diff -Nru dpatch-2.0.35/debian/rules dpatch-2.0.35+nmu1/debian/rules --- dpatch-2.0.35/debian/rules 2011-10-23 23:17:10.000000000 +0200 +++ dpatch-2.0.35+nmu1/debian/rules 2015-07-17 17:31:46.000000000 +0200 @@ -9,6 +9,8 @@ DOCS = README.History README.source README.svn-mergeWithUpstream +BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) + build-dpatch: test -e debian/control ${MAKE} @@ -72,6 +74,8 @@ find ${DPATCH} -type f -name '*.gz' | xargs chmod 0644 find ${DPATCH}/DEBIAN -type f | xargs chmod 0644 dpkg-gencontrol -isp -P${DPATCH} + find ${DPATCH} -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build ${DPATCH} .. binary-indep: binary-dpatch

