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

fuse: use fuse3 as default. #150502

Open
YellowOnion opened this issue Dec 13, 2021 · 5 comments
Open

fuse: use fuse3 as default. #150502

YellowOnion opened this issue Dec 13, 2021 · 5 comments

Comments

@YellowOnion
Copy link
Contributor

YellowOnion commented Dec 13, 2021

Describe the bug:

fuse3 has a bunch of updates that whitelist various file systems, exfat, bcachefs, etc.

nix-shell -p '(gocryptfs.override {fuse=fuse3;}).overrideAttrs (attrs: {propagatedBuildInputs = attrs.propagatedBuildInputs ++ [fuse3];})' fuse3

[nix-shell:~]$ gocryptfs ~/danie/Documents/crypt/ ~/crypt
Password: 
Decrypting master key
/run/wrappers/bin/fusermount: mounting over filesystem type 0xca451a4e is forbidden
fs.Mount failed: fusermount exited with code 256

fusermount is hardcoded here: https://github.com/hanwen/go-fuse/blob/3ab5d95a30ae25019bf030a2bab076dba61c27da/fuse/mount_linux.go#L219

but nixos packages fuse3 as fusermount3

Maybe it's time to make fuse3 the "default" as it's 4 years old, and fuse2 should explicitly provide fusermount2

Notify maintainers

@primeos

@colemickens
Copy link
Member

+1

@primeos
Copy link
Member

primeos commented Jan 1, 2022

It'd be nice if someone could check what other distributions do and if there are compatibility issues. Upstream recommends the 3 suffix. E.g. https://github.com/libfuse/libfuse/blob/d709c24cbd9e1041264c551c2a4445e654eaf429/ChangeLog.rst#libfuse-300-2016-12-08:

NOTE TO PACKAGERS:

libfuse 3 is designed to be co-installable with libfuse 2. However, some files will be installed by both libfuse 2 and libfuse 3 (e.g. /etc/fuse.conf, the udev and init scripts, and the mount.fuse(8) manpage). These files should be taken from libfuse 3. The format/content is guaranteed to remain backwards compatible with libfuse 2.

We recommend to ship libfuse2 and libfuse3 in three separate packages: a libfuse-common package that contains files shared by libfuse 2+3 (taken from the libfuse3 tarball), and libfuse2 and libfuse3 packages that contain the shared library and helper programs for the respective version.

The fusermount and mount.fuse binaries have been renamed to fusermount3 and mount.fuse3 to allow co-installation of libfuse 2.x and 3.x

I quickly looked at Ubuntu 20.04 LTS:

$ fusermount --version
fusermount version: 2.9.9
# But installing fuse3 will remove fuse:
$ apt -qqqs install fuse3
Inst libfuse3-3 (3.9.0-2 Ubuntu:20.04/focal [amd64])
Remv fuse [2.9.9-3] [ntfs-3g:amd64 ]
Inst fuse3 (3.9.0-2 Ubuntu:20.04/focal [amd64])
Conf libfuse3-3 (3.9.0-2 Ubuntu:20.04/focal [amd64])
Conf fuse3 (3.9.0-2 Ubuntu:20.04/focal [amd64])

And Debian 10: Same result (considering the major versions).

Edit: Arch seems to use that suffix for fuse3 as well: https://archlinux.org/packages/extra/x86_64/fuse3/

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 31, 2022
@oxalica
Copy link
Contributor

oxalica commented Jan 5, 2023

Another year passed, fuse 2.9.9, the latest release of fuse2, has been 4 years old. Also from its release note,

Note: This is a maintenance release from the 2.9 branch of libfuse. Users are encouraged to transition to the
actively developed libfuse 3.x.

Is it time for transition now?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 5, 2023
@S-NA
Copy link
Contributor

S-NA commented Mar 25, 2024

I ran into this recently for something I was working on. It would be nice to see fuse3 become the default, though from my initial impression, a lot of code bases do not work with simply swapping out fuse2 for fuse3. In the meantime, people can work around the forbidden mount issue by creating a tmpfs mount point.

@YellowOnion
Copy link
Contributor Author

I'm far more familiar with nix that I was when I originally opened this, this can probably be worked around by providing a fuse2 -> fuse wrapper (and a fuse3 -> fuse wrapper too) around specific packages that need fuse2, I think it makes more sense to default to the newer version and fix old packages, than stay on fuse2 indefinitely. One of the benefits of nix is being able to do this over expecting all software to work with the fusemount provided by the OS.

@primeos what are your thoughts?

@wegank wegank mentioned this issue Apr 3, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants