commands/sbom: emit an SPDX 3.0 SBOM of the installed packages - #198
commands/sbom: emit an SPDX 3.0 SBOM of the installed packages#198hiagofranco wants to merge 1 commit into
Conversation
606e8c5 to
cd22840
Compare
yoctopidg3
left a comment
There was a problem hiding this comment.
This looks good. One thing maybe for the future is a --validate using https://tools.spdx.org/app/validate/
b43ab84 to
d2ad341
Compare
I played with their API, it works, however it keeps the SBOM json-ld file public for 10 days in their servers. So instead of doing that without the user consent, I just documented this and added as a 'note' output to suggest the user to upload himself, knowing it will be there for 10 days. |
d2ad341 to
27ffa55
Compare
6baabed to
4a2b873
Compare
|
Rebased, checks are now passing. Fixed an issues where 'install -f' would fail after the second run trying to generate the sbom output. This is now ready for reviews. |
fd47bfc to
5a3700a
Compare
|
Two things — one standalone, one an interaction with another open PR. The document isn't byte-stable
But let created = chrono::Utc::now().format("%Y-%m-%dT%H:%M:%SZ").to_string();so two runs over an unchanged sysroot still produce different bytes — exactly the churn the comment is guarding against. The namespace work does its job and Honoring Interaction with #193#193 changes the rpmdb seed source from the rootfs to a dependency's sysroot. That breaks the assumption behind Concretely, #193 measures Short version of the fix: have the seed step record its transaction ids at Whichever of these two lands second should carry the change. |
Generate SPDX 3.0 SBOM json output from the installed RPM packages. The package list is read from each installed sysroot's RPM database, so it is the transitive closure the device actually holds rather than the packages avocado.yaml declares. Generate one document with one root per scope rather than one document per scope. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5a3700a to
1faa682
Compare
Thanks, fixed the bug and left the second one open, as you mentioned, whatever PR is merged first should fix it. Please take a look. |
commands/sbom: emit an SPDX 3.0 SBOM of the installed packages
Generate SPDX 3.0 SBOM json output from the installed RPM packages.
The package list is read from each installed sysroot's RPM database, so
it is the transitive closure the device actually holds rather than the
packages avocado.yaml declares. Generate one document with one root per
scope rather than one document per scope.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com