Source: chimera2
Version: 2.0a19-8
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that chimera2 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 -u chimera2-2.0a19/debian/rules chimera2-2.0a19/debian/rules
--- chimera2-2.0a19/debian/rules
+++ chimera2-2.0a19/debian/rules
@@ -9,6 +9,8 @@
 
 package=chimera2
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALLOPT=
 else
@@ -63,6 +65,8 @@
        dpkg-gencontrol -isp
        chown -R root.root debian/tmp
        chmod -R g-ws debian/tmp
+       find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build debian/tmp ..
 
 define checkdir
diff -u chimera2-2.0a19/debian/changelog chimera2-2.0a19/debian/changelog
--- chimera2-2.0a19/debian/changelog
+++ chimera2-2.0a19/debian/changelog
@@ -1,3 +1,10 @@
+chimera2 (2.0a19-8.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marival...@gmail.com>  Fri, 17 Jul 2015 16:05:52 +0200
+
 chimera2 (2.0a19-8) unstable; urgency=low
 
   * Fix segfault with font handling - Thanks to Flos Lonicera for patch
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to