Skip to content

Commit c8d9e4b

Browse files
zahclaude
andcommitted
ci: point libfuse at the setuid fusermount3 via FUSERMOUNT_PROG
The PATH prepend didn't help: tup/libfuse invokes fusermount3 by an absolute nix-store path (non-setuid), ignoring PATH, so the FUSE mount still failed with "Operation not permitted". Set libfuse's FUSERMOUNT_PROG to NixOS's setuid wrapper (/run/wrappers/bin/fusermount3) so tup mounts through the privileged helper. Adds diagnostics to confirm the wrapper exists + its setuid bit on the runner. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1cf9a70 commit c8d9e4b

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,17 @@ jobs:
170170
set -euo pipefail
171171
ct_root="$(cd "${{ github.workspace }}/../codetracer" && pwd)"
172172
direnv allow "$ct_root"
173-
# codetracer's build uses tup, which mounts a FUSE filesystem. The dev
174-
# shell puts the nixpkgs `fuse` package's NON-setuid fusermount3 on
175-
# PATH, which can't mount (EPERM). Prepend NixOS's setuid wrapper dir
176-
# (programs.fuse provides /run/wrappers/bin/fusermount3) INSIDE the
177-
# dev-shell env so tup uses the privileged wrapper.
173+
# codetracer's build uses tup, which mounts a FUSE filesystem. libfuse
174+
# invokes fusermount3 by an absolute (nix-store, NON-setuid) path, so a
175+
# PATH prepend is ignored — it must be pointed at NixOS's setuid wrapper
176+
# via libfuse's FUSERMOUNT_PROG. (programs.fuse provides
177+
# /run/wrappers/bin/fusermount3.) Diagnostics below confirm the wrapper
178+
# exists + its setuid bit on the runner.
179+
echo "RBDIAG wrapper:"; ls -l /run/wrappers/bin/fusermount3 2>&1 || echo " NO WRAPPER on runner"
180+
echo "RBDIAG id: $(id)"
181+
fuse_wrapper=/run/wrappers/bin/fusermount3
178182
( cd "$ct_root" && direnv exec "$ct_root" \
179-
bash -c 'export PATH=/run/wrappers/bin:"$PATH"; just build' )
183+
bash -c 'export FUSERMOUNT_PROG='"$fuse_wrapper"'; export PATH=/run/wrappers/bin:"$PATH"; just build' )
180184
ct_bin="$ct_root/src/build-debug/bin/ct"
181185
test -x "$ct_bin" || { echo "ct not built at $ct_bin" >&2; exit 1; }
182186
echo "CT_BIN=$ct_bin" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)