Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fuse/ipns/ipns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import (
"sync"
"testing"

"bazil.org/fuse"
"github.com/seaweedfs/fuse"

core "github.com/ipfs/kubo/core"
coreapi "github.com/ipfs/kubo/core/coreapi"

fstest "bazil.org/fuse/fs/fstestutil"
racedet "github.com/ipfs/go-detect-race"
"github.com/ipfs/go-test/random"
ci "github.com/libp2p/go-libp2p-testing/ci"
fstest "github.com/seaweedfs/fuse/fs/fstestutil"
)

func maybeSkipFuseTests(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions fuse/ipns/ipns_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (
"github.com/ipfs/boxo/namesys"
"github.com/ipfs/boxo/path"

fuse "bazil.org/fuse"
fs "bazil.org/fuse/fs"
mfs "github.com/ipfs/boxo/mfs"
cid "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2"
iface "github.com/ipfs/kubo/core/coreiface"
options "github.com/ipfs/kubo/core/coreiface/options"
fuse "github.com/seaweedfs/fuse"
fs "github.com/seaweedfs/fuse/fs"
)

func init() {
Expand Down Expand Up @@ -207,7 +207,7 @@ func (r *Root) Close() error {
}

// Forget is called when the filesystem is unmounted. probably.
// see comments here: http://godoc.org/bazil.org/fuse/fs#FSDestroyer
// see comments here: https://pkg.go.dev/github.com/seaweedfs/fuse/fs#FSDestroyer
func (r *Root) Forget() {
err := r.Close()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions fuse/ipns/link_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"context"
"os"

"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
)

type Link struct {
Expand Down
6 changes: 3 additions & 3 deletions fuse/mfs/mfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (
"testing"
"time"

"bazil.org/fuse"
"bazil.org/fuse/fs"
"bazil.org/fuse/fs/fstestutil"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/node"
"github.com/libp2p/go-libp2p-testing/ci"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
"github.com/seaweedfs/fuse/fs/fstestutil"
)

// Create an Ipfs.Node, a filesystem and a mount point.
Expand Down
4 changes: 2 additions & 2 deletions fuse/mfs/mfs_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"syscall"
"time"

"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"

dag "github.com/ipfs/boxo/ipld/merkledag"
ft "github.com/ipfs/boxo/ipld/unixfs"
Expand Down
4 changes: 2 additions & 2 deletions fuse/mount/fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"time"

"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
)

var ErrNotMounted = errors.New("not mounted")
Expand Down
24 changes: 24 additions & 0 deletions fuse/node/mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ func tryGFV() (string, error) {
}
log.Debug(err)

// try reading the macFUSE version plist (macFUSE 4+)
ov, err = tryMacFUSEPlist()
if err == nil {
return ov, nil
}
log.Debug(err)

return tryGFVFromFuseVersion()
}

Expand All @@ -179,6 +186,23 @@ func trySysctl() (string, error) {
return v, nil
}

// macFUSE 4+ no longer populates the osxfuse sysctl key. Read the version
// from the bundle plist that the installer always writes.
const macFUSEVersionPlist = "/Library/Filesystems/macfuse.fs/Contents/version.plist"

func tryMacFUSEPlist() (string, error) {
cmd := exec.Command("plutil", "-extract", "CFBundleShortVersionString", "raw", macFUSEVersionPlist)
out := new(bytes.Buffer)
cmd.Stdout = out
if err := cmd.Run(); err != nil {
log.Debug("mount: macFUSE version plist: failed")
return "", err
}
v := strings.TrimSpace(out.String())
log.Debug("mount: macFUSE version plist:", v)
return v, nil
}

func tryGFVFromFuseVersion() (string, error) {
if err := ensureFuseVersionIsInstalled(); err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion fuse/node/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"bazil.org/fuse"
"github.com/seaweedfs/fuse"

core "github.com/ipfs/kubo/core"
ipns "github.com/ipfs/kubo/fuse/ipns"
Expand Down
4 changes: 2 additions & 2 deletions fuse/readonly/ipfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ import (
"sync"
"testing"

"bazil.org/fuse"
"github.com/seaweedfs/fuse"

core "github.com/ipfs/kubo/core"
coreapi "github.com/ipfs/kubo/core/coreapi"
coremock "github.com/ipfs/kubo/core/mock"

fstest "bazil.org/fuse/fs/fstestutil"
chunker "github.com/ipfs/boxo/chunker"
"github.com/ipfs/boxo/files"
dag "github.com/ipfs/boxo/ipld/merkledag"
Expand All @@ -31,6 +30,7 @@ import (
ipld "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-test/random"
ci "github.com/libp2p/go-libp2p-testing/ci"
fstest "github.com/seaweedfs/fuse/fs/fstestutil"
)

func maybeSkipFuseTests(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions fuse/readonly/readonly_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
"os"
"syscall"

fuse "bazil.org/fuse"
fs "bazil.org/fuse/fs"
mdag "github.com/ipfs/boxo/ipld/merkledag"
ft "github.com/ipfs/boxo/ipld/unixfs"
uio "github.com/ipfs/boxo/ipld/unixfs/io"
Expand All @@ -21,6 +19,8 @@ import (
core "github.com/ipfs/kubo/core"
ipldprime "github.com/ipld/go-ipld-prime"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
fuse "github.com/seaweedfs/fuse"
fs "github.com/seaweedfs/fuse/fs"
)

var log = logging.Logger("fuse/ipfs")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/ipfs/kubo
go 1.25.7

require (
bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc
contrib.go.opencensus.io/exporter/prometheus v0.4.2
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239
github.com/blang/semver/v4 v4.0.0
Expand Down Expand Up @@ -70,6 +69,7 @@ require (
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/probe-lab/go-libdht v0.4.0
github.com/prometheus/client_golang v1.23.2
github.com/seaweedfs/fuse v1.2.3
github.com/stretchr/testify v1.11.1
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
github.com/tidwall/gjson v1.18.0
Expand Down
7 changes: 2 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc h1:utDghgcjE8u+EBjHOgYT+dJPcnDF05KqWMBcjuJy510=
bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
Expand Down Expand Up @@ -824,6 +822,8 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/seaweedfs/fuse v1.2.3 h1:VH4VF9D3yvuQBILqDbNttz7Whjgo3JBLfpZeecmYfm0=
github.com/seaweedfs/fuse v1.2.3/go.mod h1:iwbDQv5BZACY54r6AO/6xsLNuMaYcBKSkLTZVfmK594=
github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
Expand Down Expand Up @@ -895,8 +895,6 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ=
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM=
github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb h1:Ywfo8sUltxogBpFuMOFRrrSifO788kAFxmvVw31PtQQ=
github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb/go.mod h1:ikPs9bRWicNw3S7XpJ8sK/smGwU9WcSVU3dy9qahYBM=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
Expand Down Expand Up @@ -1179,7 +1177,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Loading