All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] linux-yocto: use openssl-native.bbclass
@ 2022-10-04 10:11 Mikko Rapeli
  2022-10-04 10:44 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Mikko Rapeli @ 2022-10-04 10:11 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mikko Rapeli

It sets environment variables etc correctly for openssl-native use.
For most kernel side use cases are covered by plain openssl native
wrapper but some out of tree e.g. python scripts may be not.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/recipes-kernel/linux/linux-yocto-dev.bb       | 4 ++--
 meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb   | 4 +++-
 meta/recipes-kernel/linux/linux-yocto-rt_5.19.bb   | 4 +++-
 meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb | 4 +++-
 meta/recipes-kernel/linux/linux-yocto-tiny_5.19.bb | 4 +++-
 meta/recipes-kernel/linux/linux-yocto_5.15.bb      | 4 +++-
 meta/recipes-kernel/linux/linux-yocto_5.19.bb      | 4 +++-
 7 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index b1b57beac3..fe701d25c8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -11,7 +11,7 @@
 inherit kernel
 require recipes-kernel/linux/linux-yocto.inc
 # for ncurses tests
-inherit pkgconfig
+inherit pkgconfig openssl-native
 
 # provide this .inc to set specific revisions
 include recipes-kernel/linux/linux-yocto-dev-revisions.inc
@@ -37,7 +37,7 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
 DEPENDS += "gmp-native libmpc-native"
 
 # yaml and dtschema are required for 5.16+ device tree validation, libyaml is checked
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
index 6f8648e004..8a97b8a575 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
@@ -22,7 +22,9 @@ LINUX_VERSION ?= "5.15.68"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
+
+inherit openssl-native
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.19.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.19.bb
index b3e9fbae62..e028d07b45 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.19.bb
@@ -22,7 +22,9 @@ LINUX_VERSION ?= "5.19.9"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
+
+inherit openssl-native
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
index 4f2bb48743..e58931e212 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
@@ -9,7 +9,9 @@ LINUX_VERSION ?= "5.15.68"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
+
+inherit openssl-native
 
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.19.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.19.bb
index 466b7063b4..6e5c72be60 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.19.bb
@@ -9,7 +9,9 @@ LINUX_VERSION ?= "5.19.9"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
+
+inherit openssl-native
 
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.15.bb b/meta/recipes-kernel/linux/linux-yocto_5.15.bb
index 2f91fb7a37..8303395326 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.15.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.15.bb
@@ -41,9 +41,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 LINUX_VERSION ?= "5.15.68"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
 DEPENDS += "gmp-native libmpc-native"
 
+inherit openssl-native
+
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "kernel-meta"
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.19.bb b/meta/recipes-kernel/linux/linux-yocto_5.19.bb
index f882972e35..3e915a2f5e 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.19.bb
@@ -41,9 +41,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 LINUX_VERSION ?= "5.19.9"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "util-linux-native"
 DEPENDS += "gmp-native libmpc-native"
 
+inherit openssl-native
+
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "kernel-meta"
-- 
2.17.1



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

* Re: [OE-core] [PATCH 4/4] linux-yocto: use openssl-native.bbclass
  2022-10-04 10:11 [PATCH 4/4] linux-yocto: use openssl-native.bbclass Mikko Rapeli
@ 2022-10-04 10:44 ` Richard Purdie
  2022-10-04 11:28   ` Mikko Rapeli
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2022-10-04 10:44 UTC (permalink / raw)
  To: Mikko Rapeli, openembedded-core

On Tue, 2022-10-04 at 13:11 +0300, Mikko Rapeli wrote:
> It sets environment variables etc correctly for openssl-native use.
> For most kernel side use cases are covered by plain openssl native
> wrapper but some out of tree e.g. python scripts may be not.

When you say "out of tree", you mean scripts in the kernel we don't use
by default, or scripts that aren't in the kernel at all but some users
add?

I'd have thought the dependency on the class would be added where it
was being used?

Cheers,

Richard


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

* Re: [OE-core] [PATCH 4/4] linux-yocto: use openssl-native.bbclass
  2022-10-04 10:44 ` [OE-core] " Richard Purdie
@ 2022-10-04 11:28   ` Mikko Rapeli
  0 siblings, 0 replies; 3+ messages in thread
From: Mikko Rapeli @ 2022-10-04 11:28 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hi,

On Tue, Oct 04, 2022 at 11:44:51AM +0100, Richard Purdie wrote:
> On Tue, 2022-10-04 at 13:11 +0300, Mikko Rapeli wrote:
> > It sets environment variables etc correctly for openssl-native use.
> > For most kernel side use cases are covered by plain openssl native
> > wrapper but some out of tree e.g. python scripts may be not.
> 
> When you say "out of tree", you mean scripts in the kernel we don't use
> by default, or scripts that aren't in the kernel at all but some users
> add?

Both. Same for u-boot which has internal signing scripts that require
python3-cryptography-native which doesn't work out of the box.

> I'd have thought the dependency on the class would be added where it
> was being used?

Yes, this could be done too, but I'd like to set a clear example in poky
by using this bbclass.

The root causes are not obvious when ../usr/bin/openssl works but
../usr/lib/libcrypto.so doesn't.

Cheers,

-Mikko


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

end of thread, other threads:[~2022-10-04 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 10:11 [PATCH 4/4] linux-yocto: use openssl-native.bbclass Mikko Rapeli
2022-10-04 10:44 ` [OE-core] " Richard Purdie
2022-10-04 11:28   ` Mikko Rapeli

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.