Skip to content

feat: use all bottle where it's possible - #14

Closed
tuler wants to merge 1 commit into
mainfrom
feature/all-bottle
Closed

tuler wants to merge 1 commit into
mainfrom
feature/all-bottle

Conversation

@tuler

@tuler tuler commented Aug 11, 2026

Copy link
Copy Markdown
Member

Ship a single all: bottle for the formulae that contain no compiled code.

cartesi-machine-linux-image, cartesi-machine-rootfs-image and cartesi-machine install byte-identical content on every platform — two downloaded images plus a symlink, and an empty marker file for the metapackage — yet each was getting its own per-OS bottle. For the rootfs image that means re-tarring a large ext2 on every runner to produce the same artifact twice.

brew bottle --merge collapses tags into a single all: bottle only when every tag's tarball has the same cellar and sha256. That never happens by default, because the install receipt embedded in the tarball carries per-platform data — brew's own comment in dev-cmd/bottle.rb is "Without --only-json-tab bottles are never reproducible". Passing --only-json-tab writes the receipt to the bottle JSON (and on to the ghcr metadata) instead of into the tarball, which makes the tarballs reproducible across runners.

Changes:

  • .github/workflows/tests.yml: add --only-json-tab to the brew test-bot --only-formulae step.
  • All four formulae: drop the existing bottle blocks and bump revision, so brew pr-pull writes fresh ones.

Expected result after pr-pull: the three formulae above each get one sha256 cellar: :any_skip_relocation, all: "..." line. cartesi-machine-emulator is the only formula here that actually compiles, so it keeps its per-tag bottles (arm64_sequoia, arm64_tahoe).

Two notes for review:

  • The SBOM written into a bottle is generated with bottling: true, which drops runtime-dependency URLs/checksums and compiler info, so cartesi-machine having dependencies does not make its tarball platform-specific.
  • Once cartesi-machine has an all: bottle, brew test-bot treats it as bottled only on runners where all three of its dependencies are bottled (bottled? recurses into deps for :all bottles). That is satisfied on the current arm64-only matrix.

🤖 Generated with Claude Code

@tuler tuler added the pr-pull Formula release label Aug 11, 2026
@github-actions github-actions Bot closed this in 653673a Aug 11, 2026
@github-actions
github-actions Bot deleted the feature/all-bottle branch August 11, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-pull Formula release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant