Building Flatpak KDE Runtime

Hello,

I was trying to build the Flatpak KDE Runtime in order to test a small change, but unfortunately it does not seem to work. This is probably more of a general flatpak question so I hope the question is still welcome around here :slight_smile:

After cloning the repository (Packaging / Flatpak KDE Runtime 路 GitLab) and the desired branch (qt5.15lts-23.08) I made my change inside the .json.in file and try to build it using the provided Makefile. After that, it starts building and seems to succeed in building all the modules (yay!).

However, the cleanup step fails (while executing freedesktop-post.sh):

Cleaning up
Warning: Schema 鈥渙rg.gnome.system.locale鈥 has path 鈥/system/locale/鈥.  Paths starting with 鈥/apps/鈥, 鈥/desktop/鈥 or 鈥/system/鈥 are deprecated.
Warning: Schema 鈥渙rg.gnome.system.proxy鈥 has path 鈥/system/proxy/鈥.  Paths starting with 鈥/apps/鈥, 鈥/desktop/鈥 or 鈥/system/鈥 are deprecated.
Warning: Schema 鈥渙rg.gnome.system.proxy.http鈥 has path 鈥/system/proxy/http/鈥.  Paths starting with 鈥/apps/鈥, 鈥/desktop/鈥 or 鈥/system/鈥 are deprecated.
Warning: Schema 鈥渙rg.gnome.system.proxy.https鈥 has path 鈥/system/proxy/https/鈥.  Paths starting with 鈥/apps/鈥, 鈥/desktop/鈥 or 鈥/system/鈥 are deprecated.
Warning: Schema 鈥渙rg.gnome.system.proxy.ftp鈥 has path 鈥/system/proxy/ftp/鈥.  Paths starting with 鈥/apps/鈥, 鈥/desktop/鈥 or 鈥/system/鈥 are deprecated.
Warning: Schema 鈥渙rg.gnome.system.proxy.socks鈥 has path 鈥/system/proxy/socks/鈥.  Paths starting with 鈥/apps/鈥, 鈥/desktop/鈥 or 鈥/system/鈥 are deprecated.
Fontconfig error: Cannot load config file "/run/host/font-dirs.xml": No such file: /run/host/font-dirs.xml
chmod: changing permissions of '/etc/pki/ca-trust/extracted/README': Read-only file system
chmod: changing permissions of '/etc/pki/ca-trust/extracted/edk2/README': Read-only file system
chmod: changing permissions of '/etc/pki/ca-trust/extracted/java/README': Read-only file system
chmod: changing permissions of '/etc/pki/ca-trust/extracted/openssl/README': Read-only file system
chmod: changing permissions of '/etc/pki/ca-trust/extracted/pem/README': Read-only file system
Error: Der Kindprozess wurde mit Status 1 beendet
make: *** [Makefile:23: org.kde.Sdk.app] Fehler 1
rm org.kde.Sdk.json
make  8,66s user 14,84s system 22% cpu 1:43,65 total

While I鈥檓 still new to building flatpaks, this seems to make sense to me as /etc/* shouldn鈥檛 be writable (?). When inspecting the script, the corresponding line (chmod -R ... /etc/pki/ca-trust/extracted) is referenced to come from freedesktop鈥檚 ca-certificates.bst (elements/components/ca-certificates.bst 路 release/23.08 路 freedesktop-sdk / freedesktop-sdk 路 GitLab). I assume that this part was written by people a lot more knowledgeable than me and that it should indeed work :slight_smile:

So there鈥檚 obviously something I鈥檓 missing here and I have some hope that maybe someone could help me out. Thanks a lot!

Are you building from inside a container? You might need to pass --disable-rofiles-fuse to flatpak-builder: Makefile: Disable rofiles-fuse when run in a container (e19fc74f) 路 Commits 路 Packaging / Flatpak KDE Runtime 路 GitLab

Try deleting the .flatpak-builder in the repo and try again

Hello everyone and thanks for your help!

I did try to build it on my Arch Linux host with the current flatpak-builder package from the repos (1.4.2-1), no containers involved. However, --disable-rofiles-fuse did the trick!

When I have a lot of time on my hands again to do a full rebuild I will also check if deleting .flatpak-builder helps. Maybe also on a second machine using Fedora to see if this is reproducible on another setup.

Thanks again!

Today I tried to do another build on on another system using Fedora Kinoite 40 using flatpak-builder from org.flatpak.Builder, which gives the same result. Does a flatpak run environment count as containerized :wink: ? It certainly doesn鈥檛 exhibit a /run/.containerenv file.

I think I鈥檒l try to come up with a more minimal example and see if this works in a VM using 鈥渂are-metal鈥 flatpak-builder. My guess is that this will not work either. Is anybody a bit more knowledgeable about flatpak internals willing to support me a bit with debugging this in order to write a useful bug report?