Hi,

Quoting Mark Hindley (2026-04-14 08:31:39)
> I had a quick look at this. I can't find any maintscript snippets that change
> behaviour by testing for the presence/absence of /sbin/insserv. The only
> place that I can find something similar is update-rc.d from
> src:init-system-helpers.

yes, I made the same observation.

> > > Jochen Sprickerhof brought up that update-rc.d/insserv could behave
> > > differently if DPKG_ROOT is set, but Michael Biebl replied that he has
> > > "no interest in touching this code and investigating all the corner
> > > cases".
> > without the systemd maintainers willing to change things I fear that
> > nothing will move.
> Whilst I respect Michael's extensive experience and everybody is entitled to
> have an opinion, the systemd maintainers cannot be the gatekeepers of what is
> acceptable.
> 
> For the autopkgtest breakage that I have already identified, I would still
> prefer a solution that enabled the systemd Conflicts insserv to be removed. 
> Are
> you able to look at update-rc.d and see how its behaviour could be improved?

In #debian-devel Michael Biebl only brought up update-rc.d as the problematic
point (maybe there is more). In that case, I had assumed that the fix would
simply be to tell update-rc.d to ignore the presence of /sbin/insserv and
/etc/insserv.conf in case the current system is using systemd. In that case, I
had imagined that the fix is as simple as doing:

--- a/script/update-rc.d
+++ b/script/update-rc.d
@@ -192,6 +192,10 @@ sub create_sequence {
     $insserv = "/sbin/insserv" if ( -x "$dpkg_root/sbin/insserv");
     # If insserv is not configured it is not fully installed
     my $insserv_installed = -x "$dpkg_root$insserv" && -e 
"$dpkg_root/etc/insserv.conf";
+    # Ignore the presence of insserv if this system is using systemd
+    if ($insserv_installed && -d "$dpkg_root/run/systemd/system") {
+        $insserv_installed = 0;
+    }
     my @opts;
     push(@opts, '-f') if $force;
     # Add force flag if initscripts is not installed

But I'm not an expert in this matter and I also do not have any motivation to
argue with the systemd maintainers about this. If you have the energy for that
then I can support you with doing the work when things need to be
patched/fixed. In that case, how else can I help you? If you agree that above
is likely correct, then I can build init-system-helpers with this patch and see
if it indeed has the intended effect or not. I suppose to try this out I would
have to install some packages which ship sysv scripts? Do you have a suggestion
for a small/simple package which would be a good candidate?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to