openssl: consolidate target name mapping rules
PATCH 1/7 openssl: consolidate target name mapping rules
Merge duplicates + minor reformatting (no functional changes).
Note that the openssl 1.1 recipe still needs to be updated to handle MIPS Release 6 ISA targets (e.g. linux-mipsisa32r6, etc).
--- .../recipes-connectivity/openssl/openssl_1.0.2p.bb | 7 ++-- .../recipes-connectivity/openssl/openssl_1.1.0i.bb | 39 ++++------------------ 2 files changed, 8 insertions(+), 38 deletions(-)
meta/recipes-connectivity/openssl/openssl_1.0.2p.bb +2 -5
@@ -164,7 +164,7 @@ do_configure () { linux-mips*) target=debian-mips ;; - linux-microblaze*|linux-nios2*|linux-gnu*ilp32**) + linux-microblaze* | linux-nios2* | linux-gnu*ilp32**) target=linux-generic32 ;; linux-powerpc)
@@ -179,10 +179,7 @@ do_configure () { linux-riscv64) target=linux-generic64 ;; - linux-supersparc) - target=linux-sparcv8 - ;; - linux-sparc) + linux-sparc | linux-supersparc) target=linux-sparcv8 ;; esac
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +6 -33
@@ -51,28 +51,13 @@ do_configure () { esac target="$os-${HOST_ARCH}" case $target in - linux-arm) - target=linux-armv4 - ;; - linux-armeb) + linux-arm*) target=linux-armv4 ;; linux-aarch64*) target=linux-aarch64 ;; - linux-sh3) - target=linux-generic32 - ;; - linux-sh4) - target=linux-generic32 - ;; - linux-i486) - target=linux-elf - ;; - linux-i586 | linux-viac3) - target=linux-elf - ;; - linux-i686) + linux-i?86 | linux-viac3) target=linux-elf ;; linux-gnux32-x86_64 | linux-muslx32-x86_64 )
@@ -81,23 +66,17 @@ do_configure () { linux-gnu64-x86_64) target=linux-x86_64 ;; - linux-mips) + linux-mips | linux-mipsel) # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags target="linux-mips32 ${TARGET_CC_ARCH}" ;; - linux-mipsel) - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; linux-gnun32-mips*) target=linux-mips64 ;; - linux-*-mips64 | linux-mips64) - target=linux64-mips64 - ;; - linux-*-mips64el | linux-mips64el) + linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) target=linux64-mips64 ;; - linux-microblaze*|linux-nios2*) + linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4) target=linux-generic32 ;; linux-powerpc)
@@ -112,15 +91,9 @@ do_configure () { linux-riscv64) target=linux-generic64 ;; - linux-supersparc) - target=linux-sparcv9 - ;; - linux-sparc) + linux-sparc | linux-supersparc) target=linux-sparcv9 ;; - darwin-i386) - target=darwin-i386-cc - ;; esac useprefix=${prefix}
Signature · 1 line
1.9.1
PATCH 2/7 openssl: update 32bit x86 target from linux-elf -> linux-x86
According to comments in Configurations/10-main.conf, the linux-elf target is "... to be used on older Linux machines where gcc doesn't understand -m32 and -m64".
The linux-x86 target appears to be the newer replacement (currently the only difference between the two is that linux-x86 adds -m32 to cflags).
--- meta/recipes-connectivity/openssl/openssl_1.1.0i.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +1 -1
@@ -58,7 +58,7 @@ do_configure () { target=linux-aarch64 ;; linux-i?86 | linux-viac3) - target=linux-elf + target=linux-x86 ;; linux-gnux32-x86_64 | linux-muslx32-x86_64 ) target=linux-x32
Signature · 1 line
1.9.1
PATCH 3/7 openssl: minor reformatting to align the 1.0 and 1.1 recipes
In reply to Andre McCurdyFormatting and comment tweaks only, no functional changes.
--- .../recipes-connectivity/openssl/openssl_1.0.2p.bb | 43 +++++++++++----------- .../recipes-connectivity/openssl/openssl_1.1.0i.bb | 36 ++++++++++-------- 2 files changed, 42 insertions(+), 37 deletions(-)
meta/recipes-connectivity/openssl/openssl_1.0.2p.bb +22 -21
@@ -223,10 +223,11 @@ do_install () { install -d ${D}${includedir} cp --dereference -R include/openssl ${D}${includedir} + oe_multilib_header openssl/opensslconf.h + install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash - oe_multilib_header openssl/opensslconf.h if [ "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" ]; then sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget
@@ -234,12 +235,12 @@ do_install () { rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget fi - # Create SSL structure - install -d ${D}${sysconfdir}/ssl/ - mv ${D}${libdir}/ssl/openssl.cnf \ - ${D}${libdir}/ssl/certs \ + # Create SSL structure for packages such as ca-certificates which + # contain hard-coded paths to /etc/ssl. Debian does the same. + install -d ${D}${sysconfdir}/ssl + mv ${D}${libdir}/ssl/certs \ ${D}${libdir}/ssl/private \ - \ + ${D}${libdir}/ssl/openssl.cnf \ ${D}${sysconfdir}/ssl/ ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl/certs ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl/private
@@ -256,6 +257,19 @@ do_install () { done } +do_install_append_class-native () { + create_wrapper ${D}${bindir}/openssl \ + OPENSSL_CONF=${libdir}/ssl/openssl.cnf \ + SSL_CERT_DIR=${libdir}/ssl/certs \ + SSL_CERT_FILE=${libdir}/ssl/cert.pem \ + OPENSSL_ENGINES=${libdir}/ssl/engines +} + +do_install_append_class-nativesdk () { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + do_install_ptest () { cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH}
@@ -304,21 +318,8 @@ do_install_ptest () { ${D}${PTEST_PATH}/Makefile ${D}${PTEST_PATH}/Configure } -do_install_append_class-native() { - create_wrapper ${D}${bindir}/openssl \ - OPENSSL_CONF=${libdir}/ssl/openssl.cnf \ - SSL_CERT_DIR=${libdir}/ssl/certs \ - SSL_CERT_FILE=${libdir}/ssl/cert.pem \ - OPENSSL_ENGINES=${libdir}/ssl/engines -} - -do_install_append_class-nativesdk() { - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d - install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh -} - -# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto -# package RRECOMMENDS on this package. This will enable the configuration +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration # file to be installed for both the base openssl package and the libcrypto # package since the base openssl package depends on the libcrypto package.
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +20 -16
@@ -106,16 +106,16 @@ do_configure () { do_install () { oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install + oe_multilib_header openssl/opensslconf.h - # Create SSL structure for PATH hard-coded packages like ca-certificates - # Debian is also using this technique - install -d ${D}${sysconfdir}/ssl/ - mv ${D}${libdir}/ssl-1.1/openssl.cnf \ - ${D}${libdir}/ssl-1.1/certs \ - ${D}${libdir}/ssl-1.1/private \ - \ - ${D}${sysconfdir}/ssl/ + # Create SSL structure for packages such as ca-certificates which + # contain hard-coded paths to /etc/ssl. Debian does the same. + install -d ${D}${sysconfdir}/ssl + mv ${D}${libdir}/ssl-1.1/certs \ + ${D}${libdir}/ssl-1.1/private \ + ${D}${libdir}/ssl-1.1/openssl.cnf \ + ${D}${sysconfdir}/ssl/ ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl-1.1/certs ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl-1.1/private ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${libdir}/ssl-1.1/openssl.cnf
@@ -134,7 +134,7 @@ do_install_append_class-nativesdk () { install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh } -do_install_ptest() { +do_install_ptest () { cp -r * ${D}${PTEST_PATH} # Putting .so files in ptest package will mess up the dependencies of the main openssl package
@@ -144,22 +144,26 @@ do_install_ptest() { sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t } -PACKAGES =+ "libcrypto libssl ${PN}-misc ${PN}-engines openssl-conf" +# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto +# package RRECOMMENDS on this package. This will enable the configuration +# file to be installed for both the openssl-bin package and the libcrypto +# package since the openssl-bin package depends on the libcrypto package. + +PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" FILES_libssl = "${libdir}/libssl${SOLIBS}" -FILES_${PN} =+ "${libdir}/ssl-1.1/*" -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" +FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf ${libdir}/ssl-1.1/openssl.cnf" FILES_${PN}-engines = "${libdir}/engines-1.1" - FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" -RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" +FILES_${PN} =+ "${libdir}/ssl-1.1/*" +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" -FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf ${libdir}/ssl-1.1/openssl.cnf" CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" -RRECOMMENDS_libcrypto += "openssl-conf" +RRECOMMENDS_libcrypto += "openssl-conf" RDEPENDS_${PN}-bin = "perl" +RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.9.1
PATCH 4/7 openssl: openssl-misc dependency on perl should be unconditional
In reply to Andre McCurdyThe openssl 1.1 recipe doesn't have a PACKAGECONFIG option for perl, so the RDEPENDS for openssl-misc shouldn't be conditional on it.
--- meta/recipes-connectivity/openssl/openssl_1.1.0i.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +1 -1
@@ -163,7 +163,7 @@ CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" RRECOMMENDS_libcrypto += "openssl-conf" RDEPENDS_${PN}-bin = "perl" -RDEPENDS_${PN}-misc = "${@bb.utils.filter('PACKAGECONFIG', 'perl', d)}" +RDEPENDS_${PN}-misc = "perl" RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
1.9.1
PATCH 5/7 openssl: move the libdir openssl.cnf symlink into the openssl package
In reply to Andre McCurdyThe openssl 1.0 recipe puts the libdir symlink to /etc/ssl/openssl.cnf in the base openssl package (along with the libdir symlinks to /etc/ssl/certs and /etc/ssl/private). Keep the openssl 1.1 recipe aligned with that approach until there's a clear reason to do something else. For more background, see comments in the following thread:
http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135176.html
--- meta/recipes-connectivity/openssl/openssl_1.1.0i.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +1 -1
@@ -153,7 +153,7 @@ PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" FILES_libssl = "${libdir}/libssl${SOLIBS}" -FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf ${libdir}/ssl-1.1/openssl.cnf" +FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" FILES_${PN}-engines = "${libdir}/engines-1.1" FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" FILES_${PN} =+ "${libdir}/ssl-1.1/*"
Signature · 1 line
1.9.1
PATCH 6/7 openssl: fix path in nativesdk environment-setup script
In reply to Andre McCurdyA single version of the openssl.sh environment-setup script is currently shared by both the openssl 1.0 and 1.1 recipes. The libdir path in the script needs to be tweaked for openssl 1.1.
--- meta/recipes-connectivity/openssl/openssl_1.1.0i.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +1 -0
@@ -132,6 +132,7 @@ do_install_append_class-native () { do_install_append_class-nativesdk () { mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh + sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh } do_install_ptest () {
Signature · 1 line
1.9.1
PATCH 7/7 openssl: drop obsolete no-afalgeng workaround for aarch64
In reply to Andre McCurdyThe aarch64 build issue in the afalg engine appears to have been fixed upstream since openssl 1.1.0g:
https://github.com/openssl/openssl/commit/a0c262644eab897b51faf1fa013008052c3754c2
--- meta/recipes-connectivity/openssl/openssl_1.1.0i.bb | 6 ------ 1 file changed, 6 deletions(-)
meta/recipes-connectivity/openssl/openssl_1.1.0i.bb +0 -6
@@ -25,12 +25,6 @@ SRC_URI[sha256sum] = "ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc1182 inherit lib_package multilib_header ptest relative_symlinks -#| engines/afalg/e_afalg.c: In function 'eventfd': -#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function) -#| return syscall(__NR_eventfd, n); -#| ^~~~~~~~~~~~ -EXTRA_OECONF_append_aarch64 = " no-afalgeng" - #| ./libcrypto.so: undefined reference to `getcontext' #| ./libcrypto.so: undefined reference to `setcontext' #| ./libcrypto.so: undefined reference to `makecontext'
Signature · 1 line
1.9.1
✗ patchtest: failure for "openssl: consolidate target na..." and 6 more
In reply to Andre McCurdy== Series Details ==
Series: "openssl: consolidate target na..." and 6 more
Revision: 1
URL : https://patchwork.openembedded.org/series/13570/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 176e50fb17)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
Re: ✗ patchtest: failure for "openssl: consolidate target na..." and 6 more
Quoted 13 lines · Patchwork
== Series Details ==
Series: "openssl: consolidate target na..." and 6 more
Revision: 1
URL : https://patchwork.openembedded.org/series/13570/
State : failure== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
Quoted 6 lines
* Issue Series does not apply on top of target branch [
test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at176e50fb17)If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns.
Patches apply to master-next... maybe patchtest should check that too if applying to master fails?
Quoted 9 lines
Otherwise we would appreciate you correcting the issues and submitting a new> version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe