Compare commits

...

2 Commits

Author SHA1 Message Date
Armin Schrenk
e5fe5604c3 improve documentation of fusermount3 flatpak script 2026-05-06 16:26:31 +02:00
Armin Schrenk
74f36f20ea remove legacy fuse2 stuff 2026-05-05 17:49:22 +02:00

View File

@@ -1,15 +1,11 @@
#!/bin/sh
# From: https://gitlab.gnome.org/GNOME/gnome-builder/-/blob/main/build-aux/flatpak/fusermount-wrapper.sh
if [ -z "$_FUSE_COMMFD" ]; then
FD_ARGS=
else
FD_ARGS="--env=_FUSE_COMMFD=${_FUSE_COMMFD} --forward-fd=${_FUSE_COMMFD}"
fi
if [ -e /proc/self/fd/3 ] && [ 3 != "$_FUSE_COMMFD" ]; then
FD_ARGS="$FD_ARGS --forward-fd=3"
fi
exec flatpak-spawn --host --forward-fd=1 --forward-fd=2 $FD_ARGS fusermount3 "$@"
# based on https://gitlab.gnome.org/GNOME/gnome-builder/-/blob/main/build-aux/flatpak/fusermount-wrapper.sh
#
# Sandbox escape hatch to call fusermount3 on the host system
#
# * fusermount3 is required for mount and unmount
# * FUSE3 requires for mounting a socket for communication, its file descriptor id is given in the _FUSE_COMMFD variable
# * Forwarding fd 1 and fd 2 ensures to catch process output of the fuse process
# * watch-bus ensures when the flatpak exits, also this process is killed
exec flatpak-spawn --host --watch-bus --forward-fd=1 --forward-fd=2 --env=_FUSE_COMMFD=${_FUSE_COMMFD} --forward-fd=${_FUSE_COMMFD} fusermount3 "$@"