~enr0n/ubuntu-release-upgrader:lp.1965568-jammy

Last commit made on 2022-05-06
Get this branch:
git clone -b lp.1965568-jammy https://git.launchpad.net/~enr0n/ubuntu-release-upgrader
Only Nick Rosbrook can upload to this branch. If you are Nick Rosbrook please log in for upload directions.

Branch merges

Branch information

Name:
lp.1965568-jammy
Repository:
lp:~enr0n/ubuntu-release-upgrader

Recent commits

3e92ccc... by Nick Rosbrook

DistUpgrade: gracefully handle missing dbus module

Commit ef1158e4 ("DistUpgrade: use org.freedesktop.ScreenSaver to inhibit screen lock")
added a dependency on python3-dbus, but this added dependency was not
SRU'd to any stable releases. In most cases this is not an issue because
python3-dbus is seeded, but there is no guarantee that the package will
be present on the system.

Move the `import dbus` statement to the try block in _inhibitIdle(), and
handle any ImportErrors the same way as dbus exceptions, i.e. log the
exception and inform the user that they should manually disable their
screensaver. Note that we catch Exception rather than ImportError and
dbus.exceptions.DBusException explicitly because the latter will not be
defined if an ImportError occurs.

LP: #1965568

dd5d72d... by Nick Rosbrook

releasing package ubuntu-release-upgrader version 1:22.04.10

ef52420... by Nick Rosbrook

Run pre-build.sh: updating mirrors, demotions, and translations.

a75ffaf... by Nick Rosbrook

do-release-upgrade: fix a typo in the --help output

s/seprated/separated

b951063... by Nick Rosbrook

DistUpgrade: set NEEDRESTART_SUSPEND during upgrades

Set NEEDRESTART_SUSPEND to a non-empty value by default. When the
upgrade is finished, the user will be prompted to reboot, so there is no
need for needrestart to prompt the user about service restarts during
upgrade.

LP: #1968919

Signed-off-by: Nick Rosbrook <email address hidden>

692ca2d... by Brian Murray

releasing package ubuntu-release-upgrader version 1:22.04.9

3a62d49... by Brian Murray

Run pre-build.sh: updating mirrors, demotions, and translations.

b861f6d... by Nick Rosbrook

DistUpgrade: do not make UI dialog calls while EUID != 0

The screen lock prevention code has to temporarily set the EUID to the
non-root user UID so that it can make a DBus call on the user's session
bus. While the EUID is temporarily non-zero, a UI dialog may be
displayed to report the success of inhibiting the screen lock. For most
cases this is OK, but it causes an exception for the DistUpgradeViewKDE
frontend. This is because the view.information() call needs to read
dialog_error.ui from the tmpdir, but the non-root user does not have
permission to read this file.

To fix this, in _inhibitIdle(), move the information dialog call to
after the finally block which re-sets the EUID.

089693b... by Nick Rosbrook

do-release-upgrade: preserve env vars needed for screen lock prevention

The screen lock prevention code relies on environment variables such as
DBUS_SESSION_BUS_ADDRESS being preserved, since the
org.freedesktop.ScreenSaver DBus interface is needed. This works in
cases where the dist-upgrade script is invoked with 'sudo -E' (e.g.
DistUpgradeViewText frontend). However, when pkexec is used (e.g.
DistUpgradeViewGtk3 frontend) the environment variables cannot be
preserved as per pkexec's design.

Add an --env flag to do-release-upgrade that accepts a comma-separated
list of environment variables (e.g. VAR1=VALUE1,VAR2=VALUE2) which should be set when
executing the dist-upgrade script. This approach is similar to the
existing workaround for RELEASE_UPGRADER_ALLOW_THIRD_PARTY, but is
generalized to allow any environment variables to be set.

Finally, when the DistUpgradeViewGtk3 or DistUpgradeViewKDE frontends
are used, and the do-release-upgrade script is re-exec'd with pkexec,
set the DBUS_SESSION_BUS_ADDRESS and XDG_SESSION_TYPE variables with
--env so that the screen lock prevention code works with these
frontends.

LP: #1968607

e43fc51... by Brian Murray

releasing package ubuntu-release-upgrader version 1:22.04.8