-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism …
…to fix tarball SPDX manifests 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 <[email protected]>
- Loading branch information
Showing
6 changed files
with
79 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# | ||
# Copyright OpenEmbedded Contributors | ||
# | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
# SPDX SDK tasks | ||
|
||
do_populate_sdk[recrdeptask] += "do_create_spdx do_create_package_spdx" | ||
do_populate_sdk[cleandirs] += "${SPDXSDKWORK}" | ||
do_populate_sdk[postfuncs] += "sdk_create_sbom" | ||
POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk = " sdk_host_create_spdx" | ||
POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk = " sdk_target_create_spdx" | ||
|
||
do_populate_sdk_ext[recrdeptask] += "do_create_spdx do_create_package_spdx" | ||
do_populate_sdk_ext[cleandirs] += "${SPDXSDKEXTWORK}" | ||
do_populate_sdk_ext[postfuncs] += "sdk_ext_create_sbom" | ||
POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk-ext = " sdk_ext_host_create_spdx" | ||
POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk-ext = " sdk_ext_target_create_spdx" | ||
|
||
python sdk_host_create_spdx() { | ||
from pathlib import Path | ||
import oe.spdx30_tasks | ||
spdx_work_dir = Path(d.getVar('SPDXSDKWORK')) | ||
|
||
oe.spdx30_tasks.sdk_create_spdx(d, "host", spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME")) | ||
} | ||
|
||
python sdk_target_create_spdx() { | ||
from pathlib import Path | ||
import oe.spdx30_tasks | ||
spdx_work_dir = Path(d.getVar('SPDXSDKWORK')) | ||
|
||
oe.spdx30_tasks.sdk_create_spdx(d, "target", spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME")) | ||
} | ||
|
||
python sdk_ext_host_create_spdx() { | ||
from pathlib import Path | ||
import oe.spdx30_tasks | ||
spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK')) | ||
|
||
# TODO: This doesn't seem to work | ||
oe.spdx30_tasks.sdk_create_spdx(d, "host", spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME")) | ||
} | ||
|
||
python sdk_ext_target_create_spdx() { | ||
from pathlib import Path | ||
import oe.spdx30_tasks | ||
spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK')) | ||
|
||
# TODO: This doesn't seem to work | ||
oe.spdx30_tasks.sdk_create_spdx(d, "target", spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME")) | ||
} | ||
|
||
|
||
python sdk_create_sbom() { | ||
from pathlib import Path | ||
import oe.spdx30_tasks | ||
sdk_deploydir = Path(d.getVar("SDKDEPLOYDIR")) | ||
spdx_work_dir = Path(d.getVar('SPDXSDKWORK')) | ||
|
||
oe.spdx30_tasks.create_sdk_sbom(d, sdk_deploydir, spdx_work_dir, d.getVar("TOOLCHAIN_OUTPUTNAME")) | ||
} | ||
|
||
python sdk_ext_create_sbom() { | ||
from pathlib import Path | ||
import oe.spdx30_tasks | ||
sdk_deploydir = Path(d.getVar("SDKEXTDEPLOYDIR")) | ||
spdx_work_dir = Path(d.getVar('SPDXSDKEXTWORK')) | ||
|
||
oe.spdx30_tasks.create_sdk_sbom(d, sdk_deploydir, spdx_work_dir, d.getVar("TOOLCHAINEXT_OUTPUTNAME")) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters