summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes-recipe/create-spdx-image-3.0.bbclass (renamed from meta/classes/create-spdx-image-3.0.bbclass)66
-rw-r--r--meta/classes-recipe/create-spdx-sdk-3.0.bbclass72
-rw-r--r--meta/classes-recipe/populate_sdk_base.bbclass3
-rw-r--r--meta/classes-recipe/testimage.bbclass2
-rw-r--r--meta/classes/create-spdx-3.0.bbclass1
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb3
6 files changed, 79 insertions, 68 deletions
diff --git a/meta/classes/create-spdx-image-3.0.bbclass b/meta/classes-recipe/create-spdx-image-3.0.bbclass
index 1cad8537d1..fcae134d66 100644
--- a/meta/classes/create-spdx-image-3.0.bbclass
+++ b/meta/classes-recipe/create-spdx-image-3.0.bbclass
@@ -77,69 +77,3 @@ python do_create_image_sbom_spdx_setscene() {
77 sstate_setscene(d) 77 sstate_setscene(d)
78} 78}
79addtask do_create_image_sbom_spdx_setscene 79addtask do_create_image_sbom_spdx_setscene
80
81do_populate_sdk[recrdeptask] += "do_create_spdx do_create_package_spdx"
82do_populate_sdk[cleandirs] += "${SPDXSDKWORK}"
83do_populate_sdk[postfuncs] += "sdk_create_sbom"
84POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk = " sdk_host_create_spdx"
85POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk = " sdk_target_create_spdx"
86
87do_populate_sdk_ext[recrdeptask] += "do_create_spdx do_create_package_spdx"
88do_populate_sdk_ext[cleandirs] += "${SPDXSDKEXTWORK}"
89do_populate_sdk_ext[postfuncs] += "sdk_ext_create_sbom"
90POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk-ext = " sdk_ext_host_create_spdx"
91POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk-ext = " sdk_ext_target_create_spdx"
92
93python sdk_host_create_spdx() {
94 from pathlib import Path
95 import oe.spdx30_tasks
96 spdx_work_dir = Path(d.getVar('SPDXSDKWORK'))
97
98 oe.spdx30_tasks.sdk_create_spdx(d, "host", spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME"))
99}
100
101python sdk_target_create_spdx() {
102 from pathlib import Path
103 import oe.spdx30_tasks
104 spdx_work_dir = Path(d.getVar('SPDXSDKWORK'))
105
106 oe.spdx30_tasks.sdk_create_spdx(d, "target", spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME"))
107}
108
109python sdk_ext_host_create_spdx() {
110 from pathlib import Path
111 import oe.spdx30_tasks
112 spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK'))
113
114 # TODO: This doesn't seem to work
115 oe.spdx30_tasks.sdk_create_spdx(d, "host", spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME"))
116}
117
118python sdk_ext_target_create_spdx() {
119 from pathlib import Path
120 import oe.spdx30_tasks
121 spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK'))
122
123 # TODO: This doesn't seem to work
124 oe.spdx30_tasks.sdk_create_spdx(d, "target", spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME"))
125}
126
127
128python sdk_create_sbom() {
129 from pathlib import Path
130 import oe.spdx30_tasks
131 sdk_deploydir = Path(d.getVar("SDKDEPLOYDIR"))
132 spdx_work_dir = Path(d.getVar('SPDXSDKWORK'))
133
134 oe.spdx30_tasks.create_sdk_sbom(d, sdk_deploydir, spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME"))
135}
136
137python sdk_ext_create_sbom() {
138 from pathlib import Path
139 import oe.spdx30_tasks
140 sdk_deploydir = Path(d.getVar("SDKEXTDEPLOYDIR"))
141 spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK'))
142
143 oe.spdx30_tasks.create_sdk_sbom(d, sdk_deploydir, spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME"))
144}
145
diff --git a/meta/classes-recipe/create-spdx-sdk-3.0.bbclass b/meta/classes-recipe/create-spdx-sdk-3.0.bbclass
new file mode 100644
index 0000000000..ea01a21cc5
--- /dev/null
+++ b/meta/classes-recipe/create-spdx-sdk-3.0.bbclass
@@ -0,0 +1,72 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: GPL-2.0-only
5#
6# SPDX SDK tasks
7
8do_populate_sdk[recrdeptask] += "do_create_spdx do_create_package_spdx"
9do_populate_sdk[cleandirs] += "${SPDXSDKWORK}"
10do_populate_sdk[postfuncs] += "sdk_create_sbom"
11POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk = " sdk_host_create_spdx"
12POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk = " sdk_target_create_spdx"
13
14do_populate_sdk_ext[recrdeptask] += "do_create_spdx do_create_package_spdx"
15do_populate_sdk_ext[cleandirs] += "${SPDXSDKEXTWORK}"
16do_populate_sdk_ext[postfuncs] += "sdk_ext_create_sbom"
17POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk-ext = " sdk_ext_host_create_spdx"
18POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk-ext = " sdk_ext_target_create_spdx"
19
20python sdk_host_create_spdx() {
21 from pathlib import Path
22 import oe.spdx30_tasks
23 spdx_work_dir = Path(d.getVar('SPDXSDKWORK'))
24
25 oe.spdx30_tasks.sdk_create_spdx(d, "host", spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME"))
26}
27
28python sdk_target_create_spdx() {
29 from pathlib import Path
30 import oe.spdx30_tasks
31 spdx_work_dir = Path(d.getVar('SPDXSDKWORK'))
32
33 oe.spdx30_tasks.sdk_create_spdx(d, "target", spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME"))
34}
35
36python sdk_ext_host_create_spdx() {
37 from pathlib import Path
38 import oe.spdx30_tasks
39 spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK'))
40
41 # TODO: This doesn't seem to work
42 oe.spdx30_tasks.sdk_create_spdx(d, "host", spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME"))
43}
44
45python sdk_ext_target_create_spdx() {
46 from pathlib import Path
47 import oe.spdx30_tasks
48 spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK'))
49
50 # TODO: This doesn't seem to work
51 oe.spdx30_tasks.sdk_create_spdx(d, "target", spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME"))
52}
53
54
55python sdk_create_sbom() {
56 from pathlib import Path
57 import oe.spdx30_tasks
58 sdk_deploydir = Path(d.getVar("SDKDEPLOYDIR"))
59 spdx_work_dir = Path(d.getVar('SPDXSDKWORK'))
60
61 oe.spdx30_tasks.create_sdk_sbom(d, sdk_deploydir, spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME"))
62}
63
64python sdk_ext_create_sbom() {
65 from pathlib import Path
66 import oe.spdx30_tasks
67 sdk_deploydir = Path(d.getVar("SDKEXTDEPLOYDIR"))
68 spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK'))
69
70 oe.spdx30_tasks.create_sdk_sbom(d, sdk_deploydir, spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME"))
71}
72
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index 61a8b5e300..50bb81cd04 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -4,6 +4,9 @@
4# SPDX-License-Identifier: MIT 4# SPDX-License-Identifier: MIT
5# 5#
6 6
7SDK_CLASSES += "${@bb.utils.contains("IMAGE_CLASSES", "testimage", "testsdk", "", d)}"
8inherit_defer ${SDK_CLASSES}
9
7PACKAGES = "" 10PACKAGES = ""
8 11
9# This exists as an optimization for SPDX processing to only run in image and 12# 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 531330f384..6d1e1a107a 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -483,5 +483,3 @@ python () {
483 if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"): 483 if oe.types.boolean(d.getVar("TESTIMAGE_AUTO") or "False"):
484 bb.build.addtask("testimage", "do_build", "do_image_complete", d) 484 bb.build.addtask("testimage", "do_build", "do_image_complete", d)
485} 485}
486
487inherit testsdk
diff --git a/meta/classes/create-spdx-3.0.bbclass b/meta/classes/create-spdx-3.0.bbclass
index 2eb44ba808..c1241e5856 100644
--- a/meta/classes/create-spdx-3.0.bbclass
+++ b/meta/classes/create-spdx-3.0.bbclass
@@ -115,6 +115,7 @@ SPDX_PACKAGE_SUPPLIER[doc] = "The base variable name to describe the Agent who \
115 115
116 116
117IMAGE_CLASSES:append = " create-spdx-image-3.0" 117IMAGE_CLASSES:append = " create-spdx-image-3.0"
118SDK_CLASSES += "create-spdx-sdk-3.0"
118 119
119oe.spdx30_tasks.set_timestamp_now[vardepsexclude] = "SPDX_INCLUDE_TIMESTAMPS" 120oe.spdx30_tasks.set_timestamp_now[vardepsexclude] = "SPDX_INCLUDE_TIMESTAMPS"
120oe.spdx30_tasks.get_package_sources_from_debug[vardepsexclude] += "STAGING_KERNEL_DIR" 121oe.spdx30_tasks.get_package_sources_from_debug[vardepsexclude] += "STAGING_KERNEL_DIR"
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 92fbda335d..e2ce5b3ecf 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"
112# Directory in testsdk that contains testcases 112# Directory in testsdk that contains testcases
113TESTSDK_CASES = "buildtools-cases" 113TESTSDK_CASES = "buildtools-cases"
114 114
115# We have our own code, avoid deferred inherit
116SDK_CLASSES:remove = "testsdk"
117
115python do_testsdk() { 118python do_testsdk() {
116 import oeqa.sdk.testsdk 119 import oeqa.sdk.testsdk
117 testsdk = oeqa.sdk.testsdk.TestSDK() 120 testsdk = oeqa.sdk.testsdk.TestSDK()