Source: xtrlock
Version: 2.7
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that xtrlock could not be built reproducibly.

The attached patch fixes the files mtime before building the binary
packages. Once applied, xtrlockcan be built reproducibly in our current
experimental framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds
-- 
Dhole
diff --git a/xtrlock-2.7/debian/rules b/xtrlock-2.7/debian/rules
index 91b1572..8cb574e 100755
--- a/xtrlock-2.7/debian/rules
+++ b/xtrlock-2.7/debian/rules
@@ -8,6 +8,7 @@ arch=$(shell dpkg --print-architecture)
 STRIP=strip
 
 DPKG_EXPORT_BUILDFLAGS = 1
+BUILD_DATE=$(shell dpkg-parsechangelog --show-field Date)
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 include /usr/share/dpkg/buildflags.mk
 
@@ -60,6 +61,8 @@ binary-arch:  checkroot build
        chown root.shadow debian/tmp/usr/bin/xtrlock
        chmod -R g-w debian/tmp
        chmod 2755 debian/tmp/usr/bin/xtrlock
+       find debian/tmp -depth -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build debian/tmp ..
 
 binary:        binary-indep binary-arch
_______________________________________________
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