From dd4f12ef27f088642725f6cc254515642a27ba32 Mon Sep 17 00:00:00 2001 From: 6t8k <58048945+6t8k@users.noreply.github.com> Date: Sat, 26 Aug 2023 18:42:37 +0200 Subject: [PATCH 1/3] fuse3: 3.11.0 -> 3.16.1 https://github.com/libfuse/libfuse/blob/fuse-3.16.1/ChangeLog.rst#libfuse-3161-2023-08-08 One change can be expected to break some setups: - Unsupported mount options are no longer silently accepted [1] For example, sshfs built against the present libfuse 3.11.0, `$ sshfs 127.0.0.1:/home/test/testdir /home/test/sshfs_mnt -o atime` terminates successfully (with the mount point established), while when built against 3.16.1, it outputs the error message `fuse: unknown option(s): `-o atime'` and terminates with exit status 1. --- pkgs/os-specific/linux/fuse/common.nix | 5 +++-- pkgs/os-specific/linux/fuse/default.nix | 6 ++--- .../fuse3-Do-not-set-FUSERMOUNT_DIR.patch | 5 +++-- .../linux/fuse/fuse3-install.patch | 22 ++++++++++--------- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix index bbd871a1b9ae..f4b8bfc5661a 100644 --- a/pkgs/os-specific/linux/fuse/common.nix +++ b/pkgs/os-specific/linux/fuse/common.nix @@ -1,4 +1,4 @@ -{ version, sha256Hash }: +{ version, hash }: { lib, stdenv, fetchFromGitHub, fetchpatch , fusePackages, util-linux, gettext, shadow @@ -17,7 +17,7 @@ in stdenv.mkDerivation rec { owner = "libfuse"; repo = "libfuse"; rev = "${pname}-${version}"; - sha256 = sha256Hash; + inherit hash; }; preAutoreconf = "touch config.rpath"; @@ -48,6 +48,7 @@ in stdenv.mkDerivation rec { mesonFlags = lib.optionals isFuse3 [ "-Dudevrulesdir=/udev/rules.d" "-Duseroot=false" + "-Dinitscriptdir=" ]; preConfigure = '' diff --git a/pkgs/os-specific/linux/fuse/default.nix b/pkgs/os-specific/linux/fuse/default.nix index 6aa3e46d4e1a..62d61ee1084c 100644 --- a/pkgs/os-specific/linux/fuse/default.nix +++ b/pkgs/os-specific/linux/fuse/default.nix @@ -7,11 +7,11 @@ let in { fuse_2 = mkFuse { version = "2.9.9"; - sha256Hash = "1yxxvm58c30pc022nl1wlg8fljqpmwnchkywic3r74zirvlcq23n"; + hash = "sha256-dgjM6M7xk5MHi9xPyCyvF0vq0KM8UCsEYBcMhkrdvfs="; }; fuse_3 = mkFuse { - version = "3.11.0"; - sha256Hash = "1wx80xxlvjn0wxhmkr1g91vwrgxssyzds1hizzxc2xrd4kjh9dfb"; + version = "3.16.1"; + hash = "sha256-9UYrZ+aYwoa7OmsmUGvOW9uBzTw+p+ugjTMiQIHQ804="; }; } diff --git a/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch b/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch index 903f30325df2..582d3eb0dec8 100644 --- a/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch +++ b/pkgs/os-specific/linux/fuse/fuse3-Do-not-set-FUSERMOUNT_DIR.patch @@ -1,12 +1,13 @@ +diff --git a/lib/meson.build b/lib/meson.build --- a/lib/meson.build +++ b/lib/meson.build @@ -37,8 +37,7 @@ libfuse = library('fuse3', libfuse_sources, version: meson.project_version(), soversion: '3', include_directories: include_dirs, dependencies: deps, install: true, link_depends: 'fuse_versionscript', -- c_args: [ '-DFUSE_USE_VERSION=35', +- c_args: [ '-DFUSE_USE_VERSION=312', - '-DFUSERMOUNT_DIR="@0@"'.format(fusermount_path) ], -+ c_args: [ '-DFUSE_USE_VERSION=35' ], ++ c_args: [ '-DFUSE_USE_VERSION=312' ], link_args: ['-Wl,--version-script,' + meson.current_source_dir() + '/fuse_versionscript' ]) diff --git a/pkgs/os-specific/linux/fuse/fuse3-install.patch b/pkgs/os-specific/linux/fuse/fuse3-install.patch index 147bcb439fb8..769e3088664c 100644 --- a/pkgs/os-specific/linux/fuse/fuse3-install.patch +++ b/pkgs/os-specific/linux/fuse/fuse3-install.patch @@ -1,18 +1,20 @@ ---- a/util/install_helper.sh 2019-07-10 12:00:15.984840142 +0200 -+++ b/util/install_helper.sh 2019-07-10 12:28:56.343011401 +0200 -@@ -37,10 +37,10 @@ - fi +--- a/util/install_helper.sh 2023-08-26 22:12:11.028651669 +0200 ++++ b/util/install_helper.sh 2023-08-26 22:38:03.165058694 +0200 +@@ -39,12 +39,12 @@ - install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \ + if [ "${udevrulesdir}" != "" ]; then + install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \ - "${DESTDIR}${udevrulesdir}/99-fuse3.rules" + "${sysconfdir}${udevrulesdir}/99-fuse3.rules" + fi - install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \ -- "${DESTDIR}/etc/init.d/fuse3" -+ "${sysconfdir}/init.d/fuse3" + if [ "$initscriptdir" != "" ]; then + install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \ +- "${DESTDIR}${initscriptdir}/fuse3" ++ "${sysconfdir}${initscriptdir}/fuse3" - - if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then + if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then + /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true diff --git a/util/meson.build b/util/meson.build index aa0e734..06d4378 100644 --- a/util/meson.build From dec8dd47cfaa5a036c222752dacc122df79fb75e Mon Sep 17 00:00:00 2001 From: 6t8k <58048945+6t8k@users.noreply.github.com> Date: Sat, 14 Oct 2023 17:06:38 +0200 Subject: [PATCH 2/3] fuse3: 3.16.1 -> 3.16.2 https://github.com/libfuse/libfuse/blob/fuse-3.16.2/ChangeLog.rst#libfuse-3162-2023-10-10 https://github.com/libfuse/libfuse/compare/fuse-3.16.1...fuse-3.16.2 --- pkgs/os-specific/linux/fuse/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/fuse/default.nix b/pkgs/os-specific/linux/fuse/default.nix index 62d61ee1084c..f692c2fb41c7 100644 --- a/pkgs/os-specific/linux/fuse/default.nix +++ b/pkgs/os-specific/linux/fuse/default.nix @@ -11,7 +11,7 @@ in { }; fuse_3 = mkFuse { - version = "3.16.1"; - hash = "sha256-9UYrZ+aYwoa7OmsmUGvOW9uBzTw+p+ugjTMiQIHQ804="; + version = "3.16.2"; + hash = "sha256-QO9s+IkR0rkqIYNqt2IYST6AVBkCr56jcuuz5nKJuA4="; }; } From 57909959384ea7b6d7f2d5732ddfdcce92f146b7 Mon Sep 17 00:00:00 2001 From: 6t8k <58048945+6t8k@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:50:04 +0200 Subject: [PATCH 3/3] nixos/doc: document backward incompatibility of fuse3 bump to 3.16.2 --- nixos/doc/manual/release-notes/rl-2311.section.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 79b2b3a73feb..f7cf6edddfbc 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -238,6 +238,18 @@ - `fileSystems..autoResize` now uses `systemd-growfs` to resize the file system online in stage 2. This means that `f2fs` and `ext2` can no longer be auto resized, while `xfs` and `btrfs` now can be. +- `fuse3` has been updated from 3.11.0 to 3.16.2; see [ChangeLog.rst](https://github.com/libfuse/libfuse/blob/fuse-3.16.2/ChangeLog.rst#libfuse-3162-2023-10-10) for an overview of the changes. + + Unsupported mount options are no longer silently accepted [(since 3.15.0)](https://github.com/libfuse/libfuse/blob/fuse-3.16.2/ChangeLog.rst#libfuse-3150-2023-06-09). The [affected mount options](https://github.com/libfuse/libfuse/commit/dba6b3983af34f30de01cf532dff0b66f0ed6045) are: `atime`, `diratime`, `lazytime`, `nolazytime`, `relatime`, `norelatime`, `strictatime`. + + For example, + + ```bash + $ sshfs 127.0.0.1:/home/test/testdir /home/test/sshfs_mnt -o atime` + ``` + + would previously terminate successfully with the mount point established, now it outputs the error message ``fuse: unknown option(s): `-o atime'`` and terminates with exit status 1. + - `nixos-rebuild {switch,boot,test,dry-activate}` now runs the system activation inside `systemd-run`, creating an ephemeral systemd service and protecting the system switch against issues like network disconnections during remote (e.g. SSH) sessions. This has the side effect of running the switch in an isolated environment, that could possible break post-switch scripts that depends on things like environment variables being set. If you want to opt-out from this behavior for now, you may set the `NIXOS_SWITCH_USE_DIRTY_ENV` environment variable before running `nixos-rebuild`. However, keep in mind that this option will be removed in the future. - The `services.vaultwarden.config` option default value was changed to make Vaultwarden only listen on localhost, following the [secure defaults for most NixOS services](https://github.com/NixOS/nixpkgs/issues/100192).