Skip to content

feat(brew): package Dakota's Homebrew files and prefix archive - #1126

Merged
hanthor merged 36 commits into
mainfrom
feat/brew-recipes
Nov 18, 2026
Merged

hanthor merged 36 commits into
mainfrom
feat/brew-recipes

Conversation

@hanthor

@hanthor hanthor commented Nov 16, 2026

Copy link
Copy Markdown
Member

What

Two new direct-upstream recipes from Dakota's elements/bluefin/brew.bst and elements/bluefin/brew-tarball.bst (projectbluefin/dakota@bf271777). Fedora has neither. Utah currently copies both out of ghcr.io/ublue-os/brew (BREW_IMAGE); switching Utah to the RPMs is a separate Utah PR.

brew (0^20261027git550a03e, noarch)

  • Source: ublue-os/brew at 550a03e3, the element's ref (GitHub commit archive, SHA-512 locked, codeload fallback).
  • Installs exactly what the element's cp -r system_files/usr/ /usr; cp -r system_files/etc/ /etc does: brew-setup.service, brew-{update,upgrade}.{service,timer}, 01-homebrew.preset, /etc/profile.d/brew.sh (0755, as in git) and brew-bash-completion.sh, /etc/security/limits.d/30-brew-limits.conf, /usr/share/fish/vendor_conf.d/ublue-brew.fish. /etc files are %config(noreplace); %systemd_post/preun/postun for the three units the preset enables. Requires: tar zstd (brew-setup runs tar --zstd).

