all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#30370: guix system init can't find guix-register
@ 2018-02-06 17:05 Diego Nicola Barbato
  2018-02-08 13:50 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Nicola Barbato @ 2018-02-06 17:05 UTC (permalink / raw)
  To: 30370

Hello Guix,

I tried to install GuixSD on a loop device (/dev/loop1) whith its main
partition mounted under /mnt like this:

$ guix system init /mnt/etc/config.scm /mnt

This failed with the following error message:

Betriebssystem unter »/mnt« wird initialisiert …
In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
copying to '/mnt'...
guix system: error: fport_write: Datenübergabe unterbrochen (broken pipe)

I run GuixSD on an x86_64 machine (commit:
a3a932c008d0d9051eb8cdfdcea07ebd7b68b1b3) and the configfile is a copy
of the `bare-bones.tmpl' with the target field in the
bootloader-configuration changed to "/dev/loop1".

Greetings

Diego

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-06 17:05 bug#30370: guix system init can't find guix-register Diego Nicola Barbato
@ 2018-02-08 13:50 ` Ludovic Courtès
  2018-02-08 15:59   ` Diego Nicola Barbato
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2018-02-08 13:50 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: 30370

Hi Diego,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

> I tried to install GuixSD on a loop device (/dev/loop1) whith its main
> partition mounted under /mnt like this:
>
> $ guix system init /mnt/etc/config.scm /mnt
>
> This failed with the following error message:
>
> Betriebssystem unter »/mnt« wird initialisiert …
> In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
> copying to '/mnt'...
> guix system: error: fport_write: Datenübergabe unterbrochen (broken pipe)

I suppose you’re running this in a chroot, right?  How did you populate
that chroot?  Could it be that it misses some store items?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-08 13:50 ` Ludovic Courtès
@ 2018-02-08 15:59   ` Diego Nicola Barbato
  2018-02-08 22:00     ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Nicola Barbato @ 2018-02-08 15:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30370

Hello Ludo,

ludo@gnu.org (Ludovic Courtès) writes:

> Hi Diego,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> I tried to install GuixSD on a loop device (/dev/loop1) whith its main
>> partition mounted under /mnt like this:
>>
>> $ guix system init /mnt/etc/config.scm /mnt

The above line should actually be:
$ sudo guix system init /mnt/etc/config.scm /mnt

>> This failed with the following error message:
>>
>> Betriebssystem unter »/mnt« wird initialisiert …
>> In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
>> copying to '/mnt'...
>> guix system: error: fport_write: Datenübergabe unterbrochen (broken pipe)
>
> I suppose you’re running this in a chroot, right?  How did you populate
> that chroot?  Could it be that it misses some store items?

I am not running this in a chroot.
I am afraid the explanation of what I was doing was a bit unclear.  I
was able to reproduce the error with the following steps:

$ mkdir test
$ cd test
$ qemu-img create -f raw test.img 7G
$ cfdisk test.img

I selected gpt and wrote two partitions: the first one with a size of 1M
and type BIOS boot, the second with a size of 7G and type Linux
filesystem.

$ sudo losetup --partscan --show --find test.img
/dev/loop1
$ sudo mkfs.ext4 -L my-root /dev/loop1p2
$ sudo mount /dev/loop1p2 /mnt
$ sudo mkdir /mnt/etc
$ sudo sh -c "sed 's#/dev/sdX#/dev/loop1#g' ../.config/guix/latest/gnu/system/examples/bare-bones.tmpl > /mnt/etc/config.scm"
$ sudo guix system init /mnt/etc/config.scm /mnt
The following derivation will be built:
   /gnu/store/nxy7lfbh8mx7ndrigl1bi3clsm1pnhjh-bootloader-installer.drv
/gnu/store/viyn658a9hgsf0g8r4lan24hb0f8515d-system
/gnu/store/aaigj9lvdyx2wpyyc40z51mjl7ff1zr5-grub.cfg
/gnu/store/m74kz7rvxyzabx6i4p8gd9anws84s45z-grub-2.02
/gnu/store/s4bxrnb584jm0cy5gm3jr8hva341cj2f-bootloader-installer

Betriebssystem unter »/mnt« wird initialisiert …
In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
guix system: error: failed to register '/gnu/store/2g4dzfcs6nf906d7jl6q225llmnv7krl-linux-libre-4.15' under '/mnt'
copying to '/mnt'...

It does not matter that it is a loopback device.  The same thing happens
if I try to install it on a USB flash drive.
The issue seems to be that there is no
d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/
in my store.  All I could find was this:
80k8kz7qk9palbn0ccw7y3fgym8jxlps-guix-0.12.0-10.ba2260d/

Greetings

Diego

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-08 15:59   ` Diego Nicola Barbato
@ 2018-02-08 22:00     ` Ludovic Courtès
  2018-02-09 10:26       ` Diego Nicola Barbato
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2018-02-08 22:00 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: 30370

