From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Cc: Alexander Kanavin <alex@linutronix.de>,
Hongxu Jia <hongxu.jia@windriver.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: RE: [OE-core] [PATCH 07/25] openssl: update 1.1.1l -> 3.0.0
Date: Mon, 11 Oct 2021 18:07:53 +0000 [thread overview]
Message-ID: <8cecff22cdcf4aa89bac193213219677@axis.com> (raw)
In-Reply-To: <20211011094059.4184654-7-alex@linutronix.de>
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Alexander Kanavin
> Sent: den 11 oktober 2021 11:41
> To: openembedded-core@lists.openembedded.org
> Cc: Alexander Kanavin <alex@linutronix.de>; Hongxu Jia
> <hongxu.jia@windriver.com>; Richard Purdie
> <richard.purdie@linuxfoundation.org>
> Subject: [OE-core] [PATCH 07/25] openssl: update 1.1.1l -> 3.0.0
>
> Drop 0001-skip-test_symbol_presence.patch - testing revealed
> no need for it, and I couldn't quite understand what it does.
>
> Drop reproducible.patch - upstream has removed the non-reproducible
> bit.
>
> Process lines in run-ptest with sed one by one rather than with
> perl after the test completes, avoiding ptest-runner timeout errors.
>
> License-Update: openssl relicense to apache 2.0. Goodbye awkward
> gpl exceptions in consumers.
>
> DEPRECATED_CRYPTO_FLAGS is now empty by default but available
> by anyone who wants to set it. Trying to come up with a working
> set was not a good idea as shown in the deleted comment.
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
> ...1-Configure-do-not-tweak-mips-cflags.patch | 36 +++++++++
> ...sysroot-and-debug-prefix-map-from-co.patch | 21 ++---
> .../0001-skip-test_symbol_presence.patch | 46 -----------
> .../openssl/openssl/reproducible.patch | 32 --------
> .../openssl/openssl/run-ptest | 2 +-
> .../{openssl_1.1.1l.bb => openssl_3.0.0.bb} | 81 ++++++++++---------
> 6 files changed, 90 insertions(+), 128 deletions(-)
> create mode 100644 meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch
> delete mode 100644 meta/recipes-connectivity/openssl/openssl/0001-skip-test_symbol_presence.patch
> delete mode 100644 meta/recipes-connectivity/openssl/openssl/reproducible.patch
> rename meta/recipes-connectivity/openssl/{openssl_1.1.1l.bb => openssl_3.0.0.bb} (76%)
>
[cut]
> diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
> similarity index 76%
> rename from meta/recipes-connectivity/openssl/openssl_1.1.1l.bb
> rename to meta/recipes-connectivity/openssl/openssl_3.0.0.bb
> index b241ba78bcc..d8c50a80118 100644
> --- a/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_3.0.0.bb
> @@ -4,19 +4,14 @@ HOMEPAGE = "http://www.openssl.org/"
> BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
> SECTION = "libs/network"
>
> -# "openssl" here actually means both OpenSSL and SSLeay licenses apply
> -# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped)
> -LICENSE = "openssl"
> -LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8"
> -
> -DEPENDS = "hostperl-runtime-native"
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c75985e733726beaba57bc5253e96d04"
>
> SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
> file://run-ptest \
> - file://0001-skip-test_symbol_presence.patch \
> file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
> file://afalg.patch \
> - file://reproducible.patch \
> + file://0001-Configure-do-not-tweak-mips-cflags.patch \
> "
>
> SRC_URI:append:class-nativesdk = " \
> @@ -28,9 +23,9 @@ SRC_URI:append:riscv32 = " \
> file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \
> "
>
> -SRC_URI[sha256sum] = "0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1"
> +SRC_URI[sha256sum] = "59eedfcb46c25214c9bd37ed6078297b4df01d012267fe9e9eee31f61bc70536"
>
> -inherit lib_package multilib_header multilib_script ptest
> +inherit lib_package multilib_header multilib_script ptest perlnative
> MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
>
> PACKAGECONFIG ?= ""
> @@ -59,19 +54,9 @@ EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom"
> CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
> CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
>
> -# Disable deprecated crypto algorithms
> -# Retained for compatibilty
> -# des (curl)
> -# dh (python-ssl)
> -# dsa (rpm)
> -# md4 (cyrus-sasl freeradius hostapd)
> -# bf (wvstreams postgresql x11vnc crda znc cfengine)
> -# rc4 (freerdp librtorrent ettercap xrdp transmission pam-ssh-agent-auth php)
> -# rc2 (mailx)
> -# psk (qt5)
> -# srp (libest)
> -# whirlpool (qca)
> -DEPRECATED_CRYPTO_FLAGS = "no-ssl no-idea no-rc5 no-md2 no-camellia no-mdc2 no-scrypt no-seed no-siphash no-sm2 no-sm3 no-sm4"
> +# This allows disabling deprecated or undesirable crypto algorithms.
> +# The default is to trust upstream choices.
> +DEPRECATED_CRYPTO_FLAGS ?= ""
>
> do_configure () {
> os=${HOST_OS}
> @@ -146,7 +131,7 @@ do_configure () {
> # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the
> # environment variables set by bitbake. Adjust the environment variables instead.
> HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
> - perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
> + perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-3 --libdir=${libdir} $target
> perl ${B}/configdata.pm --dump
> }
>
> @@ -154,43 +139,49 @@ do_install () {
> oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
>
> oe_multilib_header openssl/opensslconf.h
> + oe_multilib_header openssl/configuration.h
>
> # 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 \
> + mv ${D}${libdir}/ssl-3/certs \
> + ${D}${libdir}/ssl-3/private \
> + ${D}${libdir}/ssl-3/openssl.cnf \
Given that "${libdir}/ssl-3" is all over the recipe, wouldn't it make
sense to turn it into a variable? Then it will at least only be one
place to update the next time they change the version.
> ${D}${sysconfdir}/ssl/
>
> # Although absolute symlinks would be OK for the target, they become
> # invalid if native or nativesdk are relocated from sstate.
> - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs
> - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private
> - ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf
> + ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-3/certs
> + ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-3/private
> + ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-3/openssl.cnf
> }
>
> do_install:append:class-native () {
> create_wrapper ${D}${bindir}/openssl \
> - OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \
> - SSL_CERT_DIR=${libdir}/ssl-1.1/certs \
> - SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \
> - OPENSSL_ENGINES=${libdir}/engines-1.1
> + OPENSSL_CONF=${libdir}/ssl-3/openssl.cnf \
> + SSL_CERT_DIR=${libdir}/ssl-3/certs \
> + SSL_CERT_FILE=${libdir}/ssl-3/cert.pem \
> + OPENSSL_ENGINES=${libdir}/engines-3
> }
>
> 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
> + sed 's|/usr/lib/ssl/|/usr/lib/ssl-3/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
> }
>
> PTEST_BUILD_HOST_FILES += "configdata.pm"
> PTEST_BUILD_HOST_PATTERN = "perl_version ="
> do_install_ptest () {
> + install -d ${D}${PTEST_PATH}/test
> + install -m755 ${B}/test/p_test.so ${D}${PTEST_PATH}/test
> + install -m755 ${B}/test/provider_internal_test.cnf ${D}${PTEST_PATH}/test
> +
> # Prune the build tree
> rm -f ${B}/fuzz/*.* ${B}/test/*.*
>
> cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH}
> + sed 's|${S}|${PTEST_PATH}|g' -i ${D}${PTEST_PATH}/configdata.pm
> cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH}
>
> # For test_shlibload
> @@ -204,10 +195,20 @@ do_install_ptest () {
>
> install -d ${D}${PTEST_PATH}/engines
> install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines
> + install -m755 ${B}/engines/loader_attic.so ${D}${PTEST_PATH}/engines
> +
> + install -d ${D}${PTEST_PATH}/providers
> + install -m755 ${B}/providers/legacy.so ${D}${PTEST_PATH}/providers
> +
> + install -d ${D}${PTEST_PATH}/Configurations
> + cp -rf ${S}/Configurations/* ${D}${PTEST_PATH}/Configurations/
>
> # seems to be needed with perl 5.32.1
> install -d ${D}${PTEST_PATH}/util/perl/recipes
> cp ${D}${PTEST_PATH}/test/recipes/tconversion.pl ${D}${PTEST_PATH}/util/perl/recipes/
> +
> + sed 's|${S}|${PTEST_PATH}|g' -i ${D}${PTEST_PATH}/util/wrap.pl
There is a mix of tab and space indentation above (both in the original
code and in the added lines).
> +
Unnecessary empty line.
> }
>
> # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
> @@ -220,13 +221,13 @@ 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* \
> + ${libdir}/ssl-3/openssl.cnf* \
> "
> -FILES:${PN}-engines = "${libdir}/engines-1.1"
> +FILES:${PN}-engines = "${libdir}/engines-3"
> # ${prefix} comes from what we pass into --prefix at configure time (which is used for INSTALLTOP)
> -FILES:${PN}-engines:append:mingw32:class-nativesdk = "${prefix}${libdir}/engines-1_1"
> -FILES:${PN}-misc = "${libdir}/ssl-1.1/misc ${bindir}/c_rehash"
> -FILES:${PN} =+ "${libdir}/ssl-1.1/*"
> +FILES:${PN}-engines:append:mingw32:class-nativesdk = "${prefix}${libdir}/engines-3"
> +FILES:${PN}-misc = "${libdir}/ssl-3/misc ${bindir}/c_rehash"
> +FILES:${PN} =+ "${libdir}/ssl-3/* ${libdir}/ossl-modules/"
Might as well change the "=+" to "+=".
> FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
>
> CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
> --
> 2.20.1
//Peter
next prev parent reply other threads:[~2021-10-11 18:07 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 9:40 [PATCH 01/25] qemu: install qmp module without hardcoding the python version in oeqa scripts Alexander Kanavin
2021-10-11 9:40 ` [PATCH 02/25] lttng-tools: replace ad hoc ptest fixup with upstream fixes Alexander Kanavin
2021-10-11 9:40 ` [PATCH 03/25] rt-tests: update 2.1 -> 2.2 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 04/25] libgit2: update 1.1.1 -> 1.2.0 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 05/25] libssh2: update 1.9.0 -> 1.10.0 Alexander Kanavin
2021-10-11 16:06 ` Khem Raj
2021-10-11 9:40 ` [PATCH 06/25] python3: update 3.9.6 -> 3.10.0 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 07/25] openssl: update 1.1.1l -> 3.0.0 Alexander Kanavin
2021-10-11 18:07 ` Peter Kjellerstedt [this message]
2021-10-12 11:02 ` [OE-core] " Alexander Kanavin
2021-10-11 9:40 ` [PATCH 08/25] cryptodev-tests: do not use -Werror with openssl 3 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 09/25] serf: add a openssl 3 compatibility fix Alexander Kanavin
2021-10-11 9:40 ` [PATCH 10/25] ruby: disable openssl extension Alexander Kanavin
2021-10-11 9:40 ` [PATCH 11/25] glib-2.0: update 2.68.4 -> 2.70.0 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 12/25] glib-networking: update 2.68.2 " Alexander Kanavin
2021-10-11 9:40 ` [PATCH 13/25] bison: update 3.7.6 -> 3.8.1 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 14/25] libdnf: update 0.63.1 -> 0.64.0 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 15/25] libexif: update 0.6.22 -> 0.6.23 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 16/25] sudo: update 1.9.7p2 -> 1.9.8p1 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 17/25] wget: update 1.21.1 -> 1.21.2 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 18/25] coreutils: update 8.32 -> 9.0 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 19/25] itstool: update 2.0.6 -> 2.0.7 Alexander Kanavin
2021-10-11 9:40 ` [PATCH 20/25] nghttp2: add recipe from meta-oe Alexander Kanavin
2021-10-11 9:40 ` [PATCH 21/25] libsoup: add a 3.x recipe Alexander Kanavin
2021-10-12 10:08 ` [OE-core] " Ross Burton
2021-10-12 10:45 ` Alexander Kanavin
2021-10-11 9:40 ` [PATCH 22/25] webkitgtk: trim down DEPENDS Alexander Kanavin
2021-10-11 9:40 ` [PATCH 23/25] epiphany: " Alexander Kanavin
2021-10-11 9:40 ` [PATCH 24/25] webkitgtk: update 2.32.3 -> 2.34.0 Alexander Kanavin
2021-10-11 16:08 ` Khem Raj
2021-10-26 19:38 ` [OE-core] " Martin Jansa
2021-10-26 20:07 ` Alexander Kanavin
2021-10-26 20:40 ` Martin Jansa
2021-10-26 21:35 ` Alexander Kanavin
2021-10-26 21:51 ` Martin Jansa
2021-10-26 21:59 ` Alexander Kanavin
[not found] ` <16B1AD7283CD4D45.19566@lists.openembedded.org>
2021-10-26 20:21 ` Alexander Kanavin
2021-10-11 9:40 ` [PATCH 25/25] epiphany: update 40.3 -> 41.0 Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8cecff22cdcf4aa89bac193213219677@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.