Package: runit-services
Version: 0.5.5~deb12u1
Severity: important
Tags: bookworm patch

Dear Maintainer,

Upgrading from bullseye to bookworm can very likely cause dhclient to
ruin the network setup for the host.

The dhclient runscript was broken in prior releases in such a way that
it was harmless and ineffective but potentially noisy. Since being
'fixed' for 0.5.5, dhclient now defaults to setting itself up on every
interface on the system, which is almost certainly wrong.

This affects users with ifupdown scripts, network-manager and probably
anyone who doesn't simply want dhcp on any physical interfaces present.

This is fixed in 0.7.0 and later by disabling the dhclient runscript
by default. Ideally this fix would be backported to bookworm to avoid
any new installations failing badly.

I am not sure how to fix for upgrades, but as it was broken by my
upgrade it is presumably possible to fix in an upgrade, too. I suggest
the runscript exit and down the service if the INTERFACES environment
variable is empty - that is essentially an unconfigured state.

Really I think you only want this runscript if you have zero network
configuration capability, not even the underrated ifupdown, which is
perfectly capable of organising DHCP out of the box!

The new installation fix is a backport of this commit:

https://salsa.debian.org/debian/runit-services/-/commit/caf085228bbaa351749504fafd39609e2f5ec48b

Would there be any interest in a patch to fix upgrades or is it highly
unlikely that any fix would be accepted into bookworm?

Thank you for runit-services!


>From caf085228bbaa351749504fafd39609e2f5ec48b Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <plore...@disroot.org>
Date: Fri, 22 Sep 2023 18:20:54 +0200
Subject: [PATCH] dhclient: ship as disabled by default

it appears that dhclient is started automatically by some network
software; other inits also do not appear to have a services defined
for dhclient. So shipping as disabled by default is the least
surprise approach and also avoid duplicate instances.
This change is applied to new install of this package, on
upgrade the old setting is retained.
---
 debian/runit-services.runit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/runit-services.runit b/debian/runit-services.runit
index fa8e823..dbf97a2 100644
--- a/debian/runit-services.runit
+++ b/debian/runit-services.runit
@@ -11,7 +11,7 @@ sv/cron         noscripts,usr,finish,bin=/usr/sbin/cron
 sv/cups/       noscripts,usr,bin=/usr/sbin/cupsd
 sv/dbus        
noscripts,usr,logscript,onupgrade=reload,finish,bin=/usr/bin/dbus-daemon
 sv/dbus.dep-fixer   noscripts,usr,onupgrade=nostop,bin=/usr/bin/dbus-daemon
-sv/dhclient   noscripts,usr,finish,logscript,bin=/sbin/dhclient
+sv/dhclient   disable,noscripts,usr,finish,logscript,bin=/sbin/dhclient
 sv/elogind    noscripts,usr,finish,bin=/lib/elogind/elogind
 sv/exim4      noscripts,usr,finish,logscript,bin=/usr/sbin/exim4
 sv/gdomap/  noscripts,usr,disable,bin=/usr/bin/gdomap
-- 
2.39.2


-- System Information:
Debian Release: 12.7
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-26-amd64 (SMP w/6 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)
LSM: AppArmor: enabled

Versions of packages runit-services depends on:
ii  runit         2.1.2-54
ii  runit-helper  2.15.2

Versions of packages runit-services recommends:
ii  runit-init  2.1.2-54

Versions of packages runit-services suggests:
pn  socklog  <none>

-- no debconf information

Reply via email to