Source: sendfile
Version: 2.1b.20080616-5.3
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that sendfile 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. Please also consider this
other bug from the reproducible builds team:
https://bugs.debian.org/776938

Cheers,
akira

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

diff -u sendfile-2.1b.20080616/debian/changelog 
sendfile-2.1b.20080616/debian/changelog
--- sendfile-2.1b.20080616/debian/changelog
+++ sendfile-2.1b.20080616/debian/changelog
@@ -1,3 +1,10 @@
+sendfile (2.1b.20080616-5.4) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix mtimes before building binary packages to produce reproducible output
+
+ -- akira <marival...@gmail.com>  Sat, 25 Jul 2015 15:21:43 +0200
+
 sendfile (2.1b.20080616-5.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u sendfile-2.1b.20080616/debian/rules sendfile-2.1b.20080616/debian/rules
--- sendfile-2.1b.20080616/debian/rules
+++ sendfile-2.1b.20080616/debian/rules
@@ -31,6 +31,8 @@
 STRIP = -s
 endif
 
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 
-SDate)" +%s)
+
 build:
        cp -f /usr/share/misc/config.sub  develop/
        cp -f /usr/share/misc/config.guess develop/
@@ -119,6 +121,8 @@
        #
        dpkg-shlibdeps 
debian/tmp/usr/bin/{sendfile,receive,sendmsg,utf7encode,fetchfile,wlock}
        dpkg-gencontrol -isp
+       find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
+               xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
        dpkg --build debian/tmp ..
 
 binary: binary-indep binary-arch

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