[Reproducible-builds] Bug#793714: rockdodger: please make the mtimes reproducible
Maria Valentina Marin
marivalenm at gmail.com
Sun Jul 26 17:48:59 UTC 2015
Source: rockdodger
Version: 1.0.0-2
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 rockdodger 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 rockdodger-1.0.0/debian/changelog rockdodger-1.0.0/debian/changelog
--- rockdodger-1.0.0/debian/changelog 2015-06-07 18:58:57.000000000 +0200
+++ rockdodger-1.0.0/debian/changelog 2015-07-25 14:25:48.000000000 +0200
@@ -1,3 +1,10 @@
+rockdodger (1.0.0-2.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:25:38 +0200
+
rockdodger (1.0.0-2) unstable; urgency=low
* Fixed reproducible builds, closes: #778205, thanks to Chris Lamb.
diff -Nru rockdodger-1.0.0/debian/rules rockdodger-1.0.0/debian/rules
--- rockdodger-1.0.0/debian/rules 2015-06-07 18:49:12.000000000 +0200
+++ rockdodger-1.0.0/debian/rules 2015-07-25 14:25:36.000000000 +0200
@@ -10,6 +10,8 @@
MOREOPTS = $(CPPFLAGS) $(CFLAGS) -Wall -Werror
export MOREOPTS
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
+
clean:
$(testdir)
rm -f build-stamp debian/files debian/substvars
@@ -62,6 +64,8 @@
dpkg-shlibdeps debian/tmp/usr/games/rockdodger
dpkg-gencontrol -isp -prockdodger
+ find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
+ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
dpkg --build debian/tmp ..
binary-indep:
-------------- 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/cb891ba7/attachment.sig>
More information about the Reproducible-builds
mailing list