Source: xbs
Version: 0-9
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 xbs 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. Once applied, xbs can be built
reproducibly in our current experimental framework.


Cheers,
akira

[1]: https://wiki.debian.org/ReproducibleBuilds



diff -Nru xbs-0/debian/changelog xbs-0/debian/changelog
--- xbs-0/debian/changelog      2015-03-07 23:59:59.000000000 +0100
+++ xbs-0/debian/changelog      2015-07-14 15:14:23.000000000 +0200
@@ -1,3 +1,10 @@
+xbs (0-9.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages
+
+ -- akira <marival...@gmail.com>  Tue, 14 Jul 2015 15:13:30 +0200
+
 xbs (0-9) unstable; urgency=low
 
   * patch from Sylvestre Ledru <sylves...@debian.org> to make this build
diff -Nru xbs-0/debian/rules xbs-0/debian/rules
--- xbs-0/debian/rules  2015-03-07 23:58:40.000000000 +0100
+++ xbs-0/debian/rules  2015-07-14 15:13:21.000000000 +0200
@@ -7,6 +7,8 @@
 
 ddir=`pwd`/debian/tmp
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 build:
        $(checkdir)
        make 
@@ -70,6 +72,8 @@
 # clean permissions and build
        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 ..
 
 define checkdir
_______________________________________________
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