Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rclone uses fuse3 since v1.62.0 (2023-03-14) #291268

Closed
chrillefkr opened this issue Feb 24, 2024 · 2 comments · Fixed by #291585
Closed

rclone uses fuse3 since v1.62.0 (2023-03-14) #291268

chrillefkr opened this issue Feb 24, 2024 · 2 comments · Fixed by #291585
Labels
0.kind: bug Something is broken

Comments

@chrillefkr
Copy link

Describe the bug

rclone wrapper program in pkgs/applications/networking/sync/rclone/default.nix adds fuse 2.x to PATH, while rclone has seemingly moved over to use fuse 3.x. This seem to break rclone mount in certain cases when it's looking for fusermount3.

Steps To Reproduce

I'm trying to emulate whatever mount -t rclone does:

$ nix shell github:nixos/nixpkgs/nixpkgs-unstable#rclone
$ tail -F ~/rclone.log
[1] 1024832
tail: cannot open '/home/chris/rclone.log' for reading: No such file or directory
$ env -i RCLONE_DAEMON=true RCLONE_ALLOW_OTHER=true RCLONE_LOG_LEVEL=DEBUG RCLONE_LOG_FILE=/home/chris/rclone.log RCLONE_CONFIG=/etc/rclone.conf RCLONE_CACHE_DIR=/var/rclone /nix/store/f5hqbjla0k1s2dc3kcgbdyw6gjdis65n-rclone-1.65.2/bin/mount.rclone gdrive: /home/chris/Google\ Drive
2024/02/25 00:31:17 DEBUG : Home directory lookup failed and cannot be used as configuration location: exec: "getent": executable file not found in $PATH
2024/02/25 00:31:17 DEBUG : Failed to find user cache dir, using temporary directory: neither $XDG_CACHE_HOME nor $HOME are defined
2024/02/25 00:31:17 DEBUG : Setting --daemon "true" from environment variable RCLONE_DAEMON="true"
2024/02/25 00:31:17 DEBUG : Setting --allow-other "true" from environment variable RCLONE_ALLOW_OTHER="true"
2024/02/25 00:31:17 DEBUG : Setting --daemon "true" from environment variable RCLONE_DAEMON="true"
2024/02/25 00:31:17 DEBUG : Setting --allow-other "true" from environment variable RCLONE_ALLOW_OTHER="true"
2024/02/25 00:31:17 DEBUG : Setting --daemon "true" from environment variable RCLONE_DAEMON="true"
2024/02/25 00:31:17 DEBUG : Setting --allow-other "true" from environment variable RCLONE_ALLOW_OTHER="true"
2024/02/25 00:31:17 DEBUG : Setting --daemon "true" from environment variable RCLONE_DAEMON="true"
2024/02/25 00:31:17 DEBUG : Setting --allow-other "true" from environment variable RCLONE_ALLOW_OTHER="true"
2024/02/25 00:31:17 DEBUG : Setting --daemon "true" from environment variable RCLONE_DAEMON="true"
2024/02/25 00:31:17 DEBUG : Setting --allow-other "true" from environment variable RCLONE_ALLOW_OTHER="true"
2024/02/25 00:31:17 DEBUG : Setting --config "/etc/rclone.conf" from environment variable RCLONE_CONFIG="/etc/rclone.conf"
2024/02/25 00:31:17 DEBUG : Setting --cache-dir "/var/rclone" from environment variable RCLONE_CACHE_DIR="/var/rclone"
2024/02/25 00:31:17 DEBUG : Setting --log-level "DEBUG" from environment variable RCLONE_LOG_LEVEL="DEBUG"
2024/02/25 00:31:17 DEBUG : Setting --log-file "/home/chris/rclone.log" from environment variable RCLONE_LOG_FILE="/home/chris/rclone.log"
tail: '/home/chris/rclone.log' has appeared;  following new file
2024/02/25 00:33:33 DEBUG : rclone: Version "1.65.2" starting with parameters ["/nix/store/f5hqbjla0k1s2dc3kcgbdyw6gjdis65n-rclone-1.65.2/bin/mount.rclone" "mount" "gdrive:" "/home/chris/Google Drive" "--daemon"]
2024/02/25 00:33:33 DEBUG : Creating backend with remote "gdrive:"
2024/02/25 00:33:33 DEBUG : Using config file from "/etc/rclone.conf"
2024/02/25 00:33:34 DEBUG : Google drive root '': 'root_folder_id = 0AFATgfQBaiAeUk9PVA' - save this in the config to speed up startup
2024/02/25 00:33:34 DEBUG : rclone: Version "1.65.2" starting with parameters ["/nix/store/f5hqbjla0k1s2dc3kcgbdyw6gjdis65n-rclone-1.65.2/bin/.rclone-wrapped" "mount" "gdrive:" "/home/chris/Google Drive" "--daemon"]
2024/02/25 00:33:34 DEBUG : Creating backend with remote "gdrive:"
2024/02/25 00:33:34 DEBUG : Using config file from "/etc/rclone.conf"
2024/02/25 00:33:34 DEBUG : Google drive root '': 'root_folder_id = 0AFATgfQBaiAeUk9PVA' - save this in the config to speed up startup
2024/02/25 00:33:34 DEBUG : Google drive root '': Mounting on "/home/chris/Google Drive"
2024/02/25 00:33:34 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount3": executable file not found in $PATH

An easier example might be to use systemd.mount on NixOS:

{ config, pkgs, lib, ... }:
{
  # Ensure you've got /etc/rclone.conf setup before trying this

  system.activationScripts.makeRcloneDir = lib.stringAfter [ "var" ] ''
    mkdir -p /var/rclone
  '';
  environment.systemPackages = [
    pkgs.rclone
    pkgs.fuse3 # Doesn't help tho
  ];

  systemd.mounts = [
    {
      what = "gdrive:";
      where = "/mnt/gdrive";
      type = "rclone";
      options = "rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone,log-file=/var/rclone/log.txt,log-level=DEBUG";
    }
  ];
}

Expected behavior

I expect rclone to find fusermount3 by having it as a dependency.

Screenshots

N/A

Additional context

rclone uses fuse3 since v1.62.0 (2023-03-14):

Update to fuse3 after bazil.org/fuse update (Nick Craig-Wood)

Notify maintainers

@marsam @SuperSandro2000

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.10, NixOS, 23.11 (Tapir), 23.11.20240223.c5101e4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - channels(chris): `""`
 - nixpkgs: `/nix/store/80v3x99d9cl7h9fbhqrpajwg4vjyxg6y-source`

Add a 👍 reaction to issues you find important.

@chrillefkr chrillefkr added the 0.kind: bug Something is broken label Feb 24, 2024
SuperSandro2000 added a commit to SuperSandro2000/nixpkgs that referenced this issue Feb 26, 2024
@SuperSandro2000
Copy link
Member

Please test #291585

@chrillefkr
Copy link
Author

Tested it, and it works 👍 What should I do now? Close this issue, or wait until PR is merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants