maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Flatpak on Sailfish OS (https://talk.maemo.org/showthread.php?t=100909)

Kabouik 2020-02-04 22:45

Re: Flatpak on Sailfish OS
 
4 Attachment(s)
It worked for me on the Pro¹ with some warnings that I guess are minor since Angelfish runs. All steps after the "reboot" step in the Github instructions were run immediately after reboot, the screen didn't turn off once. I'm looking forward to being able to install other apps in the future!

lal 2020-02-05 04:27

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565062)
I have heard that Flathub has sometimes net issues, but usually its not too bad. I wonder now whether your phone enters suspend and looses connection because of that. In this case, the timeouts could come with switched off screen, but not with display on.

I would rule out the chances of phone suspending. I was pretty eager to see the result of the operation and kept it alive :D

Also, thanks to the intelligent timeout/suspension management in Sailfish OS (mce takes care of that?) that the screen stays on longer during the next cycle if woken up during the dimming phase.

rinigus 2020-02-07 16:40

Re: Flatpak on Sailfish OS
 
Turned out that the issue with Pure Maps was not OpenGL, but internal Mapbox code used to download tiles. As I was using hybrid version for Mapbox GL and not pure Qt one (due to a bug in old Qt used by SFOS), this somehow triggered an issue. So, GL part is working fine (well, maybe with some other issues).

coderus 2020-02-07 18:44

Re: Flatpak on Sailfish OS
 
should be flatpak-maliit-plugin-qt instead

rinigus 2020-02-15 11:47

Re: Flatpak on Sailfish OS
 
New releases of Flatpak Runner and Maliit keyboard plugin are out. It is now possible to ask Flatpak Runner to take into account whether the keyboard is shown and, if it is, reduce the window used by application accordingly. As there is a temporary side-effect while Wayland application window is changed (old content scaled to the new size and then redrawn), I made this feature opt-in. Usually its not needed, but sometimes is handy. Examples when its needed: setting homepage and search options in Angelfish.

The packages are available at OBS.

Meanwhile, I am mainly working on Angelfish. Its progressing nicely and already is the main SFOS browser for me. Some changes are not merged yet (auto-hiding of navigation bar), some changes have to be written. But we are making progress with KDE developers.

Ironically, TMO is the worst site right now. As WebEngine doesn't handle HIDPI that well, I have to scale window up and TMO just doesn't fit on portrait when the minimal font is imposed.

claustn 2020-02-16 19:06

Re: Flatpak on Sailfish OS
 
Is it possible to run flatpak on a Nexus 5? With the latest Sailfish but based on an "old" CM 12.

rinigus 2020-02-16 19:16

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by claustn (Post 1565399)
Is it possible to run flatpak on a Nexus 5? With the latest Sailfish but based on an "old" CM 12.

Give it a try. I don't know, tbh. The bug that I fixed in hybris was introduced for Android 6 and above. It may work just out of the box. Unless there is something missing in the kernel... So, try and let us know.

claustn 2020-02-17 07:05

Re: Flatpak on Sailfish OS
 
Trying to run Angelfish gives me the following output. It opens an empty window.

Code:

,---
| Sailfish OS 3.2.0.12 (Torronsuo)
'---
[nemo@Sailfish ~]$ flatpak-runner org.kde.mobile.angelfish
Starting: org.kde.mobile.angelfish
[D] unknown:0 - Using Wayland-EGL
Wayland socket: ../../display/wayland-1
WAYLAND_DISPLAY="../../display/wayland-1" FLATPAK_MALIIT_CONTAINER_DBUS="unix:abstract=/tmp/dbus-MM6gVH7U7S,guid=2cd4ffbf50593a6028484a0e5e4a3ad2" flatpak run --env=QT_WAYLAND_FORCE_DPI=442 --filesystem=/system:ro --filesystem=/vendor:ro --filesystem=/odm:ro --device=all --talk-name=org.maliit.server --filesystem=/opt/flatpak/maliit/org.kde.Platform/arm/5.12:ro --env=QT_PLUGIN_PATH=/app/lib64/plugins:/app/lib/plugins:/usr/share/runtime/lib/plugins:/opt/flatpak/maliit/org.kde.Platform/arm/5.12 --env=QT_QUICK_CONTROLS_MOBILE=1 --env=QT_QUICK_CONTROLS_STYLE=Plasma --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris/linker --env=HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/libexec/droid-hybris/system/lib:/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/lib org.kde.mobile.angelfish
[D] onCompleted:389 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool
error: app/org.kde.mobile.angelfish/arm/master not installed
[D] expression for onExit:58 - Skipping quit as it will hang the window. Proper exit is needed


