[v2,2/2] buildtools-tarball: eliminate overwtiting OPENSSL_CONF

Submitted by Jens Rehsack on July 24, 2020, 5:26 a.m. | Patch ID: 174659

Details

Message ID 20200724052606.6726-2-sno@netbsd.org
State Master Next
Commit 35756989e5253234f4d7edb0cc800d74505fa405
Headers show

Commit Message

Jens Rehsack July 24, 2020, 5:26 a.m.
Remove overwriting of OPENSSL_CONF from buildtools-tarball.bb to clarify
whether nativesdk-openssl installs wrong content or buildtools-tarball:
    (nativesdk-openssl) tmp/sysroots/x86_64/usr/lib/ssl-1.1/openssl.cnf
    (buildtools-tarball) buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/openssl.cnf

Signed-off-by: Jens Rehsack <sno@netbsd.org>
---
 meta/recipes-core/meta/buildtools-tarball.bb | 1 -
 1 file changed, 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index d0f8dd7d7c..02e662b5cc 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -75,7 +75,6 @@  create_sdk_files_append () {
 
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
 	echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
-	echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
 
 	if [ "${SDKMACHINE}" = "i686" ]; then
 		echo 'export NO32LIBS="0"' >>$script

Comments

Richard Purdie July 27, 2020, 10:26 p.m.
On Fri, 2020-07-24 at 07:26 +0200, Jens Rehsack wrote:
> Remove overwriting of OPENSSL_CONF from buildtools-tarball.bb to clarify
> whether nativesdk-openssl installs wrong content or buildtools-tarball:
>     (nativesdk-openssl) tmp/sysroots/x86_64/usr/lib/ssl-1.1/openssl.cnf
>     (buildtools-tarball) buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/openssl.cnf
> 
> Signed-off-by: Jens Rehsack <sno@netbsd.org>
> ---
>  meta/recipes-core/meta/buildtools-tarball.bb | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
> index d0f8dd7d7c..02e662b5cc 100644
> --- a/meta/recipes-core/meta/buildtools-tarball.bb
> +++ b/meta/recipes-core/meta/buildtools-tarball.bb
> @@ -75,7 +75,6 @@ create_sdk_files_append () {
>  
>  	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
>  	echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
> -	echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
>  
>  	if [ "${SDKMACHINE}" = "i686" ]; then
>  		echo 'export NO32LIBS="0"' >>$script

I did look at this further. I don't see anywhere in buildtools-tarball
that the code you add in toolchain-scripts.bbclass is actually run, it
doesn't make it into the buildtools tarball.

Note the code does:

     rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
     [...]

     # Generate new (mini) sdk-environment-setup file
     script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
     touch $script

so your patch definitely breaks buildtools. I therefore don't plan to
merge it.

You are right that we could add something here to source the
environment.d files within OECORE_NATIVE_SYSROOT but you'd need to add
that to the buildtools environment script itself.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141017): https://lists.openembedded.org/g/openembedded-core/message/141017
Mute This Topic: https://lists.openembedded.org/mt/75761298/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Jens Rehsack Aug. 4, 2020, 9:51 a.m.
Am 28.07.2020 um 00:26 schrieb Richard Purdie <richard.purdie@linuxfoundation.org>:
> 
> On Fri, 2020-07-24 at 07:26 +0200, Jens Rehsack wrote:
>> Remove overwriting of OPENSSL_CONF from buildtools-tarball.bb to clarify
>> whether nativesdk-openssl installs wrong content or buildtools-tarball:
>>    (nativesdk-openssl) tmp/sysroots/x86_64/usr/lib/ssl-1.1/openssl.cnf
>>    (buildtools-tarball) buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/openssl.cnf
>> 
>> Signed-off-by: Jens Rehsack <sno@netbsd.org>
>> ---
>> meta/recipes-core/meta/buildtools-tarball.bb | 1 -
>> 1 file changed, 1 deletion(-)
>> 
>> diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
>> index d0f8dd7d7c..02e662b5cc 100644
>> --- a/meta/recipes-core/meta/buildtools-tarball.bb
>> +++ b/meta/recipes-core/meta/buildtools-tarball.bb
>> @@ -75,7 +75,6 @@ create_sdk_files_append () {
>> 
>> 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
>> 	echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
>> -	echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
>> 
>> 	if [ "${SDKMACHINE}" = "i686" ]; then
>> 		echo 'export NO32LIBS="0"' >>$script
> 
> I did look at this further. I don't see anywhere in buildtools-tarball
> that the code you add in toolchain-scripts.bbclass is actually run, it
> doesn't make it into the buildtools tarball.
> 
> Note the code does:
> 
>     rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
>     [...]
> 
>     # Generate new (mini) sdk-environment-setup file
>     script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
>     touch $script
> 
> so your patch definitely breaks buildtools. I therefore don't plan to
> merge it.

While I wouldn't argue against not merging it, I disagree the reasoning:

There is an buildtools/environment-setup-x86_64-pokysdk-linux in my created SDK which contains:

$ cat buildtools/environment-setup-x86_64-pokysdk-linux
export PATH=/home/sno/sds-lp791a-sdk/buildtools/sysroots/x86_64-pokysdk-linux/usr/bin:$PATH
#OECORE_NATIVE_SYSROOT="/home/sno/sds-lp791a-sdk/buildtools/sysroots/x86_64-pokysdk-linux"
export GIT_SSL_CAINFO="/home/sno/sds-lp791a-sdk/buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt"
export SSL_CERT_FILE="/home/sno/sds-lp791a-sdk/buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt"
export OPENSSL_CONF="/home/sno/sds-lp791a-sdk/buildtools/sysroots/x86_64-pokysdk-linux/etc/ssl/openssl.cnf"

So it's a bit weird - and deserves more investigation.

> You are right that we could add something here to source the
> environment.d files within OECORE_NATIVE_SYSROOT but you'd need to add
> that to the buildtools environment script itself.

Maybe we can find a way so collect snippets - but I wanted to show the conflict between
buildtools/environment-setup-x86_64-pokysdk-linux and buildtools/sysroots/x86_64-pokysdk-linux/environment-setup.d/openssl.sh.

$ cat buildtools/sysroots/x86_64-pokysdk-linux/environment-setup.d/openssl.sh
export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-1.1/openssl.cnf"

This conflict should get resolved somehow.

> Cheers,
> 
> Richard

Cheers
--
Jens Rehsack - rehsack@gmail.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141182): https://lists.openembedded.org/g/openembedded-core/message/141182
Mute This Topic: https://lists.openembedded.org/mt/75761298/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-