Subject: bug#32183: New ‘guix pull’ /root/.config/current/bin/guix: Permission denied

From: [email-masked] (Ludovic Courtès)
Date: Sun, 02 Sep 2018 15:55:06 +0200

Hi Pjotr,

What was the outcome of this bug?

  https://bugs.gnu.org/32183

If it wasn’t resolved, could you answer the questions below?

Thanks in advance!

Ludo’.

[email-masked] (Ludovic Courtès) skribis:

> Hi Pjotr,
>
> Pjotr Prins <[email-masked]> skribis:
>
>> Not completely sorted. Not sure what is going wrong but now starting
>> with guix 0.14 daemon and client and running guix pull a few times
>> successfully, running guix-daemon from $HOME/.config/guix/current/bin
>> and guix from a fresh git checkout using ./pre-inst-env guix I get
>>
>> substitute: /gnu/store/x02v3j0h5q1d9bl3lwxavp8m9rpm3b7m-guix-daemon-0.15.0-2.8bbb79c/libexec/guix/substitute: line 8: /root/.config/guix/current/bin/guix: No such file or directory
>>
>> which is funny for two reasons - 1st this is a guix-daemon that
>> appears to be older (it is the same) referring to a directory that
>> does not exist - guix pull is in my $HOME/.config.
>
> Since ‘guix-daemon’ runs as root, the ‘guix-daemon’ package¹ assumes
> that ~root/.config/guix/current/bin/guix exists.  In fact, the only way
> you can install the ‘guix-daemon’ package is by running ‘guix pull’, and
> if you run ‘guix-daemon’ you run it as root, so ~root/.config/guix
> necessarily exists.
>
> Or could it be that you’re running ‘guix-daemon’ from
> ~/.config/guix/current as non-root?  That would indeed fail.
>
> In fact it may be enough to do:
>
>   exec ~/.config/guix/current/bin/guix …
>
> instead of:
>
>   exec ~root/.config/guix/current/bin/guix …
>
> in that ‘install’ phase of ‘guix-daemon’.
>
> Thanks,
> Ludo’.
>
> ¹ https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n301