spdx30: identity and purls of dependency downloads
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 0 repliesNew
- v24 patches 6 repliesSuperseded
- v14 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- Patch 1/4: read the PackageIdentity dataclass that package_identity() returns in v2 of the bitbake series [2], as Paul proposed [4].
- Rebased on master, which has python3-uv-build 0.13.8.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | spdx30: Take name, version and PURL of downloads from the fetchermeta/ | +14 | 0 replies | |
| 2/4 | spdx30: Record the lifecycle scope of crate dependenciesmeta/ meta/ meta/ | +180 | 0 replies | |
| 3/4 | spdx30: Add the PURLs of the source downloads to the output packagesmeta/ | +26 | 0 replies | |
| 4/4 | oeqa/selftest: spdx: Test crate identity, scope and output PURLsmeta/ | +122 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/4] spdx30: identity and purls of dependency downloads
Hi,
This series implements the parts of the RFC "spdx30: name, version and purl for dependency downloads" [1] that we agreed on. It needs v2 of 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.
Changes in v3:
- Patch 1/4: read the PackageIdentity dataclass that package_identity() returns in v2 of the bitbake series [2], as Paul proposed [4].
- Rebased on master, which has python3-uv-build 0.13.8.
Changes in v2:
- Patch 2/4: the walk over the cargo graph expands each workspace member only once. In v1 it did not end for python3-uv-build, where the member uv-preview is a dev dependency of itself. do_create_spdx used memory until the OOM killer stopped it. Thanks to Mathieu for the report [3].
- Patch 2/4: add unit tests for the scopes, with member cycles.
- Rebased on master.
Tests: with v2 of the bitbake series, oe-selftest -r oelib.cargo_scopes spdx.SPDX30Check passes on master (22 tests). do_create_spdx of python3-uv-build and python3-uv-build-native (0.13.8) takes less than 1 second and about 90 MB.
[1] https://lore.kernel.org/openembedded-core/[email protected]/
[2] https://lore.kernel.org/bitbake-devel/[email protected]/
[3] https://lore.kernel.org/openembedded-core/[email protected]/
[4] https://lore.kernel.org/bitbake-devel/[email protected]/
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 | 128 +++++++++++++++++- .../oeqa/selftest/cases/oelib/cargo_scopes.py | 73 ++++++++++ meta/lib/oeqa/selftest/cases/spdx.py | 122 +++++++++++++++++ 4 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 meta/lib/oeqa/selftest/cases/oelib/cargo_scopes.py
Signature · 1 line
2.56.1