Hello,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

> Betriebssystem unter »/mnt« wird initialisiert …
> In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
> guix system: error: failed to register '/gnu/store/2g4dzfcs6nf906d7jl6q225llmnv7krl-linux-libre-4.15' under '/mnt'
> copying to '/mnt'...
>
> It does not matter that it is a loopback device.  The same thing happens
> if I try to install it on a USB flash drive.
> The issue seems to be that there is no
> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/
> in my store.  All I could find was this:
> 80k8kz7qk9palbn0ccw7y3fgym8jxlps-guix-0.12.0-10.ba2260d/

Could you try to figure out where that
d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d comes from?

Also, current master is at 0.14.0*, so it’s surprising that you end up
using such an old version.

Could it be that ~root/.config/guix/latest points to that old Guix?
Does “sudo guix pull” help?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-08 22:00     ` Ludovic Courtès
@ 2018-02-09 10:26       ` Diego Nicola Barbato
  2018-02-09 10:55         ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Nicola Barbato @ 2018-02-09 10:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30370

Hello,

ludo@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> Betriebssystem unter »/mnt« wird initialisiert …
>> In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
>> guix system: error: failed to register '/gnu/store/2g4dzfcs6nf906d7jl6q225llmnv7krl-linux-libre-4.15' under '/mnt'
>> copying to '/mnt'...
>>
>> It does not matter that it is a loopback device.  The same thing happens
>> if I try to install it on a USB flash drive.
>> The issue seems to be that there is no
>> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/
>> in my store.  All I could find was this:
>> 80k8kz7qk9palbn0ccw7y3fgym8jxlps-guix-0.12.0-10.ba2260d/
>
> Could you try to figure out where that
> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d comes from?

I could not figure out where this comes from.  As I mentioned it is not
in my store, yet (only) "guix system init" seems to look for it.

> Also, current master is at 0.14.0*, so it’s surprising that you end up
> using such an old version.

It is indeed quite surprising.  Especially since "type -P guix-register"
returns "/run/current-system/profile/sbin/guix-register" which links to
"/gnu/store/b5hfsdq8yzcqfvikfhm0gk95xa5pfwgy-guix-0.14.0-7.33988f9/sbin/guix-register"
and "type -P guix" returns "/run/current-system/profile/bin/guix" which links to
"/gnu/store/b5hfsdq8yzcqfvikfhm0gk95xa5pfwgy-guix-0.14.0-7.33988f9/bin/guix"
(for both my user and root).

> Could it be that ~root/.config/guix/latest points to that old Guix?

It did not (I ran "guix pull" as user and as root last Friday,
2018-02-02).  And now after running "guix pull" again (as both user and
root) ~root/.config/guix/latest and ~/.config/guix/latest point to
/gnu/store/a565qard9xc0f0mg0vlbsrn419qgwfp9-guix-latest.

> Does “sudo guix pull” help?

Unfortunately "sudo guix pull" and "guix pull" did not help either.
The error persists even after running
"guix system reconfigure /etc/config.scm" and rebooting.

Greetings

