All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups
@ 2020-07-08 19:57 Jens Rehsack
  2020-07-08 21:20 ` Otavio Salvador
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Rehsack @ 2020-07-08 19:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jens Rehsack

Instead of recognizing only environment-setup scripts in
${STAGING_DIR_TARGET} or ${STAGING_DIR_NATIVE}, respectively - lurk also into
${SDKPATH}/buildtools/sysroots/${SDK_SYS} where nativesdk-openssl installs
setup files.

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/classes/toolchain-scripts.bbclass       | 5 +++++
 meta/recipes-core/meta/buildtools-tarball.bb | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..e3959e21e8 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -119,6 +119,11 @@ if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
 	    . \$envfile
     done
 fi
+if [ -d "${SDKPATH}/buildtools/sysroots/${SDK_SYS}/environment-setup.d" ]; then
+    for envfile in ${SDKPATH}/buildtools/sysroots/${SDK_SYS}/environment-setup.d/*.sh; do
+	    . \$envfile
+    done
+fi
 EOF
 }
 
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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups
  2020-07-08 19:57 [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups Jens Rehsack
@ 2020-07-08 21:20 ` Otavio Salvador
  2020-07-09  4:13   ` Jens Rehsack
  0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2020-07-08 21:20 UTC (permalink / raw)
  To: Jens Rehsack
  Cc: Patches and discussions about the oe-core layer, Jens Rehsack

Em qua., 8 de jul. de 2020 às 16:58, Jens Rehsack <rehsack@gmail.com> escreveu:
>
> Instead of recognizing only environment-setup scripts in
> ${STAGING_DIR_TARGET} or ${STAGING_DIR_NATIVE}, respectively - lurk also into
> ${SDKPATH}/buildtools/sysroots/${SDK_SYS} where nativesdk-openssl installs
> setup files.
>
> 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>

I did not understand the openssl related change. Is it possible to
rework the commit log so it is more detailed?


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups
  2020-07-08 21:20 ` Otavio Salvador
@ 2020-07-09  4:13   ` Jens Rehsack
  2020-07-09 11:52     ` Otavio Salvador
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Rehsack @ 2020-07-09  4:13 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]



> Am 08.07.2020 um 23:20 schrieb Otavio Salvador <otavio.salvador@ossystems.com.br>:
> 
> Em qua., 8 de jul. de 2020 às 16:58, Jens Rehsack <rehsack@gmail.com> escreveu:
>> 
>> Instead of recognizing only environment-setup scripts in
>> ${STAGING_DIR_TARGET} or ${STAGING_DIR_NATIVE}, respectively - lurk also into
>> ${SDKPATH}/buildtools/sysroots/${SDK_SYS} where nativesdk-openssl installs
>> setup files.
>> 
>> 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>
> 
> I did not understand the openssl related change. Is it possible to
> rework the commit log so it is more detailed?


For sure, but maybe I'm completely wrong. Let me try explaining it first...

If - and only if - one creates an SDK which included openssl (and not libressl, mbedssl, ...),
nativesdk-openssl packages an ${SDKPATHNATIVE}/environment-setup.d/openssl.sh

OTOH - meta/recipes-core/meta/buildtools-tarball.bb creates a script which is sourced
at the very end of SDK environment setup and writes what's included in
{SDKPATHNATIVE}/environment-setup.d/openssl.sh on it's own - with maybe slightly
different location - what guides me to add:
... 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

Maybe they way how nativesdk-cmake is doing it is the right way. Then, maybe
nativesdk-openssl should be reworked. This is for clarification.

Does it explain something better?

