From: Paul Barker <paul@pbarker.dev>
To: roosesweb@gmail.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] classes/sbom-cve-check: fall back to the stable SBOM symlink
Date: Mon, 17 Aug 2026 20:10:54 +0100 [thread overview]
Message-ID: <483e1f11846c0941d287a3a9228bd759a1310bdd.camel@pbarker.dev> (raw)
In-Reply-To: <20260804112437.3357583-1-roosesweb@gmail.com>
On Tue, 2026-08-04 at 13:24 +0200, roosesweb@gmail.com wrote:
> do_sbom_cve_check builds its input path from ${IMAGE_NAME}, which carries
> ${IMAGE_VERSION_SUFFIX} and so ${DATETIME}. That value is excluded from task
> hashes but changes on every bitbake invocation, so the path is only correct when
> do_create_image_sbom_spdx ran in the same invocation.
>
> It does not when the class is newly enabled on an existing build tree: the image
> SBOM is already deployed and stamped from an earlier build, do_sbom_cve_check has
> never run, so bitbake executes only the latter and it looks for a file whose
> timestamp belongs to the current invocation. The same happens on any forced re-run
> of just this task:
>
> $ bitbake -f -c sbom_cve_check core-image-minimal
> ERROR: core-image-minimal-1.0-r0 do_sbom_cve_check: sbom-cve-check failed: [...]
> sbom-cve-check: error: [Errno 2] No such file or directory:
> '.../core-image-minimal-qemux86-64.rootfs-20260804101106.spdx.json'
>
> $ ls tmp/deploy/images/qemux86-64/*.spdx.json
> core-image-minimal-qemux86-64.rootfs-20260804095834.spdx.json
> core-image-minimal-qemux86-64.rootfs.spdx.json -> ...-20260804095834.spdx.json
>
> The file is there under ${IMAGE_LINK_NAME}, the symlink do_create_image_sbom_spdx
> maintains. Keep preferring the timestamped name, so behaviour is unchanged whenever
> it exists, and fall back to the symlink rather than failing. Guarded on link_name
> being set, since IMAGE_LINK_NAME can be empty.
>
> Signed-off-by: Thomas Roos <roosesweb@gmail.com>
Hi Thomas,
This code has already changed recently in commit 2a80840a4fe0
("sbom-cve-check: Fix breakage with empty IMAGE_LINK_NAME"). Perhaps we
should have just added a fallback to IMAGE_NAME if IMAGE_LINK_NAME is
unset.
A quick scan of the code shows that there are other places where it is
assumed that IMAGE_LINK_NAME is valid, such as vex.bbclass.
Best regards,
--
Paul Barker
next prev parent reply other threads:[~2026-08-17 19:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 11:24 [PATCH] classes/sbom-cve-check: fall back to the stable SBOM symlink roosesweb
2026-08-17 19:10 ` Paul Barker [this message]
2026-08-19 6:22 ` [PATCH v2 0/5] Handle an empty IMAGE_LINK_NAME consistently Thomas Roos
2026-08-19 6:22 ` [PATCH v2 1/5] sbom-cve-check: read the image SBOM through the stable symlink Thomas Roos
2026-08-19 6:22 ` [PATCH v2 2/5] vex: skip the VEX symlink when IMAGE_LINK_NAME is empty Thomas Roos
2026-08-19 6:22 ` [PATCH v2 3/5] testexport: fall back to IMAGE_NAME " Thomas Roos
2026-08-19 6:22 ` [PATCH v2 4/5] image_types: skip multiubi symlinks " Thomas Roos
2026-08-19 6:22 ` [PATCH v2 5/5] oeqa/selftest/imagefeatures: test an empty IMAGE_LINK_NAME Thomas Roos
2026-08-19 6:30 ` [PATCH] classes/sbom-cve-check: fall back to the stable SBOM symlink Thomas Roos
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=483e1f11846c0941d287a3a9228bd759a1310bdd.camel@pbarker.dev \
--to=paul@pbarker.dev \
--cc=openembedded-core@lists.openembedded.org \
--cc=roosesweb@gmail.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