Service manager "init scripts" missing from current-guix

DoneSubmitted by Leo Famulari.
Details
3 participants
  • Efraim Flashner
  • Leo Famulari
  • zimoun
Owner
unassigned
Severity
normal
Merged with
L
L
Leo Famulari wrote on 2 Mar 2021 07:05
(address . bug-guix@gnu.org)
YD3VuIZ4FLpjpqN1@jasmine.lan
On #guix, user fossguy[m]11 reported that guix-install.sh fails on
Gentoo, like this:

------
cp: cannot stat '/root/.config/guix/current/etc/openrc/guix-daemon': No such file or directory
chmod: cannot access '/etc/init.d/guix-daemon': No such file or directory
* rc-update: service `guix-daemon' does not exist
------

I downloaded the 1.2.0 release binary and, indeed, there is no directory
'etc/openrc' in root's current-guix profile. It's also missing from the
'guix-1.2.0' store item that is the current-guix in this context.

There is 'etc/init.d', 'lib/upstart', and 'lib/systemd'.

Weirder: none of these files are available in current-guix on a
"current" Guix installation, although they do appear in the result of
`guix build guix`. Minus openrc of course. Is this expected?
Z
Z
zimoun wrote on 4 Mar 2021 04:27
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
86pn0fsims.fsf@gmail.com
Hi,

On Tue, 02 Mar 2021 at 01:05, Leo Famulari <leo@famulari.name> wrote:

Toggle quote (12 lines)
> ------
> cp: cannot stat '/root/.config/guix/current/etc/openrc/guix-daemon': No such file or directory
> chmod: cannot access '/etc/init.d/guix-daemon': No such file or directory
> * rc-update: service `guix-daemon' does not exist
> ------
>
> I downloaded the 1.2.0 release binary and, indeed, there is no directory
> 'etc/openrc' in root's current-guix profile. It's also missing from the
> 'guix-1.2.0' store item that is the current-guix in this context.
>
> There is 'etc/init.d', 'lib/upstart', and 'lib/systemd'.

Neither in the latest binary from CI:


Noting ’guix-profile’ instead of ’current-profile’ in the extracted ’var’:

$ ls -l var/guix/profiles/per-user/root/
total 0
lrwxrwxrwx 1 sitour sitour 19 janv. 1 1970 guix-profile -> guix-profile-1-link
lrwxrwxrwx 1 sitour sitour 51 janv. 1 1970 guix-profile-1-link -> /gnu/store/…-profile

Mathieu, how this ’latest’ tarball is produced? With “guix pack
--profile-name=current-guix” as in “make release”?


The 2 last commits seems about openrc seem,

d27dbeb9d8 gnu: guix: Install OpenRC init files to $(prefix)/etc.
cabac732de guix-install.sh: Support OpenRC.

I miss why in nix/local.mk:

Toggle snippet (5 lines)
# The service script for openrc.
openrcservicedir = $(sysconfdir)/init.d
nodist_openrcservice_DATA = etc/openrc/guix-daemon

instead of:

openrcservicedir = $(sysconfdir)/openrc

and then in accordance with the substitutes* replacement. Well, this
tiny patch does that:
Toggle diff (26 lines)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 776867eab7..938907eb12 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -212,7 +212,7 @@ $(prefix)/etc/init.d\n")))
                         (substitute* "nix/local.mk"
                           (("^openrcservicedir = .*$")
                            (string-append "openrcservicedir = \
-$(prefix)/etc/init.d\n")))
+$(prefix)/etc/openrc\n")))
 
                         (invoke "sh" "bootstrap")))
                     (add-before 'build 'use-host-compressors
diff --git a/nix/local.mk b/nix/local.mk
index d2ce349d9c..7c438ea78c 100644
--- a/nix/local.mk
+++ b/nix/local.mk
@@ -181,7 +181,7 @@ etc/init.d/guix-daemon: etc/init.d/guix-daemon.in	\
 	mv "$@.tmp" "$@"
 
 # The service script for openrc.
-openrcservicedir = $(sysconfdir)/init.d
+openrcservicedir = $(sysconfdir)/openrc
 nodist_openrcservice_DATA = etc/openrc/guix-daemon
 
 etc/openrc/guix-daemon: etc/openrc/guix-daemon.in	\
It seems to fix… but not well tested since I am still failing with
“make release”. :-)

I have tried with

./pre-inst-env guix build guix \
--with-git-url=guix=$(pwd) \
--with-commit=guix=xxxxxxxx

WDYT?


Toggle quote (4 lines)
> Weirder: none of these files are available in current-guix on a
> "current" Guix installation, although they do appear in the result of
> `guix build guix`. Minus openrc of course. Is this expected?

Is it not the difference between the package Guix and (guix self)?
Other said, “guix pull” does not install the package Guix in “current”
but compile (guix self). Maybe I misunderstand something.


Cheers,
simon
Z
Z
zimoun wrote on 13 Mar 2021 03:53
control message for bug #47090
(address . control@debbugs.gnu.org)
86v99vhihp.fsf@gmail.com
merge 47090 46871
quit
E
E
Efraim Flashner wrote on 30 Mar 2021 09:31
Re: [bug#47407] [PATCH] gnu: guix: Fix openrc init scripts.
(name . zimoun)(address . zimon.toutoune@gmail.com)
YGLT2XBKfO7peIwj@3900XT
Thanks. Patch pushed.

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBi09kACgkQQarn3Mo9
g1GR2w/+MWORNl1PivAO7j55m0fZJLVVG0VpN1dwIIMPjRwzxhdcN9PaUxfaMf4X
bRM/crsiSA860dOoY5GylWV0Y3ENSskbZiWx0SPzMMGPRD8crUUYQgsuhN446bs4
pmnjTR+3k6WzQfMutQGuuY3CVzmZ8RpQR4SlDBF+F2rom0ekYJE//db+xbxQk4WJ
L0gnGjt+a7nM7+Qn18fCzKEvi/lciXvzphpoueuTNvXGS5IhxnqMuV1yTZwCzGVY
XOpqnTxyAf7y0m3PfVu5qV6ruQnACORUSle1hD8jWnqYbCbnlSqSIK+EKnn3QYxt
To3G7M3QcLN7PeXWQWhLRjEp6e+Bu5w3vCgyDxYLjm+l8vlBJWhZjBHTMsgoUyGz
8jCsuNPBLrhZg4n3Xk3YTKhZmMI++nuRpp+7y1I4FGuMRBfiRFmsqolQbIKKQtO+
C4bt8snwx5EEnLLOzjia/q3BWAIYURWdKlxLpXkZWRjMvvcGWe5M8IV+Flff45le
iu8/hAXSfIJNk52op9caw27wtWJceEifr5zKGifvcdlbW/8Dkxc1kEYMjhVRsO9W
HJ8ePydKB45E/YRdrNoI8KsiKiR1uEBaO7lSjAebG36dxnEXFBza7Cof5eLvs4FF
J4BhqHfnHSx7y7lCn0UP7VfoBAyFACWcbVKYt/rhBwhX46lnEPI=
=S+wS
-----END PGP SIGNATURE-----


Closed
Z
Z
zimoun wrote on 30 Mar 2021 10:24
(name . Efraim Flashner)(address . efraim@flashner.co.il)
CAJ3okZ2gL5_xdvPLqjpz6Wn3372aqDzY_7iOw-QrDOGH_FWHYQ@mail.gmail.com
Hi Efraim,

On Tue, 30 Mar 2021 at 09:32, Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (3 lines)
>
> Thanks. Patch pushed.

Thanks. Cheers,
simon
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 46871@debbugs.gnu.org