Source: jargon
Version: 4.0.0-5.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 jargon 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 jargon-4.0.0/debian/changelog jargon-4.0.0/debian/changelog
--- jargon-4.0.0/debian/changelog
+++ jargon-4.0.0/debian/changelog
@@ -1,3 +1,10 @@
+jargon (4.0.0-5.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marival...@gmail.com>  Sun, 19 Jul 2015 14:50:54 +0200
+
 jargon (4.0.0-5.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -u jargon-4.0.0/debian/rules jargon-4.0.0/debian/rules
--- jargon-4.0.0/debian/rules
+++ jargon-4.0.0/debian/rules
@@ -11,6 +11,8 @@
 MANDIR=$(DESTDIR)/usr/share/man
 INFODIR=$(DESTDIR)/usr/share/info
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 build:
        $(checkdir)
        touch build
@@ -52,6 +54,8 @@
        dpkg-gencontrol -isp
        chown -R root.root debian/tmp
        chmod -R go=rX 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
_______________________________________________
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