diff options
author | Daniel Kahn Gillmor <[email protected]> | 2014-09-23 22:34:32 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-09-24 13:14:46 +0000 |
commit | d620005fd1a655d591fccb44639e22ea445e4554 (patch) | |
tree | 0a3ac368e7d8020a2f6d33e832ea1efeae95ec3b | |
parent | Add new error source GPG_ERR_SOURCE_TLS. (diff) | |
download | libgpg-error-d620005fd1a655d591fccb44639e22ea445e4554.tar.gz libgpg-error-d620005fd1a655d591fccb44639e22ea445e4554.zip |
Allow ./configure to explicitly set libgpg-error's build timestamp
* configure.ac: add --enable-build-timestamp
--
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 (for example)
--enable=build-timestamp=2014-09-23T01:02+0000
Debian-bug-id: 762397
(Minor reformatting and NEWS entry by wk.)
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | configure.ac | 12 |
2 files changed, 14 insertions, 2 deletions
@@ -1,7 +1,9 @@ Noteworthy changes in version 1.17 (unreleased) [C12/A12/R_] ----------------------------------------------- - * Add an errot source code for an TLS protocol library. + * New error source code for TLS protocol libraries. + + * New configure option --enable-build-timestamp. * Interface changes relative to the 1.16 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/configure.ac b/configure.ac index b32b751..4652a2b 100644 --- a/configure.ac +++ b/configure.ac @@ -484,7 +484,17 @@ changequote([,])dnl BUILD_FILEVERSION="${BUILD_FILEVERSION}0,mym4_revision_dec" AC_SUBST(BUILD_FILEVERSION) -BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` + +AC_ARG_ENABLE([build-timestamp], + AC_HELP_STRING([--enable-build-timestamp], + [set an explicit build timestamp for reproducibility. + (default is the current time in ISO-8601 format)]), + [if test "$enableval" = "no"; then + BUILD_TIMESTAMP="<none>" + else + BUILD_TIMESTAMP="$enableval" + fi], + [BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`]) AC_SUBST(BUILD_TIMESTAMP) AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP", [The time this package was configured for a build]) |