brew-tarball (7.0.11, x86_64)

  • The element stages /system_files/usr/share/homebrew.tar.zst from ghcr:ublue-os/brew at the per-arch manifest digest sha256:130848582eed… (x86_64 ref). Universal Blue publishes the archive only inside that image, and its builder (Homebrew's install.sh: git clone + portable Ruby download) is not reproducible.
  • New tools/generated_sources.py generator: pins that manifest digest under the Homebrew version the archive carries (git describe of its Homebrew checkout = 7.0.11), gets an anonymous ghcr pull token, checks the manifest and each layer blob against their digests, and copies the member out of the topmost layer that carries it unchanged. Output homebrew-7.0.11.tar.zst is byte-identical to the file in the image (cmp), 158 MB; SHA-512 locked.
  • Installs /usr/share/homebrew.tar.zst (the element's path) and Homebrew's LICENSE.txt; Requires: brew (the element's runtime-depends). ExclusiveArch: x86_64: the archive holds an x86_64 portable Ruby.
  • Tests for the generator (pin, moved manifest, substituted layer, unchanged copy) in tests/test_generated_sources_generate.py; the pattern is recorded in docs/skills/supply-chain-provenance.md.

Closes #1029
Closes #1039

Verification

  • python3 tools/generated_sources.py brew-tarball … against live ghcr: output identical to the image's file.
  • rpmbuild -ba of both in the pinned buildroot (ghcr.io/projectbluefin/utah-buildroot:44-20261109-5aae8bdc5f40): both build; brew-tarball's %check lists bin/brew in the archive. RPM sizes: brew 17 KB, brew-tarball 154 MB.
  • just check (includes just test): pass, 1572 tests.

Dakota's bluefin/brew.bst copies system_files of ublue-os/brew at
550a03e3 into the image; bluefin/brew-tarball.bst stages
/usr/share/homebrew.tar.zst from ghcr.io/ublue-os/brew at a pinned
per-arch manifest digest (projectbluefin/dakota bf271777). Two recipes:

- brew: the same ten files at the same paths and modes from the commit
  archive, with systemd scriptlets for the units its preset enables.
- brew-tarball: Homebrew 7.0.11, the archive copied unchanged out of the
  image at sha256:130848582eed by a new generated_sources.py generator
  that checks the manifest and every layer against their digests. The
  archive exists nowhere else; the provenance skill records the pattern.

Assisted-by: Claude Opus via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hanthor
hanthor enabled auto-merge (squash) November 16, 2026 04:21
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 16, 2026

@Danathar Danathar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stand-in review (the hive's reviewers are out of quota). Approving. brew: the source archive's sha512 equals Dakota's brew.bst ref, it's Apache-2.0, and its 10 files match %files and the element's paths. brew-tarball: homebrew.tar.zst was re-derived anonymously from ghcr.io/ublue-os/brew@sha256:130848582eed… (Dakota's x86_64 ref): the layer digest checks out, and the extracted file's sha512 equals the lock. It's Homebrew 7.0.11, BSD-2-Clause, and ExclusiveArch: x86_64 is right for the portable Ruby. For the Utah follow-up: Utah's BREW_IMAGE_SHA (9e0492…, amd64 03c8d1c8…) is a different snapshot from Dakota's, so switching changes which Homebrew ships, and it must drop COPY --from=brew so RPM-owned files aren't overwritten. Each Homebrew bump will now be a ~154 MB RPM.

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 16, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

@hanthor this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the review swarm requested changes
  • review finding: packages/brew-tarball/brew-tarball.spec:25 brew-tarball License tag omits Apache-2.0

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (6 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Nov 18, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Nov 18, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HUMAN DECISION NEEDED — @hanthor, a maintainer must decide whether Utah may ship brew-tarball, a prebuilt Homebrew folder copied byte for byte from a third-party container image that cannot be rebuilt from source.

Summary: This pull request adds Homebrew, the command-line app installer, to the system, plus a ready-made copy of its install folder that is unpacked on first boot. The only change since the last review is a routine catch-up with the main branch. That catch-up brought in a fix to the login screen package that is already merged on main and is not part of this pull request. The open question from earlier reviews is unchanged: whether shipping a prebuilt bundle that nobody here can rebuild is acceptable.

What I need from you: A maintainer decides on the prebuilt bundle; the author adds Apache-2.0 to its license line.


Re-review of head 7263897 against ff58b28. The delta is merge 7263897 of main, which brings in #1194: packages/gdm/gdm.spec:64-70 (Requires: (pam_oo7 or gnome-keyring-pam)), one packages/gdm/changelog entry, and one row in .agents/skills/build-failure-triage/SKILL.md:212. compare/main...7263897 is 0 behind, and none of those three files is in this PR's own file list. So the PR's own content is unchanged since ff58b28, and the delta adds nothing to review.

Status of earlier notes:

  • Provenance decision on brew-tarball (prebuilt prefix pulled from ghcr.io/ublue-os/brew, unpacked by a root oneshot): still open.
  • brew-tarball License omits Apache-2.0: still present. packages/brew-tarball/brew-tarball.spec:25 still reads BSD-2-Clause AND MIT AND (Ruby OR BSD-2-Clause), but the archive ships Homebrew 7.0.11's vendored sorbet-runtime gem, which is Apache-2.0. Suggested fix, unchanged from the earlier review:
-# Homebrew is BSD-2-Clause; the archive also carries its vendored Ruby gems
-# (mostly MIT) and portable Ruby (Ruby OR BSD-2-Clause).
-License:        BSD-2-Clause AND MIT AND (Ruby OR BSD-2-Clause)
+# Homebrew is BSD-2-Clause; the archive also carries its vendored Ruby gems
+# (mostly MIT; sorbet-runtime is Apache-2.0) and portable Ruby (Ruby OR BSD-2-Clause).
+License:        BSD-2-Clause AND MIT AND Apache-2.0 AND (Ruby OR BSD-2-Clause)

No new findings from: correctness, security, intent-alignment, style, docs-currency.

Confidence: 3/5 (needs attention) — 5 perspectives requires a human decision

— hive: agent=reviewer backend=claude model=claude-opus-5-5 effort=medium claude=2.1.326

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 18, 2026
brew-tarball's archive carries sorbet-runtime (Apache-2.0) among Homebrew's
vendored gems, so the License tag now lists it, as the review asked.

brew ships a root oneshot (brew-setup.service) that unpacks brew-tarball,
a prebuilt prefix that cannot be rebuilt from source. Both go on
config/bump-review-only.txt so a future upstream tag or a moved image
digest is a reviewed pull request, not a bump-gate self-merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>
@hanthor

hanthor commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

/hive decision approve — ship brew-tarball as prebuilt bytes, digest-pinned to the same image Bluefin and Dakota use.

Decided for @castrojo's open question. Shipping the prebuilt Homebrew prefix adds no new trust: Bluefin's Containerfile and Utah's own BREW_IMAGE stage already copy this archive out of ghcr.io/ublue-os/brew today. The RPM makes that dependency better, not worse: manifest and layer digests are checked, the file is SHA-512 locked, and the provenance is written down. Building Homebrew and portable Ruby from source would be its own project and would move Utah away from what Bluefin users already run, so it is not a blocker here.

I pushed the two small fixes the review raised: Apache-2.0 is now in the brew-tarball License tag, and brew and brew-tarball are on config/bump-review-only.txt, so a future bump is a reviewed PR and never self-merges. just check passes. Auto-merge is armed. The Utah switch (drop COPY --from=brew, accept Dakota's Homebrew snapshot) stays a separate PR.

Decided on behalf of @hanthor with Claude Code

@hanthor
hanthor enabled auto-merge November 18, 2026 12:33
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Approval recorded by @hanthor for head 1097bb4. The hive is treating it as your answer to the review swarm's question: nothing is sent back to the author, and the PR follows the merge path on the next pass (merged when the merge gates pass, or handed to you at the ready-for-merge stage where a person has to press the button).

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Nov 18, 2026
@hanthor
hanthor merged commit 7f6c5e4 into main Nov 18, 2026
176 checks passed
hivecommons-hive Bot added a commit to kylerankin/utah-packages that referenced this pull request Nov 18, 2026
…ources split

Port the brew-tarball block merged from projectbluefin#1126 into generated_sources_archive,
re-export its names from the facade, and register it in METADATA/GENERATORS.

Hive-Fix-Attempt: 5/6
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity(dakota): new spec for brew-tarball parity(dakota): new spec for brew

2 participants