diff options
| author | Jayasurya Maganuru <Maganuru.Jayasurya@windriver.com> | 2025-10-29 03:10:55 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:15:35 +0000 |
| commit | 4ad351892f4f61bd6018992f52d9a16a3c6c76f5 (patch) | |
| tree | b8bc97cbb48ac4938e7554850d8198b66665c60b /meta | |
| parent | c570bfcdb94e7acb019ad67fcb20c83846775bc0 (diff) | |
| download | poky-4ad351892f4f61bd6018992f52d9a16a3c6c76f5.tar.gz | |
populate_sdk_ext: include image SPDX tasks in locked signatures
Fixes [YOCTO #15726]
Fixes [YOCTO #15853]
After the switch to SPDX 3.0, eSDK installation can fail with errors like:
gcc-source-1*:do_fetch attempted to execute unexpectedly
This is usually due to missing setscene tasks.
This is caused by image-related SPDX tasks, such as do_create_image_sbom_spdx,
being excluded from the locked signatures. Without these, the corresponding
sstate-cache artifacts are missing during eSDK installation.
Previously (under SPDX 2.2), these image SPDX/SBOM tasks were not
dependencies of do_populate_sdk_ext task, so their sstate artifacts
were not required at install time.
Fix:
- Added `do_create_image_sbom_spdx` as a task dependency before `do_sdk_depends`
to ensure SPDX/SBOM data generation is integrated in the eSDK build flow.
- Adjusted `prepare_locked_cache()` to retain SDK_TARGETS (and their multilib
variants) in the locked signatures file, ensuring image SPDX/SBOM tasks are
preserved and not excluded during locked-sigs filtering.
With this fix, eSDK installs work without unexpected task runs, even
for custom distros or "tar" images.
(From OE-Core rev: 464c92ed53c8786b450bb2d971633ddf392a2bbb)
Signed-off-by: Jayasurya Maganuru <Maganuru.Jayasurya@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/create-spdx-sdk-3.0.bbclass | 1 | ||||
| -rw-r--r-- | meta/classes-recipe/populate_sdk_ext.bbclass | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes-recipe/create-spdx-sdk-3.0.bbclass b/meta/classes-recipe/create-spdx-sdk-3.0.bbclass index e5f220cdfa..4fb6b1283e 100644 --- a/meta/classes-recipe/create-spdx-sdk-3.0.bbclass +++ b/meta/classes-recipe/create-spdx-sdk-3.0.bbclass | |||
| @@ -18,6 +18,7 @@ do_populate_sdk_ext[postfuncs] += "sdk_ext_create_sbom" | |||
| 18 | do_populate_sdk_ext[file-checksums] += "${SPDX3_DEP_FILES}" | 18 | do_populate_sdk_ext[file-checksums] += "${SPDX3_DEP_FILES}" |
| 19 | POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk-ext = " sdk_ext_host_create_spdx" | 19 | POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk-ext = " sdk_ext_host_create_spdx" |
| 20 | POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk-ext = " sdk_ext_target_create_spdx" | 20 | POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk-ext = " sdk_ext_target_create_spdx" |
| 21 | addtask do_create_image_sbom_spdx before do_sdk_depends | ||
| 21 | 22 | ||
| 22 | python sdk_host_create_spdx() { | 23 | python sdk_host_create_spdx() { |
| 23 | from pathlib import Path | 24 | from pathlib import Path |
diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass index 2859320ddf..2838ca1a03 100644 --- a/meta/classes-recipe/populate_sdk_ext.bbclass +++ b/meta/classes-recipe/populate_sdk_ext.bbclass | |||
| @@ -460,6 +460,15 @@ def prepare_locked_cache(d, baseoutpath, derivative, conf_initpath): | |||
| 460 | 460 | ||
| 461 | # Filter the locked signatures file to just the sstate tasks we are interested in | 461 | # Filter the locked signatures file to just the sstate tasks we are interested in |
| 462 | excluded_targets = get_sdk_install_targets(d, images_only=True) | 462 | excluded_targets = get_sdk_install_targets(d, images_only=True) |
| 463 | sdk_targets = d.getVar('SDK_TARGETS') | ||
| 464 | ext_sdk_target_set = set(multilib_pkg_extend(d, sdk_targets).split()) | ||
| 465 | excluded_set = set(excluded_targets.split()) | ||
| 466 | |||
| 467 | # Ensure SDK_TARGETS and their image SPDX/SBOM tasks are included in the locked signatures, | ||
| 468 | # as they are required during eSDK installation. | ||
| 469 | filtered_excluded_set = excluded_set - ext_sdk_target_set | ||
| 470 | excluded_targets = ' '.join(filtered_excluded_set) | ||
| 471 | |||
| 463 | sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc' | 472 | sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc' |
| 464 | lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' | 473 | lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' |
| 465 | #nativesdk-only sigfile to merge into locked-sigs.inc | 474 | #nativesdk-only sigfile to merge into locked-sigs.inc |
