summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl10/reproducible-mkbuildinf.patch
blob: b556731219bc4170c270a83245aad064877355ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
If SOURCE_DATE_EPOCH is present in the environment, use it as build date.
Also make sure to use UTC time.

Upstream-Status: Backport [ https://github.com/openssl/openssl/blob/master/util/mkbuildinf.pl ]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>

--- mkbuildinf.pl	2018-03-06 14:20:09.438048058 -0800
+++ mkbuildinf.pl	2018-03-06 14:19:20.722045632 -0800
--- a/util/mkbuildinf.pl
+++ b/util/mkbuildinf.pl
@@ -3,7 +3,8 @@
 my ($cflags, $platform) = @ARGV;
 
 $cflags = "compiler: $cflags";
-$date = localtime();
+my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC";
+
 print <<"END_OUTPUT";
 #ifndef MK1MF_BUILD
     /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */