Discussion:
Bug#932199: insserv: warning: could not find all dependencies for $portmap
(too old to reply)
Thorsten Glaser
2019-07-16 14:40:02 UTC
Permalink
Package: insserv
Version: 1.20.0-1
Severity: important

Upgrading my system:

[…]
Preparing to unpack .../107-insserv_1.20.0-1_x32.deb ...
Unpacking insserv (1.20.0-1) over (1.14.0-5.4) ...
[…]
etting up inetutils-syslogd (2:1.9.4-8) ...
Installing new version of config file /etc/init.d/inetutils-syslogd ...
insserv: warning: could not find all dependencies for $portmap
insserv: warning: could not find all dependencies for $portmap
Restarting system log daemon syslogd.
Stopping system log daemon: syslogd.
Starting system log daemon: syslogd.
Setting up libgnutls30:i386 (3.6.8-2) ...
[…]

And, indeed, I do not have portmap installed.

***@tglase:~ $ sudo fgrep -r \$portmap /etc/init.d/
/etc/init.d/umountnfs.sh:# Should-Stop: $network $portmap nfs-common
/etc/init.d/mountnfs.sh:# Should-Start: $network $portmap nfs-common udev-mtab
/etc/init.d/README:# Should-Start: $portmap
/etc/init.d/README:# Should-Stop: $portmap

/etc/init.d/mountnfs.sh is from initscripts (= 2.93-8).
Perhaps it ought to be moved to nfs-common or so? That
being said, nfs-common does not Depends on portmap either…

-- System Information:
Debian Release: bullseye/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)

Versions of packages insserv depends on:
ii libc6 2.28-10

insserv recommends no packages.

Versions of packages insserv suggests:
pn bootchart2 <none>

-- no debco
Dmitry Bogatov
2019-07-18 12:50:02 UTC
Permalink
control: clone 932199 -2
control: reassing -2 initscripts
control: retitle -2 move /etc/init.d/mountnfs.sh to bin:nfs-common
control: severity -2 wishlist
control: forcemerge 932199 932266
control: tags 932199 +patch
Post by Thorsten Glaser
[…]
Preparing to unpack .../107-insserv_1.20.0-1_x32.deb ...
Unpacking insserv (1.20.0-1) over (1.14.0-5.4) ...
[…]
etting up inetutils-syslogd (2:1.9.4-8) ...
Installing new version of config file /etc/init.d/inetutils-syslogd ...
insserv: warning: could not find all dependencies for $portmap
insserv: warning: could not find all dependencies for $portmap
Restarting system log daemon syslogd.
Stopping system log daemon: syslogd.
Starting system log daemon: syslogd.
Setting up libgnutls30:i386 (3.6.8-2) ...
[…]
And, indeed, I do not have portmap installed.
/etc/init.d/umountnfs.sh:# Should-Stop: $network $portmap nfs-common
/etc/init.d/mountnfs.sh:# Should-Start: $network $portmap nfs-common udev-mtab
/etc/init.d/README:# Should-Start: $portmap
/etc/init.d/README:# Should-Stop: $portmap
Okay. I managed to reproduce this bug. It is triggered by unknown
virtual facility. Facility is unknown if it is mentioned neither in
/etc/insserv.conf nor in /etc/insserv.conf.d.

On my system, $x-display-manager is defined in /etc/insserv.conf.d/xdm;
on headless box there is no display manager, hence warning. Situation
with $portmap seems similar.

By the way, lightdm seems (according to apt-file) to not provide
/etc/insserv.conf.d/lightdm file. This is bug, I think.

This warning was introduced in upstream [ddd9d38] with following
changelog:

- When an initscript contains a "$service" dependency which cannot be
resolved (ie $service does not expand or does not exist) insserv
will display a warning. The initscript is still added.

Seems problem is that warning emitted not only for hard, but only for
soft dependencies. Patch at bottom.

Please check whether is solves all problems.
Post by Thorsten Glaser
/etc/init.d/mountnfs.sh is from initscripts (= 2.93-8). Perhaps it
ought to be moved to nfs-common or so? That being said, nfs-common
does not Depends on portmap either…
Sounds reasonable. Created bug.

From 233d6578855def060f9fe9d1fb62918911a209b8 Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <***@debian.org>
Date: Wed, 17 Jul 2019 18:50:53 +0000
Subject: [PATCH] Fix spurious warnings about unknown virtual dependencies

Closes: #932199
---
...nings-about-unknown-virtual-dependen.patch | 26 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 27 insertions(+)
create mode 100644 debian/patches/0004-Fix-spurious-warnings-about-unknown-virtual-dependen.patch

