Bug#1042008: xrdp: Please add an override for needrestart to avoid accidentally breaking apt upgrades
Package: xrdp
Version: 0.9.21.1-1
Severity: normal
X-Debbugs-Cc: a.t.chadwick@gmail.com
Dear Maintainer,
XRDP should be integrated with needrestart so that the default behaviour of
NeedRestart::UI::Debconf’s dialogs becomes safer. Currently, the xrdp and
xrdp-sesman services are selected automatically for restarting when
libraries affecting running desktop packages in xrdp session are updated.
This is unlike all normal local display managers, which have a specific
exemption because the user might be running their system upgrade from a
graphical session.
$ cat /etc/needrestart/needrestart.conf
[...]
# Override service default selection (hash of regex).
$nrconf{override_rc} = {
[...]
# display managers
qr(^gdm) => 0,
qr(^kdm) => 0,
qr(^nodm) => 0,
qr(^sddm) => 0,
qr(^wdm) => 0,
[...]
These overrides prevent the upgrade getting accidentally terminated should
the admin applying the upgrade click through the dialogs without looking,
by giving them safe default behaviour.
This hash defined in the main conffile can be extended to support
additional service regexes with a drop-in conffile stub:
$ cat /etc/needrestart/conf.d/xrdp.conf
# Ensure that the xrdp display manager isn’t offered for restart.
$nrconf{override_rc}{qr(^xrdp)} = 0;
This causes the XRDP services to be initially *deselected* in the
needrestart dialogs that are hooked by apt, instead of *selected*
initially. This is safer because clicking through the needrestart dialog
does not cause an apt or apt-get launched in a graphical session to
terminate when xrdp restarts. Xrdp becomes like any other graphical display
manager.
(Brought to you by me having to remember to do this every time. Sometimes I
am lazy and, well, oops.)
many thanks,
Andrew
Reply to: