diff --git a/.github/workflows/autobump.yml b/.github/workflows/autobump.yml new file mode 100644 index 0000000..7706001 --- /dev/null +++ b/.github/workflows/autobump.yml @@ -0,0 +1,28 @@ +name: "Autobump specific formulae" +on: + schedule: + - cron: "15 2-23/4 * * *" + +jobs: + autobump: + runs-on: ubuntu-latest + steps: + - name: Update Homebrew formula + uses: dawidd6/action-homebrew-bump-formula@v4 + with: + # Required, custom personal GitHub access token with only the 'public_repo' scope enabled + token: ${{secrets.AUTOBUMP_TOKEN}} + # Optional, will commit with this user name + user_name: gromgit + # Optional, will commit with this user email + user_email: the.gromgit@gmail.com + # Optional, will create tap repo fork in organization + # org: ORG + # Bump all outdated formulae in this tap + tap: gromgit/fuse + # Bump only these formulae if outdated + # formula: mint-lang,vlang-weekly + # Optional, if don't want to check for already open PRs + force: false # true + # Need to set this input if want to use `brew livecheck` + livecheck: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 061acfd..5f145bf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,33 +1,45 @@ name: brew pr-pull + on: pull_request_target: types: - labeled + jobs: pr-pull: if: contains(github.event.pull_request.labels.*.name, 'pr-pull') - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + permissions: + actions: read + checks: read + contents: write + issues: read + packages: write + pull-requests: write steps: - name: Set up Homebrew - uses: Homebrew/actions/setup-homebrew@master + uses: Homebrew/actions/setup-homebrew@main + with: + token: ${{ secrets.GITHUB_TOKEN }} - name: Set up git - uses: Homebrew/actions/git-user-config@master + uses: Homebrew/actions/git-user-config@main - name: Pull bottles env: - HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.repository_owner }} PULL_REQUEST: ${{ github.event.pull_request.number }} - run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST + run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" - name: Push commits - uses: Homebrew/actions/git-try-push@master + uses: Homebrew/actions/git-try-push@main with: - token: ${{ github.token }} branch: main - name: Delete branch if: github.event.pull_request.head.repo.fork == false env: BRANCH: ${{ github.event.pull_request.head.ref }} - run: git push --delete origin $BRANCH + run: git push --delete origin "$BRANCH" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 746a5cc..a127b4a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,30 +1,30 @@ name: brew test-bot + on: push: - branches: main + branches: + - main pull_request: + jobs: test-bot: strategy: matrix: - os: [macOS-latest] + os: [macos-14, macos-15, macos-26] runs-on: ${{ matrix.os }} steps: - name: Set up Homebrew id: set-up-homebrew - uses: Homebrew/actions/setup-homebrew@master + uses: Homebrew/actions/setup-homebrew@main - name: Cache Homebrew Bundler RubyGems - id: cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ${{ steps.set-up-homebrew.outputs.gems-path }} - key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} - restore-keys: ${{ runner.os }}-rubygems- + key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} + restore-keys: ${{ matrix.os }}-rubygems- - - name: Install Homebrew Bundler RubyGems - if: steps.cache.outputs.cache-hit != 'true' - run: brew install-bundler-gems + - run: brew install --cask macfuse - run: brew test-bot --only-cleanup-before @@ -32,12 +32,12 @@ jobs: - run: brew test-bot --only-tap-syntax - - run: brew test-bot --only-formulae + - run: brew test-bot --verbose --debug --only-formulae --root-url='https://ghcr.io/v2/gromgit/fuse' if: github.event_name == 'pull_request' - name: Upload bottles as artifact if: always() && github.event_name == 'pull_request' - uses: actions/upload-artifact@main + uses: actions/upload-artifact@v4 with: - name: bottles + name: bottles_${{ matrix.os }} path: '*.bottle.*' diff --git a/Formula/afuse-mac.rb b/Formula/afuse-mac.rb index 4c3a936..39bb381 100644 --- a/Formula/afuse-mac.rb +++ b/Formula/afuse-mac.rb @@ -3,22 +3,26 @@ require_relative "../require/macfuse" class AfuseMac < Formula desc "Automounting file system implemented in userspace with FUSE" homepage "https://github.com/pcarrier/afuse/" - url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/afuse/afuse-0.4.1.tar.gz" - sha256 "c6e0555a65d42d3782e0734198bbebd22486386e29cb00047bc43c3eb726dca8" + url "https://github.com/pcarrier/afuse.git", + tag: "v0.5.0", + revision: "d7f07c32e58850fa092bb98b53c5c570fed8be69" license "GPL-2.0-only" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/afuse-mac-0.4.1" - sha256 cellar: :any, big_sur: "d14a7e51b8d3fd8c7b3419ab06011e5e14c89b6d8c8f46dbe66b80ea3c97fa1f" - sha256 cellar: :any, catalina: "bf5f4add8d2e8a2c9ad50e2508771f3c51fded35c21f7a23cf95b364e98f9c7a" - sha256 cellar: :any, mojave: "577023bd06623a90ca245be88fbb49041a71cc1e4852195dc5d9d3b2bbdaf617" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "d0b0e74b43c27ce951eec136e4c45a98c43edc39cceeb95418f43c2d5bfa9afe" + sha256 cellar: :any, ventura: "81eac9045ff5882fa86b3e40c6562bbed06cf1346ec5fb368033511cab03c982" end + depends_on "autoconf" => :build + depends_on "automake" => :build depends_on "pkg-config" => :build depends_on MacfuseRequirement depends_on :macos def install + setup_fuse + system "./autogen.sh" system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end diff --git a/Formula/archivemount-mac.rb b/Formula/archivemount-mac.rb index af50a1e..3837be8 100644 --- a/Formula/archivemount-mac.rb +++ b/Formula/archivemount-mac.rb @@ -2,30 +2,27 @@ require_relative "../require/macfuse" class ArchivemountMac < Formula desc "File system for accessing archives using libarchive" - homepage "https://www.cybernoia.de/software/archivemount.html" - url "https://www.cybernoia.de/software/archivemount/archivemount-0.9.1.tar.gz" - sha256 "c529b981cacb19541b48ddafdafb2ede47a40fcaf16c677c1e2cd198b159c5b3" + homepage "https://git.sr.ht/~nabijaczleweli/archivemount-ng" + url "https://git.sr.ht/~nabijaczleweli/archivemount-ng/archive/1b.tar.gz" + version "1b" + sha256 "de10cfee3bff8c1dd2b92358531d3c0001db36a99e1098ed0c9d205d110e903d" + license "LGPL-2.0-or-later" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/archivemount-mac-0.9.1" - sha256 cellar: :any, big_sur: "84dfb26c79c5d3cd6596bbbbb1398dd7d0a855eab32ff2b1192cd36235c34ab9" - sha256 cellar: :any, catalina: "0d838c1b6684201cf9ff7bcc1120052bfce87c31950622961852a9e17243cd94" - sha256 cellar: :any, mojave: "42170c737f1fd151a4e36276c6929fe49aa69137886238ec38f04a84c123f26b" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_tahoe: "e0aa81ce9ae8fb880b340b02077e03acaf1d4f489554a411bf4430ba3a558f31" + sha256 cellar: :any, arm64_sequoia: "fa4e1c0bbd16a705f0746d9c1721e3a5ebf9fc664b49291dd0390129542595ae" + sha256 cellar: :any, arm64_sonoma: "ab28653f06c95589c740800b90187182cf45abffa2dda25146881dceaa963152" end - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "libarchive" depends_on MacfuseRequirement depends_on :macos def install - ENV.append_to_cflags "-I/usr/local/include/osxfuse" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" - - system "make", "install" + setup_fuse3 + system "make", "PREFIX=#{prefix}", "install" end test do diff --git a/Formula/avfs-mac.rb b/Formula/avfs-mac.rb index fd94849..cfc883e 100644 --- a/Formula/avfs-mac.rb +++ b/Formula/avfs-mac.rb @@ -3,34 +3,42 @@ require_relative "../require/macfuse" class AvfsMac < Formula desc "Virtual file system that facilitates looking inside archives" homepage "https://avf.sourceforge.io/" - url "https://downloads.sourceforge.net/project/avf/avfs/1.1.4/avfs-1.1.4.tar.bz2" - sha256 "3a7981af8557f864ae10d4b204c29969588fdb526e117456e8efd54bf8faa12b" + url "https://downloads.sourceforge.net/project/avf/avfs/1.2.0/avfs-1.2.0.tar.bz2" + sha256 "a25a8ec43c1ee172624e1a4c79ce66a1b930841cdb545b725f1ec64bcabe889c" + license all_of: [ + "GPL-2.0-only", + "LGPL-2.0-only", # for shared library + "GPL-2.0-or-later", # modules/dav_ls.c + "Zlib", # zlib/* + ] - bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/avfs-mac-1.1.4" - sha256 big_sur: "536a8ff3129d4ca73bafa08d059ecaa057dec2a24b0c4509762e8f62ad1117ca" - sha256 catalina: "edfe514eaacc649484b26a67f37a2c8aa38d4bf7cff97ff06477417df4396701" - sha256 mojave: "eb4171d8c40b058d72fb0cbf480c21c0a89b201498fcc37d2dfd4c050219aacd" + livecheck do + url :stable + regex(%r{url=.*?/avfs[._-]v?(\d+(?:\.\d+)+)\.t}i) end - depends_on "pkg-config" => :build + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 arm64_sonoma: "925ae6c3197657008289364ab4549266ea0a4a1a782314d6759eb97571f5d5e3" + sha256 ventura: "0d46af6e0d31f778779b687dc7adadbf1afac641e2c2e35f8c837726ab635c37" + end + + depends_on "pkgconf" => :build + depends_on "bzip2" depends_on MacfuseRequirement depends_on :macos - depends_on "openssl@1.1" depends_on "xz" + depends_on "zlib" def install - args = %W[ - --prefix=#{prefix} - --disable-debug - --disable-dependency-tracking - --disable-silent-rules - --enable-fuse - --enable-library - --with-ssl=#{Formula["openssl@1.1"].opt_prefix} - ] - - system "./configure", *args + setup_fuse + system "./configure", "--disable-silent-rules", + "--enable-fuse", + "--enable-library", + "--with-system-zlib", + "--with-system-bzlib", + "--with-xz", + *std_configure_args system "make", "install" end diff --git a/Formula/bindfs-mac.rb b/Formula/bindfs-mac.rb index ec94827..9cfa455 100644 --- a/Formula/bindfs-mac.rb +++ b/Formula/bindfs-mac.rb @@ -3,19 +3,19 @@ require_relative "../require/macfuse" class BindfsMac < Formula desc "FUSE file system for mounting to another location" homepage "https://bindfs.org/" - url "https://bindfs.org/downloads/bindfs-1.15.1.tar.gz" - sha256 "04dd3584a6cdf9af4344d403c62185ca9fab31ce3ae5a25d0101bc10936c68ab" + url "https://bindfs.org/downloads/bindfs-1.18.0.tar.gz" + sha256 "46fcf95b871109265e93cd42e5ae282c722716488ad9f0da1e1f98535be37f7a" license "GPL-2.0-or-later" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/bindfs-mac-1.15.1" - sha256 cellar: :any, big_sur: "edb43ff7dd67f03169b9e4c84b527a2ec729c743baeff1e47319008722fccb15" - sha256 cellar: :any, catalina: "eaabdbc55f58e3782705dbf4a1be9862f741939630bbd6d82e27915309995a2c" - sha256 cellar: :any, mojave: "a774f403c90cfc617385b6f1a6b0166dd19c9da44983207643cbca7d48808c46" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "18280a50ddee23ed3cfd05cb40e6a69a1d343ce118553f5098e9e9d289b66fb4" + sha256 cellar: :any, ventura: "a2c590ee0ca1bfc22e4e485b680490791e9a17812f8b9041c2469063280641e1" end head do - url "https://github.com/mpartel/bindfs.git" + url "https://github.com/mpartel/bindfs.git", branch: "master" + depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build @@ -26,18 +26,11 @@ class BindfsMac < Formula depends_on :macos def install - args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} - ] - - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end - + setup_fuse + # https://github.com/mpartel/bindfs/issues/163#issuecomment-2854763292 + ENV.append "CFLAGS", "-D_DARWIN_C_SOURCE" + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--disable-macos-fs-link", *std_configure_args system "make", "install" end diff --git a/Formula/btfs-mac.rb b/Formula/btfs-mac.rb index 261a8b8..0c2d9ec 100644 --- a/Formula/btfs-mac.rb +++ b/Formula/btfs-mac.rb @@ -3,37 +3,40 @@ require_relative "../require/macfuse" class BtfsMac < Formula desc "BitTorrent filesystem based on FUSE" homepage "https://github.com/johang/btfs" - url "https://github.com/johang/btfs/archive/v2.24.tar.gz" + url "https://github.com/johang/btfs/archive/refs/tags/v2.24.tar.gz" sha256 "d71ddefe3c572e05362542a0d9fd0240d8d4e1578ace55a8b3245176e7fd8935" license "GPL-3.0-only" - head "https://github.com/johang/btfs.git" + revision 1 + head "https://github.com/johang/btfs.git", branch: "master" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/btfs-mac-2.24" - sha256 cellar: :any, big_sur: "d92d62980a61112eaf05240b150122226cabaaeb9e52910d06a3db5475c9cf0d" - sha256 cellar: :any, catalina: "8820a96d3817703851cae7871711fc635a94dfc419fffeba70155f8fd09a21bf" - sha256 cellar: :any, mojave: "10516fbacf59d585f1f28fc5c883f77724de7b1e49c094aabb0fe5ee4c8e07e5" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sonoma: "71e05be0beb418720d313a63f10cfea741d648bf78630b497eb2c51a5003d319" + sha256 cellar: :any, ventura: "388cc358e3c9372768469b6b1021f43d8def07f372aaef6e3f5d2d80bc93be48" end depends_on "autoconf" => :build depends_on "automake" => :build - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "libtorrent-rasterbar" depends_on MacfuseRequirement depends_on :macos def install - ENV.cxx11 - inreplace "configure.ac", "fuse >= 2.8.0", "fuse >= 2.7.3" - system "autoreconf", "--force", "--install" - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}" + setup_fuse + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args, "--disable-silent-rules" system "make", "install" end + def caveats + <<~EOS + Mounting a torrent is fairly quick, but unmounting takes a long time. + Be patient. + EOS + end + test do - system "#{bin}/btfs", "--help" + assert_match version.to_s, shell_output("#{bin}/btfs --version 2>&1") end end diff --git a/Formula/cryfs-mac.rb b/Formula/cryfs-mac.rb new file mode 100644 index 0000000..e22643a --- /dev/null +++ b/Formula/cryfs-mac.rb @@ -0,0 +1,63 @@ +require_relative "../require/macfuse" + +class CryfsMac < Formula + desc "Encrypts your files so you can safely store them in Dropbox, iCloud, etc." + homepage "https://www.cryfs.org" + url "https://github.com/cryfs/cryfs/releases/download/1.0.3/cryfs-1.0.3.tar.xz" + sha256 "1f30cc406e5c811490ba14174518a797a80442bfff317a2fdfbc5d21205b9dfe" + license "LGPL-3.0-or-later" + head "https://github.com/cryfs/cryfs.git", branch: "develop" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_tahoe: "cf79aa4893fe09f288540e992d1c8065cdab0344ada444ed4099c5e80fd5d910" + sha256 cellar: :any, arm64_sequoia: "009d5696e71ed22394ff67d5a9e45bfcf605d0d9347f9db7d6316bf336a5e1d7" + sha256 cellar: :any, arm64_sonoma: "ab98abc9ef34928585d59a7dd93a7d9de1cedadac40b7ab797c515ba06168b44" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "python@3.13" => :build + depends_on "boost" + depends_on "curl" + depends_on "fmt" + depends_on "libomp" + depends_on MacfuseRequirement + depends_on :macos + depends_on "range-v3" + depends_on "spdlog" + + def install + setup_fuse + libomp = Formula["libomp"] + libomp_args = [ + "-DBUILD_TESTING=off", + "-DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I#{libomp.include}'", + "-DOpenMP_CXX_LIB_NAMES=omp", + "-DOpenMP_omp_LIBRARY=#{libomp.lib}/libomp.dylib", + ] + + system "cmake", "-B", "build", "-S", ".", + "-DCRYFS_UPDATE_CHECKS=OFF", + "-DDEPENDENCY_CONFIG=cmake-utils/DependenciesFromLocalSystem.cmake", + *libomp_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + ENV["CRYFS_FRONTEND"] = "noninteractive" + + # Test showing help page + assert_match "CryFS", shell_output("#{bin}/cryfs 2>&1", 10) + + # Test mounting a filesystem. This command will ultimately fail because homebrew tests + # don't have the required permissions to mount fuse filesystems, but before that + # it should display "Mounting filesystem". If that doesn't happen, there's something + # wrong. For example there was an ABI incompatibility issue between the crypto++ version + # the cryfs bottle was compiled with and the crypto++ library installed by homebrew to. + mkdir "basedir" + mkdir "mountdir" + assert_match "Operation not permitted", pipe_output("#{bin}/cryfs -f basedir mountdir 2>&1", "password") + end +end diff --git a/Formula/curlftpfs-mac.rb b/Formula/curlftpfs-mac.rb index 1843a73..20aac84 100644 --- a/Formula/curlftpfs-mac.rb +++ b/Formula/curlftpfs-mac.rb @@ -2,33 +2,33 @@ require_relative "../require/macfuse" class CurlftpfsMac < Formula desc "Filesystem for accessing FTP hosts based on FUSE and libcurl" - homepage "https://curlftpfs.sourceforge.io/" + homepage "https://curlftpfs.sourceforge.net/" url "https://downloads.sourceforge.net/project/curlftpfs/curlftpfs/0.9.2/curlftpfs-0.9.2.tar.gz" sha256 "4eb44739c7078ba0edde177bdd266c4cfb7c621075f47f64c85a06b12b3c6958" + license "GPL-2.0-only" head ":pserver:anonymous:@curlftpfs.cvs.sourceforge.net:/cvsroot/curlftpfs", using: :cvs bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/curlftpfs-mac-0.9.2" - sha256 cellar: :any, big_sur: "cd9cee6bb3058e276f82313f91a1647466b7d7ad385aaeaae75d66f9f6fa56f4" - sha256 cellar: :any, catalina: "989cd7c3567a7f55aa7f6b32f251adbfdf508c35515a38cd0030d66ff11c36d1" - sha256 cellar: :any, mojave: "a29922525b73e1083725b7b15ff047f55d63314e794c4a9060c271274f379aa0" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "52266b0b218496e9f24f982e74165991d97b49791862e683fb240d635e63f063" + sha256 cellar: :any, ventura: "1ed49dce5000b70b4ef4e47b3d8c535b4c25994cde3122a461483aa34e5d6cbe" end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build + depends_on "curl" depends_on "glib" depends_on MacfuseRequirement depends_on :macos - # TODO: depend on specific X11 formulae instead - def install + setup_fuse ENV.append "CPPFLAGS", "-D__off_t=off_t" - system "autoreconf", "-fvi" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" + system "autoreconf", "--force", "--install", "--verbose" + system "./configure", *std_configure_args system "make", "install" end diff --git a/Formula/dislocker-mac.rb b/Formula/dislocker-mac.rb index 9b96def..c6b9512 100644 --- a/Formula/dislocker-mac.rb +++ b/Formula/dislocker-mac.rb @@ -3,15 +3,15 @@ require_relative "../require/macfuse" class DislockerMac < Formula desc "FUSE driver to read/write Windows' BitLocker-ed volumes" homepage "https://github.com/Aorimn/dislocker" - url "https://github.com/Aorimn/dislocker/archive/v0.7.3.tar.gz" + url "https://github.com/Aorimn/dislocker/archive/refs/tags/v0.7.3.tar.gz" sha256 "8d5275577c44f2bd87f6e05dd61971a71c0e56a9cbedf000bd38deadd8b6c1e6" - license "GPL-2.0-or-later" + license "GPL-2.0-only" + revision 2 bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/dislocker-mac-0.7.3" - sha256 big_sur: "964e32ec0176c6373424e843f6baa3e1fe47f383a917eb2429c33a4460486a80" - sha256 catalina: "db46215c80f270b02c8a73a6272f0d251b534b32fad08162ed9bec482ddd93a9" - sha256 mojave: "92bc4d90014fc99e102e23548f43c20503bfa722ddbd8e372dd668c98d53ddd4" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sonoma: "018c699c1d89ce79a16974486a39b5a23763cd4fc0063d1de9bc326a34fa5a40" + sha256 cellar: :any, ventura: "054aa62cbb45f561f88d200c95b308a45126320b361b5807dea5064ace6bf894" end depends_on "cmake" => :build @@ -19,13 +19,22 @@ class DislockerMac < Formula depends_on :macos depends_on "mbedtls" + # Backport support for mbedtls 3.x + patch do + url "https://github.com/Aorimn/dislocker/commit/2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch?full_index=1" + sha256 "07e0e3cac520a04a478f1f08d612340fc2743fd492b0835c7fb41cfdb5ef4244" + end + # Fix OSXFUSE-isms patch :DATA def install - system "cmake", "-DCMAKE_DISABLE_FIND_PACKAGE_Ruby=TRUE", *std_cmake_args - system "make" - system "make", "install" + setup_fuse + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_DISABLE_FIND_PACKAGE_Ruby=TRUE", + *fuse_cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do diff --git a/Formula/dwarfs-fuse-mac.rb b/Formula/dwarfs-fuse-mac.rb new file mode 100644 index 0000000..e6b35b4 --- /dev/null +++ b/Formula/dwarfs-fuse-mac.rb @@ -0,0 +1,150 @@ +require_relative "../require/macfuse" + +class DwarfsFuseMac < Formula + desc "Fast high compression read-only file system (macFUSE driver)" + homepage "https://github.com/mhx/dwarfs" + url "https://github.com/mhx/dwarfs/releases/download/v0.14.1/dwarfs-0.14.1.tar.xz" + sha256 "620cf27f2e142a5f8fc05552a70704c3bf4df23c3279c6026b3f37954d0529c5" + license "GPL-3.0-or-later" + revision 2 + + livecheck do + url :stable + regex(/^(?:release[._-])?v?(\d+(?:\.\d+)+)$/i) + strategy :github_latest + end + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 arm64_tahoe: "c9f9e2ee142c6250c83e6fc37a885e2ba84dcb6146becc0dfe2cd1183deeda42" + sha256 arm64_sequoia: "b2f5010b2c6adde00ea38254045aa61671ad40e08e27cd86617dc291d9664112" + sha256 arm64_sonoma: "33574825dad792929955c4356d6ff1e30f75172b0c4e48849c42c360fe530f7e" + end + + depends_on "cmake" => :build + depends_on "googletest" => :build + depends_on "pkgconf" => :build + depends_on "boost" + depends_on "brotli" + depends_on "double-conversion" + depends_on "flac" + depends_on "fmt" + depends_on "gflags" + depends_on "glog" + depends_on "howard-hinnant-date" + depends_on "libarchive" + depends_on "libevent" + depends_on "libsodium" + depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500 + depends_on "lz4" + depends_on MacfuseRequirement + depends_on :macos + depends_on "nlohmann-json" + depends_on "openssl@3" + depends_on "parallel-hashmap" + depends_on "range-v3" + depends_on "utf8cpp" + depends_on "xxhash" + depends_on "xz" + depends_on "zstd" + + conflicts_with "dwarfs", because: "both install the same binaries" + + fails_with :clang do + build 1500 + cause "Not all required C++20 features are supported" + end + + # Workaround for Boost 1.89.0 until upstream Folly fix. + # Issue ref: https://github.com/facebook/folly/issues/2489 + # Fix to Undefined symbols for architecture x86_64: "_XXH3_64bits" + patch :DATA + + def install + args = %W[ + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_RPATH=#{rpath} + -DWITH_LIBDWARFS=ON + -DWITH_TOOLS=ON + -DWITH_FUSE_DRIVER=ON + -DWITH_TESTS=ON + -DWITH_MAN_PAGES=ON + -DENABLE_PERFMON=ON + -DTRY_ENABLE_FLAC=ON + -DENABLE_RICEPP=ON + -DENABLE_STACKTRACE=OFF + -DDISABLE_CCACHE=ON + -DDISABLE_MOLD=ON + -DPREFER_SYSTEM_GTEST=ON + ] + + if DevelopmentTools.clang_build_version <= 1500 + # No ASAN for folly + ENV.append "CXXFLAGS", "-D_LIBCPP_HAS_NO_ASAN" + + ENV.llvm_clang + + # Needed in order to find the C++ standard library + # See: https://github.com/Homebrew/homebrew-core/issues/178435 + ENV.prepend "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/unwind -lunwind" + ENV.prepend_path "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib/"c++" + end + + setup_fuse + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build", "--parallel" + system "cmake", "--install", "build" + end + + test do + # produce a dwarfs image + system bin/"mkdwarfs", "-i", prefix, "-o", "test.dwarfs", "-l4" + + # check the image + system bin/"dwarfsck", "test.dwarfs" + + # get JSON info about the image + info = JSON.parse(shell_output("#{bin}/dwarfsck test.dwarfs -j")) + assert_equal info["created_by"], "libdwarfs v#{version}" + assert info["inode_count"] >= 10 + + # extract the image + system bin/"dwarfsextract", "-i", "test.dwarfs" + assert_path_exists "bin/mkdwarfs" + assert_path_exists "share/man/man1/mkdwarfs.1" + assert compare_file bin/"mkdwarfs", "bin/mkdwarfs" + + (testpath/"test.cpp").write <<~CPP + #include + #include + + int main(int argc, char **argv) { + int v = dwarfs::get_dwarfs_library_version(); + int major = v / 10000; + int minor = (v % 10000) / 100; + int patch = v % 100; + std::cout << major << "." << minor << "." << patch << std::endl; + return 0; + } + CPP + + # ENV.llvm_clang doesn't work in the test block + ENV["CXX"] = Formula["llvm"].opt_bin/"clang++" if OS.mac? && DevelopmentTools.clang_build_version <= 1500 + + system ENV.cxx, "-std=c++20", "test.cpp", "-I#{include}", "-L#{lib}", "-o", "test", "-ldwarfs_common" + + assert_equal version.to_s, shell_output("./test").chomp + end +end + +__END__ +--- a/folly/CMake/folly-config.cmake.in ++++ b/folly/CMake/folly-config.cmake.in +@@ -38,7 +38,6 @@ find_dependency(Boost 1.51.0 MODULE + filesystem + program_options + regex +- system + thread + REQUIRED + ) diff --git a/Formula/encfs-mac.rb b/Formula/encfs-mac.rb index 6659e4d..d8b31cc 100644 --- a/Formula/encfs-mac.rb +++ b/Formula/encfs-mac.rb @@ -3,34 +3,43 @@ require_relative "../require/macfuse" class EncfsMac < Formula desc "Encrypted pass-through FUSE file system" homepage "https://vgough.github.io/encfs/" - url "https://github.com/vgough/encfs/archive/v1.9.5.tar.gz" + url "https://github.com/vgough/encfs/archive/refs/tags/v1.9.5.tar.gz" sha256 "4709f05395ccbad6c0a5b40a4619d60aafe3473b1a79bafb3aa700b1f756fd63" # The code comprising the EncFS library (libencfs) is licensed under the LGPL. # The main programs (encfs, encfsctl, etc) are licensed under the GPL. - license all_of: ["GPL-3.0-only", "LGPL-3.0-only", "MIT", "Zlib"] - head "https://github.com/vgough/encfs.git" + license "GPL-3.0-or-later" + revision 2 + head "https://github.com/vgough/encfs.git", branch: "master" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/encfs-mac-1.9.5" - sha256 big_sur: "1e40532f256119f88304d5fa3033b8a60e513f3c3531cd3471455a83fcebafa7" - sha256 catalina: "ab083e7303625337405e8f384f99d51a5208c54f4cd713dbd99b3bc196da2e90" - sha256 mojave: "7c363d28eac6e6582b352202db79f17f0a0efa4871a4991313c158cd04911dcd" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 arm64_sonoma: "04797584c9dde670d286a5369261def970ab4a5b84081999874fe84b9e24dee6" + sha256 ventura: "c1378c0f82327e7ad461b6215b7e88680d4326e94736955879313931ceacaf7a" end depends_on "cmake" => :build - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "gettext" depends_on MacfuseRequirement depends_on :macos - depends_on "openssl@1.1" + depends_on "openssl@3" + depends_on "tinyxml2" + + patch do + url "https://github.com/vgough/encfs/commit/75080681626062e5832aec0b1bb3aa37d8364822.patch?full_index=1" + sha256 "0222bc4a4f03541b1523b03471f6af5925d4ed2a4c0d36a9a6fe39a18c036770" + end def install + setup_fuse ENV.cxx11 - - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_UNIT_TESTS=OFF", + "-DUSE_INTERNAL_TINYXML=OFF", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do diff --git a/Formula/ext2fuse-mac.rb b/Formula/ext2fuse-mac.rb index 23aec6d..ee6ad53 100644 --- a/Formula/ext2fuse-mac.rb +++ b/Formula/ext2fuse-mac.rb @@ -5,12 +5,13 @@ class Ext2fuseMac < Formula homepage "https://sourceforge.net/projects/ext2fuse" url "https://downloads.sourceforge.net/project/ext2fuse/ext2fuse/0.8.1/ext2fuse-src-0.8.1.tar.gz" sha256 "431035797b2783216ec74b6aad5c721b4bffb75d2174967266ee49f0a3466cd9" + license "GPL-2.0-or-later" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/ext2fuse-mac-0.8.1" - sha256 cellar: :any, big_sur: "8dba44571e8df43bac8356f7fe74719200f965318e9075fdc717e863dbf8aad7" - sha256 cellar: :any, catalina: "0b24132b10c92b0f9ca6bde9c72caa54281e812c07f1f491034fe71e305eba67" - sha256 cellar: :any, mojave: "e46c5e7eff79716a8e075752e429bea3e9027b6516538df45fbbdc98ba878b94" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "1fea57a1f597f489ac0a58e6c75b4a7ea970b07f33d7c31dfe1a812a8029bf02" + sha256 cellar: :any, ventura: "8935e712ae67cb680c77a88dbf6aa6c66f4b294c67aefc557dce55c5c8bd5f41" end depends_on "gcc" => :build @@ -19,13 +20,13 @@ class Ext2fuseMac < Formula depends_on :macos def install + setup_fuse ENV.append "LIBS", "-lfuse" ENV.append "CFLAGS", "-D__FreeBSD__=10 -DENABLE_SWAPFS -I/usr/local/include/fuse " ENV.append "CFLAGS", "--std=gnu89" if ENV.compiler == :clang - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" + system "./configure", *std_configure_args system "make", "install" end diff --git a/Formula/ext4fuse-mac.rb b/Formula/ext4fuse-mac.rb index 4fc52f0..40a4de1 100644 --- a/Formula/ext4fuse-mac.rb +++ b/Formula/ext4fuse-mac.rb @@ -3,23 +3,24 @@ require_relative "../require/macfuse" class Ext4fuseMac < Formula desc "Read-only implementation of ext4 for FUSE" homepage "https://github.com/gerard/ext4fuse" - url "https://github.com/gerard/ext4fuse/archive/v0.1.3.tar.gz" + url "https://github.com/gerard/ext4fuse/archive/refs/tags/v0.1.3.tar.gz" sha256 "550f1e152c4de7d4ea517ee1c708f57bfebb0856281c508511419db45aa3ca9f" license "GPL-2.0-only" - head "https://github.com/gerard/ext4fuse.git" + head "https://github.com/gerard/ext4fuse.git", branch: "master" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/ext4fuse-mac-0.1.3" - sha256 cellar: :any, big_sur: "9105318c87415a8c9466580b92c4e370abffaab1addb33712fd9d6ff78ed4824" - sha256 cellar: :any, catalina: "10cb5934f23ce95bd49b76c371c919638dcd2896967718fc3950434d0538f6e8" - sha256 cellar: :any, mojave: "ddda15d4eac7e188e0fae145301c25acba30e0dbaa774332257a2966c2653524" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "293d9d09f9a4d2cfb51beb789c8b2581b4419b00daa68507f3bf6c97f258aff5" + sha256 cellar: :any, ventura: "4c4f3b18a0cd8b290e52d1290ea63a87c04597f43d9c1cde6e71c487bd4a4505" end - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on MacfuseRequirement depends_on :macos def install + setup_fuse system "make" bin.install "ext4fuse" end diff --git a/Formula/fuse-zip-mac.rb b/Formula/fuse-zip-mac.rb index eae20b5..1f2e670 100644 --- a/Formula/fuse-zip-mac.rb +++ b/Formula/fuse-zip-mac.rb @@ -3,24 +3,25 @@ require_relative "../require/macfuse" class FuseZipMac < Formula desc "FUSE file system to create & manipulate ZIP archives" homepage "https://bitbucket.org/agalanin/fuse-zip" - url "https://bitbucket.org/agalanin/fuse-zip/get/0.7.2.tar.gz" - sha256 "bba004193db9841a8d9a59e927fffe24f1b92f7ad15a5694c687456617b638a2" + url "https://bitbucket.org/agalanin/fuse-zip/downloads/fuse-zip-0.7.2.tar.gz" + sha256 "3dd0be005677442f1fd9769a02dfc0b4fcdd39eb167e5697db2f14f4fee58915" license "GPL-3.0-or-later" - head "https://bitbucket.org/agalanin/fuse-zip", using: :hg + head "https://bitbucket.org/agalanin/fuse-zip", using: :hg, branch: "master" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/fuse-zip-mac-0.7.2" - sha256 cellar: :any, big_sur: "2fc541f86072d8faba8a4aa99ab1de342f38e6f4af8ffecf8764a45b1b747e2b" - sha256 cellar: :any, catalina: "b2e45519d7a30220bcbb666abc00e299436965dd64c55abe4d656542a1e0fa29" - sha256 cellar: :any, mojave: "f4c68265733a7625566fbdaa7addf5696f52909920fd940630ece3e90b80309e" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "07d4a035c41b76adc6fa4e320ba0e002bc6ff6e8ca52e0e47d0ad42b267762f0" + sha256 cellar: :any, ventura: "185b074a45baad043449b409896b0425ffcdc83eeac02d903f6b5a84867cb7e2" end - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "libzip" depends_on MacfuseRequirement depends_on :macos def install + setup_fuse system "make", "prefix=#{prefix}", "install" end diff --git a/Formula/fusehfs-mac.rb b/Formula/fusehfs-mac.rb new file mode 100644 index 0000000..6aa1143 --- /dev/null +++ b/Formula/fusehfs-mac.rb @@ -0,0 +1,47 @@ +require_relative "../require/macfuse" + +class FusehfsMac < Formula + desc "FUSE driver for HFS filesystems" + homepage "https://thejoelpatrol.github.io/fusehfs/" + url "https://github.com/thejoelpatrol/fusehfs/archive/refs/tags/v0.1.5.tar.gz" + sha256 "0f37b0cf31d38665af279b7b5bde0a185da55d7e8e6ccdb0de9133c3740143e8" + license "GPL-2.0-or-later" + head "https://github.com/thejoelpatrol/fusehfs.git", branch: "master" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "937bc2d207749a4a9008abc5961f683c6b6753703ef8e78704746bec751e6dd3" + sha256 cellar: :any, ventura: "1c82b43b527c4ebb8e7979172a093856d8b7ca1be38d668888799db82239ed2a" + end + + depends_on xcode: :build + depends_on MacfuseRequirement + depends_on :macos + + def install + setup_fuse + xcodebuild "-arch", Hardware::CPU.arch, + "-target", "FS Bundle", + "-configuration", "Release", + "CODE_SIGN_IDENTITY=-", + "SYMROOT=build", + "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}" + bin.install "build/Release/hfsck" + bin.install "build/Release/mount_fusefs_hfs" + pkgshare.install "build/Release/fusefs_hfs.fs" + end + + def caveats + <<~EOS + To add support for mounting HFS-formatted disk images via double-click, + install and re-sign the filesystem bundle with: + + codesign -f -s - $(brew --prefix)/share/fusehfs-mac/fusefs_hfs.fs + sudo ln -s $(brew --prefix)/share/fusehfs-mac/fusefs_hfs.fs /Library/Filesystems + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/mount_fusefs_hfs --version 2>&1", 1) + end +end diff --git a/Formula/gcsfuse-mac.rb b/Formula/gcsfuse-mac.rb index ab67a45..efb6ca1 100644 --- a/Formula/gcsfuse-mac.rb +++ b/Formula/gcsfuse-mac.rb @@ -3,35 +3,70 @@ require_relative "../require/macfuse" class GcsfuseMac < Formula desc "User-space file system for interacting with Google Cloud" homepage "https://github.com/googlecloudplatform/gcsfuse" - url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/v0.35.0.tar.gz" - sha256 "7d1f9586cb9645ab9d4a6eba6ece6eab78591e01e8149797bb48d7b72ab9031f" + url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/refs/tags/v3.5.5.tar.gz" + sha256 "ae5f26ee6969081ecd71bdc581871ebb88cb7b03a00d3bab6f9939b80bcfa39a" license "Apache-2.0" - head "https://github.com/GoogleCloudPlatform/gcsfuse.git" + head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gcsfuse-mac-0.35.0" - sha256 cellar: :any_skip_relocation, big_sur: "1a43e1ffed4c8a8c1924d3165ac28a6ffe9744d53972533083b735b16596c22e" - sha256 cellar: :any_skip_relocation, catalina: "2e581d68ab98845c9642ab6c6d9fe6e85e1a117148d46915ab6ba8b42b850c1c" - sha256 cellar: :any_skip_relocation, mojave: "87d2db034da8ba510726b445d3a9eff6025f7b79f10350f29548c007eba61da5" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7f39bb946f29f15b669b159d3ea2b784e3836e34ee1a58406502607ba5a08dfe" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "11c070d74913efa55f634e8c9a6e1cff408dcca490908b161a7863e65ba3f1f4" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3498f4c6657e881e8b21850d1c9793997535a24aeddf0d46f0e226f89097d8fe" end depends_on "go" => :build depends_on MacfuseRequirement depends_on :macos + patch do + url "https://raw.githubusercontent.com/gromgit/formula-patches/f69773ce21e06e4c6407da25af33486f5ec6185d/gcsfuse-mac/macos.patch?full_index=1" + sha256 "ab3e204bf099cbabefee825f634cfb9c33349002059b1522488c12bf5790ef11" + end + + patch :DATA + def install + setup_fuse # Build the build_gcsfuse tool. Ensure that it doesn't pick up any # libraries from the user's GOPATH; it should have no dependencies. ENV.delete("GOPATH") system "go", "build", "./tools/build_gcsfuse" # Use that tool to build gcsfuse itself. - gcsfuse_version = build.head? ? Utils.git_short_head : version + gcsfuse_version = build.head? ? Utils.git_short_head : version.to_s system "./build_gcsfuse", buildpath, prefix, gcsfuse_version end + def caveats + <<~EOS + Upstream doesn't actively support macOS (https://github.com/GoogleCloudPlatform/gcsfuse/issues/1299). + EOS + end + test do - system "#{bin}/gcsfuse", "--help" + system bin/"gcsfuse", "--help" system "#{sbin}/mount_gcsfuse", "--help" end end + +__END__ +diff --git a/tools/build_gcsfuse/main.go b/tools/build_gcsfuse/main.go +index b1a4022..678f747 100644 +--- a/tools/build_gcsfuse/main.go ++++ b/tools/build_gcsfuse/main.go +@@ -134,8 +134,6 @@ func buildBinaries(dstDir, srcDir, version string, buildArgs []string) (err erro + cmd := exec.Command( + "go", + "build", +- "-C", +- srcDir, + "-o", + path.Join(dstDir, bin.outputPath)) + + diff --git a/Formula/gitfs-mac.rb b/Formula/gitfs-mac.rb new file mode 100644 index 0000000..ae2a884 --- /dev/null +++ b/Formula/gitfs-mac.rb @@ -0,0 +1,95 @@ +require_relative "../require/macfuse" + +class GitfsMac < Formula + include Language::Python::Virtualenv + + desc "Version controlled file system" + homepage "https://www.presslabs.com/gitfs" + url "https://github.com/vtemian/gitfs/archive/refs/tags/v1.0.0.tar.gz" + sha256 "75835c6e4cad400c06e86ecb2efedfa7a8ffe5c5939c4e70040f6e861b4e85d3" + license "Apache-2.0" + head "https://github.com/vtemian/gitfs.git", branch: "main" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sequoia: "e48dd7b94f4ff6bbec3b51fa4c607a04bdb2338267315d3da988c1d9f6254bd5" + sha256 cellar: :any, arm64_sonoma: "903d6859b1d8cb7d0fa54ee4294e6bd3c57d796495b4850ba4cb50b6c5bf7d63" + end + + depends_on "libgit2" + depends_on MacfuseRequirement + depends_on :macos + depends_on "python@3.13" + + uses_from_macos "libffi" + + resource "atomiclong" do + url "https://files.pythonhosted.org/packages/86/8c/70aea8215c6ab990f2d91e7ec171787a41b7fbc83df32a067ba5d7f3324f/atomiclong-0.1.1.tar.gz" + sha256 "cb1378c4cd676d6f243641c50e277504abf45f70f1ea76e446efcdbb69624bbe" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/73/f7/f14b46d4bcd21092d7d3ccef689615220d8a08fb25e564b65d20738e672e/certifi-2025.6.15.tar.gz" + sha256 "d747aa5a8b9bbbb1bb8c22bb13e22bd1f18e9796defa16bab421f7f7a317323b" + end + + resource "cffi" do + url "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz" + sha256 "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" + end + + resource "mfusepy" do + url "https://files.pythonhosted.org/packages/1c/94/c9d5dcba4a6a2b32ba23e22fd13ca08e6f5408420b2dfe42984af22277b6/mfusepy-3.0.0.tar.gz" + sha256 "eddade33e427bac9c455464cd0a7d12d63c033255ec6b1e0d6ada143a945c6f2" + end + + resource "pycparser" do + url "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz" + sha256 "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" + end + + resource "pygit2" do + url "https://files.pythonhosted.org/packages/c1/4a/72a5f3572912d93d8096f8447a20fe3aff5b5dc65aca08a2083eae54d148/pygit2-1.18.0.tar.gz" + sha256 "fbd01d04a4d2ce289aaa02cf858043679bf0dd1f9855c6b88ed95382c1f5011a" + end + + resource "sentry-sdk" do + url "https://files.pythonhosted.org/packages/04/4c/af31e0201b48469786ddeb1bf6fd3dfa3a291cc613a0fe6a60163a7535f9/sentry_sdk-2.30.0.tar.gz" + sha256 "436369b02afef7430efb10300a344fb61a11fe6db41c2b11f41ee037d2dd7f45" + end + + resource "urllib3" do + url "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz" + sha256 "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" + end + + def install + virtualenv_install_with_resources + end + + def caveats + <<~EOS + gitfs clones repos in /var/lib/gitfs. You can either create it with + sudo mkdir -m 1777 /var/lib/gitfs or use another folder with the + repo_path argument. + EOS + end + + test do + xy = Language::Python.major_minor_version Formula["python@3.13"].opt_bin/"python3" + ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" + + (testpath/"test.py").write <<~EOS + import gitfs + import pygit2 + pygit2.init_repository('testing/.git', True) + EOS + + system Formula["python@3.13"].opt_bin/"python3", "test.py" + assert_path_exists testpath/"testing/.git/config" + cd "testing" do + system "git", "remote", "add", "homebrew", "https://github.com/Homebrew/homebrew-core.git" + assert_match "homebrew", shell_output("git remote") + end + end +end diff --git a/Formula/gocryptfs-mac.rb b/Formula/gocryptfs-mac.rb index c020802..5ddfeb7 100644 --- a/Formula/gocryptfs-mac.rb +++ b/Formula/gocryptfs-mac.rb @@ -3,57 +3,33 @@ require_relative "../require/macfuse" class GocryptfsMac < Formula desc "Encrypted overlay filesystem written in Go" homepage "https://nuetzlich.net/gocryptfs/" - url "https://github.com/rfjakob/gocryptfs/releases/download/v1.8.0/gocryptfs_v1.8.0_src-deps.tar.gz" - sha256 "c4ca576c2a47f0ed395b96f70fb58fc8f7b4beced8ae67e356eeed6898f8352a" + url "https://github.com/rfjakob/gocryptfs/releases/download/v2.6.1/gocryptfs_v2.6.1_src-deps.tar.gz" + sha256 "9a966c1340a1a1d92073091643687b1205c46b57017c5da2bf7e97e3f5729a5a" license "MIT" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gocryptfs-mac-1.8.0" - sha256 cellar: :any, big_sur: "dbaf4cf915cf5753752a82b2558de4df5c0afeedbb721a670e383f87dcf0ac23" - sha256 cellar: :any, catalina: "5dc85ece4509ea6fb4b2c4954c30d103f3da87ebe4cf54626624d84276d0af9f" - sha256 cellar: :any, mojave: "6f9ea595c99e7786fbb45fe65fe4f8b1665265314f1f8823464673c69dd7ef95" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sequoia: "56a4955f379ccb148f2e269679c91af0202bb67725dc6f1ed661bb5f8c9f0b68" + sha256 cellar: :any, arm64_sonoma: "8c4634a99acb568f25b96fc752b3bdb7a16d830e96126b93ee5a354a4dc67b2d" + sha256 cellar: :any, ventura: "40cda455675c2f6a0970c1c5388797da874758bf8f50d57fa4bf6ff448ab1edd" end depends_on "go" => :build depends_on "pkg-config" => :build depends_on MacfuseRequirement depends_on :macos - depends_on "openssl@1.1" - - # Remove SOURCE_DATE_EPOCH support (requires GNU date) - patch :DATA + depends_on "openssl@3" def install - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/rfjakob/gocryptfs").install buildpath.children - cd "src/github.com/rfjakob/gocryptfs" do - system "./build.bash" - bin.install "gocryptfs" - prefix.install_metafiles - end + setup_fuse + system "./build.bash" + bin.install "gocryptfs", "gocryptfs-xray/gocryptfs-xray" + man1.install "Documentation/gocryptfs.1", "Documentation/gocryptfs-xray.1" end test do (testpath/"encdir").mkpath pipe_output("#{bin}/gocryptfs -init #{testpath}/encdir", "password", 0) - assert_predicate testpath/"encdir/gocryptfs.conf", :exist? + assert_path_exists testpath/"encdir/gocryptfs.conf" end end -__END__ -diff --git a/build.bash b/build.bash -index b5a0c4d..11f2f4c 100755 ---- a/build.bash -+++ b/build.bash -@@ -57,12 +57,6 @@ if [[ -z ${BUILDDATE:-} ]] ; then - BUILDDATE=$(date +%Y-%m-%d) - fi - --# If SOURCE_DATE_EPOCH is set, it overrides BUILDDATE. This is the --# standard environment variable for faking the date in reproducible builds. --if [[ -n ${SOURCE_DATE_EPOCH:-} ]] ; then -- BUILDDATE=$(date --utc --date="@${SOURCE_DATE_EPOCH}" +%Y-%m-%d) --fi -- - # Only set GOFLAGS if it is not already set by the user - if [[ -z ${GOFLAGS:-} ]] ; then - GOFLAGS="" diff --git a/Formula/goofys-mac.rb b/Formula/goofys-mac.rb index 448e8a1..11e4242 100644 --- a/Formula/goofys-mac.rb +++ b/Formula/goofys-mac.rb @@ -11,16 +11,21 @@ class GoofysMac < Formula bottle do root_url "https://github.com/gromgit/homebrew-fuse/releases/download/goofys-mac-0.24.0" + sha256 cellar: :any_skip_relocation, monterey: "0edf3be0d9fb22e7637e981539a5e93158d4543050a61afb5d11ce0ec80f0e17" sha256 cellar: :any_skip_relocation, big_sur: "f3f73dc39927ee0a94a26a3bc8ae4b097e083d48e311b79274a85ac7f547e85a" sha256 cellar: :any_skip_relocation, catalina: "b61cf142b7a484520ad554d17947d7022ed0c3fdab04d6cf89da93b986d6de15" sha256 cellar: :any_skip_relocation, mojave: "648d204e47b710662db2b778164346ef2b9fd77a4ec02af210fc8116eee7bb7f" end - depends_on "go@1.14" => :build + # Discussion ref: https://github.com/Homebrew/homebrew-core/pull/122082#issuecomment-1436535501 + disable! date: "2024-02-12", because: :does_not_build + + depends_on "go" => :build depends_on MacfuseRequirement depends_on :macos def install + setup_fuse contents = Dir["*"] gopath = buildpath/"gopath" (gopath/"src/github.com/kahing/goofys").install contents diff --git a/Formula/hfsfuse-mac.rb b/Formula/hfsfuse-mac.rb new file mode 100644 index 0000000..e4f680e --- /dev/null +++ b/Formula/hfsfuse-mac.rb @@ -0,0 +1,32 @@ +require_relative "../require/macfuse" + +class HfsfuseMac < Formula + desc "FUSE driver for HFS+ filesystems (read-only)" + homepage "https://github.com/0x09/hfsfuse" + url "https://github.com/0x09/hfsfuse/releases/download/0.310/hfsfuse-0.310.tar.gz" + sha256 "49ad0ea6b7cbef4d55b1b436e0e772a639162fb35cc80586ba9ae49f05ad3e65" + license all_of: ["BSD-2-Clause", "MIT"] + head "https://github.com/0x09/hfsfuse.git", branch: "master" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_tahoe: "f3f8f016549b023c31c1fbca1998d31d5d1452319a3152b0d21a8107c0c81cf8" + sha256 cellar: :any, arm64_sequoia: "f3843985cb817343609f990fa7bd1c346453017814defbf4311c5f031c6ba8cd" + sha256 cellar: :any, arm64_sonoma: "33a1216d966ed9426cbf2be528b17556e07ce0757161d62d774a69b2b72dfd3f" + end + + depends_on "libarchive" + depends_on "lzfse" + depends_on MacfuseRequirement + depends_on :macos + + def install + setup_fuse + system "make", "install", "prefix=#{prefix}" + end + + test do + assert_match version.to_s, shell_output("#{bin}/hfsfuse --version 2>&1") + system bin/"hfsdump" + end +end diff --git a/Formula/ifuse-mac.rb b/Formula/ifuse-mac.rb index 90130cc..0e1f563 100644 --- a/Formula/ifuse-mac.rb +++ b/Formula/ifuse-mac.rb @@ -2,23 +2,21 @@ require_relative "../require/macfuse" class IfuseMac < Formula desc "FUSE module for iOS devices" - homepage "https://www.libimobiledevice.org/" - url "https://github.com/libimobiledevice/ifuse/archive/1.1.4.tar.gz" - sha256 "2a00769e8f1d8bad50898b9d00baf12c8ae1cda2d19ff49eaa9bf580e5dbe78c" + homepage "https://libimobiledevice.org/" + url "https://github.com/libimobiledevice/ifuse/archive/refs/tags/1.2.0.tar.gz" + sha256 "29ab853037d781ef19f734936454c7f7806d1c46fbcca6e15ac179685ab37c9c" license "LGPL-2.1-or-later" - head "https://cgit.sukimashita.com/ifuse.git" + head "https://github.com/libimobiledevice/ifuse.git", branch: "master" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/ifuse-mac-1.1.4" - sha256 cellar: :any, big_sur: "f6c2e432e98e35ea512c85e9eed06015e157477c58ccc3209fc915401a4a3bdc" - sha256 cellar: :any, catalina: "bafcd207118ffb63fcb67ce909f52bde7dc2fa138a592be30e6d7cdb96580377" - sha256 cellar: :any, mojave: "5c2d874a7377fa5c91bad47e7ee82adb4d965e3019fbf4b5128c318549f66180" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sequoia: "7b2a54ceeca52d5ada2e625f7e3edbcdd7f6eedfc8b8f6286137fb38fcff50e6" end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "glib" depends_on "libimobiledevice" depends_on "libplist" @@ -26,9 +24,12 @@ class IfuseMac < Formula depends_on :macos def install - system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" + # This file can be generated only if `.git` directory is present + # Create it manually + (buildpath/".tarball-version").write version.to_s + + setup_fuse3 + system "./autogen.sh", *std_configure_args system "make", "install" end diff --git a/Formula/mp3fs-mac.rb b/Formula/mp3fs-mac.rb index 96c4a9e..598e404 100644 --- a/Formula/mp3fs-mac.rb +++ b/Formula/mp3fs-mac.rb @@ -8,13 +8,13 @@ class Mp3fsMac < Formula license "GPL-3.0-or-later" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/mp3fs-mac-1.1.1" - sha256 cellar: :any, big_sur: "f5d8b429073bd633bb0e3bfdf0fa5d72170e3e2c50ea35498169203c3aeb7b5a" - sha256 cellar: :any, catalina: "87445edbdfdec0ee366b5bbfb57349b4b7fc380fda83fe0c866049055ecfcda7" - sha256 cellar: :any, mojave: "64aeb9e00ab95135f27a62319c607ee47ecbaf24459e27289da40ff8c70366a2" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "4171a0e1383f1c17150ed12ecb88fb766df4a105ce789e79e3d67130208c4b60" + sha256 cellar: :any, ventura: "6d3d1bd7f5db566dbe51bf16dfd5c63ed79cc1ea98904d48921953ccc9b77c01" end - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "flac" depends_on "lame" depends_on "libid3tag" @@ -25,7 +25,8 @@ class Mp3fsMac < Formula patch :DATA def install - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + setup_fuse + system "./configure", *std_configure_args system "make", "install" end diff --git a/Formula/ntfs-3g-mac.rb b/Formula/ntfs-3g-mac.rb index 2de856d..aed09dc 100644 --- a/Formula/ntfs-3g-mac.rb +++ b/Formula/ntfs-3g-mac.rb @@ -3,26 +3,24 @@ require_relative "../require/macfuse" class Ntfs3gMac < Formula desc "Read-write NTFS driver for FUSE" homepage "https://www.tuxera.com/community/open-source-ntfs-3g/" - stable do - url "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz" - sha256 "3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5" + url "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2022.10.3.tgz" + sha256 "f20e36ee68074b845e3629e6bced4706ad053804cbaf062fbae60738f854170c" + license all_of: ["GPL-2.0-or-later", "LGPL-2.0-or-later"] - # Fails to build on Xcode 9+. Fixed upstream in a0bc659c7ff0205cfa2b2fc3429ee4d944e1bcc3 - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/3933b61bbae505fa95a24f8d7681a9c5fa26dbc2/ntfs-3g/lowntfs-3g.c.patch" - sha256 "749653cfdfe128b9499f02625e893c710e2167eb93e7b117e33cfa468659f697" - end + livecheck do + url :head + strategy :github_latest end bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/ntfs-3g-mac-2017.3.23" - sha256 cellar: :any, big_sur: "ae4e130ad74b8e15f707f7da0412c8b4f9cbfc06273cebeeb2e644612b62312f" - sha256 cellar: :any, catalina: "31dd08813e3f473a64b53b3a6f209dc28026fe76b9245621cbfab2c818feadbb" - sha256 cellar: :any, mojave: "7af07f1515a0be2c53d46e639204c7e6fe04231de6f62e719b830a38a29bbd13" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "a00edf9e9abde1b447829c0e49267189a90713b66f651e498723915f2415284d" + sha256 cellar: :any, ventura: "6e5875dd0059b8a387cc0eba1d9e3f866758c0e711ab5db62ed91da2dd989faf" end head do - url "https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git", branch: "edge" + url "https://github.com/tuxera/ntfs-3g.git", branch: "edge" depends_on "autoconf" => :build depends_on "automake" => :build @@ -30,19 +28,17 @@ class Ntfs3gMac < Formula depends_on "libtool" => :build end - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build depends_on "coreutils" => :test depends_on "gettext" depends_on MacfuseRequirement depends_on :macos def install + setup_fuse ENV.append "LDFLAGS", "-lintl" args = %W[ - --disable-debug - --disable-dependency-tracking - --prefix=#{prefix} --exec-prefix=#{prefix} --mandir=#{man} --with-fuse=external @@ -51,8 +47,8 @@ class Ntfs3gMac < Formula system "./autogen.sh" if build.head? # Workaround for hardcoded /sbin in ntfsprogs - inreplace "ntfsprogs/Makefile.in", "/sbin", sbin - system "./configure", *args + inreplace Dir["{ntfsprogs,src}/Makefile.in"], "$(DESTDIR)/sbin/", "$(DESTDIR)#{sbin}/" + system "./configure", *args, *std_configure_args system "make" system "make", "install" diff --git a/Formula/ratarmount-mac.rb b/Formula/ratarmount-mac.rb new file mode 100644 index 0000000..d3b0788 --- /dev/null +++ b/Formula/ratarmount-mac.rb @@ -0,0 +1,131 @@ +require_relative "../require/macfuse" + +class RatarmountMac < Formula + include Language::Python::Virtualenv + + desc "Mount and efficiently access archives as filesystems" + homepage "https://github.com/mxmlnkn/ratarmount" + url "https://files.pythonhosted.org/packages/f6/2f/ce04f40f3cc82bb3ffbc97bffe3b7a2abe83a382c81fe2452ad54792acdf/ratarmount-1.2.1.tar.gz" + sha256 "28be2f1b9477ba4d0d8d75ddbc2468fc906970d36f4940bd932d1a51818e06a0" + license "MIT" + head "https://github.com/mxmlnkn/ratarmount.git", branch: "master" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_tahoe: "f89ceae4c6bb313cf569f7727033c07390db1382965a22e1197d0f1ee9c0a5bc" + sha256 cellar: :any, arm64_sequoia: "c0beb8c22c87eac4c3ba674f1c7245d0094f3bfebf64f9fce2fea1bfa0c2d674" + sha256 cellar: :any, arm64_sonoma: "588e3d984a585d5c2770882e3afc3872524a979738809eee8a5d5dff5bbc15b8" + end + + depends_on "libgit2" + depends_on MacfuseRequirement + depends_on :macos + depends_on "python@3.13" + depends_on "zstd" + + resource "brotli" do + url "https://files.pythonhosted.org/packages/f7/16/c92ca344d646e71a43b8bb353f0a6490d7f6e06210f8554c8f874e454285/brotli-1.2.0.tar.gz" + sha256 "e310f77e41941c13340a95976fe66a8a95b01e783d430eeaf7a2f87e0a57dd0a" + end + + resource "fast-zip-decryption" do + url "https://files.pythonhosted.org/packages/47/c8/0fbde8b9c8314e4fde35f4841015a6143967d5fd4d141e84a6cf14e62178/fast_zip_decryption-3.0.0.tar.gz" + sha256 "5267e45aab72161b035ddc4dda4ffa2490b6da1ca752e4ff7eaedd4dd18aa85d" + end + + resource "indexed-gzip" do + url "https://files.pythonhosted.org/packages/d4/22/e9e94407bae83444adf598535b684d28cfbbcbe19f58eeba46f4db7bc0f3/indexed_gzip-1.10.1.tar.gz" + sha256 "3993fd72570b254045d2361d937a984350719f2205066f4e4c16435a1df361e3" + end + + resource "indexed-zstd" do + url "https://files.pythonhosted.org/packages/52/22/5b908d5e987043ce8390b0d9101c93fae0c0de0c9c8417c562976eeb8be6/indexed_zstd-1.6.1.tar.gz" + sha256 "8b74378f9461fceab175215b65e1c489864ddb34bd816058936a627f0cca3a8b" + end + + resource "inflate64" do + url "https://files.pythonhosted.org/packages/e3/a7/974e6daa6c353cf080b540c18f11840e81b36d18106963a0a857b1fc2adf/inflate64-1.0.3.tar.gz" + sha256 "a89edd416c36eda0c3a5d32f31ff1555db2c5a3884aa8df95e8679f8203e12ee" + end + + resource "libarchive-c" do + url "https://files.pythonhosted.org/packages/26/23/e72434d5457c24113e0c22605cbf7dd806a2561294a335047f5aa8ddc1ca/libarchive_c-5.3.tar.gz" + sha256 "5ddb42f1a245c927e7686545da77159859d5d4c6d00163c59daff4df314dae82" + end + + resource "mfusepy" do + url "https://files.pythonhosted.org/packages/1c/94/c9d5dcba4a6a2b32ba23e22fd13ca08e6f5408420b2dfe42984af22277b6/mfusepy-3.0.0.tar.gz" + sha256 "eddade33e427bac9c455464cd0a7d12d63c033255ec6b1e0d6ada143a945c6f2" + end + + resource "multivolumefile" do + url "https://files.pythonhosted.org/packages/50/f0/a7786212b5a4cb9ba05ae84a2bbd11d1d0279523aea0424b6d981d652a14/multivolumefile-0.2.3.tar.gz" + sha256 "a0648d0aafbc96e59198d5c17e9acad7eb531abea51035d08ce8060dcad709d6" + end + + resource "psutil" do + url "https://files.pythonhosted.org/packages/e1/88/bdd0a41e5857d5d703287598cbf08dad90aed56774ea52ae071bae9071b6/psutil-7.1.3.tar.gz" + sha256 "6c86281738d77335af7aec228328e944b30930899ea760ecf33a4dba66be5e74" + end + + resource "py7zr" do + url "https://files.pythonhosted.org/packages/97/62/d6f18967875aa60182198a0dd287d3a50d8aea1d844239ea00c016f7be88/py7zr-1.0.0.tar.gz" + sha256 "f6bfee81637c9032f6a9f0eb045a4bfc7a7ff4138becfc42d7cb89b54ffbfef1" + end + + resource "pybcj" do + url "https://files.pythonhosted.org/packages/ce/75/bbcf098abf68081fa27c09d642790daa99d9156132c8b0893e3fecd946ab/pybcj-1.0.6.tar.gz" + sha256 "70bbe2dc185993351955bfe8f61395038f96f5de92bb3a436acb01505781f8f2" + end + + resource "pycryptodomex" do + url "https://files.pythonhosted.org/packages/c9/85/e24bf90972a30b0fcd16c73009add1d7d7cd9140c2498a68252028899e41/pycryptodomex-3.23.0.tar.gz" + sha256 "71909758f010c82bc99b0abf4ea12012c98962fbf0583c2164f8b84533c2e4da" + end + + resource "pyppmd" do + url "https://files.pythonhosted.org/packages/f6/d7/b3084ff1ac6451ef7dd93d4f7627eeb121a3bed4f8a573a81978a43ddb06/pyppmd-1.2.0.tar.gz" + sha256 "cc04af92f1d26831ec96963439dfb27c96467b5452b94436a6af696649a121fd" + end + + resource "python-xz" do + url "https://files.pythonhosted.org/packages/fe/2f/7ed0c25005eba0efb1cea3cdf4a325852d63167cc77f96b0a0534d19e712/python-xz-0.4.0.tar.gz" + sha256 "398746593b706fa9fac59b8c988eab8603e1fe2ba9195111c0b45227a3a77db3" + end + + resource "pyzstd" do + url "https://files.pythonhosted.org/packages/47/82/7bcafbf06ee83a66990ce5badbb8f4dc32184346bab20de7e468b1a2f6ec/pyzstd-0.18.0.tar.gz" + sha256 "81b6851ab1ca2e5f2c709e896a1362e3065a64f271f43db77fb7d5e4a78e9861" + end + + resource "rapidgzip" do + url "https://files.pythonhosted.org/packages/d6/50/b9bb77eaf841f2fbd8123d9677815d4ef53b53c4c189c5f789c78ef2d05e/rapidgzip-0.15.2.tar.gz" + sha256 "fa3f90f17ce185a99514df54b5316bdfa593e98f3eebbb12da301eb25d6dedcd" + end + + resource "rarfile" do + url "https://files.pythonhosted.org/packages/26/3f/3118a797444e7e30e784921c4bfafb6500fb288a0c84cb8c32ed15853c16/rarfile-4.2.tar.gz" + sha256 "8e1c8e72d0845ad2b32a47ab11a719bc2e41165ec101fd4d3fe9e92aa3f469ef" + end + + resource "ratarmountcore" do + url "https://files.pythonhosted.org/packages/f8/15/b9c2a47a4adba9b7bef8a057896a8e96db1d286ae538bd1d9d2fd147febd/ratarmountcore-0.10.2.tar.gz" + sha256 "35e2935e1e135140d1bb8d82061c1527fb168ba5653d0218c06f3ec106711e6c" + end + + resource "texttable" do + url "https://files.pythonhosted.org/packages/1c/dc/0aff23d6036a4d3bf4f1d8c8204c5c79c4437e25e0ae94ffe4bbb55ee3c2/texttable-1.7.0.tar.gz" + sha256 "2d2068fb55115807d3ac77a4ca68fa48803e84ebb0ee2340f858107a36522638" + end + + def install + setup_fuse + virtualenv_install_with_resources + end + + test do + assert_match "ratarmount #{version}", shell_output("#{bin}/ratarmount --version 2>&1") + tarball = test_fixtures("tarballs/testball2-0.1.tbz") + assert_match "Operation not permitted", shell_output("#{bin}/ratarmount #{tarball} 2>&1", 1) + end +end diff --git a/Formula/rclone-mac.rb b/Formula/rclone-mac.rb index b0a3b39..05f6755 100644 --- a/Formula/rclone-mac.rb +++ b/Formula/rclone-mac.rb @@ -3,16 +3,24 @@ require_relative "../require/macfuse" class RcloneMac < Formula desc "Rsync for cloud storage (with macOS FUSE mount support)" homepage "https://rclone.org/" - url "https://github.com/rclone/rclone/archive/v1.55.1.tar.gz" - sha256 "b8cbf769c8ed41c6e1dd74de78bf14ee7935ee436ee5ba018f742a48ee326f62" + url "https://github.com/rclone/rclone/archive/refs/tags/v1.72.1.tar.gz" + sha256 "322c73932b533571880832c0e07abdf9492c7f329b7d1dcdbd2a195fa2635a77" license "MIT" - head "https://github.com/rclone/rclone.git" + head "https://github.com/rclone/rclone.git", branch: "master" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_tahoe: "4fbfed6cbd727a74761f9e5918aa4d2cc576fe5aefe76fa7a8a2f2e491693f07" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c3217d9951aa76172bba74eddd191554eecc85e67bfb0926e4abc0ee79a7d400" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "93cd3973b52d0d34b0b3301e0876cfe601574523b321c5021c658f2ab362b644" + end depends_on "go" => :build depends_on MacfuseRequirement depends_on :macos def install + setup_fuse system "go", "build", "-ldflags", "-s -X github.com/rclone/rclone/fs.Version=v#{version}", "-tags", "cmount", *std_go_args @@ -22,11 +30,6 @@ class RcloneMac < Formula system bin/name.to_s, "genautocomplete", "bash", "#{name}.bash" system bin/name.to_s, "genautocomplete", "zsh", "_rclone" system bin/name.to_s, "genautocomplete", "zsh", "_#{name}" - inreplace "#{name}.bash" do |s| - s.gsub! "commands=(\"rclone\")", "commands=(\"#{name}\")" - s.gsub!(/(-F __start_rclone) rclone$/, "\\1 #{name}") - end - inreplace "_#{name}", /(#compdef _rclone) rclone$/, "\\1 #{name}" bash_completion.install "rclone.bash" => "rclone" bash_completion.install "#{name}.bash" => name.to_s zsh_completion.install "_rclone" @@ -40,6 +43,10 @@ class RcloneMac < Formula If you need to use it as `rclone`, add the "rclone" directory to your PATH like: PATH="#{opt_libexec}/rclone:$PATH" + + `#{name}` supports the `mount` command on macOS, unlike the + Homebrew core `rclone`. If you don't need `mount`, please + `brew install rclone` instead. EOS end diff --git a/Formula/rofs-filtered-mac.rb b/Formula/rofs-filtered-mac.rb index 5be255e..615aa85 100644 --- a/Formula/rofs-filtered-mac.rb +++ b/Formula/rofs-filtered-mac.rb @@ -3,29 +3,62 @@ require_relative "../require/macfuse" class RofsFilteredMac < Formula desc "Filtered read-only filesystem for FUSE" homepage "https://github.com/gburca/rofs-filtered/" - url "https://github.com/gburca/rofs-filtered/archive/rel-1.7.tar.gz" + url "https://github.com/gburca/rofs-filtered/archive/refs/tags/rel-1.7.tar.gz" sha256 "d66066dfd0274a2fb7b71dd929445377dd23100b9fa43e3888dbe3fc7e8228e8" license "GPL-2.0-or-later" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/rofs-filtered-mac-1.7" - sha256 cellar: :any, big_sur: "cb7cbae756a0415b639c86a4d7998fd95bc66cde8be46f6cac08d8a158595f55" - sha256 cellar: :any, catalina: "b1606a594b8aa539680f7796ef2dd16f8f38fb239da08b2af2a5b1914a9c480f" - sha256 cellar: :any, mojave: "d3fc41566f4d522148ed320f31751e48b325935fe94f79cd17293b840011bdf7" + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_sonoma: "666320aa517fcda5fea5a9189caf62889ea80efc97991325934610f526565742" + sha256 cellar: :any, ventura: "0340ec5bd37f169ca31e5240a26766abef47040363f13f1fc0f7de2cd58a3e59" end depends_on "cmake" => :build + depends_on "pkgconf" => :build depends_on MacfuseRequirement depends_on :macos + # Use pkgconfig to find FUSE + patch :DATA + def install - mkdir "build" do - system "cmake", "..", "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", *std_cmake_args - system "make", "install" - end + setup_fuse + system "cmake", "-S", ".", "-B", "build", + "-DCMAKE_INSTALL_SYSCONFDIR=#{etc}", + *fuse_cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do system "#{bin}/rofs-filtered", "--version" end end +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53a6687..cb4f121 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,8 @@ add_definitions(-D_GNU_SOURCE) + set(CMAKE_C_FLAGS "-Wall -std=c99") + + # find fuse library +-find_package (FUSE REQUIRED) +-include_directories (${FUSE_INCLUDE_DIR}) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(FUSE fuse REQUIRED) + add_definitions(-D_FILE_OFFSET_BITS=64) + + # generate config file +@@ -24,7 +24,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) + + # create and configure targets + add_executable(rofs-filtered rofs-filtered.c) +-target_link_libraries(rofs-filtered ${FUSE_LIBRARIES}) ++target_include_directories(rofs-filtered PUBLIC ${FUSE_INCLUDE_DIRS}) ++target_link_libraries(rofs-filtered PUBLIC ${LIBS} ${FUSE_LDFLAGS}) ++target_compile_options(rofs-filtered PUBLIC ${FUSE_CFLAGS}) + + # configure installation + install(TARGETS rofs-filtered DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/Formula/s3-backer-mac.rb b/Formula/s3-backer-mac.rb index 2295fb3..0b78ae7 100644 --- a/Formula/s3-backer-mac.rb +++ b/Formula/s3-backer-mac.rb @@ -3,24 +3,26 @@ require_relative "../require/macfuse" class S3BackerMac < Formula desc "FUSE-based single file backing store via Amazon S3" homepage "https://github.com/archiecobbs/s3backer" - url "https://archie-public.s3.amazonaws.com/s3backer/s3backer-1.6.1.tar.gz" - sha256 "ec91b1c2ec2eadd945e1745fdeccc49baeb357a4040fd9ea8605a9bcdc96c29f" + url "https://archie-public.s3.amazonaws.com/s3backer/s3backer-2.1.4.tar.gz" + sha256 "0451471209cc872708e91b2784a4a1b9f3ca44c89a7bffb8f6145aed28c941e7" license "GPL-2.0-or-later" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/s3-backer-mac-1.6.1" - sha256 cellar: :any, big_sur: "7fd2974f3287fbed90f2d2cabd83c07b4fc6a832ac774fe10dcc57a5466d428b" - sha256 cellar: :any, catalina: "4efa010416a73885fa3e9727d59180f83cb90ffbd6844feda2aaa04e32db1421" - sha256 cellar: :any, mojave: "027e5963febe35bb3c3dd3acface8a3790e9933b285910c12017bf018cc6cc84" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sonoma: "7f67d78e85e19ec2447968526fddc16c9285c32f2d81eb5cdbaa2771fb2e7153" + sha256 cellar: :any, ventura: "51f68b3c5cba34ac4e669b9cc8b2b1f37a940fc01e3d356decb4aaf750f1e96d" end - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "expat" depends_on MacfuseRequirement depends_on :macos - depends_on "openssl@1.1" + depends_on "openssl@3" def install - system "./configure", "--prefix=#{prefix}" + setup_fuse + system "./configure", "--disable-silent-rules", *std_configure_args system "make", "install" end diff --git a/Formula/s3fs-mac.rb b/Formula/s3fs-mac.rb index 2c28aa5..4d7502d 100644 --- a/Formula/s3fs-mac.rb +++ b/Formula/s3fs-mac.rb @@ -3,33 +3,50 @@ require_relative "../require/macfuse" class S3fsMac < Formula desc "FUSE-based file system backed by Amazon S3" homepage "https://github.com/s3fs-fuse/s3fs-fuse/wiki" - url "https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.89.tar.gz" - sha256 "2bb9c8cad855df5a877440edac9539bd405850d2a3c366cebd9d1fec6f802e29" + url "https://github.com/s3fs-fuse/s3fs-fuse/archive/refs/tags/v1.95.tar.gz" + sha256 "0c97b8922f005500d36f72aee29a1345c94191f61d795e2a7b79fb7e3e6f5517" license "GPL-2.0-or-later" - head "https://github.com/s3fs-fuse/s3fs-fuse.git" + head "https://github.com/s3fs-fuse/s3fs-fuse.git", branch: "master" bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/s3fs-mac-1.89" - sha256 cellar: :any, big_sur: "58bf4c03848d57791f3ba33c82a04c0b0cd45aeb08ba744cff39322ee10707cc" - sha256 cellar: :any, catalina: "8d742b27f566d7dbc7ea146510a0e4fba3c31f27192dd8fc149d24f1c05f9873" - sha256 cellar: :any, mojave: "4cb700a39849dc1427cee981e6da68b5a0486c3d2c0ef8266c7904d6f953ec9f" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sonoma: "ecbfca73778ed850eeef256fcba17bb229036f9fbce767fd54abc2335236efee" + sha256 cellar: :any, ventura: "0fb739e8007836e833c79d45159c78fbd05291b19afc9439683d2712d1b1dd68" end depends_on "autoconf" => :build depends_on "automake" => :build - depends_on "pkg-config" => :build + depends_on "pkgconf" => :build + depends_on "curl" + depends_on "gcc" depends_on "gnutls" depends_on "libgcrypt" - depends_on "nettle" + depends_on "libxml2" depends_on MacfuseRequirement depends_on :macos + depends_on "nettle" + + fails_with :clang do + cause <<~EOS + libc++abi: terminating due to uncaught exception of type std::__1::system_error: + mutex lock failed: Invalid argument + EOS + end def install + setup_fuse system "./autogen.sh" - system "./configure", "--disable-dependency-tracking", "--with-gnutls", "--prefix=#{prefix}" + system "./configure", "--with-gnutls", *std_configure_args system "make", "install" end + def caveats + <<~EOS + This is the final version that supports FUSE 2. + Further updates require a macOS FUSE 3 implementation. + EOS + end + test do system "#{bin}/s3fs", "--version" end diff --git a/Formula/s3ql-mac.rb b/Formula/s3ql-mac.rb index 1387193..8e58c40 100644 --- a/Formula/s3ql-mac.rb +++ b/Formula/s3ql-mac.rb @@ -8,23 +8,27 @@ class S3qlMac < Formula url "https://github.com/s3ql/s3ql/releases/download/release-3.3.2/s3ql-3.3.2.tar.bz2" sha256 "72b310052752e281a17468a8bbe9006db7fa1f0184b83b38c5667239dfd59e73" license "GPL-3.0-only" + revision 1 bottle do root_url "https://github.com/gromgit/homebrew-fuse/releases/download/s3ql-mac-3.3.2" - sha256 cellar: :any, big_sur: "cf66cae83b1b0b01c6c31fd324717b143def621ff26a3d88b6b46e86390d921a" - sha256 cellar: :any, catalina: "944b6532b7cade5cf20a70aef23867e9ddf7df71735d0240578fdfe38a946aac" - sha256 cellar: :any, mojave: "7462fa0b038b1ad22d8dd9990a04dfd41dd59405bb22752d5a17a017a547a1c7" + sha256 cellar: :any, arm64_monterey: "28591bf8f937e22571aebb9ea52b5a41a6674bca0e285d49009d3b6f3daff494" + sha256 cellar: :any, monterey: "f2b0297df187d806be556ec6ed6c6ad5f9d3866d505387a5aee0e0ec558f0afe" + sha256 cellar: :any, big_sur: "d25584692de92f2e9982ac22a60371844032fdd4461507eff126ff2ea5077414" + sha256 cellar: :any, catalina: "5263041b72989e71d60fd9dacf95fb3138d488fc04f25ff7438fd2f73e20e8a5" + sha256 cellar: :any, mojave: "c8438bb43cc23a6addf967de989d564af559793f639553834232319913915b67" end + deprecate! date: "2025-02-11", because: "requires FUSE 3 for v3.4.0 onwards, and doesn't build on modern macOS" + depends_on "pkg-config" => :build - depends_on "openssl@1.1" - depends_on "python@3.8" + depends_on "libffi" depends_on MacfuseRequirement depends_on :macos + depends_on "openssl@3" + depends_on "python@3.13" - uses_from_macos "libffi" - - resource "apsw" do + resource "apsw-3-9-2" do url "https://files.pythonhosted.org/packages/b5/a1/3de5a2d35fc34939672f4e1bd7d68cca359a31b76926f00d95f434c63aaa/apsw-3.9.2-r1.tar.gz" sha256 "dab96fd164dde9e59f7f27228291498217fa0e74048e2c08c7059d7e39589270" end @@ -130,6 +134,7 @@ class S3qlMac < Formula end def install + setup_fuse venv = virtualenv_create(libexec, "python3") resources.each do |r| venv.pip_install r @@ -145,6 +150,16 @@ class S3qlMac < Formula venv.pip_install_and_link buildpath end + def caveats + <<~EOS + This formula is outdated, and is provided only as a courtesy. + It cannot be updated until macFUSE supports FUSE API version 3. + + If security issues are discovered with this old software, + it may be removed without notice. + EOS + end + test do assert_match "S3QL ", shell_output(bin/"mount_s3ql --version") diff --git a/Formula/securefs-mac.rb b/Formula/securefs-mac.rb index 066b7a1..838f7db 100644 --- a/Formula/securefs-mac.rb +++ b/Formula/securefs-mac.rb @@ -3,49 +3,50 @@ require_relative "../require/macfuse" class SecurefsMac < Formula desc "Filesystem with transparent authenticated encryption" homepage "https://github.com/netheril96/securefs" - url "https://github.com/netheril96/securefs.git", - tag: "0.11.1", - revision: "dfeebf8406871d020848edde668234715356158c" + url "https://github.com/netheril96/securefs/archive/refs/tags/v2.0.0.tar.gz" + sha256 "d7fac7adc70c09473173aeadee5b7041d7e63fbf392ef40bdd77888590bb12a2" license "MIT" - head "https://github.com/netheril96/securefs.git" + head "https://github.com/netheril96/securefs.git", branch: "master" + + livecheck do + url :stable + strategy :github_latest + end bottle do - root_url "https://github.com/gromgit/homebrew-fuse/releases/download/securefs-mac-0.11.1" - sha256 cellar: :any, big_sur: "67f46a42eca522dbc42cc5c8b2ac75b1f367db0810494cf0e6a196723ce32270" - sha256 cellar: :any, catalina: "ca8ed21a783afb192376d09c0e60a49da6ff20af048c7f121306fc5078acb28b" - sha256 cellar: :any, mojave: "2b37ead322ab277faf07d4c6357d426aa58a5186af5ec9246792e8e8392e0da5" + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sequoia: "78b2a05c1291ba2828512745ac2b959786288389e44fe44dc0d4cda2a6bd68cc" + sha256 cellar: :any, arm64_sonoma: "54efe58e868a530d252e05beb72537171bd1f4559c16f876d92c31394a89ffb4" end depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "tclap" => :build + depends_on "abseil" + depends_on "argon2" + depends_on "cryptopp" + depends_on "fruit" + depends_on "jsoncpp" depends_on MacfuseRequirement depends_on :macos - - patch :DATA + depends_on "protobuf" + depends_on "sqlite" + depends_on "uni-algo" + depends_on "utf8proc" def install - system "cmake", ".", *std_cmake_args - system "make", "install" + setup_fuse + args = %w[ + -DSECUREFS_ENABLE_INTEGRATION_TEST=OFF + -DSECUREFS_ENABLE_UNIT_TEST=OFF + -DSECUREFS_USE_VCPKG=OFF + ] + system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do - system "#{bin}/securefs", "version" # The sandbox prevents a more thorough test + system bin/"securefs", "version" # The sandbox prevents a more thorough test end end -__END__ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7b5e57d..7c9d2b7 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -19,11 +19,7 @@ configure_file(${CMAKE_SOURCE_DIR}/sources/git-version.cpp.in ${CMAKE_BINARY_DIR - - if (UNIX) - find_path(FUSE_INCLUDE_DIR fuse.h PATHS /usr/local/include PATH_SUFFIXES osxfuse) -- if (APPLE) -- find_library(FUSE_LIBRARIES osxfuse PATHS /usr/local/lib) -- else() -- find_library(FUSE_LIBRARIES fuse PATHS /usr/local/lib) -- endif() -+ find_library(FUSE_LIBRARIES fuse PATHS /usr/local/lib) - include_directories(${FUSE_INCLUDE_DIR}) - link_libraries(${FUSE_LIBRARIES}) - add_compile_options(-Wall -Wextra -Wno-unknown-pragmas) diff --git a/Formula/simple-mtpfs-mac.rb b/Formula/simple-mtpfs-mac.rb new file mode 100644 index 0000000..02a4bf4 --- /dev/null +++ b/Formula/simple-mtpfs-mac.rb @@ -0,0 +1,55 @@ +require_relative "../require/macfuse" + +class SimpleMtpfsMac < Formula + desc "Simple MTP fuse filesystem driver" + homepage "https://github.com/phatina/simple-mtpfs" + url "https://github.com/phatina/simple-mtpfs/archive/refs/tags/v0.4.0.tar.gz" + sha256 "1d011df3fa09ad0a5c09d48d84c03e6cddf86390af9eb4e0c178193f32f0e2fc" + license "GPL-2.0-or-later" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "cf831fa0da5d53fbef60c754223bb2ed7601c80e89d7bb11be4bd349001b2f1e" + sha256 cellar: :any, ventura: "01adbaed0737e09f73ec91d8e248a1a9c138e06f8476cd6da23e6b511f3c68d9" + end + + depends_on "autoconf" => :build + depends_on "autoconf-archive" => :build # required for AX_CXX_COMPILE_STDCXX_17 + depends_on "automake" => :build + depends_on "pkgconf" => :build + depends_on "libmtp" + depends_on "libusb" + depends_on MacfuseRequirement + depends_on :macos + + patch :DATA + + def install + setup_fuse + system "./autogen.sh" + system "./configure", "--disable-silent-rules", *std_configure_args + system "make" + system "make", "install" + end + + test do + system bin/"simple-mtpfs", "-h" + end +end +__END__ +diff --git a/configure.ac b/configure.ac +index 321cfec..a5e9294 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,8 @@ test "x$os_name" == "xDarwin" || AC_CHECK_FUNCS([fdatasync]) + + PKG_CHECK_MODULES([FUSE], [fuse >= 2.7.3]) + if test "x$os_name" == "xDarwin"; then +- AC_SUBST([FUSE_CFLAGS],["-D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse"]) +- AC_SUBST([FUSE_LIBS],["-L/usr/local/lib -losxfuse -pthread -liconv"]) ++ AC_SUBST([FUSE_CFLAGS],["-D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/fuse"]) ++ AC_SUBST([FUSE_LIBS],["-L/usr/local/lib -lfuse -pthread -liconv"]) + fi + + PKG_CHECK_MODULES( diff --git a/Formula/squashfuse-mac.rb b/Formula/squashfuse-mac.rb new file mode 100644 index 0000000..9a4a989 --- /dev/null +++ b/Formula/squashfuse-mac.rb @@ -0,0 +1,41 @@ +require_relative "../require/macfuse" + +class SquashfuseMac < Formula + desc "FUSE filesystem to mount squashfs archives" + homepage "https://github.com/vasi/squashfuse" + url "https://github.com/vasi/squashfuse/releases/download/0.6.1/squashfuse-0.6.1.tar.gz" + sha256 "7b18a58c40a3161b5c329ae925b72336b5316941f906b446b8ed6c5a90989f8c" + license "BSD-2-Clause" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any, arm64_sonoma: "9618c3556506fecc5234a9f2f238fe7e6f51cd3782fdc0d6580d222bbaff3485" + sha256 cellar: :any, ventura: "03092b26301eb86ed81db27cf2a7558d55f9ed3099ee09262065edcacb9ea8b1" + end + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkgconf" => :build + depends_on "lz4" + depends_on "lzo" + depends_on MacfuseRequirement + depends_on :macos + depends_on "squashfs" + depends_on "xz" + depends_on "zlib" + depends_on "zstd" + + def install + setup_fuse + system "./configure", *std_configure_args + system "make", "install" + end + + # Unfortunately, making/testing a squash mount requires sudo privileges, so + # just test that squashfuse execs for now. + test do + output = shell_output("#{bin}/squashfuse --version 2>&1", 254) + assert_match version.to_s, output + end +end diff --git a/Formula/sshfs-mac.rb b/Formula/sshfs-mac.rb index 67d5653..d77274d 100644 --- a/Formula/sshfs-mac.rb +++ b/Formula/sshfs-mac.rb @@ -10,11 +10,15 @@ class SshfsMac < Formula bottle do root_url "https://github.com/gromgit/homebrew-fuse/releases/download/sshfs-mac-2.10" - sha256 cellar: :any, big_sur: "9e021d24580ec55f4ab034dba0e264906d9db5c57036fe83710bc601bc6885c6" - sha256 cellar: :any, catalina: "09f254420411218a784c783df760d2c652acd280eecc875d60e41014f80011cc" - sha256 cellar: :any, mojave: "6389b69b921295f5be6eb35336649f558375eb24da60573b376a313331a4d18c" + sha256 cellar: :any, arm64_monterey: "422abbbbd1804e67c27a21b976e4e82cfdffd977b5aa2cf7ee4e21fc2b548167" + sha256 cellar: :any, monterey: "ffbc11b371d196dd6a32c13b21dfc28af7f7577145a62a165062228c2c661263" + sha256 cellar: :any, big_sur: "9e021d24580ec55f4ab034dba0e264906d9db5c57036fe83710bc601bc6885c6" + sha256 cellar: :any, catalina: "09f254420411218a784c783df760d2c652acd280eecc875d60e41014f80011cc" + sha256 cellar: :any, mojave: "6389b69b921295f5be6eb35336649f558375eb24da60573b376a313331a4d18c" end + deprecate! date: "2025-02-11", because: :unmaintained + depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build @@ -31,6 +35,7 @@ class SshfsMac < Formula patch :DATA def install + setup_fuse system "autoreconf", "-fiv" system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" @@ -39,7 +44,7 @@ class SshfsMac < Formula def caveats <<~EOS This formula is outdated, and is provided only as a courtesy. - It cannot be updated until MacFUSE supports FUSE API version 3. + It cannot be updated until macFUSE supports FUSE API version 3. If security issues are discovered with this old software, it may be removed without notice. @@ -51,6 +56,18 @@ class SshfsMac < Formula end end __END__ +diff --git a/configure.ac b/configure.ac +index 76026ad..671810b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -16,7 +16,6 @@ case "$target_os" in + *) osname=unknown;; + esac + +-export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH + PKG_CHECK_MODULES([SSHFS], [fuse >= 2.3 glib-2.0 gthread-2.0]) + have_fuse_opt_parse=no + oldlibs="$LIBS" diff --git a/sshfs.c b/sshfs.c index 97eaf06..d442577 100644 --- a/sshfs.c diff --git a/Formula/tup-mac.rb b/Formula/tup-mac.rb new file mode 100644 index 0000000..bb5ca0b --- /dev/null +++ b/Formula/tup-mac.rb @@ -0,0 +1,34 @@ +require_relative "../require/macfuse" + +class TupMac < Formula + desc "File-based build system" + homepage "http://gittup.org/tup/" + url "https://github.com/gittup/tup/archive/refs/tags/v0.8.tar.gz" + sha256 "45ca35c4c1d140f3faaab7fabf9d68fd9c21074af2af9a720cff4b27cab47d07" + license "GPL-2.0-only" + head "https://github.com/gittup/tup.git" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "c560a370134cbe065d983bc0f40a3fb7481524eeae8463c891b91853ff2813a8" + sha256 cellar: :any, ventura: "1553e833231b266f2c270dfe8e7e21933af45ffe8c37aba141cd3ce2706f6f46" + end + + depends_on "pkg-config" => :build + depends_on MacfuseRequirement + depends_on :macos + + def install + setup_fuse + ENV["TUP_LABEL"] = version + system "./build.sh" + bin.install "build/tup" + man1.install "tup.1" + doc.install (buildpath/"docs").children + pkgshare.install "contrib/syntax" + end + + test do + system "#{bin}/tup", "-v" + end +end diff --git a/Formula/unionfs-fuse.rb b/Formula/unionfs-fuse.rb new file mode 100644 index 0000000..89854cf --- /dev/null +++ b/Formula/unionfs-fuse.rb @@ -0,0 +1,53 @@ +require_relative "../require/macfuse" + +class UnionfsFuse < Formula + desc "Union filesystem using FUSE" + homepage "https://github.com/rpodgorny/unionfs-fuse" + url "https://github.com/rpodgorny/unionfs-fuse/archive/refs/tags/v3.7.tar.gz" + sha256 "026f5302279110ceb7465e5c9e863cd0319ea0dc32ad253d162cf9db0f5e9a81" + license "BSD-3-Clause" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "bd96797c922e35716d4bf81b585eccff801f33d416177b3c1f64408cf9049095" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "66afec09b9d1ec0d1549a8afe97a0fa6f1f65374c9e42898655f6ad9d718c02c" + sha256 cellar: :any_skip_relocation, ventura: "c10761c0cb52fbaa60425a8e5c3a58cc0ae7868c33943a02c9006bdcb60f8f78" + end + + depends_on "cmake" => :build + depends_on "pkg-config" => :build + depends_on MacfuseRequirement + + def install + setup_fuse + inreplace "CMakeLists.txt", "/usr/local", alt_fuse_root.to_s + mkdir "build" do + system "cmake", "..", + "-DCMAKE_C_COMPILER=clang", + "-DCMAKE_C_FLAGS=-std=gnu99", + *std_cmake_args + system "make", "install" + end + end + + test do + assert_match version.to_s, shell_output("#{bin}/unionfs --version 2>&1") + # TODO: fix test + # (testpath/"t1").mkdir + # (testpath/"t1/test1.txt").write <<~EOS + # This is test 1. + # EOS + # (testpath/"t2").mkdir + # (testpath/"t2/test2.txt").write <<~EOS + # This is test 2. + # EOS + # (testpath/"t3").mkdir + # begin + # system "#{bin}/unionfs", "-o", "cow,max_files=32768,allow_other,use_ino,nonempty", + # "#{testpath}/t1=RW:#{testpath}/t2=RO", testpath/"t3" + # assert_match "test 2", pipe_output("cat #{testpath}/t3/test2.txt") + # ensure + # system "umount", "#{testpath}/t3" + # end + end +end diff --git a/Formula/wdfs-mac.rb b/Formula/wdfs-mac.rb new file mode 100644 index 0000000..723734e --- /dev/null +++ b/Formula/wdfs-mac.rb @@ -0,0 +1,32 @@ +require_relative "../require/macfuse" + +class WdfsMac < Formula + desc "Webdav file system" + homepage "http://noedler.de/projekte/wdfs/" + url "http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz" + sha256 "fcf2e1584568b07c7f3683a983a9be26fae6534b8109e09167e5dff9114ba2e5" + license "GPL-2.0-or-later" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + rebuild 1 + sha256 cellar: :any, arm64_sonoma: "470836a78df1eefa59cf45a46d2592313bdb32a51d0797266fe2c6ee1c588867" + sha256 cellar: :any, ventura: "d4350a182eeecb7003c5ff582c5a1329e156f894d9ac0a0aa64485f607fdc55d" + end + + depends_on "pkgconf" => :build + depends_on "glib" + depends_on MacfuseRequirement + depends_on :macos + depends_on "neon" + + def install + setup_fuse + system "./configure", *std_configure_args + system "make", "install" + end + + test do + system bin/"wdfs", "-v" + end +end diff --git a/Formula/xmount-mac.rb b/Formula/xmount-mac.rb new file mode 100644 index 0000000..efdc74b --- /dev/null +++ b/Formula/xmount-mac.rb @@ -0,0 +1,79 @@ +require_relative "../require/macfuse" + +class XmountMac < Formula + desc "Convert between multiple input & output disk image types" + homepage "https://www.sits.lu/xmount" + url "https://code.sits.lu/foss/xmount/-/archive/1.2.1/xmount-1.2.1.tar.gz" + sha256 "61b0b777ca0cd4eda30aeeeca7ec17a49d2657599a37745fb94f8dcc432b93c7" + + bottle do + root_url "https://ghcr.io/v2/gromgit/fuse" + sha256 arm64_sequoia: "cc8c7f233c8e40a6512736f137aff799dc3f986e6be60c3eea476a8d9b127383" + sha256 arm64_sonoma: "61f67c7481c3f76e4d9d8b11a7100bae495b5b655524739722d867593fc494a2" + end + + depends_on "cmake" => :build + depends_on "pkgconf" => :build + depends_on "afflib" + depends_on "libewf" + depends_on MacfuseRequirement + depends_on :macos + depends_on "openssl@3" + + patch :DATA + + def install + setup_fuse + ENV.prepend_path "PKG_CONFIG_PATH", Formula["openssl@3"].opt_lib/"pkgconfig" + + system "cmake", "-S", ".", "-B", "build", *fuse_cmake_args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + end + + test do + system bin/"xmount", "--version" + end +end +__END__ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7369014..0bea886 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -73,9 +73,6 @@ check_include_files(libkern/OSByteOrder.h HAVE_LIBKERN_OSBYTEORDER_H) + find_package(Threads REQUIRED) + if(NOT APPLE) + find_package(LibFUSE REQUIRED) +-else(NOT APPLE) +- # On OSx, search for osxfuse +- find_package(LibOSXFUSE REQUIRED) + endif(NOT APPLE) + + # Generate config.h and add it's path to the include dirs +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 92d9b8f..623c3d1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -2,9 +2,8 @@ if(NOT APPLE) + include_directories(${LIBFUSE_INCLUDE_DIRS}) + set(LIBS ${LIBS} ${LIBFUSE_LIBRARIES}) + else(NOT APPLE) +- include_directories(${LIBOSXFUSE_INCLUDE_DIRS}) +- set(LIBS ${LIBS} ${LIBOSXFUSE_LIBRARIES}) +- link_directories(${LIBOSXFUSE_LIBRARY_DIRS}) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(FUSE fuse REQUIRED) + endif(NOT APPLE) + + if(LIBFUSE_VERSION EQUAL 3) +@@ -25,7 +24,9 @@ if(THREADS_HAVE_PTHREAD_ARG) + target_compile_options(xmount PUBLIC "-pthread") + endif(THREADS_HAVE_PTHREAD_ARG) + +-target_link_libraries(xmount ${LIBS}) ++target_include_directories(xmount PUBLIC ${FUSE_INCLUDE_DIRS}) ++target_link_libraries(xmount PUBLIC ${LIBS} ${FUSE_LDFLAGS}) ++target_compile_options(xmount PUBLIC ${FUSE_CFLAGS}) + + install(TARGETS xmount DESTINATION bin) + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..12500f7 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2009-present, Homebrew contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 866a741..b72677c 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,66 @@ This tap exists to support macOS FUSE-related software that have been dropped from Homebrew core. +--- + +# !!! WARNING: Reduced Build Coverage !!! + +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. + +--- + ## How do I install these formulae? -`brew install gromgit/fuse/` -## Hey, why is XYZ not available? -Probably because I haven't gotten around to putting it in yet. If you need it, [file an issue](https://github.com/gromgit/homebrew-fuse/issues/new/choose) and I'll see what can be done. +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: +1. As far as I know, Homebrew will not remove them from your system, even after the formulae themselves are deleted. +1. Many of these formulae are rather old, so you're unlikely to find updates anyway. -## Hey, why is XYZ so old? -Maybe I just haven't gotten around to updating it yet, but a significant subset simply can't be updated until MacFUSE supports version 3 of the FUSE API. Read any _Caveats_ that appear during installation for important details. +But if you _do_ want to install my formulae over the core ones, you should uninstall the core formulae first. ## Documentation + `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). + +## FAQ + +### Why is XYZ not available? + +It's probably available, but with a `-mac` suffix to avoid name clashes with Homebrew core (e.g. `sshfs` becomes `sshfs-mac`). + +If you can't find it under its new name, possible reasons include: +1. All available versions of `XYZ` require version 3 of the libfuse API, but macFUSE only supports v2. +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. 😀 + +### Why is XYZ so old? + +Possible reasons: +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. +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. +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. 😀 + +### Why is the XYZ formula called `XYZ-mac`? + +To avoid a naming conflict with the formula called `XYZ` that still exists in Homebrew core. + +### Why is the XYZ _program_ installed as `XYZ-mac`? + +`brew info gromgit/fuse/XYZ-mac` and read the _Caveats_ section. + +### Why does Homebrew say I need to build `XYZ-mac` from source? + +All my old Intel Mac hardware is dead, so I'm relying now on the free GitHub runners to build bottles. + +### Why can't I build XYZ on an ARM Mac? + +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). + +## Why aren't you using fuse-t in place of MacFUSE? + +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. + +For this to happen, at least one of the following needs to happen: + +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 +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 + +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. diff --git a/cmd/brew-test-fuse b/cmd/brew-test-fuse new file mode 100755 index 0000000..5f702ad --- /dev/null +++ b/cmd/brew-test-fuse @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +#:`brew test-fuse` +#: Tests local FUSE installation + +. "$(dirname "$0")"/../lib/funcs.sh + +tmpdir=/tmp/fuse-test.$$ +mkdir -p "$tmpdir"/test_mount +trap 'rm -fr "$tmpdir"' EXIT + +[[ $(uname -s) == "Darwin" ]] || fatal "This script can only be run on macOS" + +cd "$tmpdir" +eval "$(brew shellenv)" + +info "Checking for FUSE installation" +cmd pkgutil --pkg-info io.macfuse.installer.components.core +cmd pkgutil --lsbom io.macfuse.installer.components.core + +info "Test FUSE build" +examples=( + https://raw.githubusercontent.com/libfuse/libfuse/46b9c3326d50aebe52c33d63885b83a47a2e74ea/example/hello.c + https://raw.githubusercontent.com/libfuse/libfuse/46b9c3326d50aebe52c33d63885b83a47a2e74ea/example/hello_ll.c + https://raw.githubusercontent.com/libfuse/libfuse/46b9c3326d50aebe52c33d63885b83a47a2e74ea/example/null.c +) +for u in "${examples[@]}"; do + # Get the last FUSE 2.x lowlevel example file + cmd curl -sOL "$u" + # Build it Homebrew-style + f=${u##*/}; p=${f%.c} + cmd clang -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse -L/usr/local/lib -g -O2 -Wall -o "$p" "$f" -lfuse -lpthread +done diff --git a/formula_renames.json b/formula_renames.json index 201763a..6bd4616 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -1,6 +1,5 @@ { "afuse": "afuse-mac", - "alluxio": "alluxio-mac", "archivemount": "archivemount-mac", "avfs": "avfs-mac", "bindfs": "bindfs-mac", diff --git a/lib/funcs.sh b/lib/funcs.sh new file mode 100644 index 0000000..ddea59d --- /dev/null +++ b/lib/funcs.sh @@ -0,0 +1,79 @@ +# shellcheck shell=bash +# shellcheck disable=SC2034 +# string formatters +if [[ -t 1 ]] +then + Tty_escape() { printf "\033[%sm" "$1"; } +else + Tty_escape() { :; } +fi +Tty_mkbold() { Tty_escape "1;${1:-39}"; } +Tty_red=$(Tty_mkbold 31) +Tty_green=$(Tty_mkbold 32) +Tty_brown=$(Tty_mkbold 33) +Tty_blue=$(Tty_mkbold 34) +Tty_magenta=$(Tty_mkbold 35) +Tty_cyan=$(Tty_mkbold 36) +Tty_white=$(Tty_mkbold 37) +Tty_underscore=$(Tty_escape 38) +Tty_bold=$(Tty_mkbold 39) +Tty_reset=$(Tty_escape 0) + +msg_prefix="" + +# fatal: Report fatal error +# USAGE: fatal ... +fatal() { + echo "${Tty_red}${msg_prefix}FATAL ERROR:${Tty_reset} $*" >&2 + exit 1 +} + +# error: Report error +# USAGE: error ... +error() { + echo "${Tty_red}${msg_prefix}ERROR:${Tty_reset} $*" >&2 +} + +# warn: Report warning +# USAGE: warn ... +warn() { + echo "${Tty_blue}${msg_prefix}Warning:${Tty_reset} $*" >&2 +} + +# info: Informational message +# USAGE: info ... +info() { + echo "${Tty_green}${msg_prefix}Info:${Tty_reset} $*" >&2 +} + +# need_progs: Checks for command dependencies +# USAGE: need_progs ... +need_progs() { + local missing=() + local i + for i in "$@" + do + type -P "${i}" &>/dev/null || missing+=("${i}") + done + if [[ ${#missing[@]} -gt 0 ]] + then + fatal "Commands missing: ${missing[*]}" + fi +} + +# cmd: Show command being run +# USAGE: cmd ... +cmd() { + echo "${Tty_cyan}>>> $*${Tty_reset}" >&2 + command "$@" +} + +# git_in: Run Git command in repo +# USAGE: git_in ... +git_in() { + local repo=$1 + shift + pushd "${repo}" >/dev/null || fatal "Can't cd to '${repo}'" + cmd git "$@" + popd >/dev/null || exit +} diff --git a/lib/fuse-pkg-config b/lib/fuse-pkg-config new file mode 100755 index 0000000..4f5bb66 --- /dev/null +++ b/lib/fuse-pkg-config @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +fuse_root=%FUSE_ROOT% + +# Collect args +pkgs=() +flags=() + +for a in "$@"; do + [[ $a == -* ]] && flags+=("$a") || pkgs+=("$a") +done + +if [[ ${#pkgs[@]} -eq 0 ]]; then + pkg-config "${flags[@]}" +else + for p in "${pkgs[@]}"; do + if [[ $p == fuse ]]; then + pkg-config "${flags[@]}" "$p" | sed "s@/usr/local@${fuse_root}@g" + else + pkg-config "${flags[@]}" "$p" + fi + done +fi diff --git a/require/macfuse.rb b/require/macfuse.rb index 2ecf886..e6227e2 100644 --- a/require/macfuse.rb +++ b/require/macfuse.rb @@ -1,5 +1,7 @@ +# typed: false # frozen_string_literal: true +# USAGE: `depends_on MacfuseRequirement` class MacfuseRequirement < Requirement fatal true @@ -12,14 +14,178 @@ class MacfuseRequirement < Requirement env do ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_LIBRARY/"Homebrew/os/mac/pkgconfig/fuse" - - unless HOMEBREW_PREFIX.to_s == "/usr/local" - ENV.append_path "HOMEBREW_LIBRARY_PATHS", "/usr/local/lib" - ENV.append_path "HOMEBREW_INCLUDE_PATHS", "/usr/local/include" - end end def message - "This formula requires MacFUSE. Please run `brew install --cask macfuse` first." + "This formula requires macFUSE. Please run `brew install --cask macfuse` first." + end + + def display_s + "macFUSE" + end +end + +# Add `setup_fuse` to base Formula class, for use by FUSE formulae +class Formula + def need_alt_fuse? + HOMEBREW_PREFIX.to_s != "/usr/local" + end + + def alt_fuse_root + buildpath/"temp" + end + + def fuse_cmake_args + return unless need_alt_fuse? + + %W[ + -DCMAKE_INCLUDE_PATH=#{alt_fuse_root}/include/fuse;#{alt_fuse_root}/include + -DCMAKE_LIBRARY_PATH=#{alt_fuse_root}/lib + -DCMAKE_CXX_FLAGS=-I#{alt_fuse_root}/include/fuse\ -D_USE_FILE_OFFSET_BITS=64 + ] + # -DPKG_CONFIG=#{fuse_pkgconfig} + # -DPKG_CONFIG_EXECUTABLE=#{fuse_pkgconfig} + # -DFUSE_INCLUDE_DIR=#{alt_fuse_root}/include/fuse + # -DFUSE_LIBRARIES=#{alt_fuse_root}/lib/libfuse.dylib + end + + def setup_fuse_includes + mkdir "#{alt_fuse_root}/include" do + Dir["/usr/local/include/fuse", "/usr/local/include/fuse.h"].each { |f| cp_r f, "." } + end + end + + def setup_fuse3_includes + mkdir "#{alt_fuse_root}/include" do + Dir["/usr/local/include/fuse3"].each { |f| cp_r f, "." } + end + end + + def setup_fuse_libs + mkdir "#{alt_fuse_root}/lib" do + Dir["/usr/local/lib/libfuse.*"].each { |f| cp_r f, "." } + end + end + + def setup_fuse3_libs + mkdir "#{alt_fuse_root}/lib" do + Dir["/usr/local/lib/libfuse3.*"].each { |f| cp_r f, "." } + end + end + + def setup_fuse_pkgconfig + ### OLD METHOD: Fake pkg-config + # mkdir "#{alt_fuse_root}/bin" do + # cp path/"../../lib/fuse-pkg-config", "." + # inreplace "fuse-pkg-config", "%FUSE_ROOT%", "#{alt_fuse_root}" + # end + # ENV["PKG_CONFIG"] = "#{fuse_pkgconfig}" + + ### NEW METHOD: Fix fuse.pc in alt root + mkdir "#{alt_fuse_root}/lib/pkgconfig" do + cp "/usr/local/lib/pkgconfig/fuse.pc", "." + inreplace "fuse.pc", "/usr/local", alt_fuse_root.to_s + end + ENV.prepend_path "PKG_CONFIG_PATH", "#{alt_fuse_root}/lib/pkgconfig" + end + + def setup_fuse3_pkgconfig + mkdir "#{alt_fuse_root}/lib/pkgconfig" do + cp "/usr/local/lib/pkgconfig/fuse3.pc", "." + inreplace "fuse3.pc", "/usr/local", alt_fuse_root.to_s + end + ENV.prepend_path "PKG_CONFIG_PATH", "#{alt_fuse_root}/lib/pkgconfig" + end + + # def fuse_pkgconfig + # return "#{alt_fuse_root}/bin/fuse-pkg-config" if need_alt_fuse? + # "pkg-config" + # end + + def setup_fuse_env + odebug "Setting up FUSE temp environment under #{alt_fuse_root}" + setup_fuse_includes + setup_fuse_libs + setup_fuse_pkgconfig + Dir.glob("#{alt_fuse_root}/**/*").each { |f| odebug ">>> #{f}" } + end + + def setup_fuse3_env + odebug "Setting up FUSE3 temp environment under #{alt_fuse_root}" + setup_fuse3_includes + setup_fuse3_libs + setup_fuse3_pkgconfig + Dir.glob("#{alt_fuse_root}/**/*").each { |f| odebug ">>> #{f}" } + end + + def disable_macfuse_extensions + ENV.append "CFLAGS", "-DFUSE_DARWIN_ENABLE_EXTENSIONS=0" + ENV.append "CPPFLAGS", "-DFUSE_DARWIN_ENABLE_EXTENSIONS=0" + ENV.append "CXXFLAGS", "-DFUSE_DARWIN_ENABLE_EXTENSIONS=0" + ENV.append "CGO_CPPFLAGS", "-DFUSE_DARWIN_ENABLE_EXTENSIONS=0" + end + + def setup_fuse_flags + ENV.append "CFLAGS", "-I#{alt_fuse_root}/include/fuse" + ENV.append "CFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include/fuse" + ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CPPFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CPPFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "CXXFLAGS", "-I#{alt_fuse_root}/include/fuse" + ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CXXFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CXXFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "LDFLAGS", "-L#{alt_fuse_root}/lib" + ENV.append "CGO_CPPFLAGS", "-I#{alt_fuse_root}/include/fuse" + ENV.append "CGO_CPPFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CGO_CPPFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CGO_CPPFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "CGO_LDFLAGS", "-L#{alt_fuse_root}/lib" + disable_macfuse_extensions + odebug "PKG_CONFIG = #{ENV.fetch("PKG_CONFIG", nil)}" + odebug "PKG_CONFIG_PATH = #{ENV.fetch("PKG_CONFIG_PATH", nil)}" + odebug "CFLAGS = #{ENV.fetch("CFLAGS", nil)}" + end + + def setup_fuse3_flags + ENV.append "CFLAGS", "-I#{alt_fuse_root}/include/fuse3" + ENV.append "CFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include/fuse3" + ENV.append "CPPFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CPPFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CPPFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "CXXFLAGS", "-I#{alt_fuse_root}/include/fuse3" + ENV.append "CXXFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CXXFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CXXFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "LDFLAGS", "-L#{alt_fuse_root}/lib" + ENV.append "CGO_CPPFLAGS", "-I#{alt_fuse_root}/include/fuse3" + ENV.append "CGO_CPPFLAGS", "-I#{alt_fuse_root}/include" + ENV.append "CGO_CPPFLAGS", "-D_FILE_OFFSET_BITS=64" + ENV.append "CGO_CPPFLAGS", "-D_USE_FILE_OFFSET_BITS=64" + ENV.append "CGO_LDFLAGS", "-L#{alt_fuse_root}/lib" + disable_macfuse_extensions + odebug "PKG_CONFIG = #{ENV.fetch("PKG_CONFIG", nil)}" + odebug "PKG_CONFIG_PATH = #{ENV.fetch("PKG_CONFIG_PATH", nil)}" + odebug "CFLAGS = #{ENV.fetch("CFLAGS", nil)}" + end + + def setup_fuse + return unless need_alt_fuse? + + setup_fuse_env + setup_fuse_flags + end + + def setup_fuse3 + return unless need_alt_fuse? + + setup_fuse3_env + setup_fuse3_flags end end diff --git a/tap_migrations.json b/tap_migrations.json new file mode 100644 index 0000000..4350e68 --- /dev/null +++ b/tap_migrations.json @@ -0,0 +1,3 @@ +{ + "mounty": "homebrew/cask" +}