Source: netmaze
Version: 0.81+jpg0.82-14.1
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 netmaze 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/778200

Cheers,
akira

[1]: https://wiki.debian.org/ReproducibleBuilds
diff -u netmaze-0.81+jpg0.82/debian/changelog 
netmaze-0.81+jpg0.82/debian/changelog
--- netmaze-0.81+jpg0.82/debian/changelog
+++ netmaze-0.81+jpg0.82/debian/changelog
@@ -1,3 +1,10 @@
+netmaze (0.81+jpg0.82-14.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marival...@gmail.com>  Fri, 24 Jul 2015 14:42:41 +0200
+
 netmaze (0.81+jpg0.82-14.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u netmaze-0.81+jpg0.82/debian/rules netmaze-0.81+jpg0.82/debian/rules
--- netmaze-0.81+jpg0.82/debian/rules
+++ netmaze-0.81+jpg0.82/debian/rules
@@ -22,6 +22,7 @@
        OPTLEVEL=-O3
 endif
 
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 
-SDate)" +%s)
 
 build:
        xmkmf
@@ -64,6 +65,8 @@
        dpkg-gencontrol -isp
        chown -R root.root debian/tmp
        chmod -R go-ws,go+r debian/tmp
+       find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
+               xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
        dpkg --build debian/tmp ..
 
 clean:

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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