<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have been working on getting Flatpak on Sailfish device. It doesn't work yet, but let me give a short overview of the status.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Why: Flatpak would allow us to get latest Qt base, 5.12 and 5.13 are available already. There are other advantages, as collaboration between Linux mobile communities via the same app format, for example. Although, we do loose native feel until Silica can be packaged as a part of an app.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Current longer-term limitations: As Lipstick (?) supports wl-shell only, Gdk apps as distributed in Flatpak don't support that older standard, they refuse to start.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Status:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Packages are available at <a href="https://build.merproject.org/project/show/home:rinigus:flatpak">https://build.merproject.org/project/show/home:rinigus:flatpak</a>. By installing `flatpak` you will pull the dependencies as well. For me it was</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The following 11 NEW packages are going to be installed:<br>  flatpak flatpak-session-helper gdk-pixbuf json-glib libappstream-glib libcroco librsvg libseccomp ostree-libs<br>  xdg-dbus-proxy xdg-desktop-portal<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"> After installation, set /usr/libexec/flatpak-bwrap to setuid. Without it we get issues with /proc mounting in flatpak (bwrap: Can't mount proc on /newroot/proc: Device or resource busy).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">To use, reboot the device. While running commands leading to download of an app/platform/sdk, I am getting gpg-connect-agent error messages. Seems like we can ignore them for now.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Just install and running fails, probably due to OpenGLES in Qt case. For Gnome apps, I am getting error with "Wayland compositor does not provide any supported shell interface", so those are out (for now, at least).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">For Qt, I have added manually an extension (as in <a href="https://blog.tingping.se/2018/08/26/flatpak-host-extensions.html">https://blog.tingping.se/2018/08/26/flatpak-host-extensions.html</a> and <a href="https://gitlab.com/debian-pm/halium/flatpak-extension-libhybris">https://gitlab.com/debian-pm/halium/flatpak-extension-libhybris</a>). Right now, I have made /var/lib/flatpak/extension/org.freedesktop.Platform.GL.default/arm/1.4/lib and added content similar to the one generated by <a href="https://gitlab.com/debian-pm/halium/flatpak-extension-libhybris/blob/master/debian/flatpak-extension-libhybris.postinst.in">https://gitlab.com/debian-pm/halium/flatpak-extension-libhybris/blob/master/debian/flatpak-extension-libhybris.postinst.in</a> with few additions, such as linker/o.so. Applications are installed using --user and run with several environment variables to help hybris out, as shown in strace run below:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default">flatpak run --devel --command=strace --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/default/lib --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/default/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/default/lib/libhybris/linker org.kde.falkon /app/bin/falkon<br></div><div class="gmail_default"></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">While I can get into Flatpak sandbox (using command sh), GUI has opened only once on a qtdemo app, but without hybris extension. In case of Falkon, strace ends on <br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">fstatat64(AT_FDCWD, "/dev/__properties__", 0xffef3fa8, 0) = -1 ENOENT (No such file or directory)<br>openat(AT_FDCWD, "/dev/__properties__", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br>--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x684} ---<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">which is missing in the flatpak sandbox, indeed. For few other apps, it ended earlier on failing to find libhardware.so (curiously, found by falkon sandbox).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">That's pretty much it at this moment. All being tested on SFOS <a href="http://3.2.1.20/AOSP9">3.2.1.20/AOSP9</a> based port. Did not work in emulator with what looked to be missing kernel config options.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">As far as I read, Plasma Mobile has hybris/flatpak working and I will try to get in touch with them. Would be great to get help - maybe someone would like to join and try to make it work together. At this moment I have spent few nights to get it packaged and haven't poked it too much.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Cheers,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Rinigus</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">PS: Full range of portals (GUI for requesting file access and such) needs to be written. But that can wait till it gets working first.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div>