[Reproducible-builds] Bug#787996: cloop: please make the build reproducible
Dhole
dhole at openmailbox.org
Sun Jun 7 15:57:02 UTC 2015
Source: cloop
Version: 3.14.1.2
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 cloop could not be built reproducibly.
The attached patch tells tar to set the files timestamps to a known
value (last debian package changelog date). Once applied, cloop can be
built reproducibly in our current experimental framework.
[1]: https://wiki.debian.org/ReproducibleBuilds
--
Dhole
-------------- next part --------------
diff --git a/cloop-3.14.1.2/debian/rules b/cloop-3.14.1.2/debian/rules
index 80a8480..6e33449 100755
--- a/cloop-3.14.1.2/debian/rules
+++ b/cloop-3.14.1.2/debian/rules
@@ -7,6 +7,7 @@ include /usr/share/dpkg/architecture.mk
CFLAGS += -flto
CXXFLAGS += -flto
LDFLAGS += -flto
+BUILD_DATE := $(shell dpkg-parsechangelog --show-field=Date)
XDIR=debian/cloop-src/usr/src/modules/cloop
@@ -28,4 +29,4 @@ override_dh_auto_install:
cp Makefile *.c *.h README ChangeLog $(XDIR)
cd debian && install rules.m-a ../$(XDIR)/debian/rules && cp -r po compat control* copyright *_KVERS_* README.Debian changelog ../$(XDIR)/debian
dh_fixperms -i -Xrules
- cd debian/cloop-src/usr/src && XZ_OPT=-9 tar --xz -c -f cloop.tar.xz modules && rm -rf modules
+ cd debian/cloop-src/usr/src && XZ_OPT=-9 tar --xz -c --mtime="$(BUILD_DATE)" -f cloop.tar.xz modules && rm -rf modules
-------------- 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/b98848f7/attachment.sig>
More information about the Reproducible-builds
mailing list