[Reproducible-builds] Bug#792970: fortunes-bg: please make the build reproducible
Maria Valentina Marin
marivalenm at gmail.com
Mon Jul 20 11:27:04 UTC 2015
Source: fortunes-bg
Version: 1.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 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
-------------- next part --------------
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 <marivalenm at gmail.com> 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
More information about the Reproducible-builds
mailing list