Brad Bishop | 0011132 | 2018-04-01 22:23:53 -0400 | [diff] [blame] | 1 | If SOURCE_DATE_EPOCH is present in the environment, use it as build date. |
| 2 | Also make sure to use UTC time. |
| 3 | |
| 4 | Upstream-Status: Backport [ https://github.com/openssl/openssl/blob/master/util/mkbuildinf.pl ] |
| 5 | |
| 6 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> |
| 7 | |
| 8 | --- mkbuildinf.pl 2018-03-06 14:20:09.438048058 -0800 |
| 9 | +++ mkbuildinf.pl 2018-03-06 14:19:20.722045632 -0800 |
| 10 | --- a/util/mkbuildinf.pl |
| 11 | +++ b/util/mkbuildinf.pl |
| 12 | @@ -3,7 +3,8 @@ |
| 13 | my ($cflags, $platform) = @ARGV; |
| 14 | |
| 15 | $cflags = "compiler: $cflags"; |
| 16 | -$date = localtime(); |
| 17 | +my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC"; |
| 18 | + |
| 19 | print <<"END_OUTPUT"; |
| 20 | #ifndef MK1MF_BUILD |
| 21 | /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */ |