[Reproducible-builds] Bug#792999: console-cyrillic: please make the build reproducible
Maria Valentina Marin
marivalenm at gmail.com
Mon Jul 20 11:52:56 UTC 2015
Source: console-cyrillic
Version: 0.9-16.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 console-cyrillic 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 -u console-cyrillic-0.9/debian/changelog console-cyrillic-0.9/debian/changelog
--- console-cyrillic-0.9/debian/changelog
+++ console-cyrillic-0.9/debian/changelog
@@ -1,3 +1,10 @@
+console-cyrillic (0.9-16.3) 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 16:29:06 +0200
+
console-cyrillic (0.9-16.2) unstable; urgency=low
* Non-maintainer upload.
diff -u console-cyrillic-0.9/debian/rules console-cyrillic-0.9/debian/rules
--- console-cyrillic-0.9/debian/rules
+++ console-cyrillic-0.9/debian/rules
@@ -14,6 +14,8 @@
kazakh=debian/binary/console-kazakh-0.2b
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
debian/binary.tar.gz.uu:
$(checkdir)
cd debian && tar cf - binary | gzip -9 | uuencode binary.tar.gz >binary.tar.gz.uu
@@ -140,6 +142,8 @@
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R go=rX,u=rwX debian/tmp
+ find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+ xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
dpkg --build debian/tmp ..
binary-arch: checkroot build
More information about the Reproducible-builds
mailing list