Diego

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-09 10:26       ` Diego Nicola Barbato
@ 2018-02-09 10:55         ` Ludovic Courtès
  2018-02-09 13:04           ` Diego Nicola Barbato
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2018-02-09 10:55 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: 30370

Hi,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hello,
>>
>> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>>
>>> Betriebssystem unter »/mnt« wird initialisiert …
>>> In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
>>> guix system: error: failed to register '/gnu/store/2g4dzfcs6nf906d7jl6q225llmnv7krl-linux-libre-4.15' under '/mnt'
>>> copying to '/mnt'...
>>>
>>> It does not matter that it is a loopback device.  The same thing happens
>>> if I try to install it on a USB flash drive.
>>> The issue seems to be that there is no
>>> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/
>>> in my store.  All I could find was this:
>>> 80k8kz7qk9palbn0ccw7y3fgym8jxlps-guix-0.12.0-10.ba2260d/
>>
>> Could you try to figure out where that
>> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d comes from?
>
> I could not figure out where this comes from.  As I mentioned it is not
> in my store, yet (only) "guix system init" seems to look for it.

I mean, can you run something like:

  grep -r d4wwx93gqizx132zjk7h1ir7rzph0pig \
    $(dirname $(dirname $(readlink -f $(type -P guix))))

?

TIA,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-09 10:55         ` Ludovic Courtès
@ 2018-02-09 13:04           ` Diego Nicola Barbato
  2018-02-09 16:08             ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Nicola Barbato @ 2018-02-09 13:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30370

[-- Attachment #1: Type: text/plain, Size: 1753 bytes --]

Hello,

ludo@gnu.org (Ludovic Courtès) writes:

> Hi,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> Hello,
>>>
>>> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>>>
>>>> Betriebssystem unter »/mnt« wird initialisiert …
>>>> In execvp of /gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin/guix-register: Datei oder Verzeichnis nicht gefunden
>>>> guix system: error: failed to register '/gnu/store/2g4dzfcs6nf906d7jl6q225llmnv7krl-linux-libre-4.15' under '/mnt'
>>>> copying to '/mnt'...
>>>>
>>>> It does not matter that it is a loopback device.  The same thing happens
>>>> if I try to install it on a USB flash drive.
>>>> The issue seems to be that there is no
>>>> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/
>>>> in my store.  All I could find was this:
>>>> 80k8kz7qk9palbn0ccw7y3fgym8jxlps-guix-0.12.0-10.ba2260d/
>>>
>>> Could you try to figure out where that
>>> d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d comes from?
>>
>> I could not figure out where this comes from.  As I mentioned it is not
>> in my store, yet (only) "guix system init" seems to look for it.
>
> I mean, can you run something like:
>
>   grep -r d4wwx93gqizx132zjk7h1ir7rzph0pig \
>     $(dirname $(dirname $(readlink -f $(type -P guix))))

This did not return anything.
But I also tried running
"grep -r d4wwx93gqizx132zjk7h1ir7rzph0pig ~/.config/guix/latest" which
returned this:
/home/diego/.config/guix/latest/guix/config.scm:  "/gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin")
Übereinstimmungen in Binärdatei /home/diego/.config/guix/latest/guix/config.go

This is the file:

[-- Attachment #2: config.scm --]
[-- Type: application/octet-stream, Size: 3110 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright ?? 2012, 2013, 2014, 2015, 2016 Ludovic Court??s <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guix config)
  #:export (%guix-package-name
            %guix-version
            %guix-bug-report-address
            %guix-home-page-url

            %storedir
            %localstatedir
            %sysconfdir
            %sbindir

            %store-directory
            %state-directory
            %config-directory
            %guix-register-program

            %system
            %libgcrypt
            %libz
            %nix-instantiate
            %gzip
            %bzip2
            %xz))

;;; Commentary:
;;;
;;; Compile-time configuration of Guix.  When adding a substitution variable
;;; here, make sure to equip (guix scripts pull) to substitute it.
;;;
;;; Code:

(define %guix-package-name
  "GNU Guix")

(define %guix-version
  "8d0edc8246389c0f2bb1c8e9c9190c312746a4b4")

(define %guix-bug-report-address
  "bug-guix@gnu.org")

(define %guix-home-page-url
  "https://www.gnu.org/software/guix/")

(define %storedir
  "/gnu/store")

(define %localstatedir
  "/var")

(define %sysconfdir
  "/etc")

(define %sbindir
  "/gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin")

(define %store-directory
  (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
      %storedir))

(define %state-directory
  ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
  (or (getenv "NIX_STATE_DIR")
      (string-append %localstatedir "/guix")))

(define %config-directory
  ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
  (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
      (string-append %sysconfdir "/guix")))

(define %guix-register-program
  ;; The 'guix-register' program.
  (or (getenv "GUIX_REGISTER")
      (string-append %sbindir "/guix-register")))

(define %system
  "x86_64-linux")

(define %libgcrypt
  "/gnu/store/qfzl5frp52wdz1vbdj958sz35yfl94xi-libgcrypt-1.8.1/lib/libgcrypt")

(define %libz
  "/gnu/store/navpkpm1jf6zf8zmi54wl5w3b2ddv1sw-zlib-1.2.11/lib/libz")

(define %nix-instantiate
  "nix-instantiate")

(define %gzip
  "/gnu/store/i1xjwb58m0zs33328zihp3lwfg2d6v59-gzip-1.8/bin/gzip")

(define %bzip2
  "/gnu/store/j8hrhxjp503ch60xlbalrrd4i18pgf79-bzip2-1.0.6/bin/bzip2")

(define %xz
  "/gnu/store/9cgv5prf1prqf75dwna4j7824286imyx-xz-5.2.2/bin/xz")

;;; config.scm ends here

[-- Attachment #3: Type: text/plain, Size: 18 bytes --]


Greetings

Diego

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-09 13:04           ` Diego Nicola Barbato
@ 2018-02-09 16:08             ` Ludovic Courtès
  2018-02-11 17:32               ` Diego Nicola Barbato
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2018-02-09 16:08 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: 30370

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

