diff options
| author | Tim Orling <tim.orling@konsulko.com> | 2026-04-07 13:42:15 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-12 13:53:29 +0000 |
| commit | 168afc8354c12bce93f4f916e87580e01ea83f4d (patch) | |
| tree | ab9f85eb4bceb585aaac0610dd541e64bb74a46d /recipes-containers/vcontainer | |
| parent | b59fb87c0e991aa95f62627c3b2a606956ef6377 (diff) | |
| download | meta-virtualization-168afc8354c12bce93f4f916e87580e01ea83f4d.tar.gz | |
vcontainer-tarball: fix PACKAGE_ARCH for SPDX do_create_spdx
PACKAGE_ARCH must be "${SDK_ARCH}-${SDKPKGSUFFIX}" (e.g. x86_64-nativesdk)
to match the pattern explicitly listed in SSTATE_ARCHS in
meta/classes-global/sstate.bbclass.
do_create_recipe_spdx writes the static SPDX document under
DEPLOY_DIR_SPDX/${SSTATE_PKGARCH}/static/
where SSTATE_PKGARCH = PACKAGE_ARCH. do_create_spdx then calls
find_jsonld() which searches only the arch directories listed in
SPDX_MULTILIB_SSTATE_ARCHS (derived from SSTATE_ARCHS via
all_multilib_tune_values).
The previous value "${SDK_ARCH}_${SDK_OS}" evaluates to "x86_64_linux"
which is NOT listed in SSTATE_ARCHS, so the static document was written
to a directory never searched, causing the fatal:
ERROR: Could not find a static SPDX document named static-vcontainer-tarball
The correct value "${SDK_ARCH}-${SDKPKGSUFFIX}" evaluates to
"x86_64-nativesdk" which IS listed in SSTATE_ARCHS as the literal
"${SDK_ARCH}-${SDKPKGSUFFIX}" entry, and matches the pattern used by
buildtools-tarball.bb (the reference for host-only SDK tarballs with
TARGET_ARCH = "none" / TARGET_OS = "none").
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Diffstat (limited to 'recipes-containers/vcontainer')
| -rw-r--r-- | recipes-containers/vcontainer/vcontainer-tarball.bb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/recipes-containers/vcontainer/vcontainer-tarball.bb b/recipes-containers/vcontainer/vcontainer-tarball.bb index ee3c1147..ed9b8e13 100644 --- a/recipes-containers/vcontainer/vcontainer-tarball.bb +++ b/recipes-containers/vcontainer/vcontainer-tarball.bb | |||
| @@ -50,6 +50,15 @@ TOOLCHAIN_TARGET_TASK = "" | |||
| 50 | TARGET_ARCH = "none" | 50 | TARGET_ARCH = "none" |
| 51 | TARGET_OS = "none" | 51 | TARGET_OS = "none" |
| 52 | 52 | ||
| 53 | # Must use ${SDK_ARCH}-${SDKPKGSUFFIX} (e.g. x86_64-nativesdk) to match | ||
| 54 | # the pattern explicitly listed in SSTATE_ARCHS, which SPDX's find_jsonld() | ||
| 55 | # searches when locating the static recipe SPDX document generated by | ||
| 56 | # do_create_recipe_spdx. Using ${SDK_ARCH}_${SDK_OS} (x86_64_linux) is NOT | ||
| 57 | # in SSTATE_ARCHS and causes do_create_spdx to fatal with "Could not find a | ||
| 58 | # static SPDX document named static-vcontainer-tarball". | ||
| 59 | # See: meta/classes-global/sstate.bbclass SSTATE_ARCHS definition and | ||
| 60 | # buildtools-tarball.bb for the reference pattern. | ||
| 61 | |||
| 53 | # Host tools to include via SDK | 62 | # Host tools to include via SDK |
| 54 | # Note: nativesdk-qemu-vcontainer is a minimal QEMU without OpenGL/virgl | 63 | # Note: nativesdk-qemu-vcontainer is a minimal QEMU without OpenGL/virgl |
| 55 | # to avoid mesa -> llvm -> clang build dependency chain | 64 | # to avoid mesa -> llvm -> clang build dependency chain |
| @@ -66,7 +75,7 @@ SDK_TITLE = "vcontainer tools (vdkr/vpdmn)" | |||
| 66 | 75 | ||
| 67 | # SDK configuration (same pattern as buildtools-tarball) | 76 | # SDK configuration (same pattern as buildtools-tarball) |
| 68 | MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" | 77 | MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" |
| 69 | PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}" | 78 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
| 70 | PACKAGE_ARCHS = "" | 79 | PACKAGE_ARCHS = "" |
| 71 | SDK_PACKAGE_ARCHS += "vcontainer-dummy-${SDKPKGSUFFIX}" | 80 | SDK_PACKAGE_ARCHS += "vcontainer-dummy-${SDKPKGSUFFIX}" |
| 72 | 81 | ||
