Bug#824804: update-rc.d: may invoke insserv without -f flag when initscripts is installed but not configured

Felipe Sateler fsateler at debian.org
Thu May 19 22:57:40 BST 2016


X-Debbugs-Cc: andreas at fatal.se
Package: init-system-helpers
Version: 1.33
Severity: normal

Filing so that this is tracked somewhere.

update-rc.d currently has support for invoking insserv with the -f flag,
to allow initscripts-less installations. This should allow packages to drop
dependencies on the initscripts package. However, this does not work if the
dependency is dropped, because now apt/dpkg can choose to configure the
package before it configures initscripts. This leads to the situation that
/etc/init.d/mountkernfs.sh exists (and thus invoke-rc.d does not pass -f flag),
but the links in /etc/rc?.d/S??mountkernfs.sh are not created yet, and then
insserv fails.

A practical example of this happened when util-linux dropped the initscripts
dependency on #823665.

Possible solutions:

1. Unconditionally pass -f to insserv. This has some appeal to me as I don't
   think packaging bugs should in general abort installations, but I can see
   the argument for preserving the check.
2. Extend the check to the links (ie, check if
   `glob /etc/rc?.d/S??mountkernfs.sh` is not empty.
3. Consult the dpkg database via dpkg-query to determine if initscripts has been
   configured
4. Have dpkg/apt support ordering without dependencies (not likely to
   happen soon).


I think (2) is the easiest and fastest way out of this problem, but
(4) would be the real fix.

-- 

Saludos,
Felipe Sateler



More information about the Pkg-systemd-maintainers mailing list