[Reproducible-builds] Bug#793728: the: please make the mtimes reproducible
Maria Valentina Marin
marivalenm at gmail.com
Sun Jul 26 17:55:45 UTC 2015
Source: the
Version: 3.3~rc1-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 the 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. Please also consider this
other bug from the reproducible builds team:
https://bugs.debian.org/777370
Cheers,
akira
[1]: https://wiki.debian.org/ReproducibleBuilds
-------------- next part --------------
diff -Nru the-3.3~rc1/debian/changelog the-3.3~rc1/debian/changelog
--- the-3.3~rc1/debian/changelog 2012-06-30 18:11:25.000000000 +0200
+++ the-3.3~rc1/debian/changelog 2015-07-26 11:22:52.000000000 +0200
@@ -1,3 +1,10 @@
+the (3.3~rc1-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com> Sun, 26 Jul 2015 11:22:39 +0200
+
the (3.3~rc1-2) unstable; urgency=low
* Fixed debian/rules build target.
diff -Nru the-3.3~rc1/debian/rules the-3.3~rc1/debian/rules
--- the-3.3~rc1/debian/rules 2012-06-30 18:11:01.000000000 +0200
+++ the-3.3~rc1/debian/rules 2015-07-26 11:22:35.000000000 +0200
@@ -8,6 +8,7 @@
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
build: build-arch build-indep
build-arch: stamp-build
@@ -61,6 +62,8 @@
chmod -R go=rX debian/tmp-doc
chmod 755 debian/md5_sums
debian/md5_sums tmp-doc
+ find debian/tmp-doc -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
+ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
dpkg --build debian/tmp-doc ..
binary-arch: checkroot build
@@ -91,6 +94,8 @@
chmod -R go=rX debian/tmp*
chmod 755 debian/md5_sums
debian/md5_sums tmp
+ find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
+ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
dpkg --build debian/tmp ..
define checkdir
-------------- 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/6902dce3/attachment.sig>
More information about the Reproducible-builds
mailing list