rinigus 2020-02-17 07:11

Re: Flatpak on Sailfish OS
 
Few quick checks:

- have you rebooted after installing flatpak? If you didn't, please do so

- have you installed Angelfish using --user?

- what does `flatpak list` return in terminal?

- Try to enter Flatpak environment by running: flatpak run --command=sh org.kde.mobile.angelfish

The last command should give you a prompt inside Flatpak. If something is wrong, it will fail.

claustn 2020-02-17 21:22

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565409)
Few quick checks:

- have you rebooted after installing flatpak? If you didn't, please do so
- Yes I rebooted
- have you installed Angelfish using --user?
- Yes
- what does `flatpak list` return in terminal?

- Try to enter Flatpak environment by running: flatpak run --command=sh org.kde.mobile.angelfish

The last command should give you a prompt inside Flatpak. If something is wrong, it will fail.

My bad, I didn't complete the installation. Anyway, now it does not start with the following output:
Code:

[nemo@Sailfish ~]$ flatpak run --command=sh org.kde.mobile.angelfishbwrap: Creating new namespace failed: Invalidargumenterror: ldconfig failed, exit status 256
[nemo@Sailfish ~]$ devel-su
[root@Sailfish nemo]# ldconfig
[root@Sailfish nemo]# exit
[nemo@Sailfish ~]$ flatpak run --command=sh org.kde.mobile.angelfishbwrap: Creating new namespace failed: Invalidargumenterror: ldconfig failed, exit status 256
[nemo@Sailfish ~]$ devel-su
[root@Sailfish nemo]# flatpak-runner org.kde.mobile.angelfisherror: XDG_RUNTIME_DIR not set in the environment.[C] unknown:0 - Failed to create display (No such file or directory)[root@Sailfish nemo]#

Flatpak list output:
Code:

[nemo@Sailfish ~]$ flatpak list
Name            Application ID                Version Branch Origin  Installation
html5-codecs    …esktop.Platform.html5-codecs        18.08  flathub user
KDE Application… org.kde.Platform                      5.12  flathub user
Angelfish Webbr… org.kde.mobile.angelfish              master kdeapps user


rinigus 2020-02-18 06:59

Re: Flatpak on Sailfish OS
 
Critical error is

Creating new namespace failed

As for ldconfig, its running inside flatpak environment, different from the system one. For namespaces, kernel needs to have support for it. Check out what you get from

# zcat /proc/config.gz | grep _NS

I have the following:

CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y

I am sure that USER_NS is needed, but that should be there for older kernels as well: https://cateee.net/lkddb/web-lkddb/USER_NS.html

So, I suspect you need to recompile your kernel.

claustn 2020-02-18 14:46

Re: Flatpak on Sailfish OS
 
You're right:

Code:

# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_NET_NS=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y

I think my tests stop here then, I don't have the knowledge to recompile the kernel.

rinigus 2020-02-18 14:48

Re: Flatpak on Sailfish OS
 
Understood. At least we know why. Now, I suggest you to ask the maintainer of the port to recompile the kernel. As the options are there, its relatively easy.

edp17 2020-02-20 01:04

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565435)
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y

Do you know from which kernel version do we have these flags in the kernel? I am curious whether they are available in kernel 3.0?

rinigus 2020-02-20 06:59

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by edp17 (Post 1565484)
Do you know from which kernel version do we have these flags in the kernel? I am curious whether they are available in kernel 3.0?

According to https://cateee.net/lkddb/web-lkddb/USER_NS.html, should be there under "experimental"

edp17 2020-02-20 09:11

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565489)
According to https://cateee.net/lkddb/web-lkddb/USER_NS.html, should be there under "experimental"

Thanks for confirming and showing me the way how I can double check these things in the future.
I think will switch them on for my S2 and try Flatpak there. :D

rinigus 2020-02-23 08:48

Re: Flatpak on Sailfish OS
 
New Flatpak Runner is out: 0.5.2

I was looking into how to enable hardware acceleration for Qt WebEngine and found the way. Turned out that by dropping SFOS-specific QMLSCENE_DEVICE environment variable from Flatpak app environment resulted in Chromium using hardware acceleration. That variable is used in Qt WebEngine constructor and had such implications.

