Repository navigation
DLPX-100304 Install cargo-cyclonedx for the zfs package build - #423
Draft
suyash-jai wants to merge 1 commit into
Draft
suyash-jai wants to merge 1 commit into
suyash-jai wants to merge 1 commit into
Conversation
suyash-jai
force-pushed
the
dlpx/pr/suyash-jai/902bb56e-7dbc-4706-8184-25ebdd50d818
branch
from
November 6, 2026 10:12
76b1f25 to
3592bbc
Compare
PR URL: https://www.github.com/delphix/linux-pkg/pull/423 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
suyash-jai
force-pushed
the
dlpx/pr/suyash-jai/902bb56e-7dbc-4706-8184-25ebdd50d818
branch
from
November 17, 2026 09:37
3592bbc to
6cb3c30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Installs
cargo-cyclonedx0.5.9 in the zfs build environment, next tocargo-bundle-licenses. It is a cargo plugin that lists the Rust crates compiled into a program.It also changes the SBOM scan (
generate_sbom()inlib/common.sh) to keep hashes. Syft reads the CycloneDX files a package ships but drops their hashes, so a newrestore_sbom_hashes()copies them back onto the matching components (by purl) after the scan. Mend identifies Rust crates only by the SHA-1 of the.cratefile, which zfs now records in those files; without this step Mend recognises almost none of them. Packages that ship no.cdx.jsonfile are unaffected.delphix/zfs#2439 uses it to add the Rust crates to the zfs package SBOMs:
zfsutils-linuxgoes from 0 to 471 crates, andlibzfslinux-devgets 440. That PR explains why this tool was chosen over two other approaches, and has the testing, the comparison with the CSV and the Mend results.Merge order
cargo cyclonedx, so it fails without this PR.Testing
Pre-push #15842 and #15845, with this PR, #422 and delphix/zfs#2439: the zfs build succeeded both times. Installing
cargo-cyclonedxadds about 3 minutes to the zfs build.Pre-push #15974 (zfs package build #4526) includes the hash change, and succeeded, including the appliance image build:
zfsutils-linuxand 438 of 440 inlibzfslinux-dev. The other 2 are built from a git fork and have no archive to hash.restore_sbom_hashes()adds no measurable time to the SBOM scan.Pre-push #16011 built this PR together with #422, delphix/zfs#2439 and delphix/appliance-build#926, and succeeded. The crates and their hashes reach the final image SBOM unchanged: 469 and 438 crates with SHA-1 in all three images. Mend recognised 468 crates, all with licenses, when the whole internal-dev image SBOM was imported. delphix/zfs#2439 has the details.
Conflict with #422: both PRs add a function at the same place in
lib/common.sh. Whichever merges second needs a rebase; the fix is to keep both functions.Related
Jira: DLPX-100304, sub-task of DLPX-100124 (epic CP-13455).
🤖 Generated with Claude Code