2021-04-27 13:42:59 +08:00
|
|
|
require_relative "../require/macfuse"
|
|
|
|
|
|
2021-04-27 14:05:24 +08:00
|
|
|
class GcsfuseMac < Formula
|
2021-04-27 13:42:59 +08:00
|
|
|
desc "User-space file system for interacting with Google Cloud"
|
|
|
|
|
homepage "https://github.com/googlecloudplatform/gcsfuse"
|
2025-10-30 06:42:04 +00:00
|
|
|
url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/refs/tags/v3.4.3.tar.gz"
|
|
|
|
|
sha256 "133f96085ef34974a53382aa8a65b064095ff889eff2aa98edf78f26e4a46299"
|
2021-04-27 13:42:59 +08:00
|
|
|
license "Apache-2.0"
|
2025-03-07 20:35:29 +08:00
|
|
|
head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master"
|
2021-04-27 13:42:59 +08:00
|
|
|
|
2022-11-25 17:44:29 +08:00
|
|
|
livecheck do
|
|
|
|
|
url :stable
|
2025-03-07 16:58:27 +08:00
|
|
|
strategy :github_latest
|
2022-11-25 17:44:29 +08:00
|
|
|
end
|
|
|
|
|
|
2021-04-27 13:42:59 +08:00
|
|
|
bottle do
|
2025-03-07 09:11:25 +00:00
|
|
|
root_url "https://ghcr.io/v2/gromgit/fuse"
|
2025-10-24 02:19:42 +00:00
|
|
|
sha256 cellar: :any_skip_relocation, arm64_sequoia: "cba406fa379984f67c93ecc9c946038f843c6665bf927d90088386a0b586cd22"
|
|
|
|
|
sha256 cellar: :any_skip_relocation, arm64_sonoma: "a7bae1f2ce1f5c94e9b6fc8a2520c2da5dfa0af9c575d19e6a3327700861b0a9"
|
2021-04-27 13:42:59 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
depends_on "go" => :build
|
|
|
|
|
depends_on MacfuseRequirement
|
|
|
|
|
depends_on :macos
|
|
|
|
|
|
2025-03-07 20:35:29 +08:00
|
|
|
patch do
|
2025-05-10 10:51:12 +08:00
|
|
|
url "https://raw.githubusercontent.com/gromgit/formula-patches/f69773ce21e06e4c6407da25af33486f5ec6185d/gcsfuse-mac/macos.patch?full_index=1"
|
|
|
|
|
sha256 "ab3e204bf099cbabefee825f634cfb9c33349002059b1522488c12bf5790ef11"
|
2025-03-07 20:35:29 +08:00
|
|
|
end
|
|
|
|
|
|
2025-03-07 16:58:27 +08:00
|
|
|
patch :DATA
|
2022-06-17 11:09:28 +08:00
|
|
|
|
2021-04-27 13:42:59 +08:00
|
|
|
def install
|
2021-07-04 00:27:00 +08:00
|
|
|
setup_fuse
|
2021-04-27 13:42:59 +08:00
|
|
|
# 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.
|
2025-03-07 16:58:27 +08:00
|
|
|
gcsfuse_version = build.head? ? Utils.git_short_head : version.to_s
|
|
|
|
|
system "./build_gcsfuse", buildpath, prefix, gcsfuse_version
|
2021-04-27 13:42:59 +08:00
|
|
|
end
|
|
|
|
|
|
2025-02-11 20:48:52 +08:00
|
|
|
def caveats
|
|
|
|
|
<<~EOS
|
2025-03-07 20:35:29 +08:00
|
|
|
Upstream doesn't actively support macOS (https://github.com/GoogleCloudPlatform/gcsfuse/issues/1299).
|
2025-02-11 20:48:52 +08:00
|
|
|
EOS
|
|
|
|
|
end
|
|
|
|
|
|
2021-04-27 13:42:59 +08:00
|
|
|
test do
|
2025-03-07 16:58:27 +08:00
|
|
|
system bin/"gcsfuse", "--help"
|
2021-04-27 13:42:59 +08:00
|
|
|
system "#{sbin}/mount_gcsfuse", "--help"
|
|
|
|
|
end
|
|
|
|
|
end
|
2025-03-07 16:58:27 +08:00
|
|
|
|
|
|
|
|
__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))
|
|
|
|
|
|
|
|
|
|
|