diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2018-03-10 11:27:29 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-26 15:06:25 +0100 |
commit | 5a7cf3296715ac6543a171984fd09168bf73d1af (patch) | |
tree | 083c8cb11cf0ab4252a14f06ead7c6ea1842e7bf /meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch | |
parent | d06cf17109a2ca310c270ce4a27a15cb6190e2ff (diff) | |
download | openembedded-core-5a7cf3296715ac6543a171984fd09168bf73d1af.tar.gz |
openssl_1.0.2n: improve reproducibility
Improve reproducible build of:
openssl-staticdev
openssl-dbg
libcrypto
There are two main causes that prevent reproducible build, both related to
the generated file "buildinf.h":
1. "buildinf.h" contains build host CFLAGS, containing various build
host references. We need to pass sanitized CFLAGS to the script
generating this file ("mkbuildinf.pl". )
2. We also need to modify the script "mkbuildinf.pl" itsel in order to
generate a build timestamp based on SOURCE_DATE_EPOCH, if present in
the environment.
(From OE-Core rev: 6c556ed3553d8f5e75d65cd7db92b26df43846b7)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch b/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch new file mode 100644 index 0000000000..b556731219 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch @@ -0,0 +1,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 */ |