Re: Updating a very old Guix

2018-11-14 Thread Konrad Hinsen
swedebugia  writes:

> Could you report this to bug-g...@gnu.org?

Done (and Ludo and Ricardo are already looking into this).

> How about reinstalling v. 0.15 overwriting your current installation?
>
> this would invalidate all your store items though.

Exactly, which is why I would like to avoid it. The current profile
of the only account that matters on that machine contains some fragile
software, so I am not at all sure that if I reinstall and update
everything I will still have a working system.

Perhaps I could try to archive all the stuff in the profile, re-install
Guix, and recover my store items from the archive. But as far as I know
there is no way to install them into a profile afterwards.

BTW, I did find a way to run "guix pull" which has a good chance to work
on a more typical installation: remove $HOME/.config/guix and then run
"/usr/local/bin/guix pull". Unfortunately, this fails on my machine
because of insufficient disk space for building an enormous amount of
packages. Even gtk, although I am on a headless server.

I actually wonder if it is reasonable to run Guix on such a limited
machine. My store fills up 1/3 of the 10 GB partition, and that's right
after a "guix gc". Perhaps I should keep a profile with that machine's
software on my main Guix machine and just copy over the binaries from
time to time.

Konrad.



Re: Updating a very old Guix

2018-11-13 Thread swedebugia

Hi

On 2018-11-13 13:43, Konrad Hinsen wrote:

snip



So let's try a variant: use "guix archive" to export a nar file, copy it
over to the other machine, and import it.

guix archive --export `readlink -f ~/.config/guix/latest` > guix-update.nar

guix archive: error: build failed: program `guix-authenticate' failed
with exit code 1


Interesting bug!

Could you report this to bug-g...@gnu.org?
this code runs on the daemon so any detailed errors will probably be in 
the daemon log.


we need the version of your guix (and your daemon) so we can reproduce it.

guix-authenticate uses gcrypt which was recently changed by ludo to 
guile-gcrypt so this might have introduced a regression.




There isn't much documentation on "guix authenticate" and how it might
fail, so I'll end my experiments here. Does anyone have an idea for
something else that I might try?


How about reinstalling v. 0.15 overwriting your current installation?

this would invalidate all your store items though.

--
Cheers
Swedebugia



Re: Updating a very old Guix

2018-11-13 Thread Konrad Hinsen
Hi Julien,

> The command you should run is:
>
> guix archive --recursive --export `readlink -f ~/.config/guix/current` > 
> guix-update.nar
>
> note the --recursive (so guix can find its dependencies, but it will 
> bundle every dependency in the .nar, so there may be some duplication 

I just tried that one - same problem with guix-authenticate.

> renamed the directory where the current guix version is installed). I 
> think I told you "latest" before, that was my mistake, sorry. Maybe you 
> can try again "guix copy", with "current" this time?

No change, I get the same protocol error.

I actually do have ~/.config/guix/latest (probably left over from an
older guix), and it does point to a store entry. So I should be able to
archive and copy it, even if it's not the entry that I need.

Cheers,
  Konrad.



Re: Updating a very old Guix

2018-11-13 Thread Julien Lepiller

Le 2018-11-13 13:43, Konrad Hinsen a écrit :

swedebugia  writes:


This is most probably not correct. You most probably do have a working
Guix in the store but your current guix points to the new one which
lacks guile-gcrypt.


Indeed, kind of. It looks more complicated than that.

As you say, there is indeed a working guix in the store, but calling
apparently still makes it use the messed-up code under ~/.config/guix.
After renaming this to move it out of the way, I can again run guix
commands.

However...


I suggest you roll back your guix pull profile following the manual.
(this might not work if your guix is too old)


My guix does seem to be too old for that. And while I can now invoke it
without an immediate error message, every attempt at installing or even
removing packages leads to an attempt to compile the GCC toolchain,
which fails for lack of disk space (there's only one 10 GB partition).


So I tried Julien's suggestion to copy over a newer guix from another
machine.

Step by step:

   guix archive --generate-key

Works fine, but must be run as root because it writes to /etc.

   scp /etc/guix/signing-key.pub remote@machine

then on the remote machine

   guix archive --authorize < signing-key.pub

Again "guix archive" must be run as root. Back to the "new-guix" 
machine:


   guix copy --to=remote@machine `readlink -f ~/.config/guix/latest`

guix copy: error: failed to connect to `#': Protocol error

Hard to say which protocol is not respected there, but given how old my
guix is, I suspect the protocol used by "guix copy" has changed since.

So let's try a variant: use "guix archive" to export a nar file, copy 
it

over to the other machine, and import it.

   guix archive --export `readlink -f ~/.config/guix/latest` > 
guix-update.nar


The command you should run is:

guix archive --recursive --export `readlink -f ~/.config/guix/current` > 
guix-update.nar


note the --recursive (so guix can find its dependencies, but it will 
bundle every dependency in the .nar, so there may be some duplication 
that guix copy would have avoided), and the actual directory name is 
current, not latest (latest is the old name of the guix installation 
directory, but since we switched to full profiles for guix, we also 
renamed the directory where the current guix version is installed). I 
think I told you "latest" before, that was my mistake, sorry. Maybe you 
can try again "guix copy", with "current" this time?




guix archive: error: build failed: program `guix-authenticate' failed
with exit code 1

There isn't much documentation on "guix authenticate" and how it might
fail, so I'll end my experiments here. Does anyone have an idea for
something else that I might try?

Cheers,
  Konrad.




Re: Updating a very old Guix

2018-11-13 Thread Konrad Hinsen
swedebugia  writes:

> This is most probably not correct. You most probably do have a working 
> Guix in the store but your current guix points to the new one which 
> lacks guile-gcrypt.

Indeed, kind of. It looks more complicated than that.

As you say, there is indeed a working guix in the store, but calling
apparently still makes it use the messed-up code under ~/.config/guix.
After renaming this to move it out of the way, I can again run guix
commands.

However...

> I suggest you roll back your guix pull profile following the manual. 
> (this might not work if your guix is too old)

My guix does seem to be too old for that. And while I can now invoke it
without an immediate error message, every attempt at installing or even
removing packages leads to an attempt to compile the GCC toolchain,
which fails for lack of disk space (there's only one 10 GB partition).


So I tried Julien's suggestion to copy over a newer guix from another
machine.

Step by step:

   guix archive --generate-key

Works fine, but must be run as root because it writes to /etc.

   scp /etc/guix/signing-key.pub remote@machine

then on the remote machine

   guix archive --authorize < signing-key.pub

Again "guix archive" must be run as root. Back to the "new-guix" machine:

   guix copy --to=remote@machine `readlink -f ~/.config/guix/latest`

guix copy: error: failed to connect to `#': Protocol error

Hard to say which protocol is not respected there, but given how old my
guix is, I suspect the protocol used by "guix copy" has changed since.

So let's try a variant: use "guix archive" to export a nar file, copy it
over to the other machine, and import it.

   guix archive --export `readlink -f ~/.config/guix/latest` > guix-update.nar

