#62315 closed defect (fixed)
rclone is missing the "mount" command
Reported by: | huyz (Huy Z) | Owned by: | eborisch (Eric A. Borisch) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jjstickel (Jonathan Stickel) | |
Port: | rclone |
Description
The rclone binary wasn't built with support for the "mount" command:
❯ rclone version rclone v1.54.0-DEV - os/arch: darwin/amd64 - go version: go1.15.8 ❯ rclone mount --help Error: unknown command "mount" for "rclone" Run 'rclone --help' for usage. 2021/02/18 16:52:16 Fatal error: unknown command "mount" for "rclone"
However, if I download the binary from rclone.org via
curl https://rclone.org/install.sh | sudo bash
then the "mount" command is included:
❯ /opt/local/bin/rclone-from-website version rclone v1.54.0 - os/arch: darwin/amd64 - go version: go1.15.7 ❯ /opt/local/bin/rclone-from-website mount --help rclone mount allows Linux, FreeBSD, macOS and Windows to mount any of Rclone's cloud storage systems as a file system with FUSE. [...]
Change History (14)
comment:1 Changed 4 years ago by jmroot (Joshua Root)
Owner: | set to eborisch |
---|---|
Status: | new → assigned |
comment:2 follow-up: 8 Changed 3 years ago by eejd
comment:3 Changed 3 years ago by eborisch (Eric A. Borisch)
Patches welcome, or if someone would like to try out the proposed compilation and let us know what works… I personally have not had time to play with this.
comment:4 Changed 3 years ago by eejd
Can I ask how the port is being produced and distributed currently? I realized that I was testing on an M1 MacBook and noticed the version is derived from "v1.55.1-DEV" rather than what I assume was the released "v1.55.1". I did a test install from the rclone repo via the basic "install.sh" script and rclone showed the (new) mount command.
From the rclone repo install
/usr/local/bin/rclone version rclone v1.55.1 - os/type: darwin - os/arch: arm64 - go/version: go1.16.3 - go/linking: dynamic - go/tags: cmount
/opt/local/bin/rclone version rclone v1.55.1-DEV - os/type: darwin - os/arch: arm64 - go/version: go1.16.3 - go/linking: dynamic - go/tags: none
I'm happy to submit a patch, but I am unclear on how the macports binary is being built as when I try to build (with "build_arch arm64" and "universal_archs arm64 x86_64" I get:
sudo port -s build rclone ---> Computing dependencies for rclone Error: Cannot install rclone for the arch 'x86_64' because Error: its dependency go does not build for the required arch by default Error: and does not have a universal variant. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port rclone failed
So, I think the build just needs to be moved to the "tag/cmount" on "v1.55.1" but I don't know how to provide the patch.
comment:5 Changed 3 years ago by eborisch (Eric A. Borisch)
Ugh. I forgot this was a go port. I still don't grok go's building process, so I unfortunately can't be all that much help.
I note the Homebrew's rclone formulae also doesn't support the mount command. I haven't dug into any history over there to see why that's the case, but it is another data point.
comment:6 Changed 3 years ago by gpolitis (George Politis)
I just wanted to share a workaround until this issue is fixed. rclone serve webdav and then mount the webdav server in Finder !
comment:7 Changed 3 years ago by jjstickel (Jonathan Stickel)
Cc: | jjstickel added |
---|
comment:8 follow-up: 9 Changed 3 years ago by jjstickel (Jonathan Stickel)
Replying to eejd:
Is there any progress on this? I understand that we need to not use 'mount' but to compile rclone with '(c)mount' support using libfuse, which removes the dependency on MacFUSE. Alternatively, it might make sense to have 'macfuse' (mount), 'libfuse' ((c)mount) if we want to keep support for those using MacFUSE. Is there some other blocker other than changing the compile config? As I understand things, the version here (1.55) supports the 'cmount' libfuse version but is already called 'mount'.
It seems the direct Mac binary download from rclone.org support cmount. But where do you get libfuse
from that is not macFUSE?
comment:9 Changed 3 years ago by jjstickel (Jonathan Stickel)
Replying to jjstickel:
It seems the direct Mac binary download from rclone.org support cmount. But where do you get
libfuse
from that is not macFUSE?
As far as I can tell, macFuse is definitely required, and installing/using it has now become a bit onerous for macOS 11+, especially for M1 (https://github.com/osxfuse/osxfuse/issues/828). Otherwise, direct download of rclone from https://rclone.org/downloads/ works fine. So, I guess the question is, is there much value in Macports offering its own compiled rclone? Maybe to track version updates and to allow use via webdav as mentioned by @gpolitis (I haven't tried it myself).
comment:10 Changed 2 years ago by herbygillot (Herby Gillot)
This change by @bnoctis adds the mount command as a variant: https://github.com/macports/macports-ports/commit/0f043fc8b8a6db9ac2f3ced4f8f3fbe3bf042312
This should now be available as:
sudo port install rclone +mount
comment:11 follow-up: 12 Changed 2 years ago by huyz (Huy Z)
The variant is good enough for me. Should this ticket be closed now?
comment:12 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Replying to huyz:
The variant is good enough for me. Should this ticket be closed now?
Sure, sounds like this is resolved.
comment:13 follow-up: 14 Changed 2 years ago by jmon12
Glad to find this suitable variant.
However, it doesn't seem to work for me. The installation and the build process go very well with the +mount
extension. But when I try to mount a google drive (where the rclone lsd
command works fine for example, e.g. well configured), the following error is displayed: mount failed: cgofuse: cannot find FUSE
>>> rclone -vv mount gdrive: /Volumes/gdrive 2022/10/28 17:13:50 DEBUG : rclone: Version "v1.60.0" starting with parameters ["rclone" "-vv" "mount" "UOCgdrive:" "/Volumes/gdrive"] 2022/10/28 17:13:50 DEBUG : Creating backend with remote "gdrive:" 2022/10/28 17:13:50 DEBUG : Using config file from "/Users/me/.config/rclone/rclone.conf" 2022/10/28 17:13:50 DEBUG : Google drive root '': 'root_folder_id = XXXXXXXXXX' - save this in the config to speed up startup 2022/10/28 17:13:51 DEBUG : Mounting on "/Volumes/gdrive" ("gdrive") 2022/10/28 17:13:51 DEBUG : Adding "-o modules=iconv,from_code=UTF-8,to_code=UTF-8-MAC" for macOS 2022/10/28 17:13:51 DEBUG : Google drive root '': Mounting with options: ["-o" "attr_timeout=1" "-o" "fsname=gdrive:" "-o" "subtype=rclone" "-o" "max_readahead=131072" "-o" "atomic_o_trunc" "-o" "daemon_timeout=600" "-o" "volname=gdrive" "-o" "noappledouble" "-o" "modules=iconv,from_code=UTF-8,to_code=UTF-8-MAC"] 2022/10/28 17:13:51 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed: cgofuse: cannot find FUSE
Note that I needed to install macfuse
manually since it was not added to the deps automatically. From what I understood of the portfile, it should do so: depends_run-append port:macfuse
if the variant is used. (Or is it only for runtime?)
Here is the output of rclone --version
:
rclone v1.60.0 - os/version: darwin 12.6.1 (64 bit) - os/kernel: 21.6.0 (arm64) - os/type: darwin - os/arch: arm64 - go/version: go1.19.2 - go/linking: dynamic - go/tags: cmount noselfupdate
And of uname -a
21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 arm64
What am I missing?
I'm not used to go
at all, but maybe I should have go-devel
installed instead of the go
port...
PS: I'm sorry if I broke some convention by commenting in a closed ticket. Please let me know if that's the case and excuse me. In that case I'll open a dedicated ticket.
comment:14 Changed 5 months ago by gpolitis (George Politis)
Replying to jmon12:
Glad to find this suitable variant. However, it doesn't seem to work for me. The installation and the build process go very well with the
+mount
extension. But when I try to mount a google drive (where therclone lsd
command works fine for example, e.g. well configured), the following error is displayed:mount failed: cgofuse: cannot find FUSE
Have you run these steps? (quoting https://rclone.org/commands/rclone_mount/#macfuse-notes)
sudo mkdir /usr/local/lib cd /usr/local/lib sudo ln -s /opt/local/lib/libfuse.2.dylib
Is there any progress on this? I understand that we need to not use 'mount' but to compile rclone with '(c)mount' support using libfuse, which removes the dependency on MacFUSE. Alternatively, it might make sense to have 'macfuse' (mount), 'libfuse' ((c)mount) if we want to keep support for those using MacFUSE. Is there some other blocker other than changing the compile config? As I understand things, the version here (1.55) supports the 'cmount' libfuse version but is already called 'mount'.