openssl: sanity check that the bignum module is present
PATCH v2 1/2 openssl: sanity check that the bignum module is present
The crypto_use_bigint_in_x86-64_perl patch uses the "bigint" module to transparently support 64-bit integers on 32-bit hosts. Whilst bigint (part of bignum) is a core Perl module not all distributions install it (notable Fedora 23).
As the error message when bignum isn't installed is obscure, add a task to check that it is available and alert the user if it isn't.
[ YOCTO #8562 ]
--- meta/recipes-connectivity/openssl/openssl_1.0.2d.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/recipes-connectivity/openssl/openssl_1.0.2d.bb +10 -0
@@ -56,3 +56,13 @@ PARALLEL_MAKEINST = "" do_configure_prepend() { cp ${WORKDIR}/find.pl ${S}/util/find.pl } + +# The crypto_use_bigint patch means that perl's bignum module needs to be +# installed, but some distributions (for example Fedora 23) don't ship it by +# default. As the resulting error is very misleading check for bignum before +# building. +do_configure_prepend() { + if ! perl -Mbigint -e true; then + bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake." + fi +}
Signature · 1 line
2.1.4
PATCH v2 2/2 openssl: use subdir= instead of moving files in do_configure_prepend()
For clarity and correctness of source archiving, don't move find.pl from WORKDIR to S in do_configure_prepend but tell the fetcher to put it in the right place when unpacking.
Also re-order the files in SRC_URI so that patches are grouped together.
--- meta/recipes-connectivity/openssl/openssl_1.0.2d.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
meta/recipes-connectivity/openssl/openssl_1.0.2d.bb +3 -7
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8" export DIRS = "crypto ssl apps engines" export OE_LDFLAGS="${LDFLAGS}" -SRC_URI += "file://configure-targets.patch \ +SRC_URI += "file://find.pl;subdir=${BP}/util/ \ + file://run-ptest \ + file://configure-targets.patch \ file://shared-libs.patch \ file://oe-ldflags.patch \ file://engines-install-in-libdir-ssl.patch \
@@ -29,11 +31,9 @@ SRC_URI += "file://configure-targets.patch \ file://openssl_fix_for_x32.patch \ file://fix-cipher-des-ede3-cfb1.patch \ file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \ - file://find.pl \ file://openssl-fix-des.pod-error.patch \ file://Makefiles-ptest.patch \ file://ptest-deps.patch \ - file://run-ptest \ file://crypto_use_bigint_in_x86-64_perl.patch \ file://openssl-1.0.2a-x32-asm.patch \ file://ptest_makefile_deps.patch \
@@ -53,10 +53,6 @@ FILES_${PN}-engines-dbg = "${libdir}/ssl/engines/.debug" PARALLEL_MAKE = "" PARALLEL_MAKEINST = "" -do_configure_prepend() { - cp ${WORKDIR}/find.pl ${S}/util/find.pl -} - # The crypto_use_bigint patch means that perl's bignum module needs to be # installed, but some distributions (for example Fedora 23) don't ship it by # default. As the resulting error is very misleading check for bignum before
Signature · 1 line
2.1.4