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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Sep 24 00:38:50 CEST 2014


On 09/23/2014 06:34 PM, Daniel Kahn Gillmor wrote:
> * configure.ac: add --enable-build-timestamp

apologies for the multiple versions here.  Please disregard v2.

The v3 patch (as seen below) is the right one to use, as it handles
--disable-build-timestamp appropriately.

I find that trying to get it to pass "[none]" through all the autotools
business ends up turning into "none", so i went with "<none>" instead,
which shouldn't be mistaken for an ISO-8601 date format.

	--dkg

>  configure.ac | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index b32b751..c0435b0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -484,7 +484,13 @@ 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])
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20140923/d2dd7956/attachment.sig>


More information about the Gnupg-devel mailing list