-
Notifications
You must be signed in to change notification settings - Fork 54
Flatpak session (a.k.a. flatpak-based app fw) support. #198
Conversation
732c776 to
12529fc
Compare
|
|
||
| i = strtol(val, &e, 10); | ||
|
|
||
| if (!e && !*e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be if (e && !*e)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, well spotted.
|
|
||
| SYSTEMD_PACKAGES += "${PN}" | ||
| SYSTEMD_SERVICE_${PN} = "flatpak-sessions.target flatpak-update.service" | ||
| SYSTEMD_AUTO_ENABLE = "enable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is enable by default, no need to set it. And anyway if you set it, you might want to use ?=.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed SYSTEMD_AUTO_ENABLE.
| EXTRA_OECONF += "--with-systemdunitdir=${systemd_unitdir}" | ||
|
|
||
| # possible package configurations | ||
| PACKAGECONFIG ??= "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed empty PACKAGECONFIG.
|
|
||
| SRC_URI = " \ | ||
| git://git@github.com/klihub/flatpak-utils.git;protocol=https;branch=master \ | ||
| file://flatpak-utils \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't patch a file which you introduced in the same PR. Just change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashed commits.
|
|
||
| # This is the only way with automake I know of to force 'check-git-hooks' | ||
| # to be evaluated before 'all'. If there is a nicer way, I'm all ears... | ||
| BUILT_SOURCES = install-git-hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to install git hooks, if you have the source distribution inside the layer. There is no corresponding .git directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ripped out githooks and removed associated rule.
| #include "flatpak-session.h" | ||
|
|
||
|
|
||
| int fsys_prepare_session(context_t *c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You anyway need to link against glib (you are using GError etc. in the flatpak interfacing code). Have you checked if you could just just glib file system functions (see https://developer.gnome.org/glib/stable/glib-File-Utilities.html)? That would reduce the amount of custom code we have to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I could have used. glib has a g-wrapper for every imaginable POSIX filesystem-related system call and then some. It was an arbitrary but deliberate choice to use glib only where I have to, mostly for interfacing with libflatpak.
|
A README file for flatpak-utils would be nice. There are functions which are either dead code or used from somewhere I don't see, like |
|
I've added a very brief README and removed the unused function. The restart logic is that whenever anything changes (gets updated) in a session, the whole session gets restarted. The actual restart is delegated to systemd. When a restart is desired, the daemon exits with a special exit code reserved for this purpose which systemd is let know about in the service file. Systemd will then restart the daemon which will then relaunch the applications within the session. At least that's the general idea... |
12529fc to
9d5c3c5
Compare
|
Great. Let's wait until testing is done. Is everything you want to include in this PR now in place? |
|
Well, not quite yet. I need to still migrate some documentation over from the old repo. Also while I have added basic sanity tests, we still need to make sure they still work with latest meta-iotqa and CI infra. Once the tests work and the docs are in place, then I think this would be ready to go in. |
93b275a to
369af92
Compare
|
Unfortunately running the tests for the flatpak-enabled gateway runtime image was not enabled at all. Fixed it. We'll have to check once the latest queued build is finished. Someone with supercow powers could show mercy on the currently running futile builds using the /stop REST API... |
369af92 to
4b7234a
Compare
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <kli@iki.fi>
|
The test were run and have passed. I've also the added initial documentation snippets about flatpak support. |
Added recipe for flatpak-utils. Currently it only contains flatpak- session, our daemon to start up flatpak sessions, and the associated systemd generator. Also declared flatpak-utils as a supported recipe. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Added recipe for pre-declaring and populating the image with a set of pre-declared flatpak remotes/repositories and their associated flatpak-session users. These are then monitored for applications to automatically pull in/update and start in flatpak-sessions. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Added the necessary configuration bits for, and documented the whole process of, adding pre-declared remotes/repositories. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Added a flatpak-session packagegroup. It pulls in packagegroup-flatpak, flatpak-utils (for flatpak-session), and flatpak-predefined-repos. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Pull in packagegroup-flatpak-session if flatpak-session is among DISTRO_FEATURES. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
…ons. If included/required, enable flatpak-session in DISTRO_FEATURES and also pull in basic flatpak support. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
…gment. Added a commented out require for flatpak-session.inc and a comment about its purpose. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
4b7234a to
2c64cce
Compare
|
teat this please |
|
test this please (there needs to be 's' in 1st word :-) |
|
Thanks! Oh boy, I hate touchscreens... |
|
@ipuustin Now, this could go in. If we don't want to enable flatpak sessions by default, we should leave the config change commit out. |
|
Can one of the admins verify this patch? |
|
Retest this please. |
This patch set adds flatpak-session support to meta-flatpak on top of the existing basic flatpak support.
This mostly consists of
flatpak-session support has its dedicated DISTRO_FEATURE ('flatpak-session'). There is also a corresponding flatpak-session.inc configuration fragment which is used to enable flatpak-sessions.
By default flatpak-session support is disabled.