aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2024-02-13Add gitlab issue/merge request templatesHEADricefish_17.90.0ricefish/17.90.0lamprey_12.1.20lamprey/12.1.2017.90.012.1.20masterJan-Simon Moeller2-0/+6
Add template files for gitlab Bug-AGL: SPEC-4474 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Change-Id: I7eeb531897647aec410f53d7dc083eb8e3a06f01
2023-06-20Add sd_notify callScott Murray1-4/+7
To avoid races with client applications, add a call to sd_notify after the gRPC service should be available, so that a Type=notify systemd unit can be used to start applaunchd. As well, fix up some naming and comments around what the call to the gRPC server object's Wait method is for. Bug-AGL: SPEC-4843 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I069d3caa4e3cddb0041e2f94ecb568499104dcf2
2023-05-20Remove deprecated D-Bus interfaceDenys Dmytriyenko10-525/+1
As applaunchd now uses gRPC as its API and launches applications as systemd services, plus all applications have been converted now, it is time to remove the old D-Bus interface. Bug-AGL: SPEC-4801 Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Change-Id: Icec29c13d9310cfb043b87e44f4c5f3f0c986ccc
2023-04-13Handle "failed" signalDenys Dmytriyenko1-0/+9
When application exits abnormally, it emits "failed" signal, instead of "inactive" one. Handle it accordingly, so the internal state doesn't get out of sync and prevents starting the app again. Bug-AGL: SPEC-4199 Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Change-Id: I307a6c6973f98d8f57af477bc03ebfb1218559db
2022-09-10Add gRPC API implementationScott Murray24-535/+50379
Changes: - Rename the existing daemon to applaunchd-dbus, and add a new version that exposes a gRPC based implementation of the API based on the protobuf definition added in a top-level protos directory. Having both the D-Bus and gRPC APIs exposed by a single daemon was posing difficulties around startup dependencies stemming from D-Bus activation of the daemon. Since the end goal is dropping the D-Bus API entirely, it is easier to just add a second daemon for gRPC that will eventually be the only one present. - To facilitate building the two implementations, a significant amount of code refactoring has been done to move things from the D-Bus API implementing app_launcher.[ch] to systemd_manager.[ch] so the code can be reused. - All use of the systemd D-Bus library except for the path encoding helper function has been replaced with GDBus. The systemd interface wrapper code was generated with gdbus-codegen from XML files captured via introspection on a running system. The motivation for this change was to avoid multithreading issues with sd_bus exposed when calling into it from the gRPC threads. - The copyright headers in the source files have been tweaked to remove the Apache license boilerplate in favour of a SPDX license tag. Notes: - The gRPC API differs slightly from the D-Bus one in that it has a single status streaming RPC method as opposed to the separate signals for application started or terminated that the D-Bus API has. - The gRPC API is currently unauthenticated, the aim is to circle back and implement authentication once a consensus can be reached on what mechanism should be used (fixed JWT configuration, OAuth, etc.). Bug-AGL: SPEC-4559 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I828f38a58b60e9959162b98054982124d4fa4380
2022-07-27Rework to use systemd for app enumerationneedlefish_13.93.0needlefish/13.93.0lamprey_12.1.6lamprey_12.1.5lamprey/12.1.6lamprey/12.1.513.93.012.1.612.1.5Scott Murray9-397/+186
Rework to replace the Glib .desktop file based app enumeration scheme with querying systemd for units matching the pattern agl-app*@*.service and parsing out the application ID from the unit instance name. At the moment this assumes the use of template units, but that could be changed to open up using non-templated units if desired. Application icons are now assumed to be named with the application ID, and the systemd unit file "Description" field is read and used as the application display name. This avoids needing metadata outside of the systemd unit files. Bug-AGL: SPEC-4466 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ida7dc8f7fdb96722df0886eb9a72ee14b0856083
2022-07-11Add systemd_manager support.Denys Dmytriyenko10-335/+393
This replaces dbus_activation_manager and retains basic process_manager for now. The first version of systemd_manager supports starting apps as services, handles aynchronous events to emit corresponding STARTED and TERMINATED signals. But it still relies on .desktop files for application enumeration and icon setting, plus uses DBusActivatable=true to prefer systemd_manager over process_manager. These shortcomings will be addressed in future revisions. And systemd_manager supports sandboxing and templating with overrides: * There's a generic systemd service template called systemd/system/agl-app@.service, that becomes agl-app@<app>.service for a given <app> * Overrides for an <app> are symlinks in systemd/system/agl-app@<app>.service.d/ pointing to corresponding generic configs in systemd/sandboxing/*.conf Bug-AGL: SPEC-4466 Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Change-Id: Id62cbf848f09250f1a8989a79cc61292a3ce054a
2022-01-12app_launcher: emit "started" signal for running appsmarlin_12.93.0marlin_12.92.0marlin/12.93.0marlin/12.92.0lamprey_12.1.4lamprey_12.1.3lamprey_12.1.2lamprey_12.1.1lamprey/12.1.4lamprey/12.1.3lamprey/12.1.2lamprey/12.1.112.93.012.92.012.1.412.1.312.1.212.1.1Arnaud Ferraris2-2/+6
Due to an error in how running apps were handled, applaunchd would emit the "started" signal for D-Bus-activated apps only. This change ensures the signal is emitted for all running apps, regardless of how they were started. Bug-AGL: SPEC-4160 Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Change-Id: Ibd88223931b51de6c732985c8b886d06886769d5
2022-01-12process_manager: mark started apps as runningArnaud Ferraris1-0/+1
Without this change, we don't properly keep track of running apps, and end up starting multiple instances of those. Bug-AGL: SPEC-4160 Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Change-Id: I070264f5d12c1c84a520537612518ab2837507d7
2021-12-20Handle XDG_DATA_DIRS not being setmarlin_12.91.0marlin/12.91.012.91.0Scott Murray1-6/+10
Tweak logic in app_launcher_update_applications_list to avoid crashing when XDG_DATA_DIRS is not set in the environment. Bug-AGL: SPEC-4160 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ia5494f3482a979cbdb22d89e3777d426d4750d4f
2021-12-20applaunchd: Initial commitArnaud Ferraris19-0/+1800
`applaunchd` is a new service, dedicated to starting and monitoring applications. It is part of the Application Framework rework. Bug-AGL: SPEC-4160 Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Change-Id: I9543957f9065670e9112556f5cd2b31d0b2ab9d9
2021-12-01Add .gitreview filekoi_11.0.5koi/11.0.511.0.5Arnaud Ferraris1-0/+5
Bug-AGL: SPEC-4160 Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Change-Id: Iefaf7ec22d15cd3b8f73c73d18a8907295edd5e3
2021-12-01Initial empty repositorylamprey_12.1.0lamprey/12.1.012.1.0Jan-Simon Moeller0-0/+0