[PATCH 1/1] meta: derive ROOTFS_DISTRO correctly in sbom-chroot's do_prepare_rootfs

7 views
Skip to first unread message

srinuv...@siemens.com

unread,
Sep 11, 2025, 9:01:44 AM (2 days ago) Sep 11
to isar-...@googlegroups.com, christop...@siemens.com, felix.mo...@siemens.com, cedric.h...@siemens.com, jan.k...@siemens.com, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

In downstream layers, the ROOTFS_DISTRO may differ from "debian".
During `rootfs_prepare` of `sbom-chroot`, this causes failures such as:

| DEBUG: Executing shell function rootfs_prepare
| tar: .../debian-bookworm-amd64.tar.zst: Cannot open: No such file or directory
| tar: Error is not recoverable: exiting now
| WARNING: exit code 2 from a shell command.

The actual bootstrap archive generated was:
industrial-bookworm-amd64.tar.zst

Fix this by deriving ROOTFS_DISTRO from the current DISTRO, ensuring the
bootstrap tarball is unpacked and configured correctly.

As part of this change, remove `ROOTFS_DISTRO`, `ROOTFS_ARCH`, and
`ROOTFS_BASE_DISTRO` from the `sbom-chroot` recipe.

This modification brings it in line with the sbuild-chroot-target recipe.

Note: The sbom class is already inherited via rootfs, so it can be removed from the sbom-chroot recipe.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta/recipes-devtools/sbom-chroot/sbom-chroot.bb | 5 -----
1 file changed, 5 deletions(-)

diff --git a/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb b/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
index 6f27f842..7f5ebc5b 100644
--- a/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
+++ b/meta/recipes-devtools/sbom-chroot/sbom-chroot.bb
@@ -8,11 +8,6 @@ LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260
PV = "1.0"

inherit rootfs
-inherit sbom
-
-ROOTFS_ARCH = "${HOST_ARCH}"
-ROOTFS_DISTRO = "${HOST_DISTRO}"
-ROOTFS_BASE_DISTRO = "${HOST_BASE_DISTRO}"

ROOTFS_FEATURES = "no-generate-initrd"

--
2.39.5

MOESSBAUER, Felix

unread,
Sep 11, 2025, 9:53:38 AM (2 days ago) Sep 11
to isar-...@googlegroups.com, Arjunan, Srinu, Steiger, Christoph, cedric.h...@siemens.com, Kiszka, Jan
This patch is based on the SBOM patchset which is not merged yet.
Please directly provide your feedback on the SBOM patchset to fix it
there.

Best regards,
Felix

> -
> -ROOTFS_ARCH = "${HOST_ARCH}"
> -ROOTFS_DISTRO = "${HOST_DISTRO}"
> -ROOTFS_BASE_DISTRO = "${HOST_BASE_DISTRO}"
>
> ROOTFS_FEATURES = "no-generate-initrd"
>
> --
> 2.39.5

--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

Reply all
Reply to author
Forward
0 new messages