Devuan bug report logs - #688
systemctl infinite loop, missing /bin/systemctl symlink

version graph

Package: systemctl-service-shim; Maintainer for systemctl-service-shim is B. Stack <bgstack15@gmail.com>; Source for systemctl-service-shim is src:systemctl-service-shim.

Reported by: Jernej Jakob <jernej.jakob@gmail.com>

Date: Thu, 7 Jul 2022 19:56:02 UTC

Severity: grave

Tags: stable

Found in version 0.0.1-1

Fixed in version 0.0.3-1

Done: dak@devuan.org

Full log


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

Received: (at submit) by bugs.devuan.org; 7 Jul 2022 19:54:19 +0000
Return-Path: <jernej.jakob@gmail.com>
Delivered-To: devuanbugs@dyne.org
Received: from mail.dyne.org [141.95.83.167]
	by doc.devuan.org with IMAP (fetchmail-6.4.16)
	for <debbugs@localhost> (single-drop); Thu, 07 Jul 2022 19:54:19 +0000 (UTC)
Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.dyne.org (Postfix) with ESMTPS id 976C56617FC
	for <submit@bugs.devuan.org>; Thu,  7 Jul 2022 21:52:57 +0200 (CEST)
Authentication-Results: mail.dyne.org;
	dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mPQ3xJgc";
	dkim-atps=neutral
Received: by mail-ej1-f47.google.com with SMTP id u12so34199246eja.8
        for <submit@bugs.devuan.org>; Thu, 07 Jul 2022 12:52:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112;
        h=date:from:to:subject:message-id:mime-version
         :content-transfer-encoding;
        bh=/CD7GpQCkS3WB30Df/ryLpc+a5wz+46ZTotoNHc9qKI=;
        b=mPQ3xJgcaBkRKiS3TjXqxk7gPtk+zzUwmCKyTH3I5PdM5Y8lF6GEoy7VUQcwweq5ev
         l8JXfz3nxcoXrRmoxmWa0YX42aOMt5QHicSOGaHkqjlWiLslZnzwwqKsHBJ3ebWdooFw
         3ky2ei9teskjReO+blpp+mlYlcEaI9mBql0VAg1rGT8uJ8Ucpgxdj8U7AEq2vLPva8hc
         xQzrKJSMZxqIdXS5XTCquzEddU8wQ1IStqw+RfBRaG//5JAOY2p0hu4rLdUxWmGHAIEQ
         M48qwI/+dWnHTTzdb8sH/x5TBPVRqbJ1eilm2/WhYHtUEE1dmvnHBKcW9fiyCEMgtXNb
         NDqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=x-gm-message-state:date:from:to:subject:message-id:mime-version
         :content-transfer-encoding;
        bh=/CD7GpQCkS3WB30Df/ryLpc+a5wz+46ZTotoNHc9qKI=;
        b=b8LocRzz3o4QLBWlUUX+aPvLBniFLLsNLsKf5GtqtZB47pO2ooOMHrvcSpECKJI3zL
         J77UdJSqfE2cvW+UgnyB5BXYQEeNWVqiGq7yb6cI+apGq9uLd0otqhVJKZfPVkyme6o2
         6XywNvqSIIhlEajfLJKtBv075xNYqB9N/gzvEvUfMY2NN5By0FlGrQVsitI5lnDIFaLu
         lk+DJZUbn0+t++3zOXRveUMazeuPxtTB0BKrNhQiXB3+0iBFFwiZUEn0Y3QMJleLwsIw
         w9CbKXIMzCiSuKSOinORoJTNKx0hyKWzrXllPqOFvDNJEVtnEBfmNpZf6qZtabZ7oJQS
         IFaQ==
X-Gm-Message-State: AJIora99RViqdXF5Nt1vh96CIKv382OC0FiPE9+RX4rXw3Bh4DgipwHX
	At2S28BSK6EPR3j72iZ1lnohAJ6T444=
X-Google-Smtp-Source: AGRyM1uws0xwreyKQwHP0TDaZURl4hsipsaDwm7T0SrAj5W5F0ra6oiTJ53jZwS0pQcPGEqQhLSdGA==
X-Received: by 2002:a17:906:98c8:b0:72a:fcd9:9a54 with SMTP id zd8-20020a17090698c800b0072afcd99a54mr9076489ejb.445.1657223576777;
        Thu, 07 Jul 2022 12:52:56 -0700 (PDT)
Received: from gentoo.home ([2a01:260:8028:10f0::62])
        by smtp.gmail.com with ESMTPSA id 18-20020a170906329200b0072abb95eaa4sm7017566ejw.215.2022.07.07.12.52.55
        for <submit@bugs.devuan.org>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 07 Jul 2022 12:52:56 -0700 (PDT)
Date: Thu, 7 Jul 2022 21:52:50 +0200
From: Jernej Jakob <jernej.jakob@gmail.com>
To: submit@bugs.devuan.org
Subject: systemctl infinite loop, missing /bin/systemctl symlink
Message-ID: <20220707215250.35bd392b@gentoo.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,
	RCVD_IN_MSPIKE_H2,SPF_PASS,URIBL_BLOCKED autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dyne.org
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.

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Fri May 3 08:10:03 2024;