Store bottle SBOM data in manifests#22981
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures how bottle SBOM data is persisted by moving pour-specific details (runtime deps, compiler/stdlib, and bottle package metadata) into GitHub Packages manifest annotations, then merging that data into the installed SBOM at pour time to keep bottled SBOMs reproducible.
Changes:
- Add SBOM “supplement” generation for pour-time-only package/relationship data and support generating “bottling” SBOMs that omit host-specific packages.
- Emit/consume SBOM supplements via GitHub Packages manifest annotations (including per-platform tag handling for
:allbottles). - Merge SBOM supplements during bottle pours without requiring full SBOM validation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/sbom.rb | Adds SBOM supplement support, bottle-manifest annotation generation, and bottling/pour merge behavior. |
| Library/Homebrew/resource.rb | Parses SBOM supplement data from bottle manifest annotations (including :all tag selection). |
| Library/Homebrew/github_packages.rb | Uploads SBOM supplement annotations alongside bottle manifest metadata. |
| Library/Homebrew/formula_installer.rb | Merges manifest-provided SBOM supplements into the installed SBOM during bottle pours. |
| Library/Homebrew/dev-cmd/bottle.rb | Writes bottling SBOMs and includes SBOM supplements in generated bottle JSON / :all merge output. |
| Library/Homebrew/test/sbom_spec.rb | Adds coverage for bottling omissions, supplement generation, manifest annotation building, and pour-time merging. |
| Library/Homebrew/test/resource_spec.rb | Adds coverage for selecting the current-platform SBOM supplement from :all bottle manifests. |
| Library/Homebrew/test/github_packages_spec.rb | Verifies SBOM supplement annotations are included (and bottle package metadata is injected) in uploaded manifests. |
| Library/Homebrew/test/dev-cmd/bottle_spec.rb | Extends merge test coverage to include SBOM supplement tag aggregation in :all bottle JSON. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b8c4450 to
e5516fb
Compare
- Keep bottled SBOMs reproducible by moving pour-specific runtime, compiler and bottle package data into package manifests. - Preserve per-platform supplements for `:all` bottles so installs merge only the current platform data. - Avoid validating full SBOMs during pour by appending manifest supplement arrays.
e5516fb to
ed17247
Compare
SMillerDev
approved these changes
Jul 6, 2026
daeho-ro
approved these changes
Jul 6, 2026
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.
:allbottles so installs merge only the current platform data.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.5 xhigh with local review and testing.