| 1 | Cage macOS guest: SSHFS source and relink materials |
| 2 | |
| 3 | This distribution contains the complete SSHFS, GLib, GNU gettext and PCRE2 |
| 4 | upstream source archives, the Cage SSHFS patch, installed Homebrew recipes and |
| 5 | their external patch/resource, and the exact static libraries and headers used |
| 6 | to link Cage's SSHFS helper. build.json records source URLs, SHA256 digests, |
| 7 | versions and the build toolchain. manifest.json binds all these files to the |
| 8 | final signed project/cage-sshfs executable. Receipts retain build identity |
| 9 | without the developer's personal filesystem paths. |
| 10 | |
| 11 | Rebuild or modify SSHFS on an Apple Silicon Mac with Xcode command-line tools: |
| 12 | |
| 13 | 1. Obtain the external macFUSE 5.5.0 SDK from its official installer. It is not |
| 14 | installed by these commands. The pinned image and package hashes are checked |
| 15 | by the included extraction script. Set SOURCE to this extracted directory, |
| 16 | and WORK to a new, empty absolute directory: |
| 17 | |
| 18 | mkdir -p "$WORK" |
| 19 | curl -fL https://github.com/macfuse/macfuse/releases/download/macfuse-5.5.0/macfuse-5.5.0.dmg -o "$WORK/macfuse.dmg" |
| 20 | bash "$SOURCE/cage/macos-fuse-media.sh" "$WORK/macfuse.dmg" "$WORK/fuse.pkg" |
| 21 | pkgutil --expand-full "$WORK/fuse.pkg" "$WORK/sdk" |
| 22 | |
| 23 | 2. Relink using the frozen static libraries and headers: |
| 24 | |
| 25 | bash "$SOURCE/rebuild-macos-sshfs.sh" "$SOURCE" "$WORK/sdk/Core.pkg/Payload/usr/local" "$WORK/cage-sshfs" |
| 26 | codesign --force --sign - "$WORK/cage-sshfs" |
| 27 | |
| 28 | No Homebrew installation or network access is needed for this compile step. |
| 29 | To modify SSHFS, first extract upstream/sshfs.tar.gz, apply |
| 30 | cage/sshfs-openwith.patch with patch -p1, edit the files, then pass that source |
| 31 | directory as the fourth argument to rebuild-macos-sshfs.sh. |
| 32 | |
| 33 | The helper dynamically loads the separately installed macFUSE runtime. macFUSE |
| 34 | must be available on the machine where it runs. Xcode, the macOS SDK and macFUSE |
| 35 | are external system/build prerequisites; they are not redistributed here. |
| 36 | Rebuilding with another compiler or replacing the Developer ID signature will |
| 37 | change the executable hash. The manifest describes the shipped executable. |
| 38 | |
| 39 | To rebuild the static dependencies, the complete upstream archives are in |
| 40 | upstream/. The exact Homebrew install methods, configure/Meson flags, inline |
| 41 | source changes, and versions used for the installed bottles are preserved in |
| 42 | homebrew/{glib,gettext,pcre2}.rb. GLib's separate introspection resource and |
| 43 | hardcoded-paths patch are also included. With Homebrew and its recipe build |
| 44 | tools, copy these recipes to a local tap (Formula/ and Patches/ retain their |
| 45 | relative paths) and run: |
| 46 | |
| 47 | brew install --build-from-source your/local/pcre2 |
| 48 | brew install --build-from-source your/local/gettext |
| 49 | brew install --build-from-source your/local/glib |
| 50 | |
| 51 | The formula install methods list their build prerequisites. As with ordinary |
| 52 | Homebrew builds, these general-purpose tools and the other formula runtime |
| 53 | dependencies can be installed separately. The source archives and required |
| 54 | GLib patch/resource are frozen here; configure local source URLs if building |
| 55 | without network access. Replace dependencies/* with your rebuilt static |
| 56 | libraries/headers before relinking. The frozen originals are provided so users |
| 57 | can relink modified SSHFS immediately, without having to reproduce Homebrew's |
| 58 | bottle build environment. |
| 59 | |
| 60 | Copyright and license texts are under licenses/ and within each complete |
| 61 | upstream archive. See NOTICE for the shipped components and Cage modification. |