Source: logapp
Version: 0.15-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 logapp 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 logapp-0.15/debian/rules logapp-0.15/debian/rules
--- logapp-0.15/debian/rules
+++ logapp-0.15/debian/rules
@@ -34,6 +34,8 @@
 INSTALL_PROGRAM += -s
 endif
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 build: build-stamp
 
 build-stamp: patch
@@ -82,6 +84,8 @@
        $(INSTALL_DIR) $(PACKAGE_DIR)/DEBIAN
        cd $(PACKAGE_DIR) && find * -type f ! -regex '^DEBIAN/.*' -print0 | 
xargs -r0 md5sum > DEBIAN/md5sums
        dpkg-gencontrol -p$(PACKAGE_NAME) -P$(PACKAGE_DIR)
+       find $(PACKAGE_DIR) -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg-deb --build $(PACKAGE_DIR) ..
 
 binary: binary-indep binary-arch
diff -u logapp-0.15/debian/changelog logapp-0.15/debian/changelog
--- logapp-0.15/debian/changelog
+++ logapp-0.15/debian/changelog
@@ -1,3 +1,10 @@
+logapp (0.15-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marival...@gmail.com>  Tue, 14 Jul 2015 21:36:22 +0200
+
 logapp (0.15-1) unstable; urgency=low
 
   * New upstream release
_______________________________________________
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