Open Cogitri opened 4 years ago
Its something localized to your system considering the same manifest builds on flathubs servers fine.
It appears that this happens for multiple Alpine users, so I don't think this is localized to my system - it might be to Alpine (as a host?) though. I'm not exactly sure where to dig for this though.
I guess I missed the title, yeah musl or non-gnu coreutuils is likely relevant.
Doesn't it use the tooling from the flatpak SDK though?
It does. The problem here is FUSE, or rather something that causes it to behave differently with musl. Build should work fine if you pass --disable-rofiles-fuse
to flatpak-builder. From strace:
stat("/app/bin/apply_extra", {st_mode=S_IFREG|0755, st_size=175, ...}) = 0
mkdir("/app", 0755) = -1 EEXIST (File exists)
openat(AT_FDCWD, ".", O_RDONLY) = 3</run/build/protonmail-bridge>
chdir("/app") = -1 EINVAL (Invalid argument)
Ah yes, it works fine with --disable-rofiles-fuse
, thanks for the workaround :)
I also can reproduce. Note that it breaks GNOME Builder.
We'll just force-disable rofiles-fuse on Alpine for now, see https://gitlab.alpinelinux.org/alpine/aports/merge_requests/5738.
I doubt it it related to musl. It is the syscall chdir
that fails. Could it be a race condition? that /app
is removed before chdir("/app")
happens?
Hm, this has only been reproducible on Alpine Linux and Void Linux Musl for me though
It's literally first creating the directory it's trying chdir
into, there is no threads that could snatch that dir before it's entered. The bug exposed by musl is rather in ostree (rofiles-fuse) or FUSE itself.
Linux distribution and version
Alpine Linux Edge
Flatpak-builder version
1.0.9
Flatpak version
1.6.2
Description of the problem
Building anything that calls
mkdir
orinstall -d
with flatpak-builder fails when using flatpak-builder on a musl based distro, duringmake install
this happens:Steps to reproduce
This can be reproduced with the following Dockerfile:
Build it using:
docker build -t flatpak-builder .
with theDockerfile
in the same dir and run it withdocker container run --privileged --cap-add SYS_ADMIN --cap-add MKNOD --device /dev/fuse -it --rm flatpak-builder flatpak-builder build ch.protonmail.protonmail-bridge.yaml
. The build fails with: