Message ID | 4e4fa72cfff690365f06c94534bc3d03ac7a3418.1712074456.git.richard@freakingpenguin.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1653327BBE9; Tue, 2 Apr 2024 17:23:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1077F27BBE2 for <patchwork@mira.cbaines.net>; Tue, 2 Apr 2024 17:23:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rrgue-0001NJ-4Q; Tue, 02 Apr 2024 12:23:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rrguZ-0001MV-7b for guix-patches@gnu.org; Tue, 02 Apr 2024 12:23:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rrguY-00021o-PG for guix-patches@gnu.org; Tue, 02 Apr 2024 12:22:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rrguc-0008Rs-6M for guix-patches@gnu.org; Tue, 02 Apr 2024 12:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70148] [PATCH] guix-install.sh: Add daemonize to requirements. Resent-From: Richard Sent <richard@freakingpenguin.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Apr 2024 16:23:01 +0000 Resent-Message-ID: <handler.70148.B.171207494032223@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70148 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70148@debbugs.gnu.org Cc: Richard Sent <richard@freakingpenguin.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171207494032223 (code B ref -1); Tue, 02 Apr 2024 16:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Apr 2024 16:22:20 +0000 Received: from localhost ([127.0.0.1]:55836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rrgtr-0008NB-JB for submit@debbugs.gnu.org; Tue, 02 Apr 2024 12:22:19 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <richard@freakingpenguin.com>) id 1rrgtm-0008Lb-49 for submit@debbugs.gnu.org; Tue, 02 Apr 2024 12:22:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard@freakingpenguin.com>) id 1rrgta-0000tw-Hd for guix-patches@gnu.org; Tue, 02 Apr 2024 12:21:58 -0400 Received: from mail-108-mta46.mxroute.com ([136.175.108.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard@freakingpenguin.com>) id 1rrgtY-0001oI-3O for guix-patches@gnu.org; Tue, 02 Apr 2024 12:21:58 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta46.mxroute.com (ZoneMTA) with ESMTPSA id 18e9f9deaac0003bea.001 for <guix-patches@gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 02 Apr 2024 16:21:50 +0000 X-Zone-Loop: baecaac8d03564c464822a785361533782971da0a5d9 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GLmgSVrtIJ+5ImW6Xk3aZ3Kuyrh/o1wS6eABoget5zw=; b=r0r+BQ3gcV3PrL96ebuNCRdMn+ I06DA5LSOdFbbVzFud0HhopyF3+QNA2CEOIpRqwRwWKGBbyWvnKEaf8a7bUK7klF1G4k/V4nLWFv3 O8WZrazhGwjzJ5cEsQhf15nR0uNPCkDwytil6F5ZOh7osFDt5e/JhgPA+BUgmFpP5eUyudextgBlO z98BusIcKFeDB9EtE2JnQk2WyWlNLl/pUCri4GmsK/vrZ18L4kdIYhNddQAxrs7DozuHe3pEzvxUb Gs0hz3Qf2Ai13qLsS0mSAaUqnNLGvvQjMYqS9B+cK/6iC+T2soQBXNJxr1j+hR1+abo3XJ4qy+C2c cegW0ULA==; From: Richard Sent <richard@freakingpenguin.com> Date: Tue, 2 Apr 2024 12:14:16 -0400 Message-ID: <4e4fa72cfff690365f06c94534bc3d03ac7a3418.1712074456.git.richard@freakingpenguin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.46; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta46.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#70148] guix-install.sh: Add daemonize to requirements.
|
|
Commit Message
Richard Sent
April 2, 2024, 4:14 p.m. UTC
* etc/guix-install.sh (REQUIRE): Add daemonize to requirements list. Needed to spawn the Guix Daemon in guix-daemon.in Change-Id: I77c7f2bdd686bb023ecfa108a499c2eafbad1eb7 --- Hi Guix. I noticed that in Debian WSL the guix daemon sysvinit service wouldn't start due to daemonize not being present. This patch should catch that issue sooner. Both openrc and sysvinit use guix-daemon.in so daemonize should be required regardless of the init system. etc/guix-install.sh | 1 + 1 file changed, 1 insertion(+) base-commit: d67e4f0f9b10c7ddac8fb0ca68cbf1d6ad0a6e5d
Comments
Hi Richard, Richard Sent <richard@freakingpenguin.com> skribis: > * etc/guix-install.sh (REQUIRE): Add daemonize to requirements list. > Needed to spawn the Guix Daemon in guix-daemon.in > > Change-Id: I77c7f2bdd686bb023ecfa108a499c2eafbad1eb7 > --- > > Hi Guix. I noticed that in Debian WSL the guix daemon sysvinit service > wouldn't start due to daemonize not being present. This patch should > catch that issue sooner. > > Both openrc and sysvinit use guix-daemon.in so daemonize should be > required regardless of the init system. ‘daemonize’ seems to be used by etc/init.d/guix-daemon.in, but not by etc/openrc/guix-daemon.in, right? > REQUIRE=( > + "daemonize" My only concern is if the majority of users (which I assume use systemd) would get an error for a missing package they don’t actually need. Do you think that is a risk or is ‘daemonize’ usually installed “by default” even on those systemd distros? Thanks, Ludo’.
Hi Ludo! >> Both openrc and sysvinit use guix-daemon.in so daemonize should be >> required regardless of the init system. > > ‘daemonize’ seems to be used by etc/init.d/guix-daemon.in, but not by > etc/openrc/guix-daemon.in, right? Correct, I think I got confused by guix-install.sh copying etc/openrc/guix-daemon to /etc/init.d/guix-daemon. (See the openrc handler in the $INIT_SYS case statement in sys_enable_guix_daemon()). Assuming I understand the script; I find shell scripts hard to parse. > My only concern is if the majority of users (which I assume use systemd) > would get an error for a missing package they don’t actually need. > > Do you think that is a risk or is ‘daemonize’ usually installed “by > default” even on those systemd distros? I suspect there's a risk. WSL Debian does not come with daemonize out of the box so I imagine normal Debian does not either. If OpenRC/systemd does not require daemonize, there's probably a better way to handle this. Perhaps a INITD_REQUIRE variable that's only checked conditionally depending on what init system is detected (aka INIT_SYS).
Hi, On sam., 04 mai 2024 at 18:44, Richard Sent <richard@freakingpenguin.com> wrote: > If OpenRC/systemd does not require daemonize, there's probably a better way to > handle this. Perhaps a INITD_REQUIRE variable that's only checked > conditionally depending on what init system is detected (aka INIT_SYS). This appears to me the best solution. It seems better that the requirements stay as minimal as possible for most of users. Well, maybe another variable as INITD_REQUIRE. Or maybe a plain test for this daemonize when the init system is detected; since for now there is only one extra package, if I read correctly. Cheers, simon
Hi, Simon Tournier <zimon.toutoune@gmail.com> skribis: > On sam., 04 mai 2024 at 18:44, Richard Sent <richard@freakingpenguin.com> wrote: > >> If OpenRC/systemd does not require daemonize, there's probably a better way to >> handle this. Perhaps a INITD_REQUIRE variable that's only checked >> conditionally depending on what init system is detected (aka INIT_SYS). > > This appears to me the best solution. It seems better that the > requirements stay as minimal as possible for most of users. +1. Would be best to ensure the installer doesn’t get in the way of those using systemd distros. Could you look into it, Richard? Ludo’.
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 982fb0a266..94ecb1d8f3 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -56,6 +56,7 @@ set -eo pipefail [ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; } REQUIRE=( + "daemonize" "dirname" "readlink" "wget"