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 v3 3/3] rootfs sbom: directly use captured apt state without extraction
Date: Mon,  7 Sep 2026 14:39:45 +0200	[thread overview]
Message-ID: <20260907123945.353664-4-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260907123945.353664-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 | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/meta/classes/sbom.bbclass b/meta/classes/sbom.bbclass
index b2e8aff6..43b8a71e 100644
--- a/meta/classes/sbom.bbclass
+++ b/meta/classes/sbom.bbclass
@@ -51,20 +51,14 @@ 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
-
     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/20260907123945.353664-4-felix.moessbauer%40siemens.com.

  parent reply	other threads:[~2026-09-07 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 12:39 [PATCH v3 0/3] Update debsbom tool 'Felix Moessbauer' via isar-users
2026-09-07 12:39 ` [PATCH v3 1/3] imager sbom: simplify invocation of " 'Felix Moessbauer' via isar-users
2026-09-07 12:39 ` [PATCH v3 2/3] debsbom: update to v0.10.2 'Felix Moessbauer' via isar-users
2026-09-07 12:39 ` 'Felix Moessbauer' via isar-users [this message]
2026-09-08 14:54 ` [PATCH v3 0/3] 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=20260907123945.353664-4-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