Re: sha256 hash mismatch

2018-11-19 Thread Fredrik Salomonsson
Den mån 19 nov. 2018 10:53 skrev swedebugia :

Welcome to guix :)

Thanks!

Sorry about the rough start. Guix-land is a real adventure sometimes!


No worries. Not my first time venturing into guix-land. I'm a little bit
more prepared this time. Got a wifi-card that linux-libre supports. And I'm
more familiar with the guile language.

Thanks for specifying the command and config.scm.
Did you follow the manual?

Yes. I only authorised berlin. As I assume hydra is already authorised. Is
that assumption correct?

I suspect you did not as guix was trying to build stuff (normally we
have substitutes for almost everything if you either run init without
pulling first (=guix 0.15) or pull to a commit a week ago or so.

Getting substitutes to work is crucial if you are not very patient. The
hash mismatches are a plague brought by changes upstream which are NOT
retroactively fixed.

You can check the availability of substitutes with "guix weather".

With substitutes working and available init should not take more that 10
min on a recent machine. It would probably be a good idea to state this
in the manual.


Thanks for pointing out "guix weather". I've seen it mentioned from time to
time in the mailing list. But didn't know what it was used for. Any good
workflow to find a commit that have good substitute coverage? As from what
I understand, reading the manual. It will only check the guix version
you're running.

If you want to hack on guix you will have to update guix above 0.15.


That's my end goal. Just need to be able to install it. :)

Will try to do a guix pull, to see if that works.

Den mån 19 nov. 2018 10:53 skrev swedebugia :

> Welcome to guix :)
>
> On 2018-11-19 06:10, Fredrik Salomonsson wrote:
> > Hi,
> >
> > Trying to install guix-0.15 to see if I can get dual booting with btrfs
> > working on my laptop. But didn't get that far. Encounter an error when
> > running guix system init. Ran it twice, same error. Any idea what could
> > be wrong? Took about 4-6h to run it the first time.
>
> Sorry about the rough start. Guix-land is a real adventure sometimes!
>
> >
> > Here's the command:
> > guix system init /mnt/etc/config.scm /mnt/
> > --substitute-urls="https://hydra.gnu.org https://berlin.guixsd.org;
> Thanks for specifying the command and config.scm.
> Did you follow the manual? (e.g. authorize the keys for both servers
> above?)
>
> I suspect you did not as guix was trying to build stuff (normally we
> have substitutes for almost everything if you either run init without
> pulling first (=guix 0.15) or pull to a commit a week ago or so.
>
> Getting substitutes to work is crucial if you are not very patient. The
> hash mismatches are a plague brought by changes upstream which are NOT
> retroactively fixed.
>
> You can check the availability of substitutes with "guix weather".
>
> With substitutes working and available init should not take more that 10
> min on a recent machine. It would probably be a good idea to state this
> in the manual.
>
> If you want to hack on guix you will have to update guix above 0.15.
>
> --
> Cheers
> Swedebugia
>


Re: sha256 hash mismatch

2018-11-19 Thread swedebugia

Welcome to guix :)

On 2018-11-19 06:10, Fredrik Salomonsson wrote:

Hi,

Trying to install guix-0.15 to see if I can get dual booting with btrfs 
working on my laptop. But didn't get that far. Encounter an error when 
running guix system init. Ran it twice, same error. Any idea what could 
be wrong? Took about 4-6h to run it the first time.


Sorry about the rough start. Guix-land is a real adventure sometimes!



Here's the command:
guix system init /mnt/etc/config.scm /mnt/ 
--substitute-urls="https://hydra.gnu.org https://berlin.guixsd.org;

Thanks for specifying the command and config.scm.
Did you follow the manual? (e.g. authorize the keys for both servers above?)

I suspect you did not as guix was trying to build stuff (normally we 
have substitutes for almost everything if you either run init without 
pulling first (=guix 0.15) or pull to a commit a week ago or so.


Getting substitutes to work is crucial if you are not very patient. The 
hash mismatches are a plague brought by changes upstream which are NOT 
retroactively fixed.


You can check the availability of substitutes with "guix weather".

With substitutes working and available init should not take more that 10 
min on a recent machine. It would probably be a good idea to state this 
in the manual.


If you want to hack on guix you will have to update guix above 0.15.

--
Cheers
Swedebugia



Re: Root guix dereferencing

2018-11-19 Thread Clément Lassieur
Thorsten Wilms  writes:

>> If you are using Ubuntu, you don't need to use that command though, but
>> you need your systemd's guix-daemon to point to a recent guix.  It could
>> be either the one updated by root's 'guix pull', or the one updated by
>> your current user's 'guix pull'.  I chose the latter because I want to
>> run 'guix pull' only once.
>
> You mean edit /etc/systemd/guix-daemin.service and change
> "/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon"?

Well...  The problem with the default one is that it's not updated by
'guix pull', rather it's updated when root's guix package[1] is updated
(that is: less often).  It's not a big deal though, because
'guix-daemon' is very stable, rarely changed.

(Actually, there is no difference at the moment, because I believe 'guix
pull' uses the daemon of the guix package.  But there might be a
difference in the future.)

tldr: you don't need to change your guix-daemon :/

> If so, to what, as there's no guix-daemon in
> /var/guix/profiles/per-user/root/guix-profile/bin/.

To /home//.config/guix/current/bin/guix-daemon or
/root/.config/guix/current/bin/guix-daemon, depending on whether you
want to use your user's Guix-daemon or root's Guix-daemon.

But your current situation is fine :)

> Is the whole reason to have /usr/local/bin/guix to make guix available for
> root without modifying root's PATH?

