Flatpak (flatpak-build) fatal error when building submodules
Asked Answered
A

1

1

Following on from here, when using OpenSUSE Tumbleweed I cannot get flatpak-builder to compile submodule dependencies. I first noticed this issue when developing a console application within Gnome Builder using the Vala dependencies Gee and GXml.

As a test, I have installed org.gnome.Books.json and issued the following command (as documented here):

$ flatpak-builder --repo=repo books-app org.gnome.Books.json 

The outcome is the same as I observed when developing my own application, the fatal error:

Initializing build dir
Committing stage init to cache
Starting build of org.gnome.Books
fuse: failed to exec fusermount: Permission denied

<more stuff>

Cloning into '/home/robin/Projects-CSim/org.gnome.books/.flatpak-builder/build/gnome-online-accounts-1/telepathy-account-widgets'...
Submodule path 'telepathy-account-widgets': checked out '7d944b79961dfb6291110ceb27597a224d329b36'
error: Build directory /home/<user>/Projects/org.gnome.books/.flatpak-builder/rofiles/rofiles-D4R4cZ not initialized, use flatpak build-init
Error: module gnome-online-accounts: module gnome-online-accounts: Child process exited with code 1

Effectively it fails to build the very first submodule. This is the same behaviour that I observed when invoked from Gnome-Builder on my project; it downloaded but failed to build the very first submodule - in that case it was libgee-0.8.

I've double checked the Flatpak (V0.10.4) installation here and cannot find a solution. I understand from the documentation that invoking flatpak-builder should automatically invoke flatpak build-init.

This is worrisome as Gnome-Builder seems be using Flatpak as the default packager. Any suggestions?

Arst answered 23/2, 2018 at 10:48 Comment(0)
A
1

The problem is not Flatpak. It is a conflict between Flatpak and fuse. For some reason this was not occuring with valac or meson from the command line, only Flatpak.

From here we find a solution:

# chmod +x /usr/bin/fusermount

Is this a peculiarity of OpenSUSE Tumbleweed? In any case, after making this change, Flatpak builds submodules as expected. Magnificent!

Not sure about the security aspect of this, however - any comments would be welcomed.

Arst answered 23/2, 2018 at 11:18 Comment(1)
On openSUSE, fusermount is only executable by members oft he group trusted by default. The whole truth is more complicated, it depends on the permission level settings. See here for example.Myrt

© 2022 - 2024 — McMap. All rights reserved.