[Reproducible-builds] Bug#792991: gpsmanshp: please make the build reproducible

Maria Valentina Marin marivalenm at gmail.com
Mon Jul 20 11:45:30 UTC 2015


Source: gpsmanshp
Version: 1.2.3-4
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that gpsmanshp 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


-------------- next part --------------
diff -Nru gpsmanshp-1.2.3/debian/changelog gpsmanshp-1.2.3/debian/changelog
--- gpsmanshp-1.2.3/debian/changelog	2013-10-11 09:06:04.000000000 +0200
+++ gpsmanshp-1.2.3/debian/changelog	2015-07-19 14:06:26.000000000 +0200
@@ -1,3 +1,10 @@
+gpsmanshp (1.2.3-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output 
+
+ -- akira <marivalenm at gmail.com>  Sun, 19 Jul 2015 14:06:15 +0200
+
 gpsmanshp (1.2.3-4) unstable; urgency=low
 
   * Fixed permissions of some control files
diff -Nru gpsmanshp-1.2.3/debian/rules gpsmanshp-1.2.3/debian/rules
--- gpsmanshp-1.2.3/debian/rules	2013-10-11 09:18:35.000000000 +0200
+++ gpsmanshp-1.2.3/debian/rules	2015-07-19 14:06:12.000000000 +0200
@@ -10,6 +10,8 @@
 
 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 build: 
 	$(MAKE) -f Makefile TCLVERSION=$(TCLVERSION) LDFLAGS=$(LDFLAGS)
 
@@ -53,6 +55,8 @@
 	dpkg-shlibdeps $(INSTALLDIR)/gpsmanshp.so
 	dpkg-gencontrol -isp
 	(cd $(TMPROOT) ; md5sum usr/lib/tcl$(TCLVERSION)/gpsmanshp.so > DEBIAN/md5sums ; md5sum usr/share/doc/gpsmanshp/* >>  DEBIAN/md5sums ; md5sum usr/share/doc/gpsmanshp/html/*  >>  DEBIAN/md5sums ; chmod 644 DEBIAN/md5sums)
+	find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
+xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg-deb --build $(TMPROOT) ..
 
 binary: binary-arch


More information about the Reproducible-builds mailing list