[Reproducible-builds] Bug#788001: libf2c2: please make the build reproducible

Dhole dhole at openmailbox.org
Sun Jun 7 16:08:03 UTC 2015


Source: libf2c2
Version: 1.0-4.1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that libf2c2 could not be built reproducibly.

The attached patch sets the files mtime to a known value (last debian
package changelog date) before calling `dpkg --build` to generate the
binary packages. Once applied, libf2c2 can be built reproducibly in our
current experimental framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds

-- 
Dhole
-------------- next part --------------
diff --git a/libf2c2-20090411/debian/rules b/libf2c2-20090411/debian/rules
index 3081474..2354c5f 100755
--- a/libf2c2-20090411/debian/rules
+++ b/libf2c2-20090411/debian/rules
@@ -10,6 +10,7 @@ prefix-dev=debian/libf2c2-dev
 prefix=debian/libf2c2
 
 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+BUILD_DATE=$(shell dpkg-parsechangelog --show-field Date)
 
 dir=$(package)-$(version)
 file=$(package)_$(version)-$(debian)
@@ -144,7 +145,11 @@ endif
 	chown -R root.root ${prefix}
 	chmod -R go-ws ${prefix-dev}
 	chmod -R go-ws ${prefix}
+	find ${prefix-dev} -depth -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build ${prefix-dev}  ..
+	find ${prefix} -depth -newermt '$(BUILD_DATE)' -print0 | \
+		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
 	dpkg --build ${prefix}  ..
 
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150607/9ffb3ede/attachment.sig>


More information about the Reproducible-builds mailing list