Source: fortunes-bg Version: 1.1 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 fortunes-bg 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 fortunes-bg-1.1/changelog fortunes-bg-1.1+nmu1/changelog --- fortunes-bg-1.1/changelog 2004-11-30 04:56:58.000000000 +0100 +++ fortunes-bg-1.1+nmu1/changelog 2015-07-17 22:23:40.000000000 +0200 @@ -1,3 +1,10 @@ +fortunes-bg (1.1+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix mtimes before building binary packages to produce reproducible output + + -- akira <[email protected]> Fri, 17 Jul 2015 22:23:29 +0200 + fortunes-bg (1.1) unstable; urgency=low * The text of GPL (ver. 1) included directly in the copyright file. diff -Nru fortunes-bg-1.1/Makefile fortunes-bg-1.1+nmu1/Makefile --- fortunes-bg-1.1/Makefile 2004-11-09 02:40:45.000000000 +0100 +++ fortunes-bg-1.1+nmu1/Makefile 2015-07-17 22:23:26.000000000 +0200 @@ -10,6 +10,8 @@ FORTUNEROOT=/usr/share/games/fortunes +BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) + build: $(compiled) $(u8) rm -r bg/ mkdir bg @@ -42,6 +44,8 @@ dpkg-gencontrol -isp chown -R root.root tmp chmod -R go=rX,u=rwX tmp + find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build tmp .. binary-arch: checkroot build diff -Nru fortunes-bg-1.1/rules fortunes-bg-1.1+nmu1/rules --- fortunes-bg-1.1/rules 2004-11-09 02:40:45.000000000 +0100 +++ fortunes-bg-1.1+nmu1/rules 2015-07-17 22:23:26.000000000 +0200 @@ -10,6 +10,8 @@ FORTUNEROOT=/usr/share/games/fortunes +BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date) + build: $(compiled) $(u8) rm -r bg/ mkdir bg @@ -42,6 +44,8 @@ dpkg-gencontrol -isp chown -R root.root tmp chmod -R go=rX,u=rwX tmp + find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build tmp .. binary-arch: checkroot build

