Source: argus-client
Version: 2.0.6.fixes.1-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that argus-client 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 argus-client-2.0.6.fixes.1/debian/rules 
argus-client-2.0.6.fixes.1/debian/rules
--- argus-client-2.0.6.fixes.1/debian/rules
+++ argus-client-2.0.6.fixes.1/debian/rules
@@ -16,6 +16,8 @@
 OLDSUB=./config/config.sub
 OLDGUESS=./config/config.guess
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 CFLAGS += -O0
 else
@@ -185,6 +187,8 @@
        
        dpkg-shlibdeps $(tmp)/$(bindir)/*
        dpkg-gencontrol -ips -p$(PACKAGE) -P$(tmp)
+       find $(tmp) -newermt '$(BUILD_DATE)' -print0 | \
+               xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build $(tmp) ..
 
 
diff -u argus-client-2.0.6.fixes.1/debian/changelog 
argus-client-2.0.6.fixes.1/debian/changelog
--- argus-client-2.0.6.fixes.1/debian/changelog
+++ argus-client-2.0.6.fixes.1/debian/changelog
@@ -1,3 +1,10 @@
+argus-client (2.0.6.fixes.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <[email protected]>  Wed, 15 Jul 2015 23:26:49 +0200
+
 argus-client (2.0.6.fixes.1-3) unstable; urgency=low
 
   * Applied patch from Xavier Renaut to make ragraph generate PNG graphs

Reply via email to