Subject: bug#688: systemctl infinite loop, missing /bin/systemctl symlink

From: Jernej Jakob <[email-masked]>
Date: Thu, 7 Jul 2022 21:52:50 +0200

Package: systemctl-service-shim
Version: 0.0.1-1
Severity: grave
Tags: stable

When executing the "enable" action, systemctl enters into an infinite
loop.

# /bin/systemctl enable chrony.service
update-rc.d chrony enable
insserv: warning: script 'cgroups' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cgroups'
insserv: Default-Stop  undefined, assuming empty stop runlevel(s) for script `cgroups'
 * rc-update: chrony already installed in runlevel `default'; skipping
update-rc.d chrony enable
insserv: warning: script 'cgroups' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cgroups'
insserv: Default-Stop  undefined, assuming empty stop runlevel(s) for script `cgroups'
 * rc-update: chrony already installed in runlevel `default'; skipping
update-rc.d chrony enable

Additionally, there is no /bin/systemctl, as the script is installed to
/usr/sbin/systemctl, so some scripts that call a hardcoded binary path
/bin/systemctl won't work without manually creating a symlink after
installation.

I see some code to manipulate the symlink was added in 0.0.2
https://git.devuan.org/devuan/systemctl-service-shim/commit/abd012174f9545f4d4bd236716e51dedcad8c6f1
if I understand it correctly, it's a workaround (fix) for this infinite
loop problem which is caused by the init scripts calling systemctl
again.

In my opinion, the symlink should also be created in the package
postinst script. This way packages that depend on /bin/systemctl
will work immediately without manual symlink creation. There should be
no conflict with systemd, as the package already has a conflict with
systemd, it will never be simultaneously installed.

---

From: Jernej Jakob <[email-masked]>
Date: Thu, 7 Jul 2022 22:37:10 +0200

I installed 0.0.2-1 from deb and it appears to work correctly.
Only the symlink is missing by default and would need to be added by
the package on installation.

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Tue, 12 Jul 2022 17:14:05 +0000

This is an automatic notification regarding your bug report
which was filed against the systemctl-service-shim package:

#688: systemctl infinite loop, missing /bin/systemctl symlink

It has been closed by [email-masked].

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact [email-masked] by
replying to this email.

-- 
688: https://bugs.devuan.org/cgi/bugreport.cgi?bug=688
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: #688: fixed in src:systemctl-service-shim version 0.0.3-1
From: [email-masked]
To: [email-masked]
Date: Tue, 12 Jul 2022 15:53:37 +0000

Version: 0.0.3-1

Source package systemctl-service-shim (0.0.3-1) added to Devuan suite unstable.

This closes bug report 688.

Thanks

DAK managing the Devuan archive

Format: 1.8
Date: Tue, 12 Jul 2022 10:52:37 -0400
Source: systemctl-service-shim
Architecture: source
Version: 0.0.3-1
Distribution: unstable
Urgency: low
Maintainer: B. Stack <[email-masked]>
Changed-By: B. Stack <[email-masked]>
Closes: 688
Changes:
 systemctl-service-shim (0.0.3-1) unstable; urgency=low
 .
   * Add /bin/systemctl symlink directly to package (Closes: #688)
   * Action `try-restart` is simplified to `restart`
Checksums-Sha1:
 fba6db32fbed789965522a618a26840f5c31ef79 1654 systemctl-service-shim_0.0.3-1.dsc
 064b17d5541c6f73a8df313d2dbc0d0830359401 13809 systemctl-service-shim_0.0.3.orig.tar.gz
 d1799e0e4e6c075deb693ff2fdb8d88e0f22c6cf 6640 systemctl-service-shim_0.0.3-1.debian.tar.xz
 d5fbb6a6a10b5df39bf1e70610d65e49c7776de9 5349 systemctl-service-shim_0.0.3-1_source.buildinfo
Checksums-Sha256:
 b6d8eec49cab0ccb0588a7392a2a950ee3db688601dabe8e3d5e15216610b766 1654 systemctl-service-shim_0.0.3-1.dsc
 9f57fb5fe94277ae8d63261ee8783f79716b57589eb2e8eba1f756bfc2e0069c 13809 systemctl-service-shim_0.0.3.orig.tar.gz
 09b1b2004c583431d5fe530e37944ce924a83668327bbd0b71751258c52f5a02 6640 systemctl-service-shim_0.0.3-1.debian.tar.xz
 86f17f6f1c722f86897af8fdece01a79c2fb2995bfcfa8b1617876bb4f1d5a43 5349 systemctl-service-shim_0.0.3-1_source.buildinfo
Files:
 06f1209d1aef8f3836bd3dff061f6063 1654 admin optional systemctl-service-shim_0.0.3-1.dsc
 a78c75bafe3e21ada5bf660d1f94228d 13809 admin optional systemctl-service-shim_0.0.3.orig.tar.gz
 49faa5c7c894bd8838545f35abb82e48 6640 admin optional systemctl-service-shim_0.0.3-1.debian.tar.xz
 ee8a8ddf7b142557c1dcb0536dc57fc0 5349 admin optional systemctl-service-shim_0.0.3-1_source.buildinfo

Subject: systemctl infinite loop, missing /bin/systemctl symlink
From: Jernej Jakob <[email-masked]>
To: [email-masked]
Date: Thu, 7 Jul 2022 21:52:50 +0200