@@ -274,6 +274,21 @@ jobs:
274274 workflow-key : tests-tests-macos
275275 uninstall : true
276276
277+ - name : Install brew tests Linux dependencies
278+ if : runner.os == 'Linux'
279+ run : |
280+ sudo apt-get update
281+ sudo apt-get install -y --no-install-recommends bubblewrap
282+ # Allow unprivileged user namespace cloning; rootless `bwrap` needs this
283+ # to create its user namespace.
284+ sudo sysctl -w kernel.unprivileged_userns_clone=1
285+ # Ensure the runner can allocate user namespaces instead of hitting a
286+ # per-user namespace limit.
287+ sudo sysctl -w user.max_user_namespaces=28633
288+ # Ubuntu runners may additionally restrict unprivileged user namespaces
289+ # through AppArmor; older kernels may not expose this sysctl.
290+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
291+
277292 # brew tests doesn't like world writable directories
278293 - name : Cleanup permissions
279294 if : runner.os == 'Linux'
@@ -286,6 +301,7 @@ jobs:
286301 HOMEBREW_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
287302 # These cannot be queried at the macOS level on GitHub Actions.
288303 HOMEBREW_LANGUAGES : en-GB
304+ HOMEBREW_SANDBOX_LINUX : 1
289305 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
290306
291307 - name : Get RSpec JUnit XML filenames
@@ -335,6 +351,7 @@ jobs:
335351 - name : test-bot (macOS arm64)
336352 runs-on : macos-26
337353 env :
354+ HOMEBREW_SANDBOX_LINUX : 1
338355 HOMEBREW_TEST_BOT_ANALYTICS : 1
339356 steps :
340357 - name : Install Homebrew and Homebrew's dependencies
@@ -345,6 +362,7 @@ jobs:
345362 # Slimmed down version from the Homebrew Dockerfile
346363 apt-get update
347364 apt-get install -y --no-install-recommends \
365+ bubblewrap \
348366 bzip2 \
349367 ca-certificates \
350368 curl \
0 commit comments