From: Mark Hatle <mark.hatle@kernel.crashing.org>
To: openembedded-core@lists.openembedded.org
Subject: [scarthgap][PATCH 5/8] create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix tarball SPDX manifests
Date: Fri, 26 Jul 2024 11:22:35 -0500 [thread overview]
Message-ID: <1722010958-23635-5-git-send-email-mark.hatle@kernel.crashing.org> (raw)
In-Reply-To: <1722010958-23635-1-git-send-email-mark.hatle@kernel.crashing.org>
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently, "tarball" sdk based recipes don't generate SPDX manifests as they
don't include the rootfs generation classes. Split the SPDX 3.0 image class into
two so the SDK components can be included where needed.
To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which
the SDK code can use.
Migrate testsdk usage to this.
Also move the image/sdk spdx classes to classes-recipe rather than the general classes
directory since they'd never be included on a global level.
For buildtools-tarball, it has its own testsdk functions so disable the class there as
a deferred inherit would overwrite it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 662396533177b72cc1d83e95841b27f7e42dcb20)
Eliminate spdx-3.0 items, not applicable to Scarthgap.
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
meta/classes-recipe/populate_sdk_base.bbclass | 3 +++
meta/classes-recipe/testimage.bbclass | 2 --
meta/recipes-core/meta/buildtools-tarball.bb | 3 +++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index 6cb43ad..a103e7b 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -4,6 +4,9 @@
# SPDX-License-Identifier: MIT
#
+SDK_CLASSES += "${@bb.utils.contains("IMAGE_CLASSES", "testimage", "testsdk", "", d)}"
+inherit_defer ${SDK_CLASSES}
+
PACKAGES = ""
# This exists as an optimization for SPDX processing to only run in image and
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index ed0d87b..2f68f83 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -483,5 +483,3 @@ python () {
if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"):
bb.build.addtask("testimage", "do_build", "do_image_complete", d)
}
-
-inherit testsdk
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 92fbda3..e2ce5b3 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -112,6 +112,9 @@ INHIBIT_DEFAULT_DEPS = "1"
# Directory in testsdk that contains testcases
TESTSDK_CASES = "buildtools-cases"
+# We have our own code, avoid deferred inherit
+SDK_CLASSES:remove = "testsdk"
+
python do_testsdk() {
import oeqa.sdk.testsdk
testsdk = oeqa.sdk.testsdk.TestSDK()
--
1.8.3.1
next prev parent reply other threads:[~2024-07-26 16:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 16:22 [scarthgap][PATCH 1/8] package.py: Fix static debuginfo split Mark Hatle
2024-07-26 16:22 ` [scarthgap][PATCH 2/8] package.py: Fix static library processing Mark Hatle
2024-07-26 16:22 ` [scarthgap][PATCH 3/8] selftest-hardlink: Add additional test cases Mark Hatle
2024-07-26 16:22 ` [scarthgap][PATCH 4/8] create-spdx-*: Support multilibs via SPDX_MULTILIB_SSTATE_ARCHS Mark Hatle
2024-07-26 16:22 ` Mark Hatle [this message]
2024-07-26 16:40 ` Patchtest results for [scarthgap][PATCH 5/8] create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix tarball SPDX manifests patchtest
2024-07-26 16:22 ` [scarthgap][PATCH 6/8] oeqa sdk cases: Skip SDK test cases when TCLIBC is newlib Mark Hatle
2024-07-26 16:22 ` [scarthgap][PATCH 7/8] pseudo: Fix to work with glibc 2.40 Mark Hatle
2024-07-26 16:22 ` [scarthgap][PATCH 8/8] pseudo: Update to include open symlink handling bugfix Mark Hatle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1722010958-23635-5-git-send-email-mark.hatle@kernel.crashing.org \
--to=mark.hatle@kernel.crashing.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.