Now, with Chromium having hardware acceleration, many bug workarounds for Android phones hardware are not engaged as they are checked for Android specifically (as in https://chromium.googlesource.com/ch..._list.json#247). For now, I have disabled GPU HW composing which seems to work for me. That's done in one env variable set by default. Let me know if you get into trouble with the browser.

Browser, after enabling HW acceleration, plays youtube videos as well. There has been work done on Angelfish and the next release of it should add hiding of navigation bar, internal changes in tabs handling, bump to Qt 5.14, to name the changes that are already merged.

edp17 2020-02-24 22:01

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by edp17 (Post 1565497)
Thanks for confirming and showing me the way how I can double check these things in the future.
I think will switch them on for my S2 and try Flatpak there. :D

I needed to switch on too the CONFIG_NAMESPACES.
But now I have Flatpak support in the kernel on my S2 as well. :D
Once I have a little time I'll try to install Angelfish.

rinigus 2020-02-24 22:44

Re: Flatpak on Sailfish OS
 
Great to hear! There has been great progress in the last few days and I will probably report a bit later when few things get finalized. I am testing new settings for WebEngine that work quite well on XZ2. In addition, videos that were failing in the browser are playing now and without choppiness. Few PRs still have to be merged and then I hope new releases will be out.

Will be very interesting to hear when its all merged how it all runs on S2 and other hardware... In terms of S2, would be good to know if the current released Angelfish actually works as well. So we are sure that we don't miss anything in the setup

edp17 2020-02-24 22:55

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565660)
Great to hear! There has been great progress in the last few days and I will probably report a bit later when few things get finalized. I am testing new settings for WebEngine that work quite well on XZ2. In addition, videos that were failing in the browser are playing now and without choppiness. Few PRs still have to be merged and then I hope new releases will be out.

Will be very interesting to hear when its all merged how it all runs on S2 and other hardware... In terms of S2, would be good to know if the current released Angelfish actually works as well. So we are sure that we don't miss anything in the setup

I have installed Flatpak and added the repos, then installed angelfish. Unfortunately I got this:
Code:

[nemo@GalaxyS2 ~]$ flatpak-runner org.kde.mobile.angelfish
Starting: org.kde.mobile.angelfish
[D] unknown:0 - Using Wayland-EGL
Wayland socket: ../../display/wayland-1
WAYLAND_DISPLAY="../../display/wayland-1" FLATPAK_MALIIT_CONTAINER_DBUS="unix:abstract=/tmp/dbus-zMvZjjUACb,guid=d3719efecbc24fcf8ca84dcb5e5453c9" flatpak run --env=QT_WAYLAND_FORCE_DPI=218 --filesystem=/system:ro --filesystem=/vendor:ro --filesystem=/odm:ro --device=all --talk-name=org.maliit.server --filesystem=/opt/flatpak/maliit/org.kde.Platform/arm/5.12:ro --env=QT_PLUGIN_PATH=/app/lib64/plugins:/app/lib/plugins:/usr/share/runtime/lib/plugins:/opt/flatpak/maliit/org.kde.Platform/arm/5.12 --env=QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu-compositing --env=QT_QUICK_CONTROLS_MOBILE=1 --env=QT_QUICK_CONTROLS_STYLE=Plasma --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris/linker --env=HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/libexec/droid-hybris/system/lib:/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/lib org.kde.mobile.angelfish
[D] onCompleted:389 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool
bwrap: prctl(PR_SET_NO_NEW_CAPS) failed: Invalid argument
error: ldconfig failed, exit status 256
[D] expression for onExit:58 - Skipping quit as it will hang the window. Proper exit is needed


rinigus 2020-02-25 07:44

Re: Flatpak on Sailfish OS
 
That could be considerable roadblock for the older kernels out there. Looks like you fail at

Code:

  /* Never gain any more privs during exec */
  if (prctl (PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0)
    die_with_error ("prctl(PR_SET_NO_NEW_CAPS) failed");

PR_SET_NO_NEW_PRIVS, according to manuals, has been introduced into 3.5 kernels. So, older kernels, including S2 and the several devices with 3.4 are no go, as far as I understand.

From looking around, it seems that there are backports available, though. See https://wiki.mozilla.org/Security/Sandbox/Seccomp and https://bugzilla.mozilla.org/show_bug.cgi?id=790923 referenced there. Cannot guarantee that it will work, though.

Note that there could be more backports available, I just took one of the first links.

edp17 2020-02-25 08:31

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565663)
That could be considerable roadblock for the older kernels out there.
...

