diff mbox series

[v2] openssl: set package level PERL5LIB

Message ID 20230420063034.16806-1-yang.xu@mediatek.com
State New
Headers show
Series [v2] openssl: set package level PERL5LIB | expand

Commit Message

Yang Xu (徐扬) April 20, 2023, 6:30 a.m. UTC
Build openssl with shared state cache may meet problem under below conditions:
1. sstate cache generated by another user on same machine
2. inappropriate PERL5LIB setting
3. openssl build from scratch but perl using cache

When building openssl, without appropriate PERL5LIB setting, perl from cache
tries to search Text::Template and other modules in no permission path and
abort immediately.

This patch does three things:
1. openssl upgrades external Text-Template from 1.46 to 1.56,
correct perl module path.
2. add necessary module path while openssl build
3. set package level PERL5LIB to make perl found module in S

Signed-off-by: Yang Xu <yang.xu@mediatek.com>
---
 meta/recipes-connectivity/openssl/openssl_3.1.0.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Luca Ceresoli April 20, 2023, 8:43 a.m. UTC | #1
Hello Yang,

thanks for you patch. However there is an issue with your e-mail, see
below

On Thu, 20 Apr 2023 06:30:34 +0000
"Yang Xu via lists.openembedded.org"
<yang.xu=mediatek.com@lists.openembedded.org> wrote:
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As you can see your sender address has been mangled, and as a result
the patch is rejected by the the openembedded git server. This is not
your fault, but we need you to modify your git configuration to prevent
this from happening in the future. Have a look at the wiki for more
info and how to solve that:

https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Fixing_your_From_identity

I'm taking your patch for testing on the autobuilders, fixing it
manually so you don't need to resend it.

Best regards,
Luca
Yang Xu (徐扬) April 25, 2023, 6:04 a.m. UTC | #2
Dear Sirs,

Sorry, please NOT accept this patch because I found it will break its
own sstate cache.

I will found other solution for this openssl/perl co-work issue.

On Thu, 2023-04-20 at 10:43 +0200, Luca Ceresoli wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> Hello Yang,
> 
> thanks for you patch. However there is an issue with your e-mail, see
> below
> 
> On Thu, 20 Apr 2023 06:30:34 +0000
> "Yang Xu via lists.openembedded.org"
> <yang.xu=mediatek.com@lists.openembedded.org> wrote:
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> As you can see your sender address has been mangled, and as a result
> the patch is rejected by the the openembedded git server. This is not
> your fault, but we need you to modify your git configuration to
> prevent
> this from happening in the future. Have a look at the wiki for more
> info and how to solve that:
> 
> 
https://urldefense.com/v3/__https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded*Fixing_your_From_identity__;Iw!!CTRNKA9wMg0ARbw!mqd2E9hIGSyXX1IuHHAsZENlRGaglvctXM4n_aGmmPesGsE7KMIxiBwRhAo_7H7IP7fVwq1ICYPKoQVXgz6U1ZFvnQ$
> 
> I'm taking your patch for testing on the autobuilders, fixing it
> manually so you don't need to resend it.
> 
> Best regards,
> Luca
> 
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
> 
https://urldefense.com/v3/__https://bootlin.com__;!!CTRNKA9wMg0ARbw!mqd2E9hIGSyXX1IuHHAsZENlRGaglvctXM4n_aGmmPesGsE7KMIxiBwRhAo_7H7IP7fVwq1ICYPKoQVXgz6LUphplw$
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/openssl/openssl_3.1.0.bb b/meta/recipes-connectivity/openssl/openssl_3.1.0.bb
index b319c66044..613451f265 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.1.0.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.1.0.bb
@@ -54,6 +54,10 @@  CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/bu
 # The default is to trust upstream choices.
 DEPRECATED_CRYPTO_FLAGS ?= ""
 
+# Set package level PERL5LIB
+PERL5LIB = "${S}/external/perl/Text-Template-1.56/lib/:${S}/crypto/perlasm"
+export PERL5LIB
+
 do_configure () {
 	# When we upgrade glibc but not uninative we see obtuse failures in openssl. Make
 	# the issue really clear that perl isn't functional due to symbol mismatch issues.
@@ -138,7 +142,7 @@  do_configure () {
 	fi
 	# 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/" \
+	HASHBANGPERL="/usr/bin/env perl" PERL=perl \
 	perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-3 --libdir=${libdir} $target
 	perl ${B}/configdata.pm --dump
 }