Source: libf2c2
Version: 1.0-4.1
Severity: wishlist
Tags: patch
User: reproducible-builds@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
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}  ..
 
 

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to