Bug#920409: splitpatch: please make the build reproducible
Chris Lamb
lamby at debian.org
Fri Jan 25 07:44:24 GMT 2019
Source: splitpatch
Version: 1.0+20170926+git322ebca-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that splitpatch could not be built reproducibly.
This is because the embedded pod2man.mk uses the current build
date.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch 2019-01-25 08:42:48.543410438 +0100
@@ -0,0 +1,21 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2019-01-25
+
+--- splitpatch-1.0+20170926+git322ebca.orig/man/pod2man.mk
++++ splitpatch-1.0+20170926+git322ebca/man/pod2man.mk
+@@ -36,7 +36,13 @@ RELEASE ?= $(PACKAGE)
+
+ # Optional variables to set
+ MANSECT ?= 1
+-PODCENTER ?= $$(date "+%Y-%m-%d")
++
++DATE_FMT = %Y-%m-%d
++ifdef SOURCE_DATE_EPOCH
++PODCENTER ?= $$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
++else
++PODCENTER ?= $$(date "$(DATE_FMT)")
++endif
+
+ # Directories
+ MANSRC =
--- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series 2019-01-25 08:42:47.423403838 +0100
@@ -0,0 +1 @@
+reproducible-build.patch
More information about the Reproducible-bugs
mailing list