[PATCH] Allow ./configure to explicitly set libgpg-error's build timestamp

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Sep 22 21:40:45 CEST 2014

A group within Debian is working on making the archive rebuildable in
a reproducible way, so that the compiled binary outputs are
byte-for-byte identical when built for the same platform using the
same toolchain.  This is useful in providing auditability and
corroboration for users of the operating system.

libgpg-error is very close to reproducible except for embedding the
build timestamp in the generated binary.  This timestamp is set in
config.h during ./configure.

This patch allows an external build system to set this embedded
timestamp explicitly, which appears to make the package build
repeatably when ./configure is called with EXTERNAL_BUILD_TIMESTAMP

Debian-bug-id: 762397
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index b32b751..1093077 100644
--- a/configure.ac
+++ b/configure.ac
@@ -484,7 +484,11 @@ changequote([,])dnl
-BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
+if test "$EXTERNAL_BUILD_TIMESTAMP" = ''; then
+   BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
                    [The time this package was configured for a build])

More information about the Gnupg-devel mailing list