Cheers
--
Jens Rehsack - rehsack@gmail.com


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups
  2020-07-09  4:13   ` Jens Rehsack
@ 2020-07-09 11:52     ` Otavio Salvador
  2020-07-09 13:16       ` Jens Rehsack
  0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2020-07-09 11:52 UTC (permalink / raw)
  To: Jens Rehsack, Purdie, Richard
  Cc: Patches and discussions about the oe-core layer

Hello Jens,

I've added Richard on Cc.

Em qui., 9 de jul. de 2020 às 01:13, Jens Rehsack <rehsack@gmail.com> escreveu:
> > Am 08.07.2020 um 23:20 schrieb Otavio Salvador <otavio.salvador@ossystems.com.br>:
> >
> > Em qua., 8 de jul. de 2020 às 16:58, Jens Rehsack <rehsack@gmail.com> escreveu:
> >>
> >> Instead of recognizing only environment-setup scripts in
> >> ${STAGING_DIR_TARGET} or ${STAGING_DIR_NATIVE}, respectively - lurk also into
> >> ${SDKPATH}/buildtools/sysroots/${SDK_SYS} where nativesdk-openssl installs
> >> setup files.
> >>
> >> 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>
> >
> > I did not understand the openssl related change. Is it possible to
> > rework the commit log so it is more detailed?
>
> For sure, but maybe I'm completely wrong. Let me try explaining it first...
>
> If - and only if - one creates an SDK which included openssl (and not libressl, mbedssl, ...),
> nativesdk-openssl packages an ${SDKPATHNATIVE}/environment-setup.d/openssl.sh
>
> OTOH - meta/recipes-core/meta/buildtools-tarball.bb creates a script which is sourced
> at the very end of SDK environment setup and writes what's included in
> {SDKPATHNATIVE}/environment-setup.d/openssl.sh on it's own - with maybe slightly
> different location - what guides me to add:
> ... 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
>
> Maybe they way how nativesdk-cmake is doing it is the right way. Then, maybe
> nativesdk-openssl should be reworked. This is for clarification.
>
> Does it explain something better?

Yes and generating it directly might indeed be not the best option.
Ideally, it'd generate a new source script which would run later and
do any need adjustment. Do you agree?

Either way, this commit seems to be mixing two changes and I'd prefer
if you split it. This allow for nicer review as well as better commit
messages of individual changes.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups
  2020-07-09 11:52     ` Otavio Salvador
@ 2020-07-09 13:16       ` Jens Rehsack
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Rehsack @ 2020-07-09 13:16 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Purdie, Richard, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2958 bytes --]



> Am 09.07.2020 um 13:52 schrieb Otavio Salvador <otavio.salvador@ossystems.com.br>:
> 
> Hello Jens,
> 
> I've added Richard on Cc.

/o\

> Em qui., 9 de jul. de 2020 às 01:13, Jens Rehsack <rehsack@gmail.com> escreveu:
>>> Am 08.07.2020 um 23:20 schrieb Otavio Salvador <otavio.salvador@ossystems.com.br>:
>>> 
>>> Em qua., 8 de jul. de 2020 às 16:58, Jens Rehsack <rehsack@gmail.com> escreveu:
>>>> 
>>>> Instead of recognizing only environment-setup scripts in
>>>> ${STAGING_DIR_TARGET} or ${STAGING_DIR_NATIVE}, respectively - lurk also into
>>>> ${SDKPATH}/buildtools/sysroots/${SDK_SYS} where nativesdk-openssl installs
>>>> setup files.
>>>> 
>>>> 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>
>>> 
>>> I did not understand the openssl related change. Is it possible to
>>> rework the commit log so it is more detailed?
>> 
>> For sure, but maybe I'm completely wrong. Let me try explaining it first...
>> 
>> If - and only if - one creates an SDK which included openssl (and not libressl, mbedssl, ...),
>> nativesdk-openssl packages an ${SDKPATHNATIVE}/environment-setup.d/openssl.sh
>> 
>> OTOH - meta/recipes-core/meta/buildtools-tarball.bb creates a script which is sourced
>> at the very end of SDK environment setup and writes what's included in
>> {SDKPATHNATIVE}/environment-setup.d/openssl.sh on it's own - with maybe slightly
>> different location - what guides me to add:
>> ... 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
>> 
>> Maybe they way how nativesdk-cmake is doing it is the right way. Then, maybe
>> nativesdk-openssl should be reworked. This is for clarification.
>> 
>> Does it explain something better?
> 
> Yes and generating it directly might indeed be not the best option.
> Ideally, it'd generate a new source script which would run later and
> do any need adjustment. Do you agree?

I have at least no idea. I just wondered and thought asking this way
is an option.

> Either way, this commit seems to be mixing two changes and I'd prefer
> if you split it. This allow for nicer review as well as better commit
> messages of individual changes.

Of course I can (and will) split both changes and discuss them separately.
But I rated it highly possible that I get the feedback: both are wrong.
It's intended and should be X and Y and please send an update for nativesdk-openssl :)

Cheers
--
Jens Rehsack - rehsack@gmail.com


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-09 13:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 19:57 [OE-core][PATCH] toolchain-scripts.bbclass: also recognize ${SDK_SYS} env setups Jens Rehsack
2020-07-08 21:20 ` Otavio Salvador
2020-07-09  4:13   ` Jens Rehsack
2020-07-09 11:52     ` Otavio Salvador
2020-07-09 13:16       ` Jens Rehsack

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.