The reason is to make the 'guix' command available to every user,
because /usr/local/bin is supposedly in every user's PATH.  You don't
need it anymore if all your users already have their own 'guix' command.

> Things are a bit clearer now, thanks, Clément.

This stuff is pretty complicated anyway.  You're welcome :-)

Clément

[1]: 
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/package-management.scm#n100



Re: Root guix dereferencing

2018-11-19 Thread Thorsten Wilms

On 19/11/2018 16.06, Clément Lassieur wrote:

If you check ~root/.config/guix/current/bin/guix, you'll see that it's
updated when you run 'guix pull' as root.  If you want that guix to be
used for your 'root' user, you just need to make sure
~root/.config/guix/current/bin/ is first in root's $PATH.


I could bet last time I checked, there was not "current", only "latest", 
below ~root/.config/guix, but indeed, there's a recently changed 
~root/.config/guix/current/bin/guix.




If you are using Ubuntu, you don't need to use that command though, but
you need your systemd's guix-daemon to point to a recent guix.  It could
be either the one updated by root's 'guix pull', or the one updated by
your current user's 'guix pull'.  I chose the latter because I want to
run 'guix pull' only once.


You mean edit /etc/systemd/guix-daemin.service and change 
"/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon"?


If so, to what, as there's no guix-daemon in 
/var/guix/profiles/per-user/root/guix-profile/bin/.


Is the whole reason to have /usr/local/bin/guix to make guix available 
for root without modifying root's PATH?



Things are a bit clearer now, thanks, Clément.

--
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/



Re: Root guix dereferencing

2018-11-19 Thread Clément Lassieur
Thorsten Wilms  writes:

> On 19/11/2018 15.07, Clément Lassieur wrote:
>> It doesn't need to contain 'sudo' and 'root', because 'root' is just a
>> user, so everything works the same way.
>
> $: which guix
> /home/thorwil/.config/guix/current/bin/guix
>
> $: sudo which guix
> /usr/local/bin/guix
>
> $ sudo -E which guix
> /usr/local/bin/guix
>
> $: sudo -i
> root@charly:~# which guix
> /root/.guix-profile/bin/guix
>
> I wouldn't describe that as working the same way, especially since only the
> symlinks for the plain user are being updated.

If you check ~root/.config/guix/current/bin/guix, you'll see that it's
updated when you run 'guix pull' as root.  If you want that guix to be
used for your 'root' user, you just need to make sure
~root/.config/guix/current/bin/ is first in root's $PATH.

You can substitute 'root' with whatever else in the above statement.

'sudo', however, is more tricky to use.  I only use it for 'guix system
reconfigure' because it requires root's privileges.  'sudo -E guix
system reconfigure config.scm' would for example use my own environment
variables, thus my own guix, with root's privileges.

If you are using Ubuntu, you don't need to use that command though, but
you need your systemd's guix-daemon to point to a recent guix.  It could
be either the one updated by root's 'guix pull', or the one updated by
your current user's 'guix pull'.  I chose the latter because I want to
run 'guix pull' only once.

Does it make more sense?
Clément



Re: Root guix dereferencing

2018-11-19 Thread Thorsten Wilms

On 19/11/2018 15.07, Clément Lassieur wrote:

It doesn't need to contain 'sudo' and 'root', because 'root' is just a
user, so everything works the same way.


$: which guix
/home/thorwil/.config/guix/current/bin/guix

$: sudo which guix
/usr/local/bin/guix

$ sudo -E which guix
/usr/local/bin/guix

$: sudo -i
root@charly:~# which guix
/root/.guix-profile/bin/guix

I wouldn't describe that as working the same way, especially since only 
the symlinks for the plain user are being updated.



--
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/



Re: Root guix dereferencing

2018-11-19 Thread Clément Lassieur
Thorsten Wilms  writes:

> On 19/11/2018 11.20, Clément Lassieur wrote:
>
>> This is because the result of running guix pull is a profile available
>> under ~/.config/guix/current containing the latest Guix[1].
>>
>> So you may need to make sure it is at the beginning of your search path.
>
> Thanks, but the plain user `guix pull` works fine and ~/.config/guix/current
> is up-to-date.

In case it's not clear, '~' refers to root's home as well.  'root' is
just a user.  You don't even have to use it at all.  (I personally never
use it.)

>> [1]: 
>> https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-pull.html
>
> I note that this page doesn't contain "sudo" at all and "root" only once, in
> "For instance, when user root runs guix pull, this has no effect on the
> version of Guix that user alice sees, and vice versa.".

It doesn't need to contain 'sudo' and 'root', because 'root' is just a
user, so everything works the same way.

Clément



Re: Root guix dereferencing

2018-11-19 Thread Clément Lassieur
Hi Thorsten,

This is because the result of running guix pull is a profile available
under ~/.config/guix/current containing the latest Guix[1].

So you may need to make sure it is at the beginning of your search path.

[1]: 
https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-pull.html

Thorsten Wilms  writes:

> On 19/11/2018 00.06, Leo Famulari wrote:
>> Can you help us by clarifying exactly what is wrong?
>>
>> In general, using sudo without either the --preserve-env or --login
>> options is not recommended, because it won't do what you want in any
>> case where environment variables are involved.
>
> /usr/local/bin/guix and /root/.guix-profile/bin/guix keep pointing to the
> original guix installation.
>
> I tried all of these, each time with
> --commit=0a41123f01d5d2466d6f533be3644ac8c9a2bdf9:
>
> sudo guix pull
> sudo -i guix pull
> sudo -E
>   guix pull
>
> None of these changed what /usr/local/bin/guix and/or
> /root/.guix-profile/bin/guix are pointing to.