Skip to contentSkip to conversation

openssl: output the configure data in do_configure

PATCH New Ross Burton 1 participant 2 messages Nov 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 openssl: output the configure data in do_configure

To aid debugging configure, dump the configdata in do_configure.

---
 meta/recipes-connectivity/openssl/openssl_1.1.1.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-connectivity/openssl/openssl_1.1.1.bb +1 -0
index 1234b64b864..8d5d4b146e7 100644
@@ -114,6 +114,7 @@ do_configure () {
 	# environment variables set by bitbake. Adjust the environment variables instead.
 	PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
 	perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
+	perl ${B}/configdata.pm --dump
 }
 
 do_install () {
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 openssl: don't disable the AFALG engine based on host kernel

Whether the AFALG engine (use of hardware crypto via AF_ALG) is enable or disable depends on whether the host kernel is 4.1 or above, which has no bearing on whether the target system supports it.

Remove the complicated logic and simply enable/disable as requested.

---
 .../openssl/openssl/afalg.patch                    | 31 ++++++++++++++++++++++
 meta/recipes-connectivity/openssl/openssl_1.1.1.bb |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssl/openssl/afalg.patch
meta/recipes-connectivity/openssl/openssl/afalg.patch new file +31 -0
new file mode 100644
index 00000000000..7c4b084f3df
@@ -0,0 +1,31 @@
+Don't refuse to build afalgeng if cross-compiling or the host kernel is too old.
+
+Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688]
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/Configure b/Configure
+index 3baa8ce..9ef52ed 100755
+--- a/Configure
++++ b/Configure
+@@ -1550,20 +1550,7 @@ unless ($disabled{"crypto-mdebug-backtrace"})
+ unless ($disabled{afalgeng}) {
+     $config{afalgeng}="";
+     if (grep { $_ eq 'afalgeng' } @{$target{enable}}) {
+-        my $minver = 4*10000 + 1*100 + 0;
+-        if ($config{CROSS_COMPILE} eq "") {
+-            my $verstr = `uname -r`;
+-            my ($ma, $mi1, $mi2) = split("\\.", $verstr);
+-            ($mi2) = $mi2 =~ /(\d+)/;
+-            my $ver = $ma*10000 + $mi1*100 + $mi2;
+-            if ($ver < $minver) {
+-                $disabled{afalgeng} = "too-old-kernel";
+-            } else {
+-                push @{$config{engdirs}}, "afalg";
+-            }
+-        } else {
+-            $disabled{afalgeng} = "cross-compiling";
+-        }
++        push @{$config{engdirs}}, "afalg";
+     } else {
+         $disabled{afalgeng}  = "not-linux";
+     }
meta/recipes-connectivity/openssl/openssl_1.1.1.bb +1 -0
index 8d5d4b146e7..5d19910941e 100644
@@ -18,6 +18,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
            file://0002-fix-CVE-2018-0734.patch \
            file://0003-fix-CVE-2018-0735.patch \
            file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
+           file://afalg.patch \
            "
 
 SRC_URI_append_class-nativesdk = " \
Signature · 1 line
2.11.0