> But I also tried running
> "grep -r d4wwx93gqizx132zjk7h1ir7rzph0pig ~/.config/guix/latest" which
> returned this:
> /home/diego/.config/guix/latest/guix/config.scm:  "/gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin")

Bingo!  This string is inherit from the (guix config) of your initial
installation, the one you used to run ‘guix pull’.

I would call this a ‘guix pull’ bug.

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-09 16:08             ` Ludovic Courtès
@ 2018-02-11 17:32               ` Diego Nicola Barbato
  2018-02-16 10:19                 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Nicola Barbato @ 2018-02-11 17:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30370

Hello,

ludo@gnu.org (Ludovic Courtès) writes:

> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> But I also tried running
>> "grep -r d4wwx93gqizx132zjk7h1ir7rzph0pig ~/.config/guix/latest" which
>> returned this:
>> /home/diego/.config/guix/latest/guix/config.scm:  "/gnu/store/d4wwx93gqizx132zjk7h1ir7rzph0pig-guix-0.12.0-10.ba2260d/sbin")
>
> Bingo!  This string is inherit from the (guix config) of your initial
> installation, the one you used to run ‘guix pull’.
>
> I would call this a ‘guix pull’ bug.

I think this is a bug in the ‘build’ procedure defined in build-self.scm
which is used by guix pull’ and which uses the (guix build pull) module
to generate a new config.scm.  It uses the value for %sbindir defined in
(guix config) which causes it to be passed on unchanged.
My guess is that (find-best-packages-by-name "guix" #f) should be used
to determine the correct guix instead, which is how the values for the
dependencies (libgcrypt, zlib, ...) are determined, and that this should
be used to get the sbin directory with ‘string-append’.
WDYT?

Greetings

Diego

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#30370: guix system init can't find guix-register
  2018-02-11 17:32               ` Diego Nicola Barbato
@ 2018-02-16 10:19                 ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-02-16 10:19 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: 30370-done

Closing this bug, which was fixed by commit
47551a761bb110e0ae2402eaf014076fbe67af0f.

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-16 10:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 17:05 bug#30370: guix system init can't find guix-register Diego Nicola Barbato
2018-02-08 13:50 ` Ludovic Courtès
2018-02-08 15:59   ` Diego Nicola Barbato
2018-02-08 22:00     ` Ludovic Courtès
2018-02-09 10:26       ` Diego Nicola Barbato
2018-02-09 10:55         ` Ludovic Courtès
2018-02-09 13:04           ` Diego Nicola Barbato
2018-02-09 16:08             ` Ludovic Courtès
2018-02-11 17:32               ` Diego Nicola Barbato
2018-02-16 10:19                 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.