Source: liblip
Version: 2.0.0-1.2
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 liblip 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 liblip-2.0.0/debian/changelog liblip-2.0.0/debian/changelog
--- liblip-2.0.0/debian/changelog
+++ liblip-2.0.0/debian/changelog
@@ -1,3 +1,10 @@
+liblip (2.0.0-1.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marival...@gmail.com>  Tue, 14 Jul 2015 16:59:54 +0200
+
 liblip (2.0.0-1.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u liblip-2.0.0/debian/rules liblip-2.0.0/debian/rules
--- liblip-2.0.0/debian/rules
+++ liblip-2.0.0/debian/rules
@@ -4,6 +4,8 @@
 
 STRIP      = strip --strip-unneeded --remove-section=.comment 
--remove-section=.note
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 build:
        $(checkdir)
        cp -f /usr/share/misc/config.sub .
@@ -69,6 +71,8 @@
        chown -R root.root debian/liblip2
        chmod -x debian/liblip2/usr/lib/lip/*
        chmod -R go=rX debian/liblip2
+       find debian/liblip2 -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build debian/liblip2 ..
 
        dpkg-gencontrol -isp -pliblip-dev -Pdebian/liblip-dev
@@ -77,6 +81,8 @@
        chmod -x debian/liblip-dev/usr/lib/lip/liblip.a
        chmod -x debian/liblip-dev/usr/lib/lip/liblip.la
        chmod -R go=rX debian/liblip-dev
+       find debian/liblip-dev -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build debian/liblip-dev ..
 
 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