guix home reconfigure on a fresh system fails

  • Open
  • quality assurance status badge
Details
3 participants
  • Andrew Tropin
  • wolf
  • Tomas Volf
Owner
unassigned
Submitted by
wolf
Severity
normal
W
(address . bug-guix@gnu.org)
Y/Y3goQdK/zZFttb@ws
Hi,

I'm trying to setup a Guix machine. I did clean install using guix system init,
I can provide the config, but it does not seem to be relevant. After that I
decided to try the guix home reconfigure command, and it ended with:

guix home: error: while creating directory `/var/guix/profiles/per-user/wolf': Permission denied
hint: Please create the `/var/guix/profiles/per-user/wolf' directory, with you as the owner.

The workaround I used was to just install any random package:

guix install coreutils
guix remove coreutils

After that running

guix home reconfigure config.scm

started to work just fine. However that does not seem like proper way, but more
like a workaround. I was adviced on IRC to report it, so here I am.

W.

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmP2N4IACgkQL7/ufbZ/
wan7Sw/+MxHjEUbV5IWcwCYgb4mFfnoeB5XhY/HKDj+aT9TWL8elkyEPPvTbLq3v
mFHx5hN3QedDYmtgu0OSZXUo5E8+LrrWky9++NA6Mnz5JckfpSsuaJZsx/3KBZM6
d7uwJWm0DRurukjXwi5KPXiiECl87g+hGJMgep9Xl0gkKjBr3W1sZTegc/4FzOiH
r7Ga5kRtAJuyJdK9fTSfNuxQfycRWiCUM75Sf6/vpZ6K1devY5C3mtNrRGvFfjC/
dEWeobf+JCYdB55MHWL9UK0lORk1EM6q6eMuUWkYYnNsle/Ej7ft0///NxoCQKOb
Y+9kKQ/9WB+mP1lNOA6w/tFT4+RLRUYEm04NUZuhFPZ83409SJSAWpR9bJBG68LZ
SbBDyKpm824uF+1bWL7LJQnvfYRbPnJ1GqrOpm0VJ5kf30Je8C1HICqgDLxbejFr
hjIsxwhCZoofJoOXwmjrBmTc35IMte90Mph9pOm6Mv82prElcwXGyjUGhjgZqjZw
JFldldUAJ2rWyMcadFzuXIGLnASgE62HJNEJtzciBQ3mhePzrPuQ/uH6TauxbpTT
df4+hXgnL6Mf6cXNFNLq8FT6EqooXOLM4sp0NHT3VjbAnFR77RWGk4OyOQwmTtGv
ic4YXKV7pCSVabyONnsYwJcRvFcydlCKYMr3ZDtdscCGRx7LKvE=
=sMSd
-----END PGP SIGNATURE-----


A
A
Andrew Tropin wrote on 24 Feb 2023 14:01
87fsavz07h.fsf@trop.in
On 2023-02-22 16:40, wolf@wolfsden.cz wrote:

Toggle quote (23 lines)
> Hi,
>
> I'm trying to setup a Guix machine. I did clean install using guix system init,
> I can provide the config, but it does not seem to be relevant. After that I
> decided to try the guix home reconfigure command, and it ended with:
>
> guix home: error: while creating directory `/var/guix/profiles/per-user/wolf': Permission denied
> hint: Please create the `/var/guix/profiles/per-user/wolf' directory, with you as the owner.
>
> The workaround I used was to just install any random package:
>
> guix install coreutils
> guix remove coreutils
>
> After that running
>
> guix home reconfigure config.scm
>
> started to work just fine. However that does not seem like proper way, but more
> like a workaround. I was adviced on IRC to report it, so here I am.
>
> W.

This happens because of this call, which can't create a directory in
root owned /var/guix/profiles:

1. Actually, this call is usually unecessary as the creation of directory
for per-user profiles handled by daemon.

2. However, in some circumstances (when used custom $GUIX_STATE_DIRECTORY)
daemon doesn't handle this properly, so probably because of it this line
was added:

I moved it to a place, where connection to store is already openned, so
it work in both scenarios (first one is covered by the daemon, second
one by this call).

Ideally, it would be cool to fix on the daemon side and remove this call
at all.

CCed Ludo, Tobias, Oleg.

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmP4tTIACgkQIgjSCVjB
3rB7VQ/+Jcaud+pBP0ryzJZgc/TjLG31C6/Oqx/DloYgymFY+28TXapfVctvCZUH
F78IDmf1bp0wtWjc70KET79UaBNHlCjtvXyTOyZnRizc+9+HipgtKAoE7yUeiXKk
Wma/RmHPoUE1PeoFmDcaGCWC+y4xEZy0rn+r6wXmOf05b2tmprW8+PBdQD6xCk4O
rwDYoX+KbuoQlwjqk4jPM1PAtpjsXX5TSATLZvlFOoPY6Xz7EdQOrWEdhQud0CD4
OGcImiZEPq69uwLWTNpzs3dMe71EAKuIbvCy0dZVfVMN/irHIm1c9cnv+nRO/p2z
1Rg5OtOGzv3oU3PFSo+jWQSMOv74vb5M6j64A9mDHW3fCMMkbNyxI4HiF3eUqxkB
QL8+7dmPmN5ZDtW49i15DjzgJThCIGeILakVQDIR2TSNQ7WkUtCFubCDNQwtua7k
8s0ESIuc0zpwZ7EuowR8J6DtWeH6Z8XqChvN7msxKZek/ci8UH7XSLZOaAATtbSl
BfZMf0AszqwEGWrKzV4MSGZ/szs9X18YVQvPGhaZvubyMQ+2P4pg3BsTHyfKohud
nH34cIAqvb2D7UTNWvAHg/1CTgwBDSiTzWrAAcuU6QJB6XnfsjRiqDI1XYuIOm4m
31V94tFVqB7Rrx6LKdjP6clCnC87Bxs/+AK1diPEexdkQWxEE0Y=
=zv6d
-----END PGP SIGNATURE-----

T
T
Tomas Volf wrote on 9 Jan 17:58 +0100
control message for bug #61717
(address . control@debbugs.gnu.org)
9917e30de67f8a666adec39a8d5ed8c7@wolfsden.cz
submitter 61717 !
quit
?