Stuck upgrading from Guix v0.12

2018-12-17 Thread Paul Garlick
Hi Guix,

A lesson learnt from a previous update process [1] was; do not leave it
too long between 'guix pull' updates.  

However, I have one system running Ubuntu 16.04 and Guix v0.12 that I
am trying to update.  As root:

$guix package --list-installed
glibc-utf8-locales  2.25out /gnu/store/g4g0zhcp5j9
pyjmcv02ks4x2b48k252x-glibc-utf8-locales-2.25
guix0.12.0-9.25a4   out /gnu/store/nqy9m6hhnkkfwr5w
yq5bac96v9s9hc9i-guix-0.12.0-9.25a4
gnutls  3.5.9   out /gnu/store/56dbd2gw33g3wdxmq78lr3
9lamg8gxnq-gnutls-3.5.9
nss-certs   3.30.2  out /gnu/store/3ql0vilc0zv6ra42gh
i04787vrg6bb71-nss-certs-3.30.2

When I do 'guix pull' I get an error.  The backtrace suggests reporting
a bug:

Backtrace:
In unknown file:
   ?: 19 [primitive-load-path "guix/store" ...]
In ./guix/store.scm:
  20: 18 [#]
In ice-9/boot-9.scm:
2987: 17 [define-module* (guix store) #:filename ...]
2962: 16 [resolve-imports (((guix utils)) ((guix config)) ((guix
memoization)) ...)]
2900: 15 [resolve-interface (guix utils) #:select ...]
2825: 14 [# # ...]
3101: 13 [try-module-autoload (guix utils) #f]
2412: 12 [save-module-excursion #]
3121: 11 [#]
In unknown file:
   ?: 10 [primitive-load-path "guix/utils" ...]
In ./guix/utils.scm:
  26: 9 [#]
In ice-9/boot-9.scm:
2987: 8 [define-module* (guix utils) #:filename ...]
2962: 7 [resolve-imports (((guix config)) ((srfi srfi-1)) ((srfi srfi-
9)) ...)]
2900: 6 [resolve-interface (guix config) #:select ...]
2825: 5 [# # ...]
3101: 4 [try-module-autoload (guix config) #f]
2412: 3 [save-module-excursion #]
3121: 2 [#]
In unknown file:
   ?: 1 [primitive-load-path "guix/config" ...]
In ./guix/config.scm:
   1: 0 [#]

./guix/config.scm:1:437: In procedure #:
./guix/config.scm:1:437: In procedure module-lookup: Unbound variable:
and=>
guix pull: error: You found a bug: the program
'/gnu/store/d9dc5jdlhbp4zdx1m9ffr3fmhyg60zy8-compute-guix-derivation'
failed to compute the derivation for Guix (version: "20181217.11";
system: "x86_64-linux";
host version: "20170504.14"; pull-version: 0).
Please report it by email to .

However, I remember that the package guile-git was not a dependency at
the time of v0.12 but it is now.  So, rather than reporting the bug I
have tried to install guile-git:

$ guix package -i guile-git
Starting download of /gnu/store/c3npgqn9ag2ypi9bda1g779wwwlcqqrf-
libgit2-0.25.1.tar.gz
>From https://github.com/libgit2/libgit2/archive/v0.25.1.tar.gz...
following redirection to `https://codeload.github.com/libgit2/libgit2/t
ar.gz/v0.25.1'...
 v0.25.1 1.3MiB/s 00:03 | 4.1MiB
transferred
output path `/gnu/store/c3npgqn9ag2ypi9bda1g779wwwlcqqrf-libgit2-
0.25.1.tar.gz' should have sha256 hash
`1cdwcw38frc1wf28x5ppddazv9hywc718j92f3xa3ybzzycyds3s', instead has
`0ywcxw1mwd56c8qc14hbx31bf198gxck3nja3laxyglv7l57qp26'

This has been reported before [2].  The workaround suggested there was
to download the source directly.  However, this now fails too:

$  guix download https://mirror.hydra.gnu.org/file/libgit2-0.25.1.tar.g
z/sha256/1cdwcw38frc1wf28x5ppddazv9hywc718j92f3xa3ybzzycyds3s
ERROR: Throw to key `gnutls-error' with args `(# set-certificate-credentials-x509-trust-
file!)'

I think the error message is a little misleading here.  I have tried to
download the same file from a more recent guix installation on another
system which also fails.  Essentially, the error is 'file not found'.

So, the situation is that neither a substitute nor the source code are
available for libgit2 and Guix gets stuck.  How should one resolve
cases such as this?

Best regards,

Paul.


[1]: http://lists.gnu.org/archive/html/guix-devel/2018-09/msg00068.html
[2]: https://lists.gnu.org/archive/html/bug-guix/2017-10/msg0.html

Re: Stuck upgrading from Guix v0.12

2018-12-17 Thread Konrad Hinsen
Hi Paul,

> A lesson learnt from a previous update process [1] was; do not leave it
> too long between 'guix pull' updates.  
>
> However, I have one system running Ubuntu 16.04 and Guix v0.12 that I
> am trying to update.  As root:

I have had similar problems as well in the past. The one recipe that has
always worked (aside from one case of a machine with very limited disk
space) is temporarily using a Guix compiled from source code.

The procedure for building Guix from source code is explained in the manual:

   
https://www.gnu.org/software/guix/manual/en/html_node/Building-from-Git.html#Building-from-Git

When done (it takes a while to compile), run that copy of Guix to do a
"guix pull", without installing it, as described in

   
https://www.gnu.org/software/guix/manual/en/html_node/Running-Guix-Before-It-Is-Installed.html#Running-Guix-Before-It-Is-Installed

After that, your standard Guix installation is up to date and you can
delete all the source code again.

The procedure is lengthy in terms of compile time, and requires a lot of
temporary disk space, but the advantage is that you don't have to
analyze what actually went wrong with your installation. Put
differently, it's hard on your computer but easy on our brain :-)

Konrad.



Re: Stuck upgrading from Guix v0.12

2018-12-17 Thread Paul Garlick
Hi Konrad,

Thank you for your help.

> I have had similar problems as well in the past. The one recipe that
> has always worked (aside from one case of a machine with very limited
> disk space) is temporarily using a Guix compiled from source code.

I have hit a snag.  At the compile stage I do:

$ ./configure --localstatedir=/var

I get:

configure: error: Guile-Git is missing; please install it.

I would install guile-git if I could but it takes me back to the same
problem; neither the source nor a substitute for libgit2 are available.

I have looked for the files on hydra.gnu.org but I cannot find the
0.12-era versions.  Maybe they have been deleted.  Could they (or
should they) be restored ? 

Best regards,

Paul.



Re: Stuck upgrading from Guix v0.12

2018-12-17 Thread Gábor Boskovits
Hello Paul,

This is a hard run. Getting that system back is not easy. There are two
ways I did that. The easier is to try to guix copy a working new guix from
another machine. Then you can guix pull using that.


2018. dec. 17., H 15:52 dátummal Paul Garlick <
pgarl...@tourbillion-technology.com> ezt írta:

> Hi Konrad,
>
> Thank you for your help.
>
> > I have had similar problems as well in the past. The one recipe that
> > has always worked (aside from one case of a machine with very limited
> > disk space) is temporarily using a Guix compiled from source code.
>
> I have hit a snag.  At the compile stage I do:
>
> $ ./configure --localstatedir=/var
>
> I get:
>
> configure: error: Guile-Git is missing; please install it.
>
> I would install guile-git if I could but it takes me back to the same
> problem; neither the source nor a substitute for libgit2 are available.
>

Another option: you couls try to find the source and guix download it from
somewhere.

Most probably this would require several iterations, as requirements were
added to the build that were not previously packaged. Also we do not have
so old substitues, so most probably this would involve rebuilding the world
several times.



> I have looked for the files on hydra.gnu.org but I cannot find the
> 0.12-era versions.  Maybe they have been deleted.  Could they (or
> should they) be restored ?
>
> Best regards,
>
> Paul.
>
Best regards,
g_bor

>


Re: Stuck upgrading from Guix v0.12

2018-12-17 Thread Ricardo Wurmus


Hi Paul,

I’m in the same situation upgrading a machine that didn’t have an
Internet connection for months.

Here’s what I do:

- use a git checkout to jump to commit
  b0cb92b2d43a2c4d5fa9b3f8c04c5732c60061e7, which adds guile-gcrypt

- ./bootstrap && ./configure --localstatedir=/var && make clean && make

- ./pre-inst-env guix package -i guile guile-sqlite3 guile-json
  guile-ssh guile-gcrypt

- update to the latest version

--
Ricardo




Re: Stuck upgrading from Guix v0.12

2018-12-19 Thread Ludovic Courtès
Heya,

Ricardo Wurmus  skribis:

> I’m in the same situation upgrading a machine that didn’t have an
> Internet connection for months.
>
> Here’s what I do:
>
> - use a git checkout to jump to commit
>   b0cb92b2d43a2c4d5fa9b3f8c04c5732c60061e7, which adds guile-gcrypt
>
> - ./bootstrap && ./configure --localstatedir=/var && make clean && make
>
> - ./pre-inst-env guix package -i guile guile-sqlite3 guile-json
>   guile-ssh guile-gcrypt
>
> - update to the latest version

Just a reminder so people don’t run away ;-): the upgrade story got much
better shortly before 0.15.0, when ‘guix pull’ got the ability to “build
Guix from Guix” in a way that does not rely* on the currently installed
Guix.  For example, you can run 0.15’s ‘guix pull’ and upgrade to
today’s Guix without problems.

Ludo’.

* More specifically, ‘guix pull’ relies on a small subset of Guix
  functionality that hasn’t changed in a couple of years, which is a lot
  given Guix’s history.



Re: Stuck upgrading from Guix v0.12

2018-12-19 Thread Ricardo Wurmus


Ludovic Courtès  writes:

> Heya,
>
> Ricardo Wurmus  skribis:
>
>> I’m in the same situation upgrading a machine that didn’t have an
>> Internet connection for months.
>>
>> Here’s what I do:
>>
>> - use a git checkout to jump to commit
>>   b0cb92b2d43a2c4d5fa9b3f8c04c5732c60061e7, which adds guile-gcrypt
>>
>> - ./bootstrap && ./configure --localstatedir=/var && make clean && make
>>
>> - ./pre-inst-env guix package -i guile guile-sqlite3 guile-json
>>   guile-ssh guile-gcrypt
>>
>> - update to the latest version
>
> Just a reminder so people don’t run away ;-): the upgrade story got much
> better shortly before 0.15.0, when ‘guix pull’ got the ability to “build
> Guix from Guix” in a way that does not rely* on the currently installed
> Guix.  For example, you can run 0.15’s ‘guix pull’ and upgrade to
> today’s Guix without problems.

Yes, this is correct.

The above recipe works when Guix is used exclusively from a git
checkout.  Using “guix pull” via version 0.15.0 is easier.

--
Ricardo




Re: Stuck upgrading from Guix v0.12

2018-12-20 Thread Paul Garlick
Hi Ricardo,

Thank you for your help.

> I’m in the same situation upgrading a machine that didn’t have an
> Internet connection for months.
> 
> Here’s what I do:
> 
> - use a git checkout to jump to commit
>   b0cb92b2d43a2c4d5fa9b3f8c04c5732c60061e7, which adds guile-gcrypt
> 
> - ./bootstrap && ./configure --localstatedir=/var && make clean &&
> make
> 
> - ./pre-inst-env guix package -i guile guile-sqlite3 guile-json
> guile-ssh guile-gcrypt
> 
> - update to the latest version

I am following the recipe but have hit trouble at the configure stage:

$./configure --localstatedir=/var
.
.
.
configure: error: Guile-Git is missing; please install it.

This takes me back to the libgit2 unavailability problem.  I have not
been able to find a way to provide a sufficient build environment (I
have upgraded the OS to Ubuntu 18.04 in the meantime).  

Any suggestions?

Paul.




Re: Stuck upgrading from Guix v0.12

2019-01-09 Thread Paul Garlick
Hi Guix,

Got it! I have been able to upgrade from version 0.12 to version 0.16.

I used 'guix copy' to copy a recent guix on a local server.  Thank you
Gabor for the suggestion.  The steps I followed were:

i) generate signing keys on both systems
ii) copy across public keys and authorize on each system
iii) install guix in the user profile on the server
iv) use 'guix copy --from=localServer /gnu/store/...guix-0.16.0-4...'
Note: this copies the dependencies too
v) set GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH on the receiving
system.  Note: set the variables to point to the newly-copied paths in
/gnu/store for guile-gcrypt, guile-sqlite3, guile-git and guile-
bytestructures
vi) use '/gnu/store/...guix-0.16.0-4.../bin/guix pull'
vii) include .config/guix/current/bin in PATH variable
viii) use 'guix package --upgrade'
ix) update guix-daemon.service
x) restart daemon

To finish, I authorized substitutes for ci.guix.info.pub.  I am cooking
with gas again!

Best regards,

Paul.






Re: Stuck upgrading from Guix v0.12

2019-01-31 Thread swedebugia

On 2019-01-09 17:47, Paul Garlick wrote:

Hi Guix,

Got it! I have been able to upgrade from version 0.12 to version 0.16.

I used 'guix copy' to copy a recent guix on a local server.  Thank you
Gabor for the suggestion.  The steps I followed were:

i) generate signing keys on both systems
ii) copy across public keys and authorize on each system
iii) install guix in the user profile on the server
iv) use 'guix copy --from=localServer /gnu/store/...guix-0.16.0-4...'
Note: this copies the dependencies too
v) set GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH on the receiving
system.  Note: set the variables to point to the newly-copied paths in
/gnu/store for guile-gcrypt, guile-sqlite3, guile-git and guile-
bytestructures
vi) use '/gnu/store/...guix-0.16.0-4.../bin/guix pull'
vii) include .config/guix/current/bin in PATH variable
viii) use 'guix package --upgrade'
ix) update guix-daemon.service
x) restart daemon

To finish, I authorized substitutes for ci.guix.info.pub.  I am cooking
with gas again!


Nice!

Thanks for sharing.

--
Cheers Swedebugia