~sylvain-pineau/checkbox-ng:more-remote-fixes

Last commit made on 2022-04-01
Get this branch:
git clone -b more-remote-fixes https://git.launchpad.net/~sylvain-pineau/checkbox-ng
Only Sylvain Pineau can upload to this branch. If you are Sylvain Pineau please log in for upload directions.

Branch merges

Branch information

Name:
more-remote-fixes
Repository:
lp:~sylvain-pineau/checkbox-ng

Recent commits

819be75... by Sylvain Pineau

remote:assistant: Add XDG_SESSION_TYPE to the extra_env

The checkbox service running as root inherits session environment variables
from the user who started the desktop session.

Graphic jobs now needs XDG_SESSION_TYPE to identify Gnome vs Wayland sessions.

7499706... by Sylvain Pineau

remote:service: Select RemoteSnappyRestartStrategy if SNAP_REVISION is set

In response to snapd CVE-2021-44731, the systemd checkbox service creates
a few "fake" snap runtime environment variables to still use wrapper_local
helpers.

Adding SNAP_REVISION in this module enforces the detection mechanism to
only select RemoteSnappyRestartStrategy if the service runs in snap confine.
Otherwise even with a fake SNAP_DATA, RemoteDebRestartStrategy must be selected.

cb6088e... by Ubuntu <email address hidden>

Merge #417976 from ~sylvain-pineau/checkbox-ng:fix-session-type

fa39498... by Sylvain Pineau

session:assistant: Fix the detect_restart_strategy by looking into app_blob

The session title is not a reliable way to evaluate the session type.
By default launchers set the title to 'session title'.
This patch extract that information from the session metadata app blob.

511e6f6... by Ubuntu <email address hidden>

Merge #417573 from ~kissiel/checkbox-ng:fix-1966045-crash-on-startup

27efa7f... by Maciej Kisielewski

Fix: better naming of remote sessions

87b736e... by Maciej Kisielewski

Fix: traceback when launching checkbox

This patch adds an optional arg to detect_restart_strategy so the information
that the session is remote can be used to pick the best strategy.
There's a bit of heuristic in the SessionAssistant class that guesses that the
session is remote by looking at its title - remote sessions have
'checkbox-slave' in the session's title.

Fixes: LP: #1966045

1941bac... by Ubuntu <email address hidden>

Merge #417166 from ~sylvain-pineau/checkbox-ng:fix-CVE-2021-44731

9611605... by Sylvain Pineau

restart.py: Check for RemoteDebRestartStrategy support first

Due to snapd CVE-2021-44731, the checkbox remote service now runs outside
confinement but fakes env var like SNAP and SNAP_DATA.

The auto detection mechanism must check the RemoteDebRestartStrategy first
because the new systemd service is also named checkbox-ng.service like for
debian packages.

Sharing the same restart strategy logic as debs can only work if the code
using on_ubuntucore() is never reached in this use case.

1f12940... by Ubuntu <email address hidden>

Merge #411951 from ~kissiel/checkbox-ng:fix-provider-develop