Thank you for taking a look into it. When I switched my PC off I realised that I should have asked whether that error was something that I could/should fix on the device (or in the kernel) or something else in the flatpak-runner.
Now, I understand this is limitation of the old kernel and there might be a workaround. (This is what I love in Linux, there always is a or more workaround. :))
I have checked the links you provided for the backport and found this in the second one: backport NO_NEW_PRIVS

I apply this into the S2's kernel and will re-try.

(By the way, with adding this Flatpak support into the kernel, something else also changed because the sneak-peek function started to work there. :D Thanks for that.)

claustn 2020-02-25 14:05

Re: Flatpak on Sailfish OS
 
On Nexus 5, despite the added flags in the kernel, Angelfish does not start. Here is the output:
Code:

nemo@Sailfish ~]$ flatpak-runner
org.kde.mobi le.angelfish Starting:
org.kde.mobile.angelfish h: modules.devname [D]
unknown:0 - Using Wayland-EGL Wayland
socket: ../../display/wayland-2
WAYLAND_DISPLAY="../../display/wayland-2"
FLAT
PAK_MALIIT_CONTAINER_DBUS="unix:abstract=/tmp/
dbus-WOnQp4HCDA,guid=23d92ab87b61acf890bb9eff5
e5527a4" flatpak run
--env=QT_WAYLAND_FORCE_DP I=442
--filesystem=/system:ro
--filesystem=/ve ndor:ro
--filesystem=/odm:ro --device=all --ta
lk-name=org.maliit.server
--filesystem=/opt/fl
atpak/maliit/org.kde.Platform/arm/5.12:ro
--en
v=QT_PLUGIN_PATH=/app/lib64/plugins:/app/lib/p
lugins:/usr/share/runtime/lib/plugins:/opt/fla
tpak/maliit/org.kde.Platform/arm/5.12
--env=QT _QUICK_CONTROLS_MOBILE=1
--env=QT_QUICK_CONTRO LS_STYLE=Plasma
--env=HYBRIS_EGLPLATFORM_DIR=/
usr/lib/arm-linux-gnueabihf/GL/host/lib/libhyb
ris
--env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux
-gnueabihf/GL/host/lib/libhybris/linker
--env=
HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnue
abihf/GL/host/libexec/droid-hybris/system/lib:
/usr/libexec/droid-hybris/system/lib:/vendor/l
ib:/system/lib
--env=LD_LIBRARY_PATH=/usr/lib/
arm-linux-gnueabihf/GL/host/lib
org.kde.mobile .angelfish [D]
onCompleted:389 - Warning: specifying
an o bject instance for initialPage is
sub-optimal - prefer to use a
Component [W] unknown:52 -
file:///usr/share/flatpak-run
ner/qml/main.qml:52:26: Unable to
assign [unde fined] to bool bwrap:
execvp xdg-dbus-proxy: No such file or
directory


edp17 2020-02-25 14:25

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by claustn (Post 1565677)
On Nexus 5, despite the added flags in the kernel, Angelfish does not start. Here is the output:
...

I think I got this error. Did you try to start angelfish on the device in a fingerterm or from a PC logged into the device with ssh? Try to run it on the device!

claustn 2020-02-25 14:48

Re: Flatpak on Sailfish OS
 
I run it from fingerterm on device with your new kernel! The Angelfish app cover shows up with its icon but the loading circle spins forever.

rinigus 2020-02-25 17:38

Re: Flatpak on Sailfish OS
 
@claustn, how did you install flatpak support? did you install by zypper after setting up repository? or downloaded and installed manually?

It looks like xdg-dbus-proxy from flatpak repo is not installed (see missing command error: execvp xdg-dbus-proxy: No such file or
directory)

But in addition to that, we probably have an issue with 3.4 kernel on the top of that, as referred to earlier.

edp17 2020-02-26 08:32

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565684)
@claustn, how did you install flatpak support? did you install by zypper after setting up repository? or downloaded and installed manually?

It looks like xdg-dbus-proxy from flatpak repo is not installed (see missing command error: execvp xdg-dbus-proxy: No such file or
directory)

But in addition to that, we probably have an issue with 3.4 kernel on the top of that, as referred to earlier.

I am not sure this is related to that kernel thing because I when I first tried I got exactly the same error. Then I fixed it somehow but don't remember how.
(I will try to find out what have done when I get home. I hope the console is still active on my PC and I can look back what I was doing. :) + I will try to install this on my Nexus 5 too.)
And just after then I got the other error about the 'PR_SET_NO_NEW_PRIVS'.

