GNU bug report logs - #61717
guix home reconfigure on a fresh system fails

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Wed, 22 Feb 2023 20:35:01 UTC

Severity: normal

Full log


Message #8 received at 61717 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: wolf <wolf <at> wolfsden.cz>, 61717 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>,
 Ludovic Courtès <ludo <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>
Subject: Re: bug#61717: guix home reconfigure on a fresh system fails
Date: Fri, 24 Feb 2023 17:01:38 +0400
[Message part 1 (text/plain, inline)]
On 2023-02-22 16:40, wolf <at> wolfsden.cz wrote:

> 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:
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/home.scm?h=2c757e8fb4385f889ec91f02b77acdf27143c316#n476

1. Actually, this call is usually unecessary as the creation of directory
for per-user profiles handled by daemon.
https://git.savannah.gnu.org/cgit/guix.git/tree/nix/libstore/local-store.cc?h=2c757e8fb4385f889ec91f02b77acdf27143c316#n1613
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37744

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:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=0f6a27c2c4

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).
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=e615aaca28

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
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.