[PATCH] guix-install.sh: Add daemonize to requirements.

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Richard Sent
Owner
unassigned
Submitted by
Richard Sent
Severity
normal
R
R
Richard Sent wrote on 2 Apr 18:14 +0200
(address . guix-patches@gnu.org)(name . Richard Sent)(address . richard@freakingpenguin.com)
4e4fa72cfff690365f06c94534bc3d03ac7a3418.1712074456.git.richard@freakingpenguin.com
* 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(+)

Toggle diff (16 lines)
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"

base-commit: d67e4f0f9b10c7ddac8fb0ca68cbf1d6ad0a6e5d
--
2.41.0
L
L
Ludovic Courtès wrote on 4 May 18:49 +0200
(name . Richard Sent)(address . richard@freakingpenguin.com)(address . 70148@debbugs.gnu.org)
87wmo9sesk.fsf@gnu.org
Hi Richard,

Richard Sent <richard@freakingpenguin.com> skribis:

Toggle quote (13 lines)
> * 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?

Toggle quote (3 lines)
> 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’.
R
R
Richard Sent wrote on 5 May 00:44 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 70148@debbugs.gnu.org)
87bk5l42pc.fsf@freakingpenguin.com
Hi Ludo!

Toggle quote (6 lines)
>> 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.

Toggle quote (6 lines)
> 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).

--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
?