edp17 2020-02-26 22:22

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by edp17 (Post 1565702)
I am not sure this is related to that kernel thing because I when I first tried I got exactly the same error. Then I fixed it somehow but don't remember how.
(I will try to find out what have done when I get home. I hope the console is still active on my PC and I can look back what I was doing. :) + I will try to install this on my Nexus 5 too.)
And just after then I got the other error about the 'PR_SET_NO_NEW_PRIVS'.

Unfortunately my console I used for S2 is full of AD related stuff, so I could not check what I was doing when I got this Flatpak related error.

I have tried to install it on my Nexus 5 and got exactly the same error and the rotating circle as an app cover.

To compare the two message on the devices:

On Nexus 5:
Code:

[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool
bwrap: execvp xdg-dbus-proxy: No such file or directory

On S2:
Code:

[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool
bwrap: prctl(PR_SET_NO_NEW_CAPS) failed: Invalid argument
error: ldconfig failed, exit status 256

Both error do look similar and probably they are related to the kernel just how @rinigus said earlier.

edp17 2020-02-26 23:31

Re: Flatpak on Sailfish OS
 
It looks like the Flatpak won't work on the S2 (or some other fixes also needs to be backported).
I have backported the NO_NEW_PRIVS from here but when I re-run the angelfish, I got this:
Code:

[nemo@GalaxyS2 ~]$ flatpak-runner org.kde.mobile.angelfish
Starting: org.kde.mobile.angelfish
[D] unknown:0 - Using Wayland-EGL
Wayland socket: ../../display/wayland-2
WAYLAND_DISPLAY="../../display/wayland-2" FLATPAK_MALIIT_CONTAINER_DBUS="unix:abstract=/tmp/dbus-7rr6cT2EOw,guid=8929142dcc20de9f7e54f93c5e56fd25" flatpak run --env=QT_WAYLAND_FORCE_DPI=218 --filesystem=/system:ro --filesystem=/vendor:ro --filesystem=/odm:ro --device=all --talk-name=org.maliit.server --filesystem=/opt/flatpak/maliit/org.kde.Platform/arm/5.12:ro --env=QT_PLUGIN_PATH=/app/lib64/plugins:/app/lib/plugins:/usr/share/runtime/lib/plugins:/opt/flatpak/maliit/org.kde.Platform/arm/5.12 --env=QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu-compositing --env=QT_QUICK_CONTROLS_MOBILE=1 --env=QT_QUICK_CONTROLS_STYLE=Plasma --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris/linker --env=HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/libexec/droid-hybris/system/lib:/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/lib org.kde.mobile.angelfish
[D] onCompleted:389 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool
FATAL: kernel too old
error: ldconfig failed, exit status 34304
[D] expression for onExit:58 - Skipping quit as it will hang the window. Proper exit is needed
^C

Some of the strace is here.

Do I need the CONFIG_SECCOMP in the kernel? (Or something else?)

edp17 2020-02-27 02:15

Re: Flatpak on Sailfish OS
 
I have got an idea from elros. If we can patch the glibc for flatpak it can work on my S2 and probably on hammerhead too. I had to do this for my S2 port, otherwise sailfish wouldn't build. More info here.

(For the S2 port, I needed to add a glibc.ini file into /usr/share/ssu/features.d/ folder.)

rinigus 2020-02-27 16:24

Re: Flatpak on Sailfish OS
 
"FATAL: kernel too old" is probably an issue for S2. Do you know where the message is coming from, glibc? glibc is provided in Flatpak by its own platform, that's gonna be hard to patch.

Regarding xdg error - would you mind to check my questions from http://talk.maemo.org/showpost.php?p...4&postcount=66 and reply to them.

rinigus 2020-02-27 19:34

Re: Flatpak on Sailfish OS
 
Regarding general progress with Flatpak and Angelfish.

KDE platform added new type of extension - input plugins - which allowed me to distribute Maliit plugin as an extension in Flatpak. This depricates a hack used to package Flatpak extension in RPM and users will have to install Maliit using org.kde.PlatformInputContexts.MaliitSailfishOS :

Code:

flatpak install --user \
org.kde.PlatformInputContexts.MaliitSailfishOS//5.14

Replace //5.14 by //5.12 if you use KDE 5.12 apps. Extension is distributed and built at Flathub, https://github.com/flathub/org.kde.P...liitSailfishOS .

Right now 5.12 still has to be built, there were some Flathub internal issues with that runtime. As soon as its done, I'll let you know.

Note that after installing extension, you should remove flatpak-maliit-plugin-qt package in SFOS. Next version of Flatpak Runner will not use it.

Next, I managed to improve HW acceleration in WebEngine. I found the set of environment variables that, while not fully using HW acceleration, seem to make Angelfish reasonably fast. Flatpak packaging scripts have been developed further to improve playback of videos. Right now, it looks like all the sites I have visited are playing as they should. My issues with the acceleration are reported as a bug in https://bugreports.qt.io/browse/QTBUG-82423 and there is a hope it will be resolved at some time.

All this will become available with the next release of Flatpak Runner (waiting for KDE platform rebuild) and Angelfish (maybe will have to ask for it the lead developer). Assuming that the next SFOS will have updated libhybris, it all comes right on time.

coderus 2020-02-27 21:07

Re: Flatpak on Sailfish OS
 
being a flatpak noob i'm asking for commands to update stuff :))

rinigus 2020-02-27 21:37

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1565744)
being a flatpak noob i'm asking for commands to update stuff :))

Right now, as of today, its

Code:

sleep 48h
Hopefully, by that time KDE 5.12 is sorted or new Angelfish is released.

claustn 2020-02-28 07:47

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565736)
Regarding xdg error - would you mind to check my questions from http://talk.maemo.org/showpost.php?p...4&postcount=66 and reply to them.

