GNU bug report logs -
#80028
[PATCH] Modifying guix-install.sh to work with runit
Previous Next
To reply to this bug, email your comments to 80028 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org:
bug#80028; Package
guix-patches.
(Thu, 18 Dec 2025 05:12:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Victor H. Manotas G." <victorma <at> cryptolab.net>:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org.
(Thu, 18 Dec 2025 05:12:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Modifying guix-install.sh to work with runit
[0001-Modifying-guix-install.sh-to-work-with-runit.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org:
bug#80028; Package
guix-patches.
(Fri, 19 Dec 2025 11:29:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
"Victor H. Manotas G. via Guix-patches" via <guix-patches <at> gnu.org>
writes:
> Modifying guix-install.sh to work with runit
>
> From 091d264350978d165b8444128b730c1d07c94a35 Mon Sep 17 00:00:00 2001
> From: "Victor H. Manotas G." <victorma <at> cryptolab.net>
> Date: Wed, 17 Dec 2025 22:11:31 -0500
> Subject: [PATCH] Modifying guix-install.sh to work with runit
>
> ---
> etc/guix-install.sh | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
> mode change 100755 => 100644 etc/guix-install.sh
>
> diff --git a/etc/guix-install.sh b/etc/guix-install.sh
> old mode 100755
> new mode 100644
> index 1d0e7fe..a524aba
> --- a/etc/guix-install.sh
> +++ b/etc/guix-install.sh
> @@ -96,6 +96,12 @@ SYSTEMD_REQUIRE=(
> "newgidmap"
> )
>
> +
> +RUNIT_REQUIRE=(
> + "which"
> +)
> +
> +
> PAS=$'[ \033[32;1mPASS\033[0m ] '
> ERR=$'[ \033[31;1mFAIL\033[0m ] '
> WAR=$'[ \033[33;1mWARN\033[0m ] '
> @@ -288,6 +294,10 @@ chk_init_sys()
> _msg_info "init system is: OpenRC"
> INIT_SYS="openrc"
> return 0
> + elif [[ $(which runit-init 2>/dev/null) = "/bin/runit-init" ]]; then
Is there a reason not to use `command -v'? Additionally, is this file
always guaranteed to be in this location, regardless of distribution?
> + _msg_info "init system is: runit"
> + INIT_SYS="runit"
> + return 0
> else
> INIT_SYS="NA"
> _err "Init system could not be detected."
> @@ -667,6 +677,16 @@ sys_enable_guix_daemon()
> rc-service guix-daemon start; } &&
> _msg_pass "enabled Guix daemon via OpenRC"
> ;;
> + runit)
> + { mkdir -p /etc/sv/guix;
> + echo '#!/bin/sh
> +exec /root/.config/guix/current/bin/guix-daemon \
> + --build-users-group=guixbuild' > /etc/sv/guix/run;
All other init systems copy a configuration file from the current Guix.
So maybe create etc/runit/guix.run and copy it over, the way e.g.,
sysv-init does it?
> + chmod +x /etc/sv/guix/run;
> + ln -s /etc/sv/guix /var/service/;
> + } &&
Style nitpick, all other cases have the terminating } && on the same
line as the last expression.
> + _msg_pass "enabled Guix daemon via runit"
> + ;;
> NA|*)
> _err "unsupported init system; run the daemon manually:"
> echo " ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild"
> @@ -731,6 +751,16 @@ sys_delete_guix_daemon()
> service guix-daemon stop
> rm -rf /etc/init.d/guix-daemon
> ;;
> +
> + runit)
> + _msg_info "stopping guix-daemon in runit"
> + sv stop guix
> + rm /var/service/guix
> + _msg_info "removing guix-daemon in runit"
> + rm -rf /etc/sv/guix
I do not know runit much, can user store other things (configs, ...) in
that directory? If not, than fine, if yes, than I am unsure we want to
just rm -rf the whole directory.
> + ;;
> +
> +
> NA|*)
> _err "unsupported init system; disable, stop and remove the daemon manually:"
> echo " ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild"
> @@ -805,6 +835,7 @@ if [ -L "$GUIX_PROFILE" ]; then
> . "$GUIX_PROFILE/etc/profile"
>
> # see info '(guix) Application Setup'
> +
Why?
> export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
>
> # Documentation search paths may be handled by $GUIX_PROFILE/etc/profile if
> @@ -828,6 +859,7 @@ fi
> unset GUIX_PROFILE
> EOF
> }
> +
Why?
>
> sys_create_shell_completion()
> { # Symlink supported shell completions system-wide
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org:
bug#80028; Package
guix-patches.
(Fri, 19 Dec 2025 11:29:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.