diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 8c27d99a1..9101a7c3e 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -22,43 +22,38 @@ jobs: # API-compatible with macFUSE, no kernel extension needed. # https://github.com/macos-fuse-t/fuse-t brew tap macos-fuse-t/homebrew-cask - brew install fuse-t - brew install pkg-config pcre2 ccache cmake + # Use fully qualified tap path to ensure brew reads the local tap + # (not a stale Homebrew JSON API cache). We need >= 1.0.54 which + # includes the recv-EOF unmount fix (macos-fuse-t/libfuse#11). + brew install --cask macos-fuse-t/cask/fuse-t + brew install pkg-config pcre2 ccache pip3 install --break-system-packages sh - - name: Create macFUSE-compatible header symlinks + - name: Create macFUSE-compatible symlinks run: | - # FUSE-T puts headers in a framework; tup expects /usr/local/include/fuse/ + # FUSE-T installs headers in a framework and pkg-config as fuse-t.pc, + # but tup's build expects /usr/local/include/fuse/ and fuse.pc. sudo mkdir -p /usr/local/include/fuse sudo ln -sf /Library/Frameworks/fuse_t.framework/Headers/* /usr/local/include/fuse/ - - name: Build patched libfuse for FUSE-T - run: | - # FUSE-T's libfuse has an unmount teardown bug that causes non-zero - # exit after every successful FUSE operation. We build from a patched - # fork until the fix is merged upstream. - # Fix: https://github.com/macos-fuse-t/libfuse/pull/11 - git clone https://github.com/petemoore/libfuse.git /tmp/libfuse-src \ - --branch fix/recv-eof-and-attrcache --depth 1 - cd /tmp/libfuse-src && mkdir build && cd build - cmake .. && make -j$(sysctl -n hw.ncpu) - # Install patched library over FUSE-T's version - install_name_tool -id /usr/local/lib/libfuse-t.dylib lib/libfuse-t.dylib - sudo cp lib/libfuse-t.dylib /usr/local/lib/libfuse-t.dylib - sudo cp lib/libfuse-t.a /usr/local/lib/libfuse-t.a + # FUSE-T's dylib uses @rpath as its install name, but tup's build + # doesn't set an rpath. Fix the dylib's install name to its absolute + # path so the linker embeds that directly. + sudo install_name_tool -id /usr/local/lib/libfuse-t.dylib /usr/local/lib/libfuse-t.dylib - # Create fuse.pc (FUSE-T doesn't ship one) - sudo mkdir -p /usr/local/lib/pkgconfig - sudo tee /usr/local/lib/pkgconfig/fuse.pc > /dev/null << 'EOF' + # Create fuse.pc that wraps fuse-t.pc and adds the -D_FILE_OFFSET_BITS=64 + # flag required by the FUSE headers. + sudo tee /usr/local/lib/pkgconfig/fuse.pc > /dev/null << 'PKGCONFIG' prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: fuse - Description: FUSE-T libfuse + Description: FUSE-T (macFUSE-compatible) Version: 2.9.9 + Requires.private: fuse-t Libs: -L${libdir} -lfuse-t -pthread Cflags: -I${includedir}/fuse -D_FILE_OFFSET_BITS=64 - EOF + PKGCONFIG - name: Build (bootstrap) run: ./bootstrap.sh - name: Run tests diff --git a/docs/html/index.html b/docs/html/index.html index 82f53cb05..20b9e7304 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -32,35 +32,34 @@

Linux Ubuntu

macOS

Tup requires a FUSE implementation on macOS. FUSE-T is recommended — it runs entirely in user space (no kernel extension needed) and is API-compatible with macFUSE.

-

Install FUSE-T and build dependencies:

+

Install FUSE-T (version 1.0.54 or later) and build dependencies:

 brew tap macos-fuse-t/homebrew-cask
 brew install fuse-t
-brew install pkg-config pcre2 cmake
+brew install pkg-config pcre2
 
-

Build the patched libfuse (fixes an unmount teardown issue in FUSE-T):

+

Create macFUSE-compatible symlinks and fix the dylib install name:

-git clone https://github.com/petemoore/libfuse.git --branch fix/recv-eof-on-unmount --depth 1
-cd libfuse && mkdir build && cd build && cmake .. && make
-install_name_tool -id /usr/local/lib/libfuse-t.dylib lib/libfuse-t.dylib
-sudo cp lib/libfuse-t.dylib /usr/local/lib/libfuse-t.dylib
-sudo cp lib/libfuse-t.a /usr/local/lib/libfuse-t.a
 sudo mkdir -p /usr/local/include/fuse
 sudo ln -sf /Library/Frameworks/fuse_t.framework/Headers/* /usr/local/include/fuse/
-sudo mkdir -p /usr/local/lib/pkgconfig
+sudo install_name_tool -id /usr/local/lib/libfuse-t.dylib /usr/local/lib/libfuse-t.dylib
+
+ +

Create a fuse.pc pkg-config file (FUSE-T ships fuse-t.pc but tup expects fuse.pc):

+
 sudo tee /usr/local/lib/pkgconfig/fuse.pc > /dev/null << 'EOF'
 prefix=/usr/local
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 Name: fuse
-Description: FUSE-T libfuse
+Description: FUSE-T (macFUSE-compatible)
 Version: 2.9.9
+Requires.private: fuse-t
 Libs: -L${libdir} -lfuse-t -pthread
 Cflags: -I${includedir}/fuse -D_FILE_OFFSET_BITS=64
 EOF
-cd ../..
 

Build tup:

@@ -70,7 +69,7 @@

macOS

./bootstrap.sh -

Alternatively, if you already have macFUSE installed (requires enabling the kernel extension in System Settings > Privacy & Security), tup will use it automatically without the patched libfuse steps above.

+

Alternatively, if you already have macFUSE installed (requires enabling the kernel extension in System Settings > Privacy & Security), tup will use it automatically without the steps above.

If you use MacPorts:

sudo port install tup