[Reproducible-builds] Bug#792975: libmsv: please make the build reproducible

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


Source: libmsv
Version: 1.1-1
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 libmsv 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 libmsv-1.1/debian/changelog libmsv-1.1/debian/changelog
--- libmsv-1.1/debian/changelog	2014-03-14 18:19:51.000000000 +0100
+++ libmsv-1.1/debian/changelog	2015-07-14 20:36:34.000000000 +0200
@@ -1,3 +1,10 @@
+libmsv (1.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com>  Tue, 14 Jul 2015 19:53:34 +0200
+
 libmsv (1.1-1) unstable; urgency=medium
 
   * New upstream version.
diff -Nru libmsv-1.1/debian/rules libmsv-1.1/debian/rules
--- libmsv-1.1/debian/rules	2014-03-14 18:16:54.000000000 +0100
+++ libmsv-1.1/debian/rules	2015-07-14 19:53:27.000000000 +0200
@@ -9,6 +9,7 @@
 DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
 
 STRIP=strip
 
@@ -80,12 +81,16 @@
 	dpkg-gencontrol -ldebian/changelog -isp -p$(package) -Tdebian/$(package).substvars -Pdebian/$(package)
 	chown -R root:root debian/$(package)
 	chmod -R go=rX debian/$(package)
+	find debian/$(package) -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/$(package) ..
 
 	cd debian/$(devpkg) && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
 	dpkg-gencontrol -ldebian/changelog -isp -p$(devpkg) -Tdebian/$(devpkg).substvars -Pdebian/$(devpkg)
 	chown -R root:root debian/$(devpkg)
 	chmod -R go=rX debian/$(devpkg)
+	find debian/$(devpkg) -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/$(devpkg) ..
 
 


More information about the Reproducible-builds mailing list