RE: [OE-core] [PATCH 2/3] openssl: Add legacy packageconfig option

Peter Kjellerstedt
2026-02-13T18:24:04Z

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Colin McAllister via lists.openembedded.org
> Sent: den 11 februari 2026 19:49
> To: openembedded-core@lists.openembedded.org
> Cc: Colin Pinnell McAllister <colinmca242@gmail.com>
> Subject: [OE-core] [PATCH 2/3] openssl: Add legacy packageconfig option
>
> Add packageconfig option to enable legacy support (disabled by default).
> The legacy module includes deprecated and unmaintained OpenSSL
> components. The openssl-ossl-module-legacy package that includes the
> module is now conditional on the packageconfig option being enabled.
> Packages that depend on this package are also now conditional on the
> packageconfig option.
>
> Signed-off-by: Colin Pinnell McAllister <colinmca242@gmail.com>
> ---
> meta/recipes-connectivity/openssl/openssl_3.5.5.bb | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
> b/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
> index 6b9ccef0b5..c9d74002a7 100644
> --- a/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
> @@ -29,6 +29,7 @@ PACKAGECONFIG:class-native = ""
> PACKAGECONFIG:class-nativesdk = ""
>
> PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module"
> +PACKAGECONFIG[legacy] = ",no-legacy"
> PACKAGECONFIG[tls1] = ",no-tls1"
> PACKAGECONFIG[tls1_1] = ",no-tls1_1"
> PACKAGECONFIG[manpages] = ""
> @@ -257,7 +258,8 @@ pkg_postinst_ontarget:${PN}-ossl-module-fips () {
> # 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 ${PN}-ossl-module-legacy ${PN}-ossl-module-fips"
> +PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc ${PN}-ossl-module-fips"
> +PACKAGES =+ "${@bb.utils.contains("PAKCAGECONFIG", "legacy", "${PN}-ossl-module-legacy", "", d)}"

There should be no reason to conditionally add the
${PN}-ossl-module-legacy package here. If the legacy PACKAGECONFIG
is not enabled, then I assume that no files that go in this package
are created and thus the package will not be created even if it is
listed in PACKAGES.

>
> FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}"
> FILES:libssl = "${libdir}/libssl${SOLIBS}"
> @@ -275,9 +277,11 @@ FILES:${PN}:append:class-nativesdk = "
> ${SDKPATHNATIVE}/environment-setup.d/open
>
> CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
>
> -RRECOMMENDS:libcrypto += "openssl-conf ${PN}-ossl-module-legacy"
> +RRECOMMENDS:libcrypto += "openssl-conf"
> +RRECOMMENDS:libcrypto += "${@bb.utils.contains("PAKCAGECONFIG", "legacy", "${PN}-ossl-module-legacy", "", d)}"

Since this is a recommendation, there is no reason to make it
conditional as long as the package is listed in PACKAGES. If there
are no files in the package and it thus is not created, then the
recommendation will just be ignored.

> RDEPENDS:${PN}-misc = "perl"
> -RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash sed openssl-engines openssl-ossl-module-legacy"
> +RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash sed openssl-engines"
> +RDEPENDS:${PN}-ptest += "${@bb.utils.contains("PAKCAGECONFIG", "legacy", "${PN}-ossl-module-legacy", "", d)}"

Turn this into a recommendation instead and then there
is no longer any need for it to be conditionally added.

>
> RDEPENDS:${PN}-bin += "openssl-conf"
>
> --
> 2.53.0

//Peter