guix archive: error: build failed: program `guix-authenticate' failed
with exit code 1

There isn't much documentation on "guix authenticate" and how it might
fail, so I'll end my experiments here. Does anyone have an idea for
something else that I might try?

Cheers,
  Konrad.



Re: Updating a very old Guix

2018-11-12 Thread swedebugia

Hi

On 2018-11-09 18:07, Konrad Hinsen wrote:

Hi Swedebugia and Julien,

First of all, thanks to both of you for your suggestions!


Have you tried the commit for the next nearest stable? v.0.13 v.0.14
v.0.15? (gcrypt was added after 0.15 point)
Ludo recommended in another thread to pull in increments. But basically
building guix with an old guix is not supported at all ATM but should work.

I did consider going through intermediates, but only when the problems
showed up. Since I do not have a working Guix any more, I cannot use
"guix pull" with a commit to move to an intermediate.


This is most probably not correct. You most probably do have a working 
Guix in the store but your current guix points to the new one which 
lacks guile-gcrypt.


I suggest you roll back your guix pull profile following the manual. 
(this might not work if your guix is too old)

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

If you want more help I suggest you run:

$ guile --version | head -1 && guix --version | head -1

And your env
$ env

Also
guix package -l && guix pull -l
ls -l ~/.guix-profile ~/.config/guix/
--
Cheers Swedebugia



Re: Updating a very old Guix

2018-11-10 Thread Konrad Hinsen
 writes:

> I think the main feature of guix - the roll back function - rests there. 
> May be you could choose most previous kernel in grub and then ran
> `guix system roll-back`. Would it repair your system?

Sorry for my lack of precision: I am not running GuixSD, but the guix
package manager on top of a Debian installation.

Konrad.



Re: Updating a very old Guix

2018-11-10 Thread Konrad Hinsen
Konrad Hinsen  writes:

> I can still check out some intermediate version and build from source.

I can indeed check out and build them, but not use them at all. The
binaries for these intermediate versions are no longer on the substitute
servers, and my machine runs out of memory and/or disk space when trying
to rebuild everything from source.

So I will try Julien's suggestion next week.

Konrad.



Re: Updating a very old Guix

2018-11-09 Thread znavko
Hello! It is interesting to read. I use GuixSD for 2 months. I have not 
accumulated problems and solutions, but an issue with gcrypt and hash appeared 
here. 
The luck was there, I only can show you a link: 
http://lists.gnu.org/archive/html/bug-guix/2018-09/msg00153.html 

I think the main feature of guix - the roll back function - rests there. 
May be you could choose most previous kernel in grub and then ran
`guix system roll-back`. Would it repair your system?


9. Nov 2018 20:07 by konrad.hin...@fastmail.net 
:


> Hi Swedebugia and Julien,
>
> First of all, thanks to both of you for your suggestions!
>
>> Have you tried the commit for the next nearest stable? v.0.13 v.0.14 
>> v.0.15? (gcrypt was added after 0.15 point)
>> Ludo recommended in another thread to pull in increments. But basically 
>> building guix with an old guix is not supported at all ATM but should work.
>
> I did consider going through intermediates, but only when the problems
> showed up. Since I do not have a working Guix any more, I cannot use
> "guix pull" with a commit to move to an intermediate.
>
> Thanks again to both of you,
>   Konrad

Re: Updating a very old Guix

2018-11-09 Thread Konrad Hinsen
Hi Swedebugia and Julien,

First of all, thanks to both of you for your suggestions!

> Have you tried the commit for the next nearest stable? v.0.13 v.0.14 
> v.0.15? (gcrypt was added after 0.15 point)
> Ludo recommended in another thread to pull in increments. But basically 
> building guix with an old guix is not supported at all ATM but should work.

I did consider going through intermediates, but only when the problems
showed up. Since I do not have a working Guix any more, I cannot use
"guix pull" with a commit to move to an intermediate.

I can still check out some intermediate version and build from source.
But then I guess I would have to install it in some temporary place, and
use it to build another intermediate. In the end, I would use the final
one to do a pull on my standard user account. Well, that just *might*
work...

> Please report your progress!

I will!


> If you have another machine with guix installed, you could try to use 
> guix copy to copy a working guix pull profile (~/.config/guix/current) 

Yes, I do have another machine with a pretty recent Guix. Unfortunately
I have no access to it over the weekend, but if the above strategy
fails, I will try yours next week.

Thanks again to both of you,
  Konrad



Re: Updating a very old Guix

2018-11-09 Thread swedebugia

Hi!

On 2018-11-09 15:37, Konrad Hinsen wrote:

First try: "guix pull".


Have you tried the commit for the next nearest stable? v.0.13 v.0.14 
v.0.15? (gcrypt was added after 0.15 point)
Ludo recommended in another thread to pull in increments. But basically 
building guix with an old guix is not supported at all ATM but should work.


Please report your progress! I will work on improving the pull-section 
of the manual shortly.



ERROR: In procedure scm-error:
no code for module (gcrypt hash)

Se my solution here:

https://gitlab.com/swedebugia/guix-notes/blob/master/BUILD_LATEST_GUIX_FROM_SOURCE_WITH_Guix_v0.15.org

(search for "gcrypt")

--
Cheers
Swedebugia



Re: Updating a very old Guix

2018-11-09 Thread Julien Lepiller

Le 2018-11-09 15:37, Konrad Hinsen a écrit :

Hi everyone,

I have a computer that I don't use very often, with a rather old Guix
installation from nearly a year ago. So I though I should do an update.

First try: "guix pull".

Does a lot of downloading and compiling, then finishes. But guix no
longer works:

   ERROR: In procedure scm-error:
   no code for module (gcrypt hash)

Next try: I cloned the repository under a different user account (that
still had the old Guix). "guix environment guix", "bootstrap", and
then "configure" get me to the error message:

  configure: error: A recent Guile-SQLite3 could not be found; please
  install it.

But I cannot install a recent Guile-SQLite3 without doing a "guix pull"
first.

One more option I can think of is installing everything required to
compile Guix manually, then compile from source. Not exactly an
attractive idea, all the more since the dependency list in the Guix
manual looks incomplete (it doesn't mention Guile, for example, nor
Guile-SQLite3).

Are there any other options ? I would like to avoid deleting everything
and starting from scratch because there is one account on that machine
that has in its Guix profile my only working installation of the only
program I actually need this machine for.

Konrad.


If you have another machine with guix installed, you could try to use 
guix copy to copy a working guix pull profile (~/.config/guix/current) 
to that computer, and then you will be able to use that guix to run guix 
pull. Don't forget to create a key-pair on the other machine and to 
authorize the public key on the receiving end.


So on a machine with a recent guix:

guix archive --generate-key
scp /etc/guix/signing-key.pub remote@machine

On the first machine:

guix archive --authorize < signing-key.pub

On the machine with a recent guix:

guix copy --to=remote@machine `readlink -f ~/.config/guix/latest`

And finally on the machine with an old guix:

/gnu/store/.../bin/guix pull
# with ... the result of readlink on the machine with the recent guix.

Hopefully, that will work :)

See 
http://guix.info/manual/en/Invoking-guix-copy.html#Invoking-guix-copy 
and 
http://guix.info/manual/en/Invoking-guix-archive.html#Invoking-guix-archive 
for reference.