Source: dbview
Version: 1.0.4-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 dbview  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 dbview-1.0.4/debian/changelog dbview-1.0.4/debian/changelog
--- dbview-1.0.4/debian/changelog
+++ dbview-1.0.4/debian/changelog
@@ -1,3 +1,10 @@
+dbview (1.0.4-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marival...@gmail.com>  Fri, 17 Jul 2015 17:09:05 +0200
+
 dbview (1.0.4-1) unstable; urgency=low
 
   * Fixed typo in NMU-Disclaimer, thanks to Petter Reinholdtsen (See:
diff -u dbview-1.0.4/debian/rules dbview-1.0.4/debian/rules
--- dbview-1.0.4/debian/rules
+++ dbview-1.0.4/debian/rules
@@ -24,6 +24,8 @@
 version = $(shell grep "^$(package) " debian/changelog|head -1 |sed 
's/.*(\(.*\)\-[^\-]*).*/\1/g')
 revision = $(shell grep "^$(package) " debian/changelog|head -1 |sed 
's/.*([^\-]*\-\(.*\)).*/\1/g')
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 installbin = install -o root -g root -m 755
 installdoc = install -o root -g root -m 644
 
@@ -74,6 +76,8 @@
        #
        dpkg-shlibdeps debian/tmp/usr/bin/dbview
        dpkg-gencontrol -isp
+       find debian/tmp -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