[Reproducible-builds] Bug#795987: pngcheck: please make the build reproducible
Dhole
dhole at openmailbox.org
Tue Aug 18 13:30:52 UTC 2015
Source: pngcheck
Version: 2.3.0-7
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 pngcheck could not be built reproducibly.
The attached patch sets the embedded date in the man pages generated by
podman to the latest debian/changelog entry timestamp instead of local
date. Once applied, pngcheck can be built reproducibly in our current
experimental framework.
[1]: https://wiki.debian.org/ReproducibleBuilds
Regards,
--
Dhole
-------------- next part --------------
diff -Nru pngcheck-2.3.0/debian/changelog pngcheck-2.3.0/debian/changelog
--- pngcheck-2.3.0/debian/changelog 2013-06-26 11:28:27.000000000 +0200
+++ pngcheck-2.3.0/debian/changelog 2015-08-17 11:59:26.000000000 +0200
@@ -1,3 +1,11 @@
+pngcheck (2.3.0-7.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Replace man timestamp by SOURCE_DATE_EPOCH to make the package build
+ reproducibly.
+
+ -- Eduard Sanou <dhole at openmailbox.org> Mon, 17 Aug 2015 11:59:03 +0200
+
pngcheck (2.3.0-7) unstable; urgency=low
* debian/control
diff -Nru pngcheck-2.3.0/debian/pod2man.mk pngcheck-2.3.0/debian/pod2man.mk
--- pngcheck-2.3.0/debian/pod2man.mk 2013-06-26 11:28:27.000000000 +0200
+++ pngcheck-2.3.0/debian/pod2man.mk 2015-08-17 12:07:46.000000000 +0200
@@ -36,7 +36,11 @@
# Optional variables to set
MANSECT ?= 1
-PODCENTER ?= $$(date "+%Y-%m-%d")
+ifdef SOURCE_DATE_EPOCH
+ PODCENTER ?= $$(date -u -d @${SOURCE_DATE_EPOCH} "+%Y-%m-%d")
+else
+ PODCENTER ?= $$(date "+%Y-%m-%d")
+endif
# Directories
MANSRC =
diff -Nru pngcheck-2.3.0/debian/rules pngcheck-2.3.0/debian/rules
--- pngcheck-2.3.0/debian/rules 2013-06-26 11:28:27.000000000 +0200
+++ pngcheck-2.3.0/debian/rules 2015-08-17 11:56:05.000000000 +0200
@@ -6,6 +6,7 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic -DUSE_ZLIB
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
LIBS = -lz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150818/e3bc2017/attachment.sig>
More information about the Reproducible-builds
mailing list