Simplify macOS CI: use stock FUSE-T instead of building libfuse#2
Open
Simplify macOS CI: use stock FUSE-T instead of building libfuse#2
Conversation
Apparently this started to get used in the readlink binary instead of the standard readlink() function somewhere between readlink v9.4 and v9.10.
These started showing up after a gcc update. Most of them just needed to switch to const char * when passing to strchr() and such. The only case where we actually modified the string was in parse_rule(), but that can be fixed by just setting r.command_len properly instead of overwriting the string.
Some functions call lua_settop() with the required number of arguments and then use negative offsets, and others use positive arguments with no lua_settop(). I'm not really sure why we use two different approaches currently, but this at least tests for and fixes crashes if you call these functions with no arguments.
Since each C function has its own private lua stack, we can just use positive indices and avoid calling lua_settop() prior to checking the arguments.
On macOS, RLIM_INFINITY is 0x7FFFFFFFFFFFFFFF. After tup_fuse_fs_init() doubles rlim_cur and divides by 2, casting the rlim_t result to int overflows, producing max_open_files = -1. Since open_count >= -1 is always true, every FUSE open immediately closes its fd and sets fh=0. With macFUSE (kernel FUSE) this is harmless — the kernel always delivers FUSE_RELEASE regardless of server-side fd state. With FUSE-T (NFS-backed FUSE), the NFS client may skip sending CLOSE for files the server already closed, causing finfo_wait_open_count() to time out with "FUSE did not appear to release all file descriptors after the sub-process closed." The fix caps the rlim_t value at INT_MAX before casting to int. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FUSE-T is a kext-free FUSE implementation for macOS that uses an NFS v4 local server instead of a kernel extension. This makes it possible to run tup's FUSE-based test suite on GitHub-hosted macOS runners (which block kernel extensions). CI changes: - Install FUSE-T runtime and create macFUSE-compatible header symlinks - Build patched libfuse (unmount teardown fix, PR pending upstream: macos-fuse-t/libfuse#11) - Bootstrap tup and run full test suite 9 tests are skipped (deterministic FUSE-T NFS backend limitations or macOS platform issues). ~20 additional tests are flaky under CI load due to the NFS client occasionally dropping FUSE callbacks; these are retried up to 3 times to distinguish flakes from regressions. Also update macOS install docs with FUSE-T instructions as an alternative to macFUSE. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…source The unmount teardown fix (macos-fuse-t/libfuse#11) has landed upstream and shipped in FUSE-T 1.0.54. Remove the custom libfuse build step and use the stock FUSE-T installation directly. Changes: - Remove git clone / cmake build of patched libfuse fork - Remove cmake from brew install (no longer needed) - Use fully qualified tap path to avoid stale Homebrew API cache - Fix libfuse-t.dylib install name (@rpath -> absolute path) - Create fuse.pc with -D_FILE_OFFSET_BITS=64 (FUSE-T's fuse-t.pc doesn't include this flag, but the FUSE headers require it) - Simplify macOS install docs to match Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The unmount teardown fix (macos-fuse-t/libfuse#11) has landed upstream and shipped in FUSE-T 1.0.54. This removes the custom libfuse build-from-source step and uses the stock FUSE-T installation directly.
cmakefrom brew install (no longer needed)@rpath-> absolute path)fuse.pcwith-D_FILE_OFFSET_BITS=64(FUSE-T'sfuse-t.pcdoesn't include this flag, but the FUSE headers require it)Test plan
🤖 Generated with Claude Code