Subject: Re: [bug#73842] [PATCH v5 2/3] pack: Add support for AppImage pack format.

From: Ludovic Courtès <[email-masked]>
Date: Fri, 15 Nov 2024 18:02:07 +0100

Hello Noé,

The patch series LGTM, and tests pass: we’re all set!

But… one thing I noticed when trying it out is that the resulting
AppImage would fail to run on relatively bare-bones non-Guix systems:

--8<---------------cut here---------------start------------->8---
$ ./2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage 
fuse: failed to exec fusermount3: No such file or directory

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory
--8<---------------cut here---------------end--------------->8---

I wonder if there’s something that can be done on our side about it or
if it’s a limitation of the approach (I expect the latter: ‘fusermount’
has to be available and setuid root), in which case we could just add a
warning in the manual.

WDYT?

Interestingly, it works on my Guix System laptop, except if I strace it:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage 
Hello, world!
$ strace -f -o /tmp/log.strace -s 500 /gnu/store/2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage 
fusermount3: mount failed: Operation not permitted

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory
$ grep 'mount(' /tmp/log.strace 
17569 mount("2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage", "/tmp/.mount_2i2l6iLZ8WYZ", "fuse.2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage", MS_RDONLY|MS_NOSUID|MS_NODEV, "fd=5,rootmode=40000,user_id=1000,group_id=998") = -1 EPERM (Operation not permitted)
17570 mount("2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage", ".", "fuse.2i2l6irl2n8q24aimfmidvlglllc4s8z-hello-appimage-pack.AppImage", MS_RDONLY|MS_NOSUID|MS_NODEV, "fd=6,rootmode=40000,user_id=1000,group_id=998") = -1 EPERM (Operation not permitted)
17571 mount("/dev/fuse", ".", "fuse", MS_RDONLY|MS_NOSUID|MS_NODEV, "fd=6,rootmode=40000,user_id=1000,group_id=998") = -1 EPERM (Operation not permitted)
--8<---------------cut here---------------end--------------->8---

Ludo’.