Package: needrestart Version: 3.5-1 Severity: normal Tags: patch Dear maintainer,
Please consider the attached patch that adds support for runit to needrestart. Runit is a very lightweight init scheme with service supervision capability; for more details see http://smarden.org/runit/ Regards, Lorenzo Puliti -- Package-specific info: needrestart output: Your outdated processes: kactivitymanage[23935], kdeconnectd[22453], kded5[6680], kdeinit5[6696], kglobalaccel5[23942], klauncher[6697], konqueror[6620], kuiserver[22496], lxqt-notificati[5553], lxqt-panel[5557], lxqt-policykit-[5558], lxqt-powermanag[8009], lxqt-runner[5559], lxqt-session[5460], openbox[5530], qjackctl[8006], qterminal[8833, 5222], QtWebEngineProc[9293, 6647], superkaramba[8014] -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 5.7.0-1-amd64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /bin/dash Init: runit (via /run/runit.stopit) Versions of packages needrestart depends on: ii binutils 2.35.1-2 ii dpkg 1.20.5 ii gettext-base 0.19.8.1-10 ii libintl-perl 1.26-2 ii libmodule-find-perl 0.15-1 ii libmodule-scandeps-perl 1.29-1 ii libproc-processtable-perl 0.59-2 ii libsort-naturally-perl 1.03-2 ii libterm-readkey-perl 2.38-1+b1 ii perl 5.30.3-4 ii xz-utils 5.2.4-1+b1 Versions of packages needrestart recommends: ii libpam-elogind-compat [libpam-systemd] 1.2 Versions of packages needrestart suggests: ii iucode-tool 2.3.1-1 pn needrestart-session | libnotify-bin <none> -- no debconf information -- debsums errors found: debsums: changed file /usr/sbin/needrestart (from needrestart package)
Description: Add support for runit init system When runit is used as init system, a native runit service exists and is enabled, use sv instead of invoke-rc.d. If no native service exists (or is disabled) fallback on invoke-rc.d Author: Lorenzo Puliti <plore...@disroot.org> Last-Update: 2020-10-22 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/needrestart +++ b/needrestart @@ -46,6 +46,7 @@ my $LOGPREF = '[main]'; my $is_systemd = -d q(/run/systemd/system); +my $is_runit = -e q(/run/runit.stopit); my $is_tty = (-t *STDERR || -t *STDOUT || -t *STDIN); my $is_vm; my $is_container; @@ -386,6 +387,14 @@ (qw(systemctl restart), qq($rc.service)); } } + elsif($is_runit && -d qq(/etc/sv/$rc)) { + if(-e qq(/etc/service/$rc)) { + (qw(sv restart), $rc); + } + else { + (q(invoke-rc.d), $rc, q(restart)); + } + } else { (q(invoke-rc.d), $rc, q(restart)); }