Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/4] spdx30: identity and purls of dependency downloads
@ 2026-11-18  9:29 Stefano Tondo
  2026-11-18  9:29 ` [PATCH 1/4] spdx30: Take name, version and PURL of downloads from the fetcher Stefano Tondo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stefano Tondo @ 2026-11-18  9:29 UTC (permalink / raw)
  To: openembedded-core
  Cc: Joshua Watt, Alexander Kanavin, Stefan Herbrechtsmeier,
	Stefano Tondo

Hi,

This series implements the parts of the RFC "spdx30: name, version
and purl for dependency downloads" [1] that we agreed on. It needs
the bitbake series "fetch: package identity of crate, gomod and npm
URLs" [2].

1. The SPDX of a crate, gomod or npm download gets the name, the
   version and the purl from the fetcher.
2. For Cargo recipes, a new do_cargo_metadata task writes the crate
   dependency graph for the target. The build links to each crate
   download with a runtime, build or test scope. A crate that is not
   used on the target gets an annotation.
3. Each output package gets the purls of its source downloads as
   external identifiers, as Joshua proposed: a statically linked
   dependency is part of the binary. A purl is left out only when the
   cargo graph proves that the crate is not in the target. The
   software_packageUrl of the package does not change.
4. Selftests with python3-bcrypt.

For python3-bcrypt, the output package gets the purls of 25 of its
42 crates. The other 17 crates are not built into the target.

Two points for review:

- All output packages of a recipe get the purls, also -dbg and -src.
  I have no proof per package, so I followed the rule "keep the purl
  unless there is proof".
- Go recipes have no filter yet. go version -m can give the proof per
  binary, and I can add it in a follow-up.

I ran oe-selftest -r spdx.SPDX30Check on master: all 20 tests pass.

[1] https://lore.kernel.org/openembedded-core/20261105122145.543282-1-stondo@gmail.com/
[2] https://lore.kernel.org/bitbake-devel/20261118092831.201831-1-stondo@gmail.com/

Stefano Tondo (4):
  spdx30: Take name, version and PURL of downloads from the fetcher
  spdx30: Record the lifecycle scope of crate dependencies
  spdx30: Add the PURLs of the source downloads to the output packages
  oeqa/selftest: spdx: Test crate identity, scope and output PURLs

 meta/classes-recipe/cargo.bbclass    |  17 ++++
 meta/lib/oe/spdx30_tasks.py          | 119 +++++++++++++++++++++++++-
 meta/lib/oeqa/selftest/cases/spdx.py | 122 +++++++++++++++++++++++++++
 3 files changed, 257 insertions(+), 1 deletion(-)

-- 
2.56.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-18  9:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  9:29 [PATCH 0/4] spdx30: identity and purls of dependency downloads Stefano Tondo
2026-11-18  9:29 ` [PATCH 1/4] spdx30: Take name, version and PURL of downloads from the fetcher Stefano Tondo
2026-11-18  9:29 ` [PATCH 2/4] spdx30: Record the lifecycle scope of crate dependencies Stefano Tondo
2026-11-18  9:29 ` [PATCH 3/4] spdx30: Add the PURLs of the source downloads to the output packages Stefano Tondo
2026-11-18  9:29 ` [PATCH 4/4] oeqa/selftest: spdx: Test crate identity, scope and output PURLs Stefano Tondo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox