Skip to content

Install bubblewrap in CI before Linux formula builds#22

Merged
marcqualie merged 2 commits into
mainfrom
add-linux-bubblewrap-dependency
Jun 13, 2026
Merged

Install bubblewrap in CI before Linux formula builds#22
marcqualie merged 2 commits into
mainfrom
add-linux-bubblewrap-dependency

Conversation

@marcqualie

@marcqualie marcqualie commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Problem

Homebrew 6.0.0 (released ~2026-06-12) enables a Bubblewrap-based sandbox for Linux source builds by default and adds a fatal pre-build check. When a rootless bwrap is not on PATH, brew install --build-from-source aborts with:

Bubblewrap is required to use the Linux sandbox but was not found.

Because CI uses Homebrew/actions/setup-homebrew@master, it picked up 6.0.0 automatically, and the ubuntu-latest image doesn't ship bwrap. This broke the Linux test-formula jobs for both formulae, independent of any formula change.

Why not a formula depends_on

A first attempt added bubblewrap as a Linux-only formula dependency. It doesn't work: the bottle is poured, but Homebrew's sandbox check prefers a system bwrap and runs before the brewed keg is usable, so it still reports "not found." The fix has to make bwrap available on the system PATH before brew install runs.

Fix

Add a CI pre-step that installs the bubblewrap apt package on Linux (lands bwrap in /usr/bin) before brew install. Keeps the sandbox active rather than disabling it with HOMEBREW_NO_SANDBOX_LINUX.

Homebrew 6.0 sandboxes Linux source builds with Bubblewrap and aborts
with a fatal error when a rootless bwrap is not on PATH. The ubuntu-latest
runner image doesn't ship it, and a brewed bubblewrap isn't picked up by
the sandbox check (it prefers a system bwrap), so install the apt package
in a pre-step before brew install. Fixes the Linux test-formula jobs.
@marcqualie marcqualie force-pushed the add-linux-bubblewrap-dependency branch from 8eff2ea to e187c9b Compare June 13, 2026 15:17
@marcqualie marcqualie changed the title Require bubblewrap for Linux sandbox source builds Install bubblewrap in CI before Linux formula builds Jun 13, 2026
Installing the bubblewrap package alone wasn't enough: ubuntu-latest
(24.04) blocks unprivileged user namespaces via AppArmor, so rootless
bwrap can't create its sandbox and brew install still aborts. Relax the
unprivileged-userns sysctls in the pre-step so the sandbox can run.
@marcqualie marcqualie merged commit 57d4f87 into main Jun 13, 2026
4 checks passed
@marcqualie marcqualie deleted the add-linux-bubblewrap-dependency branch June 13, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant