public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: christoph.steiger@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v4 2/2] rootfs sbom: directly use captured apt state without extraction
Date: Wed,  9 Sep 2026 08:18:31 +0200	[thread overview]
Message-ID: <20260909061831.1241330-3-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260909061831.1241330-1-felix.moessbauer@siemens.com>

Since version 0.10 debsbom is capable of reading the apt state from a
tarball instead of an extracted rootfs. By that, we can remove the
manual extraction of the apt state and instead directly pass the tarball
to debsbom.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/sbom.bbclass | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/meta/classes/sbom.bbclass b/meta/classes/sbom.bbclass
index b2e8aff6..dad8e8f6 100644
--- a/meta/classes/sbom.bbclass
+++ b/meta/classes/sbom.bbclass
@@ -51,20 +51,17 @@ EOF
 }
 
 generate_sbom() {
-    run_privileged_heredoc <<'EOF'
-        mkdir -p ${SBOM_CHROOT_LOCAL}/mnt/rootfs \
-                 ${SBOM_CHROOT_LOCAL}/mnt/deploy-dir
-        tar -xf ${WORKDIR}/${ROOTFS_APT_STATE} --zstd \
-            -C ${SBOM_CHROOT_LOCAL}/mnt/rootfs
-EOF
+    run_privileged \
+        mkdir -p ${SBOM_CHROOT_LOCAL}/mnt/deploy-dir
 
     TIMESTAMP=$(date --iso-8601=s -d @${SOURCE_DATE_EPOCH})
+    unzstd < ${WORKDIR}/${ROOTFS_APT_STATE} | \
     bwrap \
         --unshare-user \
         --unshare-pid \
         --bind ${SBOM_CHROOT_LOCAL} / \
         --bind ${SBOM_LOCAL_DEPLOYDIR} /mnt/deploy-dir \
-        -- debsbom -v generate ${SBOM_DEBSBOM_TYPE_ARGS} -r /mnt/rootfs -o /mnt/deploy-dir/'${ROOTFS_PACKAGE_SUFFIX}' \
+        -- debsbom -v generate ${SBOM_DEBSBOM_TYPE_ARGS} -r - -o /mnt/deploy-dir/'${ROOTFS_PACKAGE_SUFFIX}' \
             --distro-name '${SBOM_DISTRO_NAME}' --distro-supplier '${SBOM_DISTRO_SUPPLIER}' \
             --distro-version '${SBOM_DISTRO_VERSION}' --distro-arch '${DISTRO_ARCH}' \
             --base-distro-vendor '${SBOM_BASE_DISTRO_VENDOR}' \
-- 
2.55.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260909061831.1241330-3-felix.moessbauer%40siemens.com.

  parent reply	other threads:[~2026-09-09  6:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  6:18 [PATCH v4 0/2] Update debsbom tool 'Felix Moessbauer' via isar-users
2026-09-09  6:18 ` [PATCH v4 1/2] debsbom: update to v0.10.2 'Felix Moessbauer' via isar-users
2026-09-09  6:18 ` 'Felix Moessbauer' via isar-users [this message]
2026-09-14 12:31 ` [PATCH v4 0/2] Update debsbom tool Zhihang Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260909061831.1241330-3-felix.moessbauer@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=christoph.steiger@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox