deja-dup: fix fusermount error

Currently the Meson option `fusermount_command` is set to a path in the Nix store, but `fusermount` requires setuid, so when trying to mount a restic backup, it fails with `fusermount: mount failed: Operation not permitted`. This commit instead patches deja-dup's `find-fusermount` script to use the setuid wrapper `/run/wrappers/bin/fusermount` if it exists.

I also switched the package from using fuse2 to fuse3 because both are supported and I didn't see a reason to use the older version.
This commit is contained in:
Anthony Wang
2026-01-10 21:15:04 -06:00
parent 862303d4db
commit 05c7601a6a
2 changed files with 15 additions and 2 deletions
@@ -0,0 +1,13 @@
diff --git a/libdeja/find-fusermount b/libdeja/find-fusermount
index 1b3211bb..95b35cf5 100755
--- a/libdeja/find-fusermount
+++ b/libdeja/find-fusermount
@@ -20,6 +20,8 @@
if [ ! -f /.flatpak-info ]; then
if [ -n "@FUSERMOUNT_CMD@" ]; then
echo "@FUSERMOUNT_CMD@"
+ elif [ -f /run/wrappers/bin/fusermount3 ]; then
+ echo /run/wrappers/bin/fusermount3
elif command -pv fusermount3 > /dev/null; then
command -pv fusermount3
elif command -pv fusermount > /dev/null; then
+2 -2
View File
@@ -21,7 +21,6 @@
json-glib,
borgbackup,
duplicity,
fuse,
rclone,
restic,
nix-update-script,
@@ -66,7 +65,6 @@ stdenv.mkDerivation (finalAttrs: {
# Check https://gitlab.gnome.org/World/deja-dup/-/blob/main/meson.options
(lib.mesonOption "borg_command" (lib.getExe borgbackup))
(lib.mesonOption "duplicity_command" (lib.getExe duplicity))
(lib.mesonOption "fusermount_command" (lib.getExe' fuse "fusermount"))
(lib.mesonOption "rclone_command" (lib.getExe rclone))
(lib.mesonOption "restic_command" (lib.getExe restic))
(lib.mesonEnable "packagekit" false) # packagekit-glib not packaged
@@ -79,6 +77,8 @@ stdenv.mkDerivation (finalAttrs: {
)
'';
patches = [ ./find-fusermount-setuid.patch ];
passthru = {
updateScript = nix-update-script { };
};