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

fuse3: use /etc/fuse.conf for configuration #59043

Merged
merged 1 commit into from Apr 7, 2019

Conversation

matthewbauer
Copy link
Member

We don’t want the config file to be read only.

Fixes #59021

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

We don’t want the config file to be read only.
@Yarny0
Copy link
Contributor

Yarny0 commented Apr 7, 2019

(Review per top comment in PULL_REQUEST_TEMPLATE.md and doc/reviewing-contributions.xml)

Reviewed points
  • package name fits guidelines (no change)
  • package version fits guidelines (no change)
  • package build on x86_64-linux
  • executables tested on x86_64-linux (only fusermount3)
  • all depending packages build: only sshfs package for testing!
Possible improvements
  • I'm not sure if it might be wiser to set the path to fuse.conf with the compiler flag -DFUSE_CONF=/etc/fuser.conf.
    • It would probably be more robust than patching build system scripts (the patched file might changed in newer fuse versions).
    • It would hardcode the sysconfig path /etc in CC flags making this path harder to be changed.
    • The build system also uses -DFUSE_CONF to set this path. I tested this and using NIX_CFLAGS_COMPILE="-DFUSE_CONF=\"/etc/fuse.conf\"" prevails over the FUSE_CONF setting of fuse's build scripts, but I don't how if this precedence can be guaranteed at all times.
Comments
  • Tested with nixos-unstable and nixos-19.03, with sshfs (that is based on fuse3) with the user_allow_other option in /etc/fuse.conf. It works great.
  • I suggest backporting this to 19.03, maybe even 18.09 if it merges without conflicts.
  • Ping fuse maintainer @primeos

@primeos
Copy link
Member

primeos commented Apr 7, 2019

@Yarny0 thank you very much for the great review :)

Regarding the possible improvement: Yes, that's a good idea but I also have some doubts that the behaviour could change in the future. Since I don't mind updating the patch if the file changes I'll merge it as it is but we/I could consider making an upstream PR to make it easier to configure (e.g. by introducing a Meson option). And thanks for the pinging me :)

Edit: @matthewbauer I've changed the commit message slightly - hope that's ok.

@primeos primeos changed the title fuse: use /etc/fuse.conf for configuration fuse3: use /etc/fuse.conf for configuration Apr 7, 2019
@primeos primeos merged commit 5541559 into NixOS:master Apr 7, 2019
primeos pushed a commit to primeos/nixpkgs that referenced this pull request Apr 8, 2019
We don’t want the config file to be read only and in the Nix store.

(cherry picked from commit 5541559)
Reason: Backport a trivial fix for NixOS#59021.
primeos added a commit that referenced this pull request Apr 8, 2019
[19.03] fuse3: use /etc/fuse.conf for configuration (backport of #59043)
@primeos
Copy link
Member

primeos commented Apr 8, 2019

Backported to 19.03 in #59166. Since 19.03 should be released very soon (today?) it should be okay to skip 18.09 (feel free to make a PR and/or ping me if someone desperately needs this on 18.09 ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants