Package: polkitd
Version: 124-2
Severity: wishlist
Tags: patch

Dear Maintainer,

In polkitd.postinst, the following is executed on non-systemd systems to stop
polkitd:

        start-stop-daemon --stop --oknodo --quiet --exec
/usr/libexec/polkitd || true

This /usr/libexec/polkitd file is not on my system, and it can not be found in
current *_debian_dists_sid_{main,contrib,non-free}_Contents-{all,amd64}.lz4.
This causes a message emitted during the configure of the polkitd package:

Setting up polkitd (124-2) ...
Creating group 'polkitd' with GID 994.
Creating user 'polkitd' (User for polkitd) with UID 994 and GID 994.
start-stop-daemon: unable to stat /usr/libexec/polkitd (No such file
or directory)

This message(start-stop-daemon: unable to ...) is useless and may confuse users.
I suggest change this line and the line before it as the following to prevent
this message:

        test -x /usr/lib/polkit-1/polkitd && start-stop-daemon --stop
--oknodo --quiet --exec /usr/lib/polkit-1/polkitd || true
        test -x /usr/libexec/polkitd && start-stop-daemon --stop
--oknodo --quiet --exec /usr/libexec/polkitd || true

A full patch is attached. Please consider apply this change or take any other
modification to prevent the possible confusing message from emitting.

Regards,
Jun MO

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.12-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, 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 /usr/bin/dash
Init: runit (via /run/runit.stopit)
LSM: AppArmor: enabled

Versions of packages polkitd depends on:
ii  adduser                          3.137
ii  dbus [default-dbus-system-bus]   1.14.10-4+b1
ii  libc6                            2.38-7
ii  libduktape207                    2.7.0-2+b1
ii  libexpat1                        2.6.2-1
ii  libglib2.0-0t64                  2.80.0-9
ii  libpam-elogind [logind]          255.5-1debian1
ii  libpam0g                         1.5.3-7
ii  libpolkit-agent-1-0              124-2
ii  libpolkit-gobject-1-0            124-2
ii  libsystemd0                      255.5-1
ii  opensysusers [systemd-sysusers]  0.7.3-2
ii  xml-core                         0.19

polkitd recommends no packages.

Versions of packages polkitd suggests:
pn  polkitd-pkla  <none>

Versions of packages polkitd is related to:
ii  elogind         255.5-1debian1
ii  libpam-elogind  255.5-1debian1
pn  libpam-systemd  <none>
pn  systemd         <none>

-- no debconf information
--- /var/lib/dpkg/info/polkitd.postinst	2024-03-17 03:22:27.000000000 +0800
+++ /tmp/polkitd.postinst	2024-05-05 21:28:05.829634044 +0800
@@ -39,8 +39,8 @@
         # On non-systemd systems, polkitd is started as a traditional D-Bus
         # system service and is not managed by a service manager, so this is
         # the best we can do
-        start-stop-daemon --stop --oknodo --quiet --exec /usr/lib/polkit-1/polkitd || true
-        start-stop-daemon --stop --oknodo --quiet --exec /usr/libexec/polkitd || true
+        test -x /usr/lib/polkit-1/polkitd && start-stop-daemon --stop --oknodo --quiet --exec /usr/lib/polkit-1/polkitd || true
+        test -x /usr/libexec/polkitd && start-stop-daemon --stop --oknodo --quiet --exec /usr/libexec/polkitd || true
     fi
 }
 

Reply via email to