From 797c4187b0426247d74163e71702963bbeacb7a6 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Tue, 4 Jul 2017 09:23:41 +0200 Subject: [PATCH] Allow to not include build date, hostname, user if indicated by the environment to allow for reproducible builds This is slightly stretching the definition of the variable defined at https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Bernhard M. Wiedemann --- configure.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.c b/configure.c index b227d5a6..75006e88 100644 --- a/configure.c +++ b/configure.c @@ -1285,7 +1285,9 @@ make_build_data(char *target) lower_case(target_data.program, progname); fprintf(fp4, "char *build_command = \"%s\";\n", progname); - if (strlen(hostname)) + if (getenv("SOURCE_DATE_EPOCH")) + fprintf(fp4, "char *build_data = \"reproducible build\";\n"); + else if (strlen(hostname)) fprintf(fp4, "char *build_data = \"%s by %s on %s\";\n", strip_linefeeds(inbuf1), inbuf2, hostname); else