[Reproducible-builds] Bug#792981: wmweather: please make the build reproducible

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


Source: wmweather
Version: 2.4.5-2
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 wmweather 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 wmweather-2.4.5/debian/changelog wmweather-2.4.5/debian/changelog
--- wmweather-2.4.5/debian/changelog	2013-12-30 16:28:13.000000000 +0100
+++ wmweather-2.4.5/debian/changelog	2015-07-15 19:36:09.000000000 +0200
@@ -1,3 +1,10 @@
+wmweather (2.4.5-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marivalenm at gmail.com>  Wed, 15 Jul 2015 19:35:49 +0200
+
 wmweather (2.4.5-2) unstable; urgency=low
 
   * Updated build system.
diff -Nru wmweather-2.4.5/debian/rules wmweather-2.4.5/debian/rules
--- wmweather-2.4.5/debian/rules	2013-12-30 16:15:09.000000000 +0100
+++ wmweather-2.4.5/debian/rules	2015-07-15 19:35:47.000000000 +0200
@@ -17,6 +17,8 @@
 export CFLAGS
 export LDFLAGS
 
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)
+
 clean:
 	$(testdir)
 	rm -f build-stamp debian/files debian/substvars
@@ -66,6 +68,8 @@
 	dpkg-shlibdeps debian/wmweather/usr/bin/wmweather
 	dpkg-gencontrol -isp -pwmweather -Pdebian/wmweather
 	chmod -R u+w,go=u-w debian/wmweather
+	find debian/wmweather -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build debian/wmweather ..
 
 binary-indep:


More information about the Reproducible-builds mailing list