diff --git a/debian/patches/0004-Fix-spurious-warnings-about-unknown-virtual-dependen.patch b/debian/patches/0004-Fix-spurious-warnings-about-unknown-virtual-dependen.patch
new file mode 100644
index 0000000..c69214d
--- /dev/null
+++ b/debian/patches/0004-Fix-spurious-warnings-about-unknown-virtual-dependen.patch
@@ -0,0 +1,26 @@
+From: Dmitry Bogatov <***@debian.org>
+Date: Wed, 17 Jul 2019 18:45:45 +0000
+Subject: Fix spurious warnings about unknown virtual dependencies
+
+Do not emit warnings about unknown virtual($foo) facility soft
+dependency. It is perfectly fine to have soft (should) dependency
+on facility, provided by currently not installed package.
+
+Closes: #932199
+---
+ insserv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/insserv.c b/insserv.c
+index 90ea1bd..0c638dd 100644
+--- a/insserv.c
++++ b/insserv.c
+@@ -471,7 +471,7 @@ static void rememberreq(service_t * restrict serv, uint bit, const char * restri
+ break;
+ }
+ }
+- if (! can_expand_name)
++ if (! can_expand_name && (bit & REQ_MUST))
+ warn("warning: could not find all dependencies for %s\n", token);
+
+ break;
diff --git a/debian/patches/series b/debian/patches/series
index 27b8394..cbda0c6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
11_debian_conf.patch
110_portmap.patch
warn_in_ignore_mode.patch
+0004-Fix-spurious-warnings-about-unknown-virtual-dependen.patch
--
Note, that I send and fetch email in batch, once in a few days.
Please, mention in body of your reply when you add or remove recepients.
Thorsten Glaser
2019-07-18 14:00:01 UTC
Permalink
Post by Dmitry Bogatov
On my system, $x-display-manager is defined in /etc/insserv.conf.d/xdm;
on headless box there is no display manager, hence warning. Situation
with $portmap seems similar.
Indeed, I also ran into the $x-display-manager one after having
reported the $portmap one.
Post by Dmitry Bogatov
This warning was introduced in upstream [ddd9d38] with following
=20
- When an initscript contains a "$service" dependency which cannot be
resolved (ie $service does not expand or does not exist) insserv
will display a warning. The initscript is still added.
=20
Seems problem is that warning emitted not only for hard, but only for
soft dependencies. Patch at bottom.
=20
Please check whether is solves all problems.
I=E2=80=99d assume so but since it was only a warning I can now reboot with=
out
fear =E2=98=BB
Post by Dmitry Bogatov
/etc/init.d/mountnfs.sh is from initscripts (=3D 2.93-8). Perhaps it
ought to be moved to nfs-common or so? That being said, nfs-common
does not Depends on portmap either=E2=80=A6
That being said, it Depends on rpcbind which Provides portmap nowadays,
so I=E2=80=99d guess that will be it.
Post by Dmitry Bogatov
Sounds reasonable. Created bug.
OK, thanks!

bye,
//mirabilos
--=20
tarent solutions GmbH
Rochusstra=C3=9Fe 2-4, D-53123 Bonn =E2=80=A2 http://www.tarent.de/
Tel: +49 228 54881-393 =E2=80=A2 Fax: +49 228 54881-235
HRB 5168 (AG Bonn) =E2=80=A2 USt-ID (VAT): DE122264941
Gesch=C3=A4ftsf=C3=BChrer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Ale=
xander Steeg

**********

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontak=
t.

**********
Felix Zielcke
2019-07-20 05:40:01 UTC
Permalink
control: forcemerge 932199 932260
Post by Dmitry Bogatov
control: forcemerge 932199 932266
I guess you actually meant #932260 which is my filed bug.
#932266 is an ITP.
Post by Dmitry Bogatov
[...]
By the way, lightdm seems (according to apt-file) to not provide
/etc/insserv.conf.d/lightdm file. This is bug, I think.
So there should be another bug report filed against lightdm about this?
Post by Dmitry Bogatov
This warning was introduced in upstream [ddd9d38] with following
- When an initscript contains a "$service" dependency which cannot be
resolved (ie $service does not expand or does not exist) insserv
will display a warning. The initscript is still added.
Seems problem is that warning emitted not only for hard, but only for
soft dependencies. Patch at bottom.
Please check whether is solves all problems.
Now with todays apt upgrade and insserv 1.20.0-2 there were'nt any
warnins now at all from it.

Thanks for fixing!
Dmitry Bogatov
2019-07-21 18:50:02 UTC
Permalink
Post by Felix Zielcke
Post by Dmitry Bogatov
By the way, lightdm seems (according to apt-file) to not provide
/etc/insserv.conf.d/lightdm file. This is bug, I think.
So there should be another bug report filed against lightdm about this?
Yes. /etc/init.d/bootlogs contains following line:

# Should-Start: $x-display-manager gdm kdm xdm ldm sdm wdm nodm

Idea is that this script is ordered after display-manager, if any.

Since `lightdm` does not provide $x-display-manager,
/etc/init.d/bootlogs can be ordered before `lightdm'. I do not know how
severe are consequences, if any.

As fast and dirty fix we can add `lightdm` into Should-Start, but I'd
rather remove names of other display managers instead.

More generally, it could be lintian check that if package {foo} provides
x-display-manager, then it must bundle /etc/insserv.conf.d/{foo}.
--
Note, that I send and fetch email in batch, once in a few days.
Please, mention in body of your reply when you add or remove recepients.
Loading...