On the Nexus 5, I installed flatpak using zipper, followig the instructions provided on GitHub https://github.com/sailfishos-flatpak/main

rinigus 2020-02-28 07:52

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by claustn (Post 1565749)
On the Nexus 5, I installed flatpak using zipper, followig the instructions provided on GitHub https://github.com/sailfishos-flatpak/main

Can you please check if xdg-dbus-proxy is installed? Maybe I am missing some dependency...

edp17 2020-02-28 08:10

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565736)
"FATAL: kernel too old" is probably an issue for S2. Do you know where the message is coming from, glibc? glibc is provided in Flatpak by its own platform, that's gonna be hard to patch.

Regarding xdg error - would you mind to check my questions from http://talk.maemo.org/showpost.php?p...4&postcount=66 and reply to them.

I don't know how can I check this message is coming from where. If you an idea on how to check,I appreciate if you let me know.

Regarding that post, I did respond on that already.

After reading your post about the general progress of Fltapak where you mentioned you might need to contact the main developer of Flatpak. Is it worth to as them to try to apply the glibc patch that elros provided? If they can apply that, this can make Flatpak available for the wider audience like my S2 with that old kernel.

edp17 2020-02-28 08:12

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1565750)
Can you please check if xdg-dbus-proxy is installed? Maybe I am missing some dependency...

I just have checked my Nexus 5 and can confirm yes, xd-dbus-proxy is installed.

What I spotted on my Nexus 5 was the version of libhybris. It is 0.0.5.33+master.... while in the install instruction you said Flatpak is required libhybris >= 0.0.5.34
How can I get the newer libhybris?
I am happy to build a new sailfish image if I know what to change in there to get the newer libhybris.

rinigus 2020-02-28 08:36

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by edp17 (Post 1565752)
I just have checked my Nexus 5 and can confirm yes, xd-dbus-proxy is installed.

Souldn't we install the flatpak-libs package?

No, flatpak-libs is not needed on device. Have you rebooted after installation? Other than that, I am out of ideas on why that xdg- missing error is issued

rinigus 2020-02-28 08:42

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by edp17 (Post 1565751)
I don't know how can I check this message is coming from where. If you an idea on how to check,I appreciate if you let me know.

Regarding that post, I did respond on that already.

After reading your post about the general progress of Fltapak where you mentioned you might need to contact the main developer of Flatpak. Is it worth to as them to try to apply the glibc patch that elros provided? If they can apply that, this can make Flatpak available for the wider audience like my S2 with that old kernel.

The best I can come up is to grep inside flatpak platform. As in

flatpak run --command=sh org.kde.mobile.angelfish

then in the opened shell, try to grep files in /usr

As for patch, I don't know who to ask. I am mainly in contact with some KDE developers. That type of question should probably belong to freedesktop-sdk IRC/Matrix channel or their issue tracker in gitlab. But try to see first which file has the error message and proceed from there.


All times are GMT. The time now is 07:29.

vBulletin® Version 3.8.8