fix: let util/mkbuildinf.pl use SOURCE_DATE_EPOCH, even if it's zero

Doing this allows reproducible builds, for those who want this.

Fixes #25475

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25699)
This commit is contained in:
Richard Levitte 2024-10-15 14:25:34 +02:00
parent 6bb62ab826
commit 7b36037e22

View File

@ -12,7 +12,9 @@ use warnings;
my ($cflags, $platform) = @ARGV;
$cflags = "compiler: $cflags";
my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC";
# Use the value of the envvar SOURCE_DATE_EPOCH, even if it's
# zero or the empty string.
my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} // time()) . " UTC";
print <<"END_OUTPUT";
/*