├── .github └── workflows │ ├── autobump.yml │ ├── publish.yml │ └── tests.yml ├── Formula ├── afuse-mac.rb ├── archivemount-mac.rb ├── avfs-mac.rb ├── bindfs-mac.rb ├── btfs-mac.rb ├── cryfs-mac.rb ├── curlftpfs-mac.rb ├── dislocker-mac.rb ├── dwarfs-fuse-mac.rb ├── encfs-mac.rb ├── ext2fuse-mac.rb ├── ext4fuse-mac.rb ├── fuse-zip-mac.rb ├── fusehfs-mac.rb ├── gcsfuse-mac.rb ├── gitfs-mac.rb ├── gocryptfs-mac.rb ├── goofys-mac.rb ├── hfsfuse-mac.rb ├── ifuse-mac.rb ├── mp3fs-mac.rb ├── ntfs-3g-mac.rb ├── ratarmount-mac.rb ├── rclone-mac.rb ├── rofs-filtered-mac.rb ├── s3-backer-mac.rb ├── s3fs-mac.rb ├── s3ql-mac.rb ├── securefs-mac.rb ├── simple-mtpfs-mac.rb ├── squashfuse-mac.rb ├── sshfs-mac.rb ├── tup-mac.rb ├── unionfs-fuse.rb ├── wdfs-mac.rb └── xmount-mac.rb ├── LICENSE.txt ├── README.md ├── cmd └── brew-test-fuse ├── formula_renames.json ├── lib ├── funcs.sh └── fuse-pkg-config ├── require └── macfuse.rb └── tap_migrations.json /.github/workflows/autobump.yml: -------------------------------------------------------------------------------- 1 | name: "Autobump specific formulae" 2 | on: 3 | schedule: 4 | - cron: "15 2-23/4 * * *" 5 | 6 | jobs: 7 | autobump: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Update Homebrew formula 11 | uses: dawidd6/action-homebrew-bump-formula@v4 12 | with: 13 | # Required, custom personal GitHub access token with only the 'public_repo' scope enabled 14 | token: ${{secrets.AUTOBUMP_TOKEN}} 15 | # Optional, will commit with this user name 16 | user_name: gromgit 17 | # Optional, will commit with this user email 18 | user_email: the.gromgit@gmail.com 19 | # Optional, will create tap repo fork in organization 20 | # org: ORG 21 | # Bump all outdated formulae in this tap 22 | tap: gromgit/fuse 23 | # Bump only these formulae if outdated 24 | # formula: mint-lang,vlang-weekly 25 | # Optional, if don't want to check for already open PRs 26 | force: false # true 27 | # Need to set this input if want to use `brew livecheck` 28 | livecheck: true 29 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: brew pr-pull 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - labeled 7 | 8 | jobs: 9 | pr-pull: 10 | if: contains(github.event.pull_request.labels.*.name, 'pr-pull') 11 | strategy: 12 | matrix: 13 | os: [macos-13, macos-14] 14 | runs-on: ${{ matrix.os }} 15 | permissions: 16 | contents: write 17 | packages: write 18 | pull-requests: write 19 | steps: 20 | - name: Set up Homebrew 21 | uses: Homebrew/actions/setup-homebrew@master 22 | 23 | - name: Set up git 24 | uses: Homebrew/actions/git-user-config@master 25 | 26 | - name: Pull bottles 27 | env: 28 | HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} 29 | HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }} 30 | HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.repository_owner }} 31 | PULL_REQUEST: ${{ github.event.pull_request.number }} 32 | run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" 33 | 34 | - name: Push commits 35 | uses: Homebrew/actions/git-try-push@master 36 | with: 37 | token: ${{ github.token }} 38 | branch: main 39 | 40 | - name: Delete branch 41 | if: github.event.pull_request.head.repo.fork == false 42 | env: 43 | BRANCH: ${{ github.event.pull_request.head.ref }} 44 | run: git push --delete origin "$BRANCH" 45 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: brew test-bot 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | jobs: 10 | test-bot: 11 | strategy: 12 | matrix: 13 | os: [macos-13, macos-14] 14 | runs-on: ${{ matrix.os }} 15 | steps: 16 | - name: Set up Homebrew 17 | id: set-up-homebrew 18 | uses: Homebrew/actions/setup-homebrew@master 19 | 20 | - name: Cache Homebrew Bundler RubyGems 21 | uses: actions/cache@v4 22 | with: 23 | path: ${{ steps.set-up-homebrew.outputs.gems-path }} 24 | key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} 25 | restore-keys: ${{ matrix.os }}-rubygems- 26 | 27 | - run: brew install --cask macfuse 28 | 29 | - run: brew test-bot --only-cleanup-before 30 | 31 | - run: brew test-bot --only-setup 32 | 33 | - run: brew test-bot --only-tap-syntax 34 | 35 | - run: brew test-bot --only-formulae --root-url='https://ghcr.io/v2/gromgit/fuse' 36 | if: github.event_name == 'pull_request' 37 | 38 | - name: Upload bottles as artifact 39 | if: always() && github.event_name == 'pull_request' 40 | uses: actions/upload-artifact@v4 41 | with: 42 | name: bottles_${{ matrix.os }} 43 | path: '*.bottle.*' 44 | -------------------------------------------------------------------------------- /Formula/afuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class AfuseMac < Formula 4 | desc "Automounting file system implemented in userspace with FUSE" 5 | homepage "https://github.com/pcarrier/afuse/" 6 | url "https://github.com/pcarrier/afuse.git", 7 | tag: "v0.5.0", 8 | revision: "d7f07c32e58850fa092bb98b53c5c570fed8be69" 9 | license "GPL-2.0-only" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0b0e74b43c27ce951eec136e4c45a98c43edc39cceeb95418f43c2d5bfa9afe" 14 | sha256 cellar: :any, ventura: "81eac9045ff5882fa86b3e40c6562bbed06cf1346ec5fb368033511cab03c982" 15 | end 16 | 17 | depends_on "autoconf" => :build 18 | depends_on "automake" => :build 19 | depends_on "pkg-config" => :build 20 | depends_on MacfuseRequirement 21 | depends_on :macos 22 | 23 | def install 24 | setup_fuse 25 | system "./autogen.sh" 26 | system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" 27 | system "make", "install" 28 | end 29 | 30 | test do 31 | assert_match "FUSE library version", pipe_output("#{bin}/afuse --version 2>&1") 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /Formula/archivemount-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class ArchivemountMac < Formula 4 | desc "File system for accessing archives using libarchive" 5 | homepage "https://github.com/cybernoid/archivemount" 6 | url "https://slackware.uk/~urchlay/src/archivemount-0.9.1.tar.gz" 7 | sha256 "c529b981cacb19541b48ddafdafb2ede47a40fcaf16c677c1e2cd198b159c5b3" 8 | 9 | livecheck do 10 | url "https://raw.githubusercontent.com/cybernoid/archivemount/refs/heads/master/CHANGELOG" 11 | regex(/\*\s+v?(\d+(?:\.\d+)+)\s+/i) 12 | end 13 | 14 | bottle do 15 | root_url "https://ghcr.io/v2/gromgit/fuse" 16 | rebuild 1 17 | sha256 cellar: :any, arm64_sonoma: "abe39d7d99aae950033e62df6c1ac3c33b7b8a7863eeb92d2bb82c1b3b5662fc" 18 | sha256 cellar: :any, ventura: "be2622a6cb26b8dc581c35b1cad1f07ddafbfea379e5f4db250258ab6583f615" 19 | end 20 | 21 | depends_on "pkgconf" => :build 22 | depends_on "libarchive" 23 | depends_on MacfuseRequirement 24 | depends_on :macos 25 | 26 | def install 27 | setup_fuse 28 | system "./configure", "--disable-silent-rules", *std_configure_args 29 | system "make", "install" 30 | end 31 | 32 | test do 33 | system bin/"archivemount", "--version" 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /Formula/avfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class AvfsMac < Formula 4 | desc "Virtual file system that facilitates looking inside archives" 5 | homepage "https://avf.sourceforge.io/" 6 | url "https://downloads.sourceforge.net/project/avf/avfs/1.2.0/avfs-1.2.0.tar.bz2" 7 | sha256 "a25a8ec43c1ee172624e1a4c79ce66a1b930841cdb545b725f1ec64bcabe889c" 8 | license all_of: [ 9 | "GPL-2.0-only", 10 | "LGPL-2.0-only", # for shared library 11 | "GPL-2.0-or-later", # modules/dav_ls.c 12 | "Zlib", # zlib/* 13 | ] 14 | 15 | livecheck do 16 | url :stable 17 | regex(%r{url=.*?/avfs[._-]v?(\d+(?:\.\d+)+)\.t}i) 18 | end 19 | 20 | bottle do 21 | root_url "https://ghcr.io/v2/gromgit/fuse" 22 | sha256 arm64_sonoma: "925ae6c3197657008289364ab4549266ea0a4a1a782314d6759eb97571f5d5e3" 23 | sha256 ventura: "0d46af6e0d31f778779b687dc7adadbf1afac641e2c2e35f8c837726ab635c37" 24 | end 25 | 26 | depends_on "pkgconf" => :build 27 | depends_on "bzip2" 28 | depends_on MacfuseRequirement 29 | depends_on :macos 30 | depends_on "xz" 31 | depends_on "zlib" 32 | 33 | def install 34 | setup_fuse 35 | system "./configure", "--disable-silent-rules", 36 | "--enable-fuse", 37 | "--enable-library", 38 | "--with-system-zlib", 39 | "--with-system-bzlib", 40 | "--with-xz", 41 | *std_configure_args 42 | system "make", "install" 43 | end 44 | 45 | test do 46 | system bin/"avfsd", "--version" 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /Formula/bindfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class BindfsMac < Formula 4 | desc "FUSE file system for mounting to another location" 5 | homepage "https://bindfs.org/" 6 | url "https://bindfs.org/downloads/bindfs-1.18.0.tar.gz" 7 | sha256 "46fcf95b871109265e93cd42e5ae282c722716488ad9f0da1e1f98535be37f7a" 8 | license "GPL-2.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "18280a50ddee23ed3cfd05cb40e6a69a1d343ce118553f5098e9e9d289b66fb4" 13 | sha256 cellar: :any, ventura: "a2c590ee0ca1bfc22e4e485b680490791e9a17812f8b9041c2469063280641e1" 14 | end 15 | 16 | head do 17 | url "https://github.com/mpartel/bindfs.git", branch: "master" 18 | 19 | depends_on "autoconf" => :build 20 | depends_on "automake" => :build 21 | depends_on "libtool" => :build 22 | end 23 | 24 | depends_on "pkg-config" => :build 25 | depends_on MacfuseRequirement 26 | depends_on :macos 27 | 28 | def install 29 | setup_fuse 30 | # https://github.com/mpartel/bindfs/issues/163#issuecomment-2854763292 31 | ENV.append "CFLAGS", "-D_DARWIN_C_SOURCE" 32 | configure = build.head? ? "./autogen.sh" : "./configure" 33 | system configure, "--disable-macos-fs-link", *std_configure_args 34 | system "make", "install" 35 | end 36 | 37 | test do 38 | system "#{bin}/bindfs", "-V" 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /Formula/btfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class BtfsMac < Formula 4 | desc "BitTorrent filesystem based on FUSE" 5 | homepage "https://github.com/johang/btfs" 6 | url "https://github.com/johang/btfs/archive/refs/tags/v2.24.tar.gz" 7 | sha256 "d71ddefe3c572e05362542a0d9fd0240d8d4e1578ace55a8b3245176e7fd8935" 8 | license "GPL-3.0-only" 9 | revision 1 10 | head "https://github.com/johang/btfs.git", branch: "master" 11 | 12 | bottle do 13 | root_url "https://ghcr.io/v2/gromgit/fuse" 14 | sha256 cellar: :any, arm64_sonoma: "71e05be0beb418720d313a63f10cfea741d648bf78630b497eb2c51a5003d319" 15 | sha256 cellar: :any, ventura: "388cc358e3c9372768469b6b1021f43d8def07f372aaef6e3f5d2d80bc93be48" 16 | end 17 | 18 | depends_on "autoconf" => :build 19 | depends_on "automake" => :build 20 | depends_on "pkgconf" => :build 21 | depends_on "libtorrent-rasterbar" 22 | depends_on MacfuseRequirement 23 | depends_on :macos 24 | 25 | def install 26 | setup_fuse 27 | system "autoreconf", "--force", "--install", "--verbose" 28 | system "./configure", *std_configure_args, "--disable-silent-rules" 29 | system "make", "install" 30 | end 31 | 32 | def caveats 33 | <<~EOS 34 | Mounting a torrent is fairly quick, but unmounting takes a long time. 35 | Be patient. 36 | EOS 37 | end 38 | 39 | test do 40 | assert_match version.to_s, shell_output("#{bin}/btfs --version 2>&1") 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /Formula/cryfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class CryfsMac < Formula 4 | desc "Encrypts your files so you can safely store them in Dropbox, iCloud, etc." 5 | homepage "https://www.cryfs.org" 6 | url "https://github.com/cryfs/cryfs/releases/download/1.0.1/cryfs-1.0.1.tar.xz" 7 | sha256 "7ad4cc45e1060431991538d3e671ec11285896c0d7a24880290945ef3ca248ed" 8 | license "LGPL-3.0-or-later" 9 | head "https://github.com/cryfs/cryfs.git", branch: "develop" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any, arm64_sonoma: "b5175d3198f2be05e267ffdee0000ce54a2f2a56dba534e71a3755b1abcedda3" 14 | sha256 cellar: :any, ventura: "38006b9bbd045368a952af0dc34997a2f51eb2b0a5d41feccd75e8e699aee0d0" 15 | end 16 | 17 | depends_on "cmake" => :build 18 | depends_on "pkgconf" => :build 19 | depends_on "python@3.13" => :build 20 | depends_on "boost" 21 | depends_on "curl" 22 | depends_on "fmt" 23 | depends_on "libomp" 24 | depends_on MacfuseRequirement 25 | depends_on :macos 26 | depends_on "range-v3" 27 | depends_on "spdlog" 28 | 29 | def install 30 | setup_fuse 31 | libomp = Formula["libomp"] 32 | libomp_args = [ 33 | "-DBUILD_TESTING=off", 34 | "-DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I#{libomp.include}'", 35 | "-DOpenMP_CXX_LIB_NAMES=omp", 36 | "-DOpenMP_omp_LIBRARY=#{libomp.lib}/libomp.dylib", 37 | ] 38 | 39 | system "cmake", "-B", "build", "-S", ".", 40 | "-DCRYFS_UPDATE_CHECKS=OFF", 41 | "-DDEPENDENCY_CONFIG=cmake-utils/DependenciesFromLocalSystem.cmake", 42 | *libomp_args, *std_cmake_args 43 | system "cmake", "--build", "build" 44 | system "cmake", "--install", "build" 45 | end 46 | 47 | test do 48 | ENV["CRYFS_FRONTEND"] = "noninteractive" 49 | 50 | # Test showing help page 51 | assert_match "CryFS", shell_output("#{bin}/cryfs 2>&1", 10) 52 | 53 | # Test mounting a filesystem. This command will ultimately fail because homebrew tests 54 | # don't have the required permissions to mount fuse filesystems, but before that 55 | # it should display "Mounting filesystem". If that doesn't happen, there's something 56 | # wrong. For example there was an ABI incompatibility issue between the crypto++ version 57 | # the cryfs bottle was compiled with and the crypto++ library installed by homebrew to. 58 | mkdir "basedir" 59 | mkdir "mountdir" 60 | assert_match "Operation not permitted", pipe_output("#{bin}/cryfs -f basedir mountdir 2>&1", "password") 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /Formula/curlftpfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class CurlftpfsMac < Formula 4 | desc "Filesystem for accessing FTP hosts based on FUSE and libcurl" 5 | homepage "https://curlftpfs.sourceforge.net/" 6 | url "https://downloads.sourceforge.net/project/curlftpfs/curlftpfs/0.9.2/curlftpfs-0.9.2.tar.gz" 7 | sha256 "4eb44739c7078ba0edde177bdd266c4cfb7c621075f47f64c85a06b12b3c6958" 8 | license "GPL-2.0-only" 9 | head ":pserver:anonymous:@curlftpfs.cvs.sourceforge.net:/cvsroot/curlftpfs", using: :cvs 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | rebuild 1 14 | sha256 cellar: :any, arm64_sonoma: "52266b0b218496e9f24f982e74165991d97b49791862e683fb240d635e63f063" 15 | sha256 cellar: :any, ventura: "1ed49dce5000b70b4ef4e47b3d8c535b4c25994cde3122a461483aa34e5d6cbe" 16 | end 17 | 18 | depends_on "autoconf" => :build 19 | depends_on "automake" => :build 20 | depends_on "libtool" => :build 21 | depends_on "pkgconf" => :build 22 | depends_on "curl" 23 | depends_on "glib" 24 | depends_on MacfuseRequirement 25 | depends_on :macos 26 | 27 | def install 28 | setup_fuse 29 | ENV.append "CPPFLAGS", "-D__off_t=off_t" 30 | system "autoreconf", "--force", "--install", "--verbose" 31 | system "./configure", *std_configure_args 32 | system "make", "install" 33 | end 34 | 35 | test do 36 | assert_match version.to_s, shell_output("#{bin}/curlftpfs --version 2>&1", 1) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /Formula/dislocker-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class DislockerMac < Formula 4 | desc "FUSE driver to read/write Windows' BitLocker-ed volumes" 5 | homepage "https://github.com/Aorimn/dislocker" 6 | url "https://github.com/Aorimn/dislocker/archive/refs/tags/v0.7.3.tar.gz" 7 | sha256 "8d5275577c44f2bd87f6e05dd61971a71c0e56a9cbedf000bd38deadd8b6c1e6" 8 | license "GPL-2.0-only" 9 | revision 2 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any, arm64_sonoma: "018c699c1d89ce79a16974486a39b5a23763cd4fc0063d1de9bc326a34fa5a40" 14 | sha256 cellar: :any, ventura: "054aa62cbb45f561f88d200c95b308a45126320b361b5807dea5064ace6bf894" 15 | end 16 | 17 | depends_on "cmake" => :build 18 | depends_on MacfuseRequirement 19 | depends_on :macos 20 | depends_on "mbedtls" 21 | 22 | # Backport support for mbedtls 3.x 23 | patch do 24 | url "https://github.com/Aorimn/dislocker/commit/2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch?full_index=1" 25 | sha256 "07e0e3cac520a04a478f1f08d612340fc2743fd492b0835c7fb41cfdb5ef4244" 26 | end 27 | 28 | # Fix OSXFUSE-isms 29 | patch :DATA 30 | 31 | def install 32 | setup_fuse 33 | system "cmake", "-S", ".", "-B", "build", 34 | "-DCMAKE_DISABLE_FIND_PACKAGE_Ruby=TRUE", 35 | *fuse_cmake_args, *std_cmake_args 36 | system "cmake", "--build", "build" 37 | system "cmake", "--install", "build" 38 | end 39 | 40 | test do 41 | system "#{bin}/dislocker", "-h" 42 | end 43 | end 44 | __END__ 45 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 46 | index bd854d2..9ab137d 100644 47 | --- a/src/CMakeLists.txt 48 | +++ b/src/CMakeLists.txt 49 | @@ -92,7 +92,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") 50 | # Don't use `-read_only_relocs' here as it seems to only work for 32 bits 51 | # binaries 52 | set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-bind_at_load") 53 | - set (FUSE_LIB osxfuse_i64) 54 | + set (FUSE_LIB fuse) 55 | else() 56 | # Useless warnings when used within Darwin 57 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion") 58 | diff --git a/src/dislocker-fuse.c b/src/dislocker-fuse.c 59 | index f93523f..3dd106c 100644 60 | --- a/src/dislocker-fuse.c 61 | +++ b/src/dislocker-fuse.c 62 | @@ -33,11 +33,7 @@ 63 | 64 | 65 | 66 | -#ifdef __DARWIN 67 | -# include 68 | -#else 69 | -# include 70 | -#endif /* __DARWIN */ 71 | +#include 72 | 73 | 74 | /** NTFS virtual partition's name */ 75 | -------------------------------------------------------------------------------- /Formula/dwarfs-fuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class DwarfsFuseMac < Formula 4 | desc "Fast high compression read-only file system (macFUSE driver)" 5 | homepage "https://github.com/mhx/dwarfs" 6 | url "https://github.com/mhx/dwarfs/releases/download/v0.12.4/dwarfs-0.12.4.tar.xz" 7 | sha256 "352d13a3c7d9416e0a7d0d959306a25908b58d1ff47fb97e30a7c8490fcff259" 8 | license "GPL-3.0-or-later" 9 | 10 | livecheck do 11 | url :stable 12 | strategy :github_latest 13 | end 14 | 15 | bottle do 16 | root_url "https://ghcr.io/v2/gromgit/fuse" 17 | sha256 cellar: :any, arm64_sonoma: "90f3d989da230bc700c53503d32ca75dfff4452dd3883d7deef88767b3972112" 18 | sha256 cellar: :any, ventura: "549f3ecb3236964c7ecb36cb967de29872ed5257de5a37491577762a660f2cb8" 19 | end 20 | 21 | depends_on "cmake" => :build 22 | depends_on "pkg-config" => :build 23 | depends_on "dwarfs" 24 | depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500 25 | depends_on MacfuseRequirement 26 | depends_on :macos 27 | 28 | fails_with :clang do 29 | build 1500 30 | cause "Not all required C++20 features are supported" 31 | end 32 | 33 | def install 34 | args = %W[ 35 | -DBUILD_SHARED_LIBS=ON 36 | -DCMAKE_INSTALL_RPATH=#{rpath} 37 | -DWITH_LIBDWARFS=OFF 38 | -DWITH_TOOLS=OFF 39 | -DWITH_FUSE_DRIVER=ON 40 | -DWITH_TESTS=OFF 41 | -DWITH_MAN_PAGES=ON 42 | -DENABLE_PERFMON=ON 43 | -DENABLE_STACKTRACE=OFF 44 | -DDISABLE_CCACHE=ON 45 | -DDISABLE_MOLD=ON 46 | ] 47 | 48 | if DevelopmentTools.clang_build_version <= 1500 49 | ENV.llvm_clang 50 | 51 | # Needed in order to find the C++ standard library 52 | # See: https://github.com/Homebrew/homebrew-core/issues/178435 53 | ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/unwind -lunwind" 54 | ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" 55 | end 56 | 57 | system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args 58 | system "cmake", "--build", "build", "--parallel" 59 | system "cmake", "--install", "build" 60 | end 61 | 62 | test do 63 | system sbin/"dwarfs", "--help" 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /Formula/encfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class EncfsMac < Formula 4 | desc "Encrypted pass-through FUSE file system" 5 | homepage "https://vgough.github.io/encfs/" 6 | url "https://github.com/vgough/encfs/archive/refs/tags/v1.9.5.tar.gz" 7 | sha256 "4709f05395ccbad6c0a5b40a4619d60aafe3473b1a79bafb3aa700b1f756fd63" 8 | # The code comprising the EncFS library (libencfs) is licensed under the LGPL. 9 | # The main programs (encfs, encfsctl, etc) are licensed under the GPL. 10 | license "GPL-3.0-or-later" 11 | revision 2 12 | head "https://github.com/vgough/encfs.git", branch: "master" 13 | 14 | bottle do 15 | root_url "https://ghcr.io/v2/gromgit/fuse" 16 | sha256 arm64_sonoma: "04797584c9dde670d286a5369261def970ab4a5b84081999874fe84b9e24dee6" 17 | sha256 ventura: "c1378c0f82327e7ad461b6215b7e88680d4326e94736955879313931ceacaf7a" 18 | end 19 | 20 | depends_on "cmake" => :build 21 | depends_on "pkgconf" => :build 22 | depends_on "gettext" 23 | depends_on MacfuseRequirement 24 | depends_on :macos 25 | depends_on "openssl@3" 26 | depends_on "tinyxml2" 27 | 28 | patch do 29 | url "https://github.com/vgough/encfs/commit/75080681626062e5832aec0b1bb3aa37d8364822.patch?full_index=1" 30 | sha256 "0222bc4a4f03541b1523b03471f6af5925d4ed2a4c0d36a9a6fe39a18c036770" 31 | end 32 | 33 | def install 34 | setup_fuse 35 | ENV.cxx11 36 | system "cmake", "-S", ".", "-B", "build", 37 | "-DBUILD_UNIT_TESTS=OFF", 38 | "-DUSE_INTERNAL_TINYXML=OFF", 39 | "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", 40 | *std_cmake_args 41 | system "cmake", "--build", "build" 42 | system "cmake", "--install", "build" 43 | end 44 | 45 | test do 46 | # Functional test violates sandboxing, so punt. 47 | # Issue #50602; upstream issue vgough/encfs#151 48 | assert_match version.to_s, shell_output("#{bin}/encfs 2>&1", 1) 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /Formula/ext2fuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class Ext2fuseMac < Formula 4 | desc "Compact implementation of ext2 file system using FUSE" 5 | homepage "https://sourceforge.net/projects/ext2fuse" 6 | url "https://downloads.sourceforge.net/project/ext2fuse/ext2fuse/0.8.1/ext2fuse-src-0.8.1.tar.gz" 7 | sha256 "431035797b2783216ec74b6aad5c721b4bffb75d2174967266ee49f0a3466cd9" 8 | license "GPL-2.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | rebuild 1 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "1fea57a1f597f489ac0a58e6c75b4a7ea970b07f33d7c31dfe1a812a8029bf02" 14 | sha256 cellar: :any, ventura: "8935e712ae67cb680c77a88dbf6aa6c66f4b294c67aefc557dce55c5c8bd5f41" 15 | end 16 | 17 | depends_on "gcc" => :build 18 | depends_on "e2fsprogs" 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | 22 | def install 23 | setup_fuse 24 | ENV.append "LIBS", "-lfuse" 25 | ENV.append "CFLAGS", 26 | "-D__FreeBSD__=10 -DENABLE_SWAPFS -I/usr/local/include/fuse " 27 | ENV.append "CFLAGS", "--std=gnu89" if ENV.compiler == :clang 28 | 29 | system "./configure", *std_configure_args 30 | system "make", "install" 31 | end 32 | 33 | test do 34 | assert_match version.to_s, shell_output("#{bin}/ext2fuse --version 2>&1", 9) 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /Formula/ext4fuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class Ext4fuseMac < Formula 4 | desc "Read-only implementation of ext4 for FUSE" 5 | homepage "https://github.com/gerard/ext4fuse" 6 | url "https://github.com/gerard/ext4fuse/archive/refs/tags/v0.1.3.tar.gz" 7 | sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f" 8 | license "GPL-2.0-only" 9 | head "https://github.com/gerard/ext4fuse.git", branch: "master" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | rebuild 1 14 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "293d9d09f9a4d2cfb51beb789c8b2581b4419b00daa68507f3bf6c97f258aff5" 15 | sha256 cellar: :any, ventura: "4c4f3b18a0cd8b290e52d1290ea63a87c04597f43d9c1cde6e71c487bd4a4505" 16 | end 17 | 18 | depends_on "pkgconf" => :build 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | 22 | def install 23 | setup_fuse 24 | system "make" 25 | bin.install "ext4fuse" 26 | end 27 | 28 | test do 29 | assert_match version.to_s, shell_output("#{bin}/ext4fuse --version 2>&1", 1) 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /Formula/fuse-zip-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class FuseZipMac < Formula 4 | desc "FUSE file system to create & manipulate ZIP archives" 5 | homepage "https://bitbucket.org/agalanin/fuse-zip" 6 | url "https://bitbucket.org/agalanin/fuse-zip/downloads/fuse-zip-0.7.2.tar.gz" 7 | sha256 "3dd0be005677442f1fd9769a02dfc0b4fcdd39eb167e5697db2f14f4fee58915" 8 | license "GPL-3.0-or-later" 9 | head "https://bitbucket.org/agalanin/fuse-zip", using: :hg, branch: "master" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | rebuild 1 14 | sha256 cellar: :any, arm64_sonoma: "07d4a035c41b76adc6fa4e320ba0e002bc6ff6e8ca52e0e47d0ad42b267762f0" 15 | sha256 cellar: :any, ventura: "185b074a45baad043449b409896b0425ffcdc83eeac02d903f6b5a84867cb7e2" 16 | end 17 | 18 | depends_on "pkgconf" => :build 19 | depends_on "libzip" 20 | depends_on MacfuseRequirement 21 | depends_on :macos 22 | 23 | def install 24 | setup_fuse 25 | system "make", "prefix=#{prefix}", "install" 26 | end 27 | 28 | test do 29 | system bin/"fuse-zip", "--help" 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /Formula/fusehfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class FusehfsMac < Formula 4 | desc "FUSE driver for HFS filesystems" 5 | homepage "https://thejoelpatrol.github.io/fusehfs/" 6 | url "https://github.com/thejoelpatrol/fusehfs/archive/refs/tags/v0.1.5.tar.gz" 7 | sha256 "0f37b0cf31d38665af279b7b5bde0a185da55d7e8e6ccdb0de9133c3740143e8" 8 | license "GPL-2.0-or-later" 9 | head "https://github.com/thejoelpatrol/fusehfs.git", branch: "master" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "937bc2d207749a4a9008abc5961f683c6b6753703ef8e78704746bec751e6dd3" 14 | sha256 cellar: :any, ventura: "1c82b43b527c4ebb8e7979172a093856d8b7ca1be38d668888799db82239ed2a" 15 | end 16 | 17 | depends_on xcode: :build 18 | depends_on MacfuseRequirement 19 | depends_on :macos 20 | 21 | def install 22 | setup_fuse 23 | xcodebuild "-arch", Hardware::CPU.arch, 24 | "-target", "FS Bundle", 25 | "-configuration", "Release", 26 | "CODE_SIGN_IDENTITY=-", 27 | "SYMROOT=build", 28 | "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" 29 | bin.install "build/Release/hfsck" 30 | bin.install "build/Release/mount_fusefs_hfs" 31 | pkgshare.install "build/Release/fusefs_hfs.fs" 32 | end 33 | 34 | def caveats 35 | <<~EOS 36 | To add support for mounting HFS-formatted disk images via double-click, 37 | install and re-sign the filesystem bundle with: 38 | 39 | codesign -f -s - $(brew --prefix)/share/fusehfs-mac/fusefs_hfs.fs 40 | sudo ln -s $(brew --prefix)/share/fusehfs-mac/fusefs_hfs.fs /Library/Filesystems 41 | EOS 42 | end 43 | 44 | test do 45 | assert_match version.to_s, shell_output("#{bin}/mount_fusefs_hfs --version 2>&1", 1) 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /Formula/gcsfuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class GcsfuseMac < Formula 4 | desc "User-space file system for interacting with Google Cloud" 5 | homepage "https://github.com/googlecloudplatform/gcsfuse" 6 | url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/refs/tags/v2.12.0.tar.gz" 7 | sha256 "b530ef33fd1b0eee5822caab7f594d36237fc7caa546acdeee0d10b15e714726" 8 | license "Apache-2.0" 9 | head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master" 10 | 11 | livecheck do 12 | url :stable 13 | strategy :github_latest 14 | end 15 | 16 | bottle do 17 | root_url "https://ghcr.io/v2/gromgit/fuse" 18 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "f921abdf2d2201b4154b138b110f84211176ca2528ad3dde1ce57303837a6e97" 19 | sha256 cellar: :any_skip_relocation, ventura: "bd3c9206a9d130512830de6d84566352a272d28d096f021584c23f441dccd65e" 20 | end 21 | 22 | depends_on "go" => :build 23 | depends_on MacfuseRequirement 24 | depends_on :macos 25 | 26 | patch do 27 | url "https://raw.githubusercontent.com/gromgit/formula-patches/f69773ce21e06e4c6407da25af33486f5ec6185d/gcsfuse-mac/macos.patch?full_index=1" 28 | sha256 "ab3e204bf099cbabefee825f634cfb9c33349002059b1522488c12bf5790ef11" 29 | end 30 | 31 | patch :DATA 32 | 33 | def install 34 | setup_fuse 35 | # Build the build_gcsfuse tool. Ensure that it doesn't pick up any 36 | # libraries from the user's GOPATH; it should have no dependencies. 37 | ENV.delete("GOPATH") 38 | system "go", "build", "./tools/build_gcsfuse" 39 | 40 | # Use that tool to build gcsfuse itself. 41 | gcsfuse_version = build.head? ? Utils.git_short_head : version.to_s 42 | system "./build_gcsfuse", buildpath, prefix, gcsfuse_version 43 | end 44 | 45 | def caveats 46 | <<~EOS 47 | Upstream doesn't actively support macOS (https://github.com/GoogleCloudPlatform/gcsfuse/issues/1299). 48 | EOS 49 | end 50 | 51 | test do 52 | system bin/"gcsfuse", "--help" 53 | system "#{sbin}/mount_gcsfuse", "--help" 54 | end 55 | end 56 | 57 | __END__ 58 | diff --git a/tools/build_gcsfuse/main.go b/tools/build_gcsfuse/main.go 59 | index b1a4022..678f747 100644 60 | --- a/tools/build_gcsfuse/main.go 61 | +++ b/tools/build_gcsfuse/main.go 62 | @@ -134,8 +134,6 @@ func buildBinaries(dstDir, srcDir, version string, buildArgs []string) (err erro 63 | cmd := exec.Command( 64 | "go", 65 | "build", 66 | - "-C", 67 | - srcDir, 68 | "-o", 69 | path.Join(dstDir, bin.outputPath)) 70 | 71 | 72 | -------------------------------------------------------------------------------- /Formula/gitfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class GitfsMac < Formula 4 | include Language::Python::Virtualenv 5 | 6 | desc "Version controlled file system" 7 | homepage "https://www.presslabs.com/gitfs" 8 | url "https://github.com/presslabs/gitfs/archive/refs/tags/0.5.2.tar.gz" 9 | sha256 "921e24311e3b8ea3a5448d698a11a747618ee8dd62d5d43a85801de0b111cbf3" 10 | license "Apache-2.0" 11 | revision 1 12 | head "https://github.com/presslabs/gitfs.git" 13 | 14 | bottle do 15 | root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gitfs-mac-0.5.2" 16 | sha256 cellar: :any, arm64_monterey: "5aa42d1f875f89f6860de825ba6f522435e9e78361b3eddc3b32799d3c5aa498" 17 | sha256 cellar: :any, monterey: "ba780fac3f0470ed7e5a01f2bd1b0df66918bd50eac1b58e8373e3e0dc52974d" 18 | sha256 cellar: :any, big_sur: "e0086949aa4b8e18713a50cacb8bf2f1f73dba28e6523273b53856da35ea9dc7" 19 | sha256 cellar: :any, catalina: "aa14fd52fbd30a3d46fd57ec011ad73fefabc3350c5b962c10c71961bc9f7265" 20 | sha256 cellar: :any, mojave: "7d0605b4d2d6022c607ae6dfbdf87ae984b2f73bbe43e35cddf60fef0b79d3dc" 21 | end 22 | 23 | # Last release on 2019-10-20 and upstream has locked pygit2==0.28.2, which Homebrew 24 | # has been ignoring and manually updating to support recent `libgit2` versions. 25 | disable! date: "2023-10-06", because: :unmaintained 26 | 27 | depends_on "libgit2" 28 | depends_on MacfuseRequirement 29 | depends_on :macos 30 | depends_on "python@3.9" 31 | 32 | uses_from_macos "libffi" 33 | 34 | resource "atomiclong" do 35 | url "https://files.pythonhosted.org/packages/86/8c/70aea8215c6ab990f2d91e7ec171787a41b7fbc83df32a067ba5d7f3324f/atomiclong-0.1.1.tar.gz" 36 | sha256 "cb1378c4cd676d6f243641c50e277504abf45f70f1ea76e446efcdbb69624bbe" 37 | end 38 | 39 | resource "cached-property" do 40 | url "https://files.pythonhosted.org/packages/57/8e/0698e10350a57d46b3bcfe8eff1d4181642fd1724073336079cb13c5cf7f/cached-property-1.5.1.tar.gz" 41 | sha256 "9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504" 42 | end 43 | 44 | resource "cffi" do 45 | url "https://files.pythonhosted.org/packages/66/6a/98e023b3d11537a5521902ac6b50db470c826c682be6a8c661549cb7717a/cffi-1.14.4.tar.gz" 46 | sha256 "1a465cbe98a7fd391d47dce4b8f7e5b921e6cd805ef421d04f5f66ba8f06086c" 47 | end 48 | 49 | resource "fusepy" do 50 | url "https://files.pythonhosted.org/packages/04/0b/4506cb2e831cea4b0214d3625430e921faaa05a7fb520458c75a2dbd2152/fusepy-3.0.1.tar.gz" 51 | sha256 "72ff783ec2f43de3ab394e3f7457605bf04c8cf288a2f4068b4cde141d4ee6bd" 52 | end 53 | 54 | resource "pygit2" do 55 | url "https://files.pythonhosted.org/packages/6b/23/a8c5b726a58282fe2cadcc63faaddd4be147c3c8e0bd38b233114adf98fd/pygit2-1.6.1.tar.gz" 56 | sha256 "c3303776f774d3e0115c1c4f6e1fc35470d15f113a7ae9401a0b90acfa1661ac" 57 | 58 | # libgit2 1.3 support 59 | # https://github.com/libgit2/pygit2/pull/1089 60 | patch do 61 | url "https://raw.githubusercontent.com/Homebrew/formula-patches/54d3a0d1f241fdd4e9229312ced0d8da85d964b1/pygit2/libgit2-1.3.0.patch" 62 | sha256 "4d501c09d6642d50d89a1a4d691980e3a4a2ebcb6de7b45d22cce16a451b9839" 63 | end 64 | end 65 | 66 | resource "six" do 67 | url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz" 68 | sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" 69 | end 70 | 71 | resource "raven" do 72 | url "https://files.pythonhosted.org/packages/79/57/b74a86d74f96b224a477316d418389af9738ba7a63c829477e7a86dd6f47/raven-6.10.0.tar.gz" 73 | sha256 "3fa6de6efa2493a7c827472e984ce9b020797d0da16f1db67197bcc23c8fae54" 74 | end 75 | 76 | resource "pycparser" do 77 | url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz" 78 | sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3" 79 | end 80 | 81 | # pygit2 1.6.1 support 82 | # https://github.com/presslabs/gitfs/pull/379 83 | patch :DATA 84 | 85 | def install 86 | virtualenv_install_with_resources 87 | end 88 | 89 | def caveats 90 | <<~EOS 91 | gitfs clones repos in /var/lib/gitfs. You can either create it with 92 | sudo mkdir -m 1777 /var/lib/gitfs or use another folder with the 93 | repo_path argument. 94 | EOS 95 | end 96 | 97 | test do 98 | xy = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3" 99 | ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" 100 | 101 | (testpath/"test.py").write <<~EOS 102 | import gitfs 103 | import pygit2 104 | pygit2.init_repository('testing/.git', True) 105 | EOS 106 | 107 | system Formula["python@3.9"].opt_bin/"python3", "test.py" 108 | assert_path_exists testpath/"testing/.git/config" 109 | cd "testing" do 110 | system "git", "remote", "add", "homebrew", "https://github.com/Homebrew/homebrew-core.git" 111 | assert_match "homebrew", shell_output("git remote") 112 | end 113 | end 114 | end 115 | __END__ 116 | diff --git a/gitfs/mounter.py b/gitfs/mounter.py 117 | index 31b436d..391e899 100644 118 | --- a/gitfs/mounter.py 119 | +++ b/gitfs/mounter.py 120 | @@ -19,7 +19,7 @@ import resource 121 | 122 | from fuse import FUSE 123 | from pygit2 import Keypair, UserPass 124 | -from pygit2.remote import RemoteCallbacks 125 | +from pygit2.callbacks import RemoteCallbacks 126 | 127 | from gitfs import __version__ 128 | from gitfs.utils import Args 129 | diff --git a/requirements.txt b/requirements.txt 130 | index fb7d0f3..42c4d1f 100644 131 | --- a/requirements.txt 132 | +++ b/requirements.txt 133 | @@ -2,6 +2,6 @@ atomiclong==0.1.1 134 | cffi==1.12.3 135 | fusepy==3.0.1 136 | pycparser==2.19 137 | -pygit2==0.28.2 138 | +pygit2==1.16.1 139 | raven==6.10.0 140 | six==1.12.0 141 | -------------------------------------------------------------------------------- /Formula/gocryptfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class GocryptfsMac < Formula 4 | desc "Encrypted overlay filesystem written in Go" 5 | homepage "https://nuetzlich.net/gocryptfs/" 6 | url "https://github.com/rfjakob/gocryptfs/releases/download/v2.5.4/gocryptfs_v2.5.4_src-deps.tar.gz" 7 | sha256 "0db47fe41f46d1ff5b3ff4f1cc1088ab324a95af03995348435dcc20a5ff0282" 8 | license "MIT" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | sha256 cellar: :any, arm64_sonoma: "5aae6298ea41b24848d03cbc377612fca04c69ff3b451088dbe206bb3ad753ed" 13 | sha256 cellar: :any, ventura: "01ca8e529273f5f40cec85c5fdd2bfe0329c469e73317c466b4cd49fcc067bfe" 14 | end 15 | 16 | depends_on "go" => :build 17 | depends_on "pkg-config" => :build 18 | depends_on MacfuseRequirement 19 | depends_on :macos 20 | depends_on "openssl@3" 21 | 22 | def install 23 | setup_fuse 24 | system "./build.bash" 25 | bin.install "gocryptfs", "gocryptfs-xray/gocryptfs-xray" 26 | man1.install "Documentation/gocryptfs.1", "Documentation/gocryptfs-xray.1" 27 | end 28 | 29 | test do 30 | (testpath/"encdir").mkpath 31 | pipe_output("#{bin}/gocryptfs -init #{testpath}/encdir", "password", 0) 32 | assert_path_exists testpath/"encdir/gocryptfs.conf" 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /Formula/goofys-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class GoofysMac < Formula 4 | desc "Filey-System interface to Amazon S3" 5 | homepage "https://github.com/kahing/goofys" 6 | url "https://github.com/kahing/goofys.git", 7 | tag: "v0.24.0", 8 | revision: "45b8d78375af1b24604439d2e60c567654bcdf88" 9 | license "Apache-2.0" 10 | head "https://github.com/kahing/goofys.git" 11 | 12 | bottle do 13 | root_url "https://github.com/gromgit/homebrew-fuse/releases/download/goofys-mac-0.24.0" 14 | sha256 cellar: :any_skip_relocation, monterey: "0edf3be0d9fb22e7637e981539a5e93158d4543050a61afb5d11ce0ec80f0e17" 15 | sha256 cellar: :any_skip_relocation, big_sur: "f3f73dc39927ee0a94a26a3bc8ae4b097e083d48e311b79274a85ac7f547e85a" 16 | sha256 cellar: :any_skip_relocation, catalina: "b61cf142b7a484520ad554d17947d7022ed0c3fdab04d6cf89da93b986d6de15" 17 | sha256 cellar: :any_skip_relocation, mojave: "648d204e47b710662db2b778164346ef2b9fd77a4ec02af210fc8116eee7bb7f" 18 | end 19 | 20 | # Discussion ref: https://github.com/Homebrew/homebrew-core/pull/122082#issuecomment-1436535501 21 | disable! date: "2024-02-12", because: :does_not_build 22 | 23 | depends_on "go" => :build 24 | depends_on MacfuseRequirement 25 | depends_on :macos 26 | 27 | def install 28 | setup_fuse 29 | contents = Dir["*"] 30 | gopath = buildpath/"gopath" 31 | (gopath/"src/github.com/kahing/goofys").install contents 32 | 33 | ENV["GOPATH"] = gopath 34 | 35 | goofys_version = build.head? ? Utils.git_head : version 36 | cd gopath/"src/github.com/kahing/goofys" do 37 | system "go", "build", *std_go_args, 38 | "-ldflags", "-X main.Version=#{goofys_version}", 39 | "-o", "#{bin}/goofys" 40 | prefix.install_metafiles 41 | end 42 | end 43 | 44 | test do 45 | system "#{bin}/goofys", "--version" 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /Formula/hfsfuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class HfsfuseMac < Formula 4 | desc "FUSE driver for HFS+ filesystems (read-only)" 5 | homepage "https://github.com/0x09/hfsfuse" 6 | url "https://github.com/0x09/hfsfuse/releases/download/0.289/hfsfuse-0.289.tar.gz" 7 | sha256 "b19597dda364a670eebf05d0681c77db4b0f625f19b9e16f4b2b65dd8d16c360" 8 | license all_of: ["BSD-2-Clause", "MIT"] 9 | head "https://github.com/0x09/hfsfuse.git", branch: "master" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any, arm64_sonoma: "508aa0e067ea5bd62cdab71626d343384578d79db7ed53ad1a6cb075ca1bd6a8" 14 | sha256 cellar: :any, ventura: "06146c2169ecaf61ed886a28231bec023ae7761eb85bce358c7fc8ed2fd60d12" 15 | end 16 | 17 | depends_on "lzfse" 18 | depends_on MacfuseRequirement 19 | depends_on :macos 20 | 21 | def install 22 | setup_fuse 23 | system "make", "install", "prefix=#{prefix}" 24 | end 25 | 26 | test do 27 | assert_match version.to_s, shell_output("#{bin}/hfsfuse --version 2>&1") 28 | system bin/"hfsdump" 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /Formula/ifuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class IfuseMac < Formula 4 | desc "FUSE module for iOS devices" 5 | homepage "https://libimobiledevice.org/" 6 | url "https://github.com/libimobiledevice/ifuse/archive/refs/tags/1.1.4.tar.gz" 7 | sha256 "2a00769e8f1d8bad50898b9d00baf12c8ae1cda2d19ff49eaa9bf580e5dbe78c" 8 | license "LGPL-2.1-or-later" 9 | head "https://github.com/libimobiledevice/ifuse.git", branch: "master" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | rebuild 1 14 | sha256 cellar: :any, arm64_sonoma: "06ceadb0e0c288cc0f02b5c64c7051f8d54dd39d697801c305ba70101780e3ee" 15 | sha256 cellar: :any, ventura: "d7aecf23caa314cb17ae46d790af547fceca621a300f19f74b2593c0c4cafe10" 16 | end 17 | 18 | depends_on "autoconf" => :build 19 | depends_on "automake" => :build 20 | depends_on "libtool" => :build 21 | depends_on "pkgconf" => :build 22 | depends_on "glib" 23 | depends_on "libimobiledevice" 24 | depends_on "libplist" 25 | depends_on MacfuseRequirement 26 | depends_on :macos 27 | 28 | def install 29 | setup_fuse 30 | system "./autogen.sh", *std_configure_args 31 | system "make", "install" 32 | end 33 | 34 | test do 35 | # Actual test of functionality requires osxfuse, so test for expected failure instead 36 | assert_match "ERROR: No device found!", shell_output("#{bin}/ifuse --list-apps", 1) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /Formula/mp3fs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class Mp3fsMac < Formula 4 | desc "Read-only FUSE file system: transcodes audio formats to MP3" 5 | homepage "https://khenriks.github.io/mp3fs/" 6 | url "https://github.com/khenriks/mp3fs/releases/download/v1.1.1/mp3fs-1.1.1.tar.gz" 7 | sha256 "942b588fb623ea58ce8cac8844e6ff2829ad4bc9b4c163bba58e3fa9ebc15608" 8 | license "GPL-3.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | rebuild 1 13 | sha256 cellar: :any, arm64_sonoma: "4171a0e1383f1c17150ed12ecb88fb766df4a105ce789e79e3d67130208c4b60" 14 | sha256 cellar: :any, ventura: "6d3d1bd7f5db566dbe51bf16dfd5c63ed79cc1ea98904d48921953ccc9b77c01" 15 | end 16 | 17 | depends_on "pkgconf" => :build 18 | depends_on "flac" 19 | depends_on "lame" 20 | depends_on "libid3tag" 21 | depends_on "libvorbis" 22 | depends_on MacfuseRequirement 23 | depends_on :macos 24 | 25 | patch :DATA 26 | 27 | def install 28 | setup_fuse 29 | system "./configure", *std_configure_args 30 | system "make", "install" 31 | end 32 | 33 | test do 34 | assert_match "mp3fs version: #{version}", shell_output("#{bin}/mp3fs -V") 35 | end 36 | end 37 | __END__ 38 | diff --git a/src/mp3fs.cc b/src/mp3fs.cc 39 | index f846da9..f215f10 100644 40 | --- a/src/mp3fs.cc 41 | +++ b/src/mp3fs.cc 42 | @@ -28,9 +28,6 @@ 43 | #include 44 | #include 45 | #include 46 | -#ifdef __APPLE__ 47 | -#include 48 | -#endif 49 | 50 | #include 51 | #include 52 | @@ -166,9 +163,6 @@ void print_versions(std::ostream&& out) { 53 | print_codec_versions(out); 54 | out << "FUSE library version: " << FUSE_MAJOR_VERSION << "." 55 | << FUSE_MINOR_VERSION << std::endl; 56 | -#ifdef __APPLE__ 57 | - out << "OS X FUSE version: " << osxfuse_version() << std::endl; 58 | -#endif 59 | } 60 | 61 | int mp3fs_opt_proc(void* /*unused*/, const char* arg, int key, 62 | -------------------------------------------------------------------------------- /Formula/ntfs-3g-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class Ntfs3gMac < Formula 4 | desc "Read-write NTFS driver for FUSE" 5 | homepage "https://www.tuxera.com/community/open-source-ntfs-3g/" 6 | url "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2022.10.3.tgz" 7 | sha256 "f20e36ee68074b845e3629e6bced4706ad053804cbaf062fbae60738f854170c" 8 | license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] 9 | 10 | livecheck do 11 | url :head 12 | strategy :github_latest 13 | end 14 | 15 | bottle do 16 | root_url "https://ghcr.io/v2/gromgit/fuse" 17 | rebuild 1 18 | sha256 cellar: :any, arm64_sonoma: "a00edf9e9abde1b447829c0e49267189a90713b66f651e498723915f2415284d" 19 | sha256 cellar: :any, ventura: "6e5875dd0059b8a387cc0eba1d9e3f866758c0e711ab5db62ed91da2dd989faf" 20 | end 21 | 22 | head do 23 | url "https://github.com/tuxera/ntfs-3g.git", branch: "edge" 24 | 25 | depends_on "autoconf" => :build 26 | depends_on "automake" => :build 27 | depends_on "libgcrypt" => :build 28 | depends_on "libtool" => :build 29 | end 30 | 31 | depends_on "pkgconf" => :build 32 | depends_on "coreutils" => :test 33 | depends_on "gettext" 34 | depends_on MacfuseRequirement 35 | depends_on :macos 36 | 37 | def install 38 | setup_fuse 39 | ENV.append "LDFLAGS", "-lintl" 40 | 41 | args = %W[ 42 | --exec-prefix=#{prefix} 43 | --mandir=#{man} 44 | --with-fuse=external 45 | --enable-extras 46 | ] 47 | 48 | system "./autogen.sh" if build.head? 49 | # Workaround for hardcoded /sbin in ntfsprogs 50 | inreplace Dir["{ntfsprogs,src}/Makefile.in"], "$(DESTDIR)/sbin/", "$(DESTDIR)#{sbin}/" 51 | system "./configure", *args, *std_configure_args 52 | system "make" 53 | system "make", "install" 54 | 55 | # Install a script that can be used to enable automount 56 | File.open("#{sbin}/mount_ntfs", File::CREAT|File::TRUNC|File::RDWR, 0755) do |f| 57 | f.puts <<~EOS 58 | #!/bin/bash 59 | 60 | VOLUME_NAME="${@:$#}" 61 | VOLUME_NAME=${VOLUME_NAME#/Volumes/} 62 | USER_ID=#{Process.uid} 63 | GROUP_ID=#{Process.gid} 64 | 65 | if [ "$(/usr/bin/stat -f %u /dev/console)" -ne 0 ]; then 66 | USER_ID=$(/usr/bin/stat -f %u /dev/console) 67 | GROUP_ID=$(/usr/bin/stat -f %g /dev/console) 68 | fi 69 | 70 | #{opt_bin}/ntfs-3g \\ 71 | -o volname="${VOLUME_NAME}" \\ 72 | -o local \\ 73 | -o negative_vncache \\ 74 | -o auto_xattr \\ 75 | -o auto_cache \\ 76 | -o noatime \\ 77 | -o windows_names \\ 78 | -o streams_interface=openxattr \\ 79 | -o inherit \\ 80 | -o uid="$USER_ID" \\ 81 | -o gid="$GROUP_ID" \\ 82 | -o allow_other \\ 83 | -o big_writes \\ 84 | "$@" >> /var/log/mount-ntfs-3g.log 2>&1 85 | 86 | exit $?; 87 | EOS 88 | end 89 | end 90 | 91 | test do 92 | # create a small raw image, format and check it 93 | ntfs_raw = testpath/"ntfs.raw" 94 | system Formula["coreutils"].libexec/"gnubin/truncate", "--size=10M", ntfs_raw 95 | ntfs_label_input = "Homebrew" 96 | system sbin/"mkntfs", "--force", "--fast", "--label", ntfs_label_input, ntfs_raw 97 | system bin/"ntfsfix", "--no-action", ntfs_raw 98 | ntfs_label_output = shell_output("#{sbin}/ntfslabel #{ntfs_raw}") 99 | assert_match ntfs_label_input, ntfs_label_output 100 | end 101 | end 102 | -------------------------------------------------------------------------------- /Formula/ratarmount-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class RatarmountMac < Formula 4 | include Language::Python::Virtualenv 5 | 6 | desc "Mount and efficiently access archives as filesystems" 7 | homepage "https://github.com/mxmlnkn/ratarmount" 8 | url "https://github.com/mxmlnkn/ratarmount/archive/refs/tags/v1.0.0.tar.gz" 9 | sha256 "fc5fadfc4dc268613eb3df832a0b3a3bc7fd40cd119b6aff83beaaa29ed05254" 10 | license "MIT" 11 | 12 | bottle do 13 | root_url "https://ghcr.io/v2/gromgit/fuse" 14 | sha256 cellar: :any, arm64_sonoma: "68b4006721eabdf2e61d7cd70923e6947e7584632e90f959b27b148291e285dc" 15 | sha256 cellar: :any, ventura: "89fef5efaf90f0a381e74a53f42d301c3f3b81ad15ddcc20929b8a93e0d48dc7" 16 | end 17 | 18 | depends_on "libgit2" 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | depends_on "python@3.13" 22 | depends_on "zstd" 23 | 24 | resource "cffi" do 25 | url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" 26 | sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" 27 | end 28 | 29 | resource "fast-zip-decryption" do 30 | url "https://files.pythonhosted.org/packages/47/c8/0fbde8b9c8314e4fde35f4841015a6143967d5fd4d141e84a6cf14e62178/fast_zip_decryption-3.0.0.tar.gz" 31 | sha256 "5267e45aab72161b035ddc4dda4ffa2490b6da1ca752e4ff7eaedd4dd18aa85d" 32 | end 33 | 34 | resource "indexed-gzip" do 35 | url "https://files.pythonhosted.org/packages/f2/75/0eff2f73f451d8510a9ab90d96fb974b900cd68fcba0be1d21bc0da62dc2/indexed_gzip-1.9.4.tar.gz" 36 | sha256 "6b415e4a29e799d5a21756ecf309325997992f046ee93526b8fe4ff511502b60" 37 | end 38 | 39 | resource "indexed-zstd" do 40 | url "https://files.pythonhosted.org/packages/52/22/5b908d5e987043ce8390b0d9101c93fae0c0de0c9c8417c562976eeb8be6/indexed_zstd-1.6.1.tar.gz" 41 | sha256 "8b74378f9461fceab175215b65e1c489864ddb34bd816058936a627f0cca3a8b" 42 | end 43 | 44 | resource "libarchive-c" do 45 | url "https://files.pythonhosted.org/packages/a0/f9/3b6cd86e683a06bc28b9c2e1d9fe0bd7215f2750fd5c85dce0df96db8eca/libarchive-c-5.1.tar.gz" 46 | sha256 "7bcce24ea6c0fa3bc62468476c6d2f6264156db2f04878a372027c10615a2721" 47 | end 48 | 49 | resource "pycparser" do 50 | url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" 51 | sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" 52 | end 53 | 54 | resource "pygit2" do 55 | url "https://files.pythonhosted.org/packages/b7/ea/17aa8ca38750f1ba69511ceeb41d29961f90eb2e0a242b668c70311efd4e/pygit2-1.17.0.tar.gz" 56 | sha256 "fa2bc050b2c2d3e73b54d6d541c792178561a344f07e409f532d5bb97ac7b894" 57 | end 58 | 59 | resource "python-xz" do 60 | url "https://files.pythonhosted.org/packages/fe/2f/7ed0c25005eba0efb1cea3cdf4a325852d63167cc77f96b0a0534d19e712/python-xz-0.4.0.tar.gz" 61 | sha256 "398746593b706fa9fac59b8c988eab8603e1fe2ba9195111c0b45227a3a77db3" 62 | end 63 | 64 | resource "rapidgzip" do 65 | url "https://files.pythonhosted.org/packages/0b/ac/0eee3d3279618a3c3810ac6b012b8ee7c1a9f239c9fa37529e619a31bb93/rapidgzip-0.14.3.tar.gz" 66 | sha256 "7d35f0af1657b4051a90c3c0c2c0d2433f3ce839db930fdbed3d6516de2a5df1" 67 | end 68 | 69 | resource "rarfile" do 70 | url "https://files.pythonhosted.org/packages/26/3f/3118a797444e7e30e784921c4bfafb6500fb288a0c84cb8c32ed15853c16/rarfile-4.2.tar.gz" 71 | sha256 "8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef" 72 | end 73 | 74 | resource "ratarmountcore" do 75 | url "https://files.pythonhosted.org/packages/a1/5a/5600a4abe37426e9f3206bed3519b392f01816679226f4058049ea0e4a7d/ratarmountcore-0.8.0.tar.gz" 76 | sha256 "f1991a79b020b94e75c37c92c199677c80186db5f86a7a9717def68f1ae08207" 77 | end 78 | 79 | def install 80 | setup_fuse 81 | virtualenv_install_with_resources 82 | end 83 | 84 | test do 85 | assert_match "ratarmount #{version}", shell_output("#{bin}/ratarmount --version 2>&1") 86 | tarball = test_fixtures("tarballs/testball2-0.1.tbz") 87 | assert_match "Operation not permitted", shell_output("#{bin}/ratarmount #{tarball} 2>&1", 1) 88 | end 89 | end 90 | -------------------------------------------------------------------------------- /Formula/rclone-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class RcloneMac < Formula 4 | desc "Rsync for cloud storage (with macOS FUSE mount support)" 5 | homepage "https://rclone.org/" 6 | url "https://github.com/rclone/rclone/archive/refs/tags/v1.69.1.tar.gz" 7 | sha256 "2fe258d1b4257aef98b53794c27d1b254ee0f2e307634f94fbf3c71786e3b1b5" 8 | license "MIT" 9 | head "https://github.com/rclone/rclone.git" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "caa66df2b247b645af99f05d5160f3f029449773032b4dae9d0ff3c3c3aa0d0e" 14 | sha256 cellar: :any_skip_relocation, ventura: "81d46f8631fde56232477af918e701762faa935edd5199b25ed771bef86bb343" 15 | end 16 | 17 | depends_on "go" => :build 18 | depends_on MacfuseRequirement 19 | depends_on :macos 20 | 21 | def install 22 | setup_fuse 23 | system "go", "build", 24 | "-ldflags", "-s -X github.com/rclone/rclone/fs.Version=v#{version}", 25 | "-tags", "cmount", *std_go_args 26 | (libexec/"rclone").install_symlink bin/name.to_s => "rclone" 27 | man1.install "rclone.1" => "#{name}.1" 28 | system bin/name.to_s, "genautocomplete", "bash", "rclone.bash" 29 | system bin/name.to_s, "genautocomplete", "bash", "#{name}.bash" 30 | system bin/name.to_s, "genautocomplete", "zsh", "_rclone" 31 | system bin/name.to_s, "genautocomplete", "zsh", "_#{name}" 32 | bash_completion.install "rclone.bash" => "rclone" 33 | bash_completion.install "#{name}.bash" => name.to_s 34 | zsh_completion.install "_rclone" 35 | zsh_completion.install "_#{name}" 36 | end 37 | 38 | def caveats 39 | <<~EOS 40 | The rclone binary has been installed as `#{name}`, 41 | to avoid conflict with the core `rclone` formula. 42 | If you need to use it as `rclone`, add the "rclone" directory 43 | to your PATH like: 44 | PATH="#{opt_libexec}/rclone:$PATH" 45 | 46 | `#{name}` supports the `mount` command on macOS, unlike the 47 | Homebrew core `rclone`. If you don't need `mount`, please 48 | `brew install rclone` instead. 49 | EOS 50 | end 51 | 52 | test do 53 | (testpath/"file1.txt").write "Test!" 54 | system bin/name.to_s, "copy", testpath/"file1.txt", testpath/"dist" 55 | assert_match File.read(testpath/"file1.txt"), File.read(testpath/"dist/file1.txt") 56 | system opt_libexec/"rclone/rclone", "copy", testpath/"file1.txt", testpath/"dast" 57 | assert_match File.read(testpath/"file1.txt"), File.read(testpath/"dast/file1.txt") 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /Formula/rofs-filtered-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class RofsFilteredMac < Formula 4 | desc "Filtered read-only filesystem for FUSE" 5 | homepage "https://github.com/gburca/rofs-filtered/" 6 | url "https://github.com/gburca/rofs-filtered/archive/refs/tags/rel-1.7.tar.gz" 7 | sha256 "d66066dfd0274a2fb7b71dd929445377dd23100b9fa43e3888dbe3fc7e8228e8" 8 | license "GPL-2.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | rebuild 1 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "666320aa517fcda5fea5a9189caf62889ea80efc97991325934610f526565742" 14 | sha256 cellar: :any, ventura: "0340ec5bd37f169ca31e5240a26766abef47040363f13f1fc0f7de2cd58a3e59" 15 | end 16 | 17 | depends_on "cmake" => :build 18 | depends_on "pkgconf" => :build 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | 22 | # Use pkgconfig to find FUSE 23 | patch :DATA 24 | 25 | def install 26 | setup_fuse 27 | system "cmake", "-S", ".", "-B", "build", 28 | "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", 29 | *fuse_cmake_args, *std_cmake_args 30 | system "cmake", "--build", "build" 31 | system "cmake", "--install", "build" 32 | end 33 | 34 | test do 35 | system "#{bin}/rofs-filtered", "--version" 36 | end 37 | end 38 | __END__ 39 | diff --git a/CMakeLists.txt b/CMakeLists.txt 40 | index 53a6687..cb4f121 100644 41 | --- a/CMakeLists.txt 42 | +++ b/CMakeLists.txt 43 | @@ -12,8 +12,8 @@ add_definitions(-D_GNU_SOURCE) 44 | set(CMAKE_C_FLAGS "-Wall -std=c99") 45 | 46 | # find fuse library 47 | -find_package (FUSE REQUIRED) 48 | -include_directories (${FUSE_INCLUDE_DIR}) 49 | +find_package(PkgConfig REQUIRED) 50 | +pkg_check_modules(FUSE fuse REQUIRED) 51 | add_definitions(-D_FILE_OFFSET_BITS=64) 52 | 53 | # generate config file 54 | @@ -24,7 +24,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) 55 | 56 | # create and configure targets 57 | add_executable(rofs-filtered rofs-filtered.c) 58 | -target_link_libraries(rofs-filtered ${FUSE_LIBRARIES}) 59 | +target_include_directories(rofs-filtered PUBLIC ${FUSE_INCLUDE_DIRS}) 60 | +target_link_libraries(rofs-filtered PUBLIC ${LIBS} ${FUSE_LDFLAGS}) 61 | +target_compile_options(rofs-filtered PUBLIC ${FUSE_CFLAGS}) 62 | 63 | # configure installation 64 | install(TARGETS rofs-filtered DESTINATION ${CMAKE_INSTALL_BINDIR}) 65 | -------------------------------------------------------------------------------- /Formula/s3-backer-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class S3BackerMac < Formula 4 | desc "FUSE-based single file backing store via Amazon S3" 5 | homepage "https://github.com/archiecobbs/s3backer" 6 | url "https://archie-public.s3.amazonaws.com/s3backer/s3backer-2.1.4.tar.gz" 7 | sha256 "0451471209cc872708e91b2784a4a1b9f3ca44c89a7bffb8f6145aed28c941e7" 8 | license "GPL-2.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | sha256 cellar: :any, arm64_sonoma: "7f67d78e85e19ec2447968526fddc16c9285c32f2d81eb5cdbaa2771fb2e7153" 13 | sha256 cellar: :any, ventura: "51f68b3c5cba34ac4e669b9cc8b2b1f37a940fc01e3d356decb4aaf750f1e96d" 14 | end 15 | 16 | depends_on "pkgconf" => :build 17 | depends_on "curl" 18 | depends_on "expat" 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | depends_on "openssl@3" 22 | 23 | def install 24 | setup_fuse 25 | system "./configure", "--disable-silent-rules", *std_configure_args 26 | system "make", "install" 27 | end 28 | 29 | test do 30 | system bin/"s3backer", "--version" 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /Formula/s3fs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class S3fsMac < Formula 4 | desc "FUSE-based file system backed by Amazon S3" 5 | homepage "https://github.com/s3fs-fuse/s3fs-fuse/wiki" 6 | url "https://github.com/s3fs-fuse/s3fs-fuse/archive/refs/tags/v1.95.tar.gz" 7 | sha256 "0c97b8922f005500d36f72aee29a1345c94191f61d795e2a7b79fb7e3e6f5517" 8 | license "GPL-2.0-or-later" 9 | head "https://github.com/s3fs-fuse/s3fs-fuse.git", branch: "master" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any, arm64_sonoma: "ecbfca73778ed850eeef256fcba17bb229036f9fbce767fd54abc2335236efee" 14 | sha256 cellar: :any, ventura: "0fb739e8007836e833c79d45159c78fbd05291b19afc9439683d2712d1b1dd68" 15 | end 16 | 17 | depends_on "autoconf" => :build 18 | depends_on "automake" => :build 19 | depends_on "pkgconf" => :build 20 | depends_on "curl" 21 | depends_on "gcc" 22 | depends_on "gnutls" 23 | depends_on "libgcrypt" 24 | depends_on "libxml2" 25 | depends_on MacfuseRequirement 26 | depends_on :macos 27 | depends_on "nettle" 28 | 29 | fails_with :clang do 30 | cause <<~EOS 31 | libc++abi: terminating due to uncaught exception of type std::__1::system_error: 32 | mutex lock failed: Invalid argument 33 | EOS 34 | end 35 | 36 | def install 37 | setup_fuse 38 | system "./autogen.sh" 39 | system "./configure", "--with-gnutls", *std_configure_args 40 | system "make", "install" 41 | end 42 | 43 | def caveats 44 | <<~EOS 45 | This is the final version that supports FUSE 2. 46 | Further updates require a macOS FUSE 3 implementation. 47 | EOS 48 | end 49 | 50 | test do 51 | system "#{bin}/s3fs", "--version" 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /Formula/s3ql-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class S3qlMac < Formula 4 | include Language::Python::Virtualenv 5 | 6 | desc "POSIX-compliant FUSE filesystem using object store as block storage" 7 | homepage "https://github.com/s3ql/s3ql" 8 | url "https://github.com/s3ql/s3ql/releases/download/release-3.3.2/s3ql-3.3.2.tar.bz2" 9 | sha256 "72b310052752e281a17468a8bbe9006db7fa1f0184b83b38c5667239dfd59e73" 10 | license "GPL-3.0-only" 11 | revision 1 12 | 13 | bottle do 14 | root_url "https://github.com/gromgit/homebrew-fuse/releases/download/s3ql-mac-3.3.2" 15 | sha256 cellar: :any, arm64_monterey: "28591bf8f937e22571aebb9ea52b5a41a6674bca0e285d49009d3b6f3daff494" 16 | sha256 cellar: :any, monterey: "f2b0297df187d806be556ec6ed6c6ad5f9d3866d505387a5aee0e0ec558f0afe" 17 | sha256 cellar: :any, big_sur: "d25584692de92f2e9982ac22a60371844032fdd4461507eff126ff2ea5077414" 18 | sha256 cellar: :any, catalina: "5263041b72989e71d60fd9dacf95fb3138d488fc04f25ff7438fd2f73e20e8a5" 19 | sha256 cellar: :any, mojave: "c8438bb43cc23a6addf967de989d564af559793f639553834232319913915b67" 20 | end 21 | 22 | deprecate! date: "2025-02-11", because: "requires FUSE 3 for v3.4.0 onwards, and doesn't build on modern macOS" 23 | 24 | depends_on "pkg-config" => :build 25 | depends_on "libffi" 26 | depends_on MacfuseRequirement 27 | depends_on :macos 28 | depends_on "openssl@3" 29 | depends_on "python@3.13" 30 | 31 | resource "apsw-3-9-2" do 32 | url "https://files.pythonhosted.org/packages/b5/a1/3de5a2d35fc34939672f4e1bd7d68cca359a31b76926f00d95f434c63aaa/apsw-3.9.2-r1.tar.gz" 33 | sha256 "dab96fd164dde9e59f7f27228291498217fa0e74048e2c08c7059d7e39589270" 34 | end 35 | 36 | resource "cachetools" do 37 | url "https://files.pythonhosted.org/packages/30/62/88fda08df9053141647b6941141b71b4c2a23d0fabab485feb917428ab46/cachetools-4.1.0.tar.gz" 38 | sha256 "1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab" 39 | end 40 | 41 | resource "certifi" do 42 | url "https://files.pythonhosted.org/packages/b8/e2/a3a86a67c3fc8249ed305fc7b7d290ebe5e4d46ad45573884761ef4dea7b/certifi-2020.4.5.1.tar.gz" 43 | sha256 "51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" 44 | end 45 | 46 | resource "cffi" do 47 | url "https://files.pythonhosted.org/packages/05/54/3324b0c46340c31b909fcec598696aaec7ddc8c18a63f2db352562d3354c/cffi-1.14.0.tar.gz" 48 | sha256 "2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6" 49 | end 50 | 51 | resource "chardet" do 52 | url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz" 53 | sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" 54 | end 55 | 56 | resource "cryptography" do 57 | url "https://files.pythonhosted.org/packages/56/3b/78c6816918fdf2405d62c98e48589112669f36711e50158a0c15d804c30d/cryptography-2.9.2.tar.gz" 58 | sha256 "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229" 59 | end 60 | 61 | resource "defusedxml" do 62 | url "https://files.pythonhosted.org/packages/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz" 63 | sha256 "f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" 64 | end 65 | 66 | resource "dugong" do 67 | url "https://files.pythonhosted.org/packages/db/68/74767cc13b9e7cfa9705fc9cf3b272e55350de8cd4a73c98508a95d9a52c/dugong-3.7.5.tar.bz2" 68 | sha256 "d0d07606282230fd9832f2de647e4cb46882c227883e6a12a8ff811ac46d7283" 69 | end 70 | 71 | resource "google-auth" do 72 | url "https://files.pythonhosted.org/packages/d8/47/0b6f9d832fe0699c8daf8b645408752e995f5afbb466cfa76d9954fcf8e1/google-auth-1.14.1.tar.gz" 73 | sha256 "e63b2210e03c4ed829063b72c4af0c4b867c2788efb3210b6b9439b488bd3afd" 74 | end 75 | 76 | resource "google-auth-oauthlib" do 77 | url "https://files.pythonhosted.org/packages/cd/5a/2b5a4c1294a4e8903bdba122083bd505dc51688a95d4670cde89dc45e6ed/google-auth-oauthlib-0.4.1.tar.gz" 78 | sha256 "88d2cd115e3391eb85e1243ac6902e76e77c5fe438b7276b297fbe68015458dd" 79 | end 80 | 81 | resource "idna" do 82 | url "https://files.pythonhosted.org/packages/cb/19/57503b5de719ee45e83472f339f617b0c01ad75cba44aba1e4c97c2b0abd/idna-2.9.tar.gz" 83 | sha256 "7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb" 84 | end 85 | 86 | resource "llfuse" do 87 | url "https://files.pythonhosted.org/packages/75/b4/5248459ec0e7e1608814915479cb13e5baf89034b572e3d74d5c9219dd31/llfuse-1.3.6.tar.bz2" 88 | sha256 "31a267f7ec542b0cd62e0f1268e1880fdabf3f418ec9447def99acfa6eff2ec9" 89 | end 90 | 91 | resource "oauthlib" do 92 | url "https://files.pythonhosted.org/packages/fc/c7/829c73c64d3749da7811c06319458e47f3461944da9d98bb4df1cb1598c2/oauthlib-3.1.0.tar.gz" 93 | sha256 "bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889" 94 | end 95 | 96 | resource "pyasn1" do 97 | url "https://files.pythonhosted.org/packages/a4/db/fffec68299e6d7bad3d504147f9094830b704527a7fc098b721d38cc7fa7/pyasn1-0.4.8.tar.gz" 98 | sha256 "aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba" 99 | end 100 | 101 | resource "pyasn1-modules" do 102 | url "https://files.pythonhosted.org/packages/88/87/72eb9ccf8a58021c542de2588a867dbefc7556e14b2866d1e40e9e2b587e/pyasn1-modules-0.2.8.tar.gz" 103 | sha256 "905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e" 104 | end 105 | 106 | resource "pycparser" do 107 | url "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz" 108 | sha256 "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" 109 | end 110 | 111 | resource "requests" do 112 | url "https://files.pythonhosted.org/packages/f5/4f/280162d4bd4d8aad241a21aecff7a6e46891b905a4341e7ab549ebaf7915/requests-2.23.0.tar.gz" 113 | sha256 "b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" 114 | end 115 | 116 | resource "requests-oauthlib" do 117 | url "https://files.pythonhosted.org/packages/23/eb/68fc8fa86e0f5789832f275c8289257d8dc44dbe93fce7ff819112b9df8f/requests-oauthlib-1.3.0.tar.gz" 118 | sha256 "b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a" 119 | end 120 | 121 | resource "rsa" do 122 | url "https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f/rsa-4.0.tar.gz" 123 | sha256 "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487" 124 | end 125 | 126 | resource "six" do 127 | url "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz" 128 | sha256 "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" 129 | end 130 | 131 | resource "urllib3" do 132 | url "https://files.pythonhosted.org/packages/05/8c/40cd6949373e23081b3ea20d5594ae523e681b6f472e600fbc95ed046a36/urllib3-1.25.9.tar.gz" 133 | sha256 "3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527" 134 | end 135 | 136 | def install 137 | setup_fuse 138 | venv = virtualenv_create(libexec, "python3") 139 | resources.each do |r| 140 | venv.pip_install r 141 | end 142 | 143 | # The inreplace changes the name of the (fsck|mkfs|mount|umount).s3ql 144 | # utilities to use underscore (_) as a separator, which is consistent 145 | # with other tools on macOS. 146 | # Final names: fsck_s3ql, mkfs_s3ql, mount_s3ql, umount_s3ql 147 | inreplace "setup.py", /'(?:(mkfs|fsck|mount|umount)\.)s3ql =/, "'\\1_s3ql =" 148 | 149 | system libexec/"bin/python3", "setup.py", "build_ext", "--inplace" 150 | venv.pip_install_and_link buildpath 151 | end 152 | 153 | def caveats 154 | <<~EOS 155 | This formula is outdated, and is provided only as a courtesy. 156 | It cannot be updated until macFUSE supports FUSE API version 3. 157 | 158 | If security issues are discovered with this old software, 159 | it may be removed without notice. 160 | EOS 161 | end 162 | 163 | test do 164 | assert_match "S3QL ", shell_output(bin/"mount_s3ql --version") 165 | 166 | # create a local filesystem, and run an fsck on it 167 | assert_equal "Library\n", shell_output("ls") 168 | assert_match "Creating metadata", shell_output(bin/"mkfs_s3ql --plain local://#{testpath} 2>&1") 169 | assert_match "s3ql_metadata", shell_output("ls s3ql_metadata") 170 | system bin/"fsck_s3ql", "local://#{testpath}" 171 | end 172 | end 173 | -------------------------------------------------------------------------------- /Formula/securefs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class SecurefsMac < Formula 4 | desc "Filesystem with transparent authenticated encryption" 5 | homepage "https://github.com/netheril96/securefs" 6 | url "https://github.com/netheril96/securefs/archive/refs/tags/v1.1.0.tar.gz" 7 | sha256 "3b1d75c8716abafebd45466ddde33dba0ba93371d75ff2b8594e7822d29bd1f9" 8 | license "MIT" 9 | head "https://github.com/netheril96/securefs.git", branch: "master" 10 | 11 | livecheck do 12 | url :stable 13 | strategy :github_latest 14 | end 15 | 16 | bottle do 17 | root_url "https://ghcr.io/v2/gromgit/fuse" 18 | sha256 cellar: :any, arm64_sonoma: "00c3dde00c48f87ece1f6df2422f4e52e7823d36079acd8a362781d9ce586df8" 19 | sha256 cellar: :any, ventura: "f1620f8c63014b133d381ad4de21fd5f2e651f93607c6d66886261fd514d30b6" 20 | end 21 | 22 | depends_on "cmake" => :build 23 | depends_on "pkgconf" => :build 24 | depends_on "tclap" => :build 25 | depends_on "abseil" 26 | depends_on "argon2" 27 | depends_on "cryptopp" 28 | depends_on "fruit" 29 | depends_on "jsoncpp" 30 | depends_on MacfuseRequirement 31 | depends_on :macos 32 | depends_on "protobuf" 33 | depends_on "sqlite" 34 | depends_on "uni-algo" 35 | depends_on "utf8proc" 36 | 37 | def install 38 | setup_fuse 39 | args = %w[ 40 | -DSECUREFS_ENABLE_INTEGRATION_TEST=OFF 41 | -DSECUREFS_ENABLE_UNIT_TEST=OFF 42 | -DSECUREFS_USE_VCPKG=OFF 43 | ] 44 | system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args 45 | system "cmake", "--build", "build" 46 | system "cmake", "--install", "build" 47 | end 48 | 49 | test do 50 | system bin/"securefs", "version" # The sandbox prevents a more thorough test 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /Formula/simple-mtpfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class SimpleMtpfsMac < Formula 4 | desc "Simple MTP fuse filesystem driver" 5 | homepage "https://github.com/phatina/simple-mtpfs" 6 | url "https://github.com/phatina/simple-mtpfs/archive/refs/tags/v0.4.0.tar.gz" 7 | sha256 "1d011df3fa09ad0a5c09d48d84c03e6cddf86390af9eb4e0c178193f32f0e2fc" 8 | license "GPL-2.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | rebuild 1 13 | sha256 cellar: :any, arm64_sonoma: "cf831fa0da5d53fbef60c754223bb2ed7601c80e89d7bb11be4bd349001b2f1e" 14 | sha256 cellar: :any, ventura: "01adbaed0737e09f73ec91d8e248a1a9c138e06f8476cd6da23e6b511f3c68d9" 15 | end 16 | 17 | depends_on "autoconf" => :build 18 | depends_on "autoconf-archive" => :build # required for AX_CXX_COMPILE_STDCXX_17 19 | depends_on "automake" => :build 20 | depends_on "pkgconf" => :build 21 | depends_on "libmtp" 22 | depends_on "libusb" 23 | depends_on MacfuseRequirement 24 | depends_on :macos 25 | 26 | patch :DATA 27 | 28 | def install 29 | setup_fuse 30 | system "./autogen.sh" 31 | system "./configure", "--disable-silent-rules", *std_configure_args 32 | system "make" 33 | system "make", "install" 34 | end 35 | 36 | test do 37 | system bin/"simple-mtpfs", "-h" 38 | end 39 | end 40 | __END__ 41 | diff --git a/configure.ac b/configure.ac 42 | index 321cfec..a5e9294 100644 43 | --- a/configure.ac 44 | +++ b/configure.ac 45 | @@ -25,8 +25,8 @@ test "x$os_name" == "xDarwin" || AC_CHECK_FUNCS([fdatasync]) 46 | 47 | PKG_CHECK_MODULES([FUSE], [fuse >= 2.7.3]) 48 | if test "x$os_name" == "xDarwin"; then 49 | - AC_SUBST([FUSE_CFLAGS],["-D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse"]) 50 | - AC_SUBST([FUSE_LIBS],["-L/usr/local/lib -losxfuse -pthread -liconv"]) 51 | + AC_SUBST([FUSE_CFLAGS],["-D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/fuse"]) 52 | + AC_SUBST([FUSE_LIBS],["-L/usr/local/lib -lfuse -pthread -liconv"]) 53 | fi 54 | 55 | PKG_CHECK_MODULES( 56 | -------------------------------------------------------------------------------- /Formula/squashfuse-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class SquashfuseMac < Formula 4 | desc "FUSE filesystem to mount squashfs archives" 5 | homepage "https://github.com/vasi/squashfuse" 6 | url "https://github.com/vasi/squashfuse/releases/download/0.6.1/squashfuse-0.6.1.tar.gz" 7 | sha256 "7b18a58c40a3161b5c329ae925b72336b5316941f906b446b8ed6c5a90989f8c" 8 | license "BSD-2-Clause" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | sha256 cellar: :any, arm64_sonoma: "9618c3556506fecc5234a9f2f238fe7e6f51cd3782fdc0d6580d222bbaff3485" 13 | sha256 cellar: :any, ventura: "03092b26301eb86ed81db27cf2a7558d55f9ed3099ee09262065edcacb9ea8b1" 14 | end 15 | 16 | depends_on "autoconf" => :build 17 | depends_on "automake" => :build 18 | depends_on "libtool" => :build 19 | depends_on "pkgconf" => :build 20 | depends_on "lz4" 21 | depends_on "lzo" 22 | depends_on MacfuseRequirement 23 | depends_on :macos 24 | depends_on "squashfs" 25 | depends_on "xz" 26 | depends_on "zlib" 27 | depends_on "zstd" 28 | 29 | def install 30 | setup_fuse 31 | system "./configure", *std_configure_args 32 | system "make", "install" 33 | end 34 | 35 | # Unfortunately, making/testing a squash mount requires sudo privileges, so 36 | # just test that squashfuse execs for now. 37 | test do 38 | output = shell_output("#{bin}/squashfuse --version 2>&1", 254) 39 | assert_match version.to_s, output 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /Formula/sshfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class SshfsMac < Formula 4 | desc "File system client based on SSH File Transfer Protocol" 5 | homepage "https://github.com/libfuse/sshfs" 6 | url "https://github.com/libfuse/sshfs/archive/refs/tags/sshfs-2.10.tar.gz" 7 | sha256 "6af13acda03a4632e3deb559ecc3f35881cb92e16098049a7ba4cc502650ab18" 8 | license any_of: ["LGPL-2.1-only", "GPL-2.0-only"] 9 | revision 1 10 | 11 | bottle do 12 | root_url "https://github.com/gromgit/homebrew-fuse/releases/download/sshfs-mac-2.10" 13 | sha256 cellar: :any, arm64_monterey: "422abbbbd1804e67c27a21b976e4e82cfdffd977b5aa2cf7ee4e21fc2b548167" 14 | sha256 cellar: :any, monterey: "ffbc11b371d196dd6a32c13b21dfc28af7f7577145a62a165062228c2c661263" 15 | sha256 cellar: :any, big_sur: "9e021d24580ec55f4ab034dba0e264906d9db5c57036fe83710bc601bc6885c6" 16 | sha256 cellar: :any, catalina: "09f254420411218a784c783df760d2c652acd280eecc875d60e41014f80011cc" 17 | sha256 cellar: :any, mojave: "6389b69b921295f5be6eb35336649f558375eb24da60573b376a313331a4d18c" 18 | end 19 | 20 | deprecate! date: "2025-02-11", because: :unmaintained 21 | 22 | depends_on "autoconf" => :build 23 | depends_on "automake" => :build 24 | depends_on "libtool" => :build 25 | depends_on "pkg-config" => :build 26 | depends_on "glib" 27 | depends_on MacfuseRequirement 28 | depends_on :macos 29 | 30 | patch do 31 | url "https://github.com/libfuse/sshfs/commit/667cf34622e2e873db776791df275c7a582d6295.patch?full_index=1" 32 | sha256 "ab2aa697d66457bf8a3f469e89572165b58edb0771aa1e9c2070f54071fad5f6" 33 | end 34 | 35 | patch :DATA 36 | 37 | def install 38 | setup_fuse 39 | system "autoreconf", "-fiv" 40 | system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" 41 | system "make", "install" 42 | end 43 | 44 | def caveats 45 | <<~EOS 46 | This formula is outdated, and is provided only as a courtesy. 47 | It cannot be updated until macFUSE supports FUSE API version 3. 48 | 49 | If security issues are discovered with this old software, 50 | it may be removed without notice. 51 | EOS 52 | end 53 | 54 | test do 55 | system "#{bin}/sshfs", "--version" 56 | end 57 | end 58 | __END__ 59 | diff --git a/configure.ac b/configure.ac 60 | index 76026ad..671810b 100644 61 | --- a/configure.ac 62 | +++ b/configure.ac 63 | @@ -16,7 +16,6 @@ case "$target_os" in 64 | *) osname=unknown;; 65 | esac 66 | 67 | -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH 68 | PKG_CHECK_MODULES([SSHFS], [fuse >= 2.3 glib-2.0 gthread-2.0]) 69 | have_fuse_opt_parse=no 70 | oldlibs="$LIBS" 71 | diff --git a/sshfs.c b/sshfs.c 72 | index 97eaf06..d442577 100644 73 | --- a/sshfs.c 74 | +++ b/sshfs.c 75 | @@ -14,9 +14,6 @@ 76 | #if !defined(__CYGWIN__) 77 | #include 78 | #endif 79 | -#ifdef __APPLE__ 80 | -# include 81 | -#endif 82 | #include 83 | #include 84 | #include 85 | -------------------------------------------------------------------------------- /Formula/tup-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class TupMac < Formula 4 | desc "File-based build system" 5 | homepage "http://gittup.org/tup/" 6 | url "https://github.com/gittup/tup/archive/refs/tags/v0.8.tar.gz" 7 | sha256 "45ca35c4c1d140f3faaab7fabf9d68fd9c21074af2af9a720cff4b27cab47d07" 8 | license "GPL-2.0-only" 9 | head "https://github.com/gittup/tup.git" 10 | 11 | bottle do 12 | root_url "https://ghcr.io/v2/gromgit/fuse" 13 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "c560a370134cbe065d983bc0f40a3fb7481524eeae8463c891b91853ff2813a8" 14 | sha256 cellar: :any, ventura: "1553e833231b266f2c270dfe8e7e21933af45ffe8c37aba141cd3ce2706f6f46" 15 | end 16 | 17 | depends_on "pkg-config" => :build 18 | depends_on MacfuseRequirement 19 | depends_on :macos 20 | 21 | def install 22 | setup_fuse 23 | ENV["TUP_LABEL"] = version 24 | system "./build.sh" 25 | bin.install "build/tup" 26 | man1.install "tup.1" 27 | doc.install (buildpath/"docs").children 28 | pkgshare.install "contrib/syntax" 29 | end 30 | 31 | test do 32 | system "#{bin}/tup", "-v" 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /Formula/unionfs-fuse.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class UnionfsFuse < Formula 4 | desc "Union filesystem using FUSE" 5 | homepage "https://github.com/rpodgorny/unionfs-fuse" 6 | url "https://github.com/rpodgorny/unionfs-fuse/archive/refs/tags/v3.6.tar.gz" 7 | sha256 "e6c9fac4e0f0ca82b3e515ca2c82c07dc51ed6da168c465c4b6f50c47bfeddd7" 8 | license "BSD-3-Clause" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | sha256 cellar: :any_skip_relocation, arm64_sonoma: "5a0c0f743d06d272dac36193370071247d72beb391f7d95f8445d5a86079a1c5" 13 | sha256 cellar: :any, ventura: "053749fc797bf0ece88d571b7213d79082e112678a758c6e8ec6120f4e69a7d5" 14 | end 15 | 16 | depends_on "cmake" => :build 17 | depends_on "pkg-config" => :build 18 | depends_on MacfuseRequirement 19 | 20 | def install 21 | setup_fuse 22 | inreplace "CMakeLists.txt", "/usr/local", alt_fuse_root.to_s 23 | mkdir "build" do 24 | system "cmake", "..", 25 | "-DCMAKE_C_COMPILER=clang", 26 | "-DCMAKE_C_FLAGS=-std=gnu99", 27 | *std_cmake_args 28 | system "make", "install" 29 | end 30 | end 31 | 32 | test do 33 | assert_match version.to_s, shell_output("#{bin}/unionfs --version 2>&1") 34 | # TODO: fix test 35 | # (testpath/"t1").mkdir 36 | # (testpath/"t1/test1.txt").write <<~EOS 37 | # This is test 1. 38 | # EOS 39 | # (testpath/"t2").mkdir 40 | # (testpath/"t2/test2.txt").write <<~EOS 41 | # This is test 2. 42 | # EOS 43 | # (testpath/"t3").mkdir 44 | # begin 45 | # system "#{bin}/unionfs", "-o", "cow,max_files=32768,allow_other,use_ino,nonempty", 46 | # "#{testpath}/t1=RW:#{testpath}/t2=RO", testpath/"t3" 47 | # assert_match "test 2", pipe_output("cat #{testpath}/t3/test2.txt") 48 | # ensure 49 | # system "umount", "#{testpath}/t3" 50 | # end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /Formula/wdfs-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class WdfsMac < Formula 4 | desc "Webdav file system" 5 | homepage "http://noedler.de/projekte/wdfs/" 6 | url "http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz" 7 | sha256 "fcf2e1584568b07c7f3683a983a9be26fae6534b8109e09167e5dff9114ba2e5" 8 | license "GPL-2.0-or-later" 9 | 10 | bottle do 11 | root_url "https://ghcr.io/v2/gromgit/fuse" 12 | rebuild 1 13 | sha256 cellar: :any, arm64_sonoma: "470836a78df1eefa59cf45a46d2592313bdb32a51d0797266fe2c6ee1c588867" 14 | sha256 cellar: :any, ventura: "d4350a182eeecb7003c5ff582c5a1329e156f894d9ac0a0aa64485f607fdc55d" 15 | end 16 | 17 | depends_on "pkgconf" => :build 18 | depends_on "glib" 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | depends_on "neon" 22 | 23 | def install 24 | setup_fuse 25 | system "./configure", *std_configure_args 26 | system "make", "install" 27 | end 28 | 29 | test do 30 | system bin/"wdfs", "-v" 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /Formula/xmount-mac.rb: -------------------------------------------------------------------------------- 1 | require_relative "../require/macfuse" 2 | 3 | class XmountMac < Formula 4 | desc "Convert between multiple input & output disk image types" 5 | homepage "https://www.sits.lu/xmount" 6 | url "https://code.sits.lu/foss/xmount/-/archive/1.2.0/xmount-1.2.0.tar.gz" 7 | sha256 "abded7b53646c5d56ab9caf30473d75d0deb543e8262cadf2af572da3e1d127d" 8 | 9 | bottle do 10 | root_url "https://ghcr.io/v2/gromgit/fuse" 11 | sha256 arm64_sonoma: "1d67ae2174104c69471b892aceaface732e0853c15c039c260ef78c1f493eea9" 12 | sha256 ventura: "aa2caa902402f9aa415b5bf570c046f5dcf7129621b7a514de1e4cc031b4ab7d" 13 | end 14 | 15 | depends_on "cmake" => :build 16 | depends_on "pkgconf" => :build 17 | depends_on "afflib" 18 | depends_on "libewf" 19 | depends_on MacfuseRequirement 20 | depends_on :macos 21 | depends_on "openssl@3" 22 | 23 | patch :DATA 24 | 25 | def install 26 | setup_fuse 27 | ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl@3"].opt_lib/"pkgconfig" 28 | 29 | system "cmake", "-S", ".", "-B", "build", *fuse_cmake_args, *std_cmake_args 30 | system "cmake", "--build", "build" 31 | system "cmake", "--install", "build" 32 | end 33 | 34 | test do 35 | system bin/"xmount", "--version" 36 | end 37 | end 38 | __END__ 39 | diff --git a/CMakeLists.txt b/CMakeLists.txt 40 | index 7369014..0bea886 100644 41 | --- a/CMakeLists.txt 42 | +++ b/CMakeLists.txt 43 | @@ -73,9 +73,6 @@ check_include_files(libkern/OSByteOrder.h HAVE_LIBKERN_OSBYTEORDER_H) 44 | find_package(Threads REQUIRED) 45 | if(NOT APPLE) 46 | find_package(LibFUSE REQUIRED) 47 | -else(NOT APPLE) 48 | - # On OSx, search for osxfuse 49 | - find_package(LibOSXFUSE REQUIRED) 50 | endif(NOT APPLE) 51 | 52 | # Generate config.h and add it's path to the include dirs 53 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 54 | index 92d9b8f..623c3d1 100644 55 | --- a/src/CMakeLists.txt 56 | +++ b/src/CMakeLists.txt 57 | @@ -2,9 +2,8 @@ if(NOT APPLE) 58 | include_directories(${LIBFUSE_INCLUDE_DIRS}) 59 | set(LIBS ${LIBS} ${LIBFUSE_LIBRARIES}) 60 | else(NOT APPLE) 61 | - include_directories(${LIBOSXFUSE_INCLUDE_DIRS}) 62 | - set(LIBS ${LIBS} ${LIBOSXFUSE_LIBRARIES}) 63 | - link_directories(${LIBOSXFUSE_LIBRARY_DIRS}) 64 | + find_package(PkgConfig REQUIRED) 65 | + pkg_check_modules(FUSE fuse REQUIRED) 66 | endif(NOT APPLE) 67 | 68 | if(LIBFUSE_VERSION EQUAL 3) 69 | @@ -25,7 +24,9 @@ if(THREADS_HAVE_PTHREAD_ARG) 70 | target_compile_options(xmount PUBLIC "-pthread") 71 | endif(THREADS_HAVE_PTHREAD_ARG) 72 | 73 | -target_link_libraries(xmount ${LIBS}) 74 | +target_include_directories(xmount PUBLIC ${FUSE_INCLUDE_DIRS}) 75 | +target_link_libraries(xmount PUBLIC ${LIBS} ${FUSE_LDFLAGS}) 76 | +target_compile_options(xmount PUBLIC ${FUSE_CFLAGS}) 77 | 78 | install(TARGETS xmount DESTINATION bin) 79 | 80 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2009-present, Homebrew contributors 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gromgit's macOS FUSE stuff 2 | 3 | This tap exists to support macOS FUSE-related software that have been dropped from Homebrew core. 4 | 5 | --- 6 | 7 | # !!! WARNING: Reduced Build Coverage !!! 8 | 9 | All my old Intel Mac hardware is dead, and I'm not inclined to spend additional resources spinning up VMs or building Hackintoshes at this stage. As of 2025-Feb-10, the only bottles built will be for those macOS versions supported by GitHub runners (currently Ventura on Intel and Sonoma on ARM). Sorry. 10 | 11 | --- 12 | 13 | ## How do I install these formulae? 14 | 15 | First, if you've already installed FUSE formulae from the core tap _before_ they were disabled, you might _not_ want to switch over to my formulae, because: 16 | 1. As far as I know, Homebrew will not remove them from your system, even after the formulae themselves are deleted. 17 | 1. Many of these formulae are rather old, so you're unlikely to find updates anyway. 18 | 19 | But if you _do_ want to install my formulae over the core ones, you should uninstall the core formulae first. 20 | 21 | ## Documentation 22 | 23 | `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). 24 | 25 | ## FAQ 26 | 27 | ### Why is XYZ not available? 28 | 29 | It's probably available, but with a `-mac` suffix to avoid name clashes with Homebrew core (e.g. `sshfs` becomes `sshfs-mac`). 30 | 31 | If you can't find it under its new name, possible reasons include: 32 | 1. All available versions of `XYZ` require version 3 of the libfuse API, but macFUSE only supports v2. 33 | 1. I might not have gotten around to getting it up. [File an issue](https://github.com/gromgit/homebrew-fuse/issues/new/choose) to get my attention. 😀 34 | 35 | ### Why is XYZ so old? 36 | 37 | Possible reasons: 38 | 1. Current `XYZ` requires FUSE 3, which is not supported by all known macOS FUSE drivers, so the version you see is the latest one that can be built on macOS. 39 | 1. `XYZ` was abandoned by its authors. If you know of a revived fork of such software, [file an issue](https://github.com/gromgit/homebrew-fuse/issues/new/choose) with the details and I'll see what can be done. 40 | 1. I might not have gotten around to updating it yet. [File an issue](https://github.com/gromgit/homebrew-fuse/issues/new/choose) to get my attention. 😀 41 | 42 | ### Why is the XYZ formula called `XYZ-mac`? 43 | 44 | To avoid a naming conflict with the formula called `XYZ` that still exists in Homebrew core. 45 | 46 | ### Why is the XYZ _program_ installed as `XYZ-mac`? 47 | 48 | `brew info gromgit/fuse/XYZ-mac` and read the _Caveats_ section. 49 | 50 | ### Why does Homebrew say I need to build `XYZ-mac` from source? 51 | 52 | All my old Intel Mac hardware is dead, so I'm relying now on the free GitHub runners to build bottles. 53 | 54 | ### Why can't I build XYZ on an ARM Mac? 55 | 56 | Homebrew currently [filters out `/usr/local` entirely during ARM-based builds](https://github.com/Homebrew/brew/blob/04532cb6216b69a5b067aa7a4e22cff0944b257d/Library/Homebrew/shims/super/cc#L266-L270). I've devised a workaround for this, that seems to work well on both Intel and ARM GitHub runners. If you still can't build it, please [file an issue](https://github.com/gromgit/homebrew-fuse/issues/new/choose). 57 | 58 | ## Why aren't you using fuse-t in place of MacFUSE? 59 | 60 | As of 2025-Feb-16, [fuse-t](https://github.com/macos-fuse-t/fuse-t) is certainly interesting, but not enough of an improvement to make me force everyone to move over. 61 | 62 | For this to happen, at least one of the following needs to happen: 63 | 64 | 1. **open source**, so there's a hope of getting it into Homebrew core _a la_ `libfuse{,@2}`, and get rid of all the `require` hackery in these formulae 65 | 1. **FUSE 2 and 3 support**, so we're not stuck in the past with half these formulae, but are still able to build older FUSE 2 formulae 66 | 67 | If any macOS FUSE implementation achieves *all* the above, I'm prepared to move everything over. Heck, if point 1 is achieved, this repo may itself become defunct. 68 | -------------------------------------------------------------------------------- /cmd/brew-test-fuse: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #:`brew test-fuse` 3 | #: Tests local FUSE installation 4 | 5 | . "$(dirname "$0")"/../lib/funcs.sh 6 | 7 | tmpdir=/tmp/fuse-test.$$ 8 | mkdir -p "$tmpdir"/test_mount 9 | trap 'rm -fr "$tmpdir"' EXIT 10 | 11 | [[ $(uname -s) == "Darwin" ]] || fatal "This script can only be run on macOS" 12 | 13 | cd "$tmpdir" 14 | eval "$(brew shellenv)" 15 | 16 | info "Checking for FUSE installation" 17 | cmd pkgutil --pkg-info io.macfuse.installer.components.core 18 | cmd pkgutil --lsbom io.macfuse.installer.components.core 19 | 20 | info "Test FUSE build" 21 | examples=( 22 | https://raw.githubusercontent.com/libfuse/libfuse/46b9c3326d50aebe52c33d63885b83a47a2e74ea/example/hello.c 23 | https://raw.githubusercontent.com/libfuse/libfuse/46b9c3326d50aebe52c33d63885b83a47a2e74ea/example/hello_ll.c 24 | https://raw.githubusercontent.com/libfuse/libfuse/46b9c3326d50aebe52c33d63885b83a47a2e74ea/example/null.c 25 | ) 26 | for u in "${examples[@]}"; do 27 | # Get the last FUSE 2.x lowlevel example file 28 | cmd curl -sOL "$u" 29 | # Build it Homebrew-style 30 | f=${u##*/}; p=${f%.c} 31 | cmd clang -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse -L/usr/local/lib -g -O2 -Wall -o "$p" "$f" -lfuse -lpthread 32 | done 33 | -------------------------------------------------------------------------------- /formula_renames.json: -------------------------------------------------------------------------------- 1 | { 2 | "afuse": "afuse-mac", 3 | "archivemount": "archivemount-mac", 4 | "avfs": "avfs-mac", 5 | "bindfs": "bindfs-mac", 6 | "curlftpfs": "curlftpfs-mac", 7 | "dislocker": "dislocker-mac", 8 | "encfs": "encfs-mac", 9 | "ext4fuse": "ext4fuse-mac", 10 | "fuse-zip": "fuse-zip-mac", 11 | "gcsfuse": "gcsfuse-mac", 12 | "ntfs-3g": "ntfs-3g-mac", 13 | "sshfs": "sshfs-mac" 14 | } 15 | -------------------------------------------------------------------------------- /lib/funcs.sh: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 3 | # string formatters 4 | if [[ -t 1 ]] 5 | then 6 | Tty_escape() { printf "\033[%sm" "$1"; } 7 | else 8 | Tty_escape() { :; } 9 | fi 10 | Tty_mkbold() { Tty_escape "1;${1:-39}"; } 11 | Tty_red=$(Tty_mkbold 31) 12 | Tty_green=$(Tty_mkbold 32) 13 | Tty_brown=$(Tty_mkbold 33) 14 | Tty_blue=$(Tty_mkbold 34) 15 | Tty_magenta=$(Tty_mkbold 35) 16 | Tty_cyan=$(Tty_mkbold 36) 17 | Tty_white=$(Tty_mkbold 37) 18 | Tty_underscore=$(Tty_escape 38) 19 | Tty_bold=$(Tty_mkbold 39) 20 | Tty_reset=$(Tty_escape 0) 21 | 22 | msg_prefix="" 23 | 24 | # fatal: Report fatal error 25 | # USAGE: fatal ... 26 | fatal() { 27 | echo "${Tty_red}${msg_prefix}FATAL ERROR:${Tty_reset} $*" >&2 28 | exit 1 29 | } 30 | 31 | # error: Report error 32 | # USAGE: error ... 33 | error() { 34 | echo "${Tty_red}${msg_prefix}ERROR:${Tty_reset} $*" >&2 35 | } 36 | 37 | # warn: Report warning 38 | # USAGE: warn ... 39 | warn() { 40 | echo "${Tty_blue}${msg_prefix}Warning:${Tty_reset} $*" >&2 41 | } 42 | 43 | # info: Informational message 44 | # USAGE: info ... 45 | info() { 46 | echo "${Tty_green}${msg_prefix}Info:${Tty_reset} $*" >&2 47 | } 48 | 49 | # need_progs: Checks for command dependencies 50 | # USAGE: need_progs ... 51 | need_progs() { 52 | local missing=() 53 | local i 54 | for i in "$@" 55 | do 56 | type -P "${i}" &>/dev/null || missing+=("${i}") 57 | done 58 | if [[ ${#missing[@]} -gt 0 ]] 59 | then 60 | fatal "Commands missing: ${missing[*]}" 61 | fi 62 | } 63 | 64 | # cmd: Show command being run 65 | # USAGE: cmd ... 66 | cmd() { 67 | echo "${Tty_cyan}>>> $*${Tty_reset}" >&2 68 | command "$@" 69 | } 70 | 71 | # git_in: Run Git command in repo 72 | # USAGE: git_in ... 73 | git_in() { 74 | local repo=$1 75 | shift 76 | pushd "${repo}" >/dev/null || fatal "Can't cd to '${repo}'" 77 | cmd git "$@" 78 | popd >/dev/null || exit 79 | } 80 | -------------------------------------------------------------------------------- /lib/fuse-pkg-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | fuse_root=%FUSE_ROOT% 4 | 5 | # Collect args 6 | pkgs=() 7 | flags=() 8 | 9 | for a in "$@"; do 10 | [[ $a == -* ]] && flags+=("$a") || pkgs+=("$a") 11 | done 12 | 13 | if [[ ${#pkgs[@]} -eq 0 ]]; then 14 | pkg-config "${flags[@]}" 15 | else 16 | for p in "${pkgs[@]}"; do 17 | if [[ $p == fuse ]]; then 18 | pkg-config "${flags[@]}" "$p" | sed "s@/usr/local@${fuse_root}@g" 19 | else 20 | pkg-config "${flags[@]}" "$p" 21 | fi 22 | done 23 | fi 24 | -------------------------------------------------------------------------------- /require/macfuse.rb: -------------------------------------------------------------------------------- 1 | # typed: false 2 | # frozen_string_literal: true 3 | 4 | # USAGE: `depends_on MacfuseRequirement` 5 | class MacfuseRequirement < Requirement 6 | fatal true 7 | 8 | satisfy(build_env: false) { self.class.binary_osxfuse_installed? } 9 | 10 | def self.binary_osxfuse_installed? 11 | File.exist?("/usr/local/include/fuse.h") && 12 | !File.symlink?("/usr/local/include") 13 | end 14 | 15 | env do 16 | ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse" 17 | end 18 | 19 | def message 20 | "This formula requires macFUSE. Please run `brew install --cask macfuse` first." 21 | end 22 | 23 | def display_s 24 | "macFUSE" 25 | end 26 | end 27 | 28 | # Add `setup_fuse` to base Formula class, for use by FUSE formulae 29 | class Formula 30 | def need_alt_fuse? 31 | HOMEBREW_PREFIX.to_s != "/usr/local" 32 | end 33 | 34 | def alt_fuse_root 35 | buildpath/"temp" 36 | end 37 | 38 | def fuse_cmake_args 39 | return unless need_alt_fuse? 40 | 41 | %W[ 42 | -DCMAKE_INCLUDE_PATH=#{alt_fuse_root}/include/fuse;#{alt_fuse_root}/include 43 | -DCMAKE_LIBRARY_PATH=#{alt_fuse_root}/lib 44 | -DCMAKE_CXX_FLAGS=-I#{alt_fuse_root}/include/fuse\ -D_USE_FILE_OFFSET_BITS=64 45 | ] 46 | # -DPKG_CONFIG=#{fuse_pkgconfig} 47 | # -DPKG_CONFIG_EXECUTABLE=#{fuse_pkgconfig} 48 | # -DFUSE_INCLUDE_DIR=#{alt_fuse_root}/include/fuse 49 | # -DFUSE_LIBRARIES=#{alt_fuse_root}/lib/libfuse.dylib 50 | end 51 | 52 | def setup_fuse_includes 53 | mkdir "#{alt_fuse_root}/include" do 54 | Dir["/usr/local/include/fuse*"].each { |f| cp_r f, "." } 55 | end 56 | end 57 | 58 | def setup_fuse_libs 59 | mkdir "#{alt_fuse_root}/lib" do 60 | Dir["/usr/local/lib/*fuse*"].each { |f| cp_r f, "." } 61 | end 62 | end 63 | 64 | def setup_fuse_pkgconfig 65 | ### OLD METHOD: Fake pkg-config 66 | # mkdir "#{alt_fuse_root}/bin" do 67 | # cp path/"../../lib/fuse-pkg-config", "." 68 | # inreplace "fuse-pkg-config", "%FUSE_ROOT%", "#{alt_fuse_root}" 69 | # end 70 | # ENV["PKG_CONFIG"] = "#{fuse_pkgconfig}" 71 | 72 | ### NEW METHOD: Fix fuse.pc in alt root 73 | mkdir "#{alt_fuse_root}/lib/pkgconfig" do 74 | cp "/usr/local/lib/pkgconfig/fuse.pc", "." 75 | inreplace "fuse.pc", "/usr/local", alt_fuse_root.to_s 76 | cp "/usr/local/lib/pkgconfig/fuse3.pc", "." 77 | inreplace "fuse3.pc", "/usr/local", alt_fuse_root.to_s 78 | end 79 | ENV.prepend_path "PKG_CONFIG_PATH", "#{alt_fuse_root}/lib/pkgconfig" 80 | end 81 | 82 | # def fuse_pkgconfig 83 | # return "#{alt_fuse_root}/bin/fuse-pkg-config" if need_alt_fuse? 84 | # "pkg-config" 85 | # end 86 | 87 | def setup_fuse_env 88 | odebug "Setting up FUSE temp environment under #{alt_fuse_root}" 89 | setup_fuse_includes 90 | setup_fuse_libs 91 | setup_fuse_pkgconfig 92 | Dir.glob("#{alt_fuse_root}/**/*").each { |f| odebug ">>> #{f}" } 93 | end 94 | 95 | def setup_fuse_flags 96 | ENV.append "CFLAGS", "-I#{alt_fuse_root}/include" 97 | ENV.append "CFLAGS", "-I#{alt_fuse_root}/include/fuse" 98 | ENV.append "CFLAGS", "-D_USE_FILE_OFFSET_BITS=64" 99 | ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include" 100 | ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include/fuse" 101 | ENV.append "CPPFLAGS", "-D_USE_FILE_OFFSET_BITS=64" 102 | ENV.append "CXXFLAGS", "-I#{alt_fuse_root}/include" 103 | ENV.append "CXXFLAGS", "-I#{alt_fuse_root}/include/fuse" 104 | ENV.append "CXXFLAGS", "-D_USE_FILE_OFFSET_BITS=64" 105 | ENV.append "LDFLAGS", "-L#{alt_fuse_root}/lib" 106 | ENV.append "CGO_CPPFLAGS", "-I#{alt_fuse_root}/include" 107 | ENV.append "CGO_CPPFLAGS", "-D_USE_FILE_OFFSET_BITS=64" 108 | ENV.append "CGO_LDFLAGS", "-L#{alt_fuse_root}/lib" 109 | odebug "PKG_CONFIG = #{ENV.fetch("PKG_CONFIG", nil)}" 110 | odebug "PKG_CONFIG_PATH = #{ENV.fetch("PKG_CONFIG_PATH", nil)}" 111 | odebug "CFLAGS = #{ENV.fetch("CFLAGS", nil)}" 112 | end 113 | 114 | def setup_fuse 115 | return unless need_alt_fuse? 116 | 117 | setup_fuse_env 118 | setup_fuse_flags 119 | end 120 | end 121 | -------------------------------------------------------------------------------- /tap_migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "mounty": "homebrew/cask" 3 | } 4 | --------------------------------------------------------------------------------