GNU bug report logs - #27529
[PATCH] bootloader: Use <menu-entry> for the bootloader side.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Thu, 29 Jun 2017 10:44:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27529 in the body.
You can then email your comments to 27529 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Thu, 29 Jun 2017 10:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 29 Jun 2017 10:44:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH] bootloader: Use <menu-entry> for the bootloader side.
Date: Thu, 29 Jun 2017 12:42:59 +0200
* gnu/bootloader.scm (menu-entry-device-mount-point): New variable.  Export it.
(<menu-entry>: New field "device".
* gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
entries.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
<menu-entry> entries.
* gnu/system.scm (menu->entry->boot-parameters): Delete variable.
(boot-parameters->menu-entry): New variable.  Export it.
(operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
* guix/script/system.scm (reinstall-bootloader):  Fix bootcfg usage.
---
 gnu/bootloader.scm          |  3 +++
 gnu/bootloader/extlinux.scm | 19 +++++++++----------
 gnu/bootloader/grub.scm     | 27 ++++++++++++---------------
 gnu/system.scm              | 29 ++++++++++++++---------------
 guix/scripts/system.scm     | 10 +++++-----
 5 files changed, 43 insertions(+), 45 deletions(-)

diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm
index d5fcf30f0..e080b0456 100644
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -30,6 +30,7 @@
             menu-entry-linux
             menu-entry-linux-arguments
             menu-entry-initrd
+            menu-entry-device-mount-point
 
             bootloader
             bootloader?
@@ -67,6 +68,8 @@
   (label           menu-entry-label)
   (device          menu-entry-device       ; file system uuid, label, or #f
                    (default #f))
+  (device-mount-point menu-entry-device-mount-point
+                   (default #f))
   (linux           menu-entry-linux)
   (linux-arguments menu-entry-linux-arguments
                    (default '()))          ; list of string-valued gexps
diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm
index 219b058e5..e5fdeb580 100644
--- a/gnu/bootloader/extlinux.scm
+++ b/gnu/bootloader/extlinux.scm
@@ -38,14 +38,13 @@
 corresponding to old generations of the system."
 
   (define all-entries
-    (append entries (map menu-entry->boot-parameters
-                         (bootloader-configuration-menu-entries config))))
-
-  (define (boot-parameters->gexp params)
-    (let ((label (boot-parameters-label params))
-          (kernel (boot-parameters-kernel params))
-          (kernel-arguments (boot-parameters-kernel-arguments params))
-          (initrd (boot-parameters-initrd params)))
+    (append entries (bootloader-configuration-menu-entries config)))
+
+  (define (menu-entry->gexp entry)
+    (let ((label (menu-entry-label entry))
+          (kernel (menu-entry-linux entry))
+          (kernel-arguments (menu-entry-linux-arguments entry))
+          (initrd (menu-entry-initrd entry)))
       #~(format port "LABEL ~a
   MENU LABEL ~a
   KERNEL ~a
@@ -69,11 +68,11 @@ TIMEOUT ~a~%"
                     (if (> timeout 0) 1 0)
                     ;; timeout is expressed in 1/10s of seconds.
                     (* 10 timeout))
-            #$@(map boot-parameters->gexp all-entries)
+            #$@(map menu-entry->gexp all-entries)
 
             #$@(if (pair? old-entries)
                    #~((format port "~%")
-                      #$@(map boot-parameters->gexp old-entries)
+                      #$@(map menu-entry->gexp old-entries)
                       (format port "~%"))
                    #~())))))
 
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index f1cc3324d..c23eeec88 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -311,16 +311,14 @@ code."
 STORE-FS, a <file-system> object.  OLD-ENTRIES is taken to be a list of menu
 entries corresponding to old generations of the system."
   (define all-entries
-    (append entries (map menu-entry->boot-parameters
-                         (bootloader-configuration-menu-entries config))))
-
-  (define (boot-parameters->gexp params)
-    (let ((device (boot-parameters-store-device params))
-          (device-mount-point (boot-parameters-store-mount-point params))
-          (label (boot-parameters-label params))
-          (kernel (boot-parameters-kernel params))
-          (arguments (boot-parameters-kernel-arguments params))
-          (initrd (boot-parameters-initrd params)))
+    (append entries (bootloader-configuration-menu-entries config)))
+  (define (menu-entry->gexp entry)
+    (let ((device (menu-entry-device entry))
+          (device-mount-point (menu-entry-device-mount-point entry))
+          (label (menu-entry-label entry))
+          (kernel (menu-entry-linux entry))
+          (arguments (menu-entry-linux-arguments entry))
+          (initrd (menu-entry-initrd entry)))
       ;; Here DEVICE is the store and DEVICE-MOUNT-POINT is its mount point.
       ;; Use the right file names for KERNEL and INITRD in case
       ;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a
@@ -336,11 +334,10 @@ entries corresponding to old generations of the system."
                   #$(grub-root-search device kernel)
                   #$kernel (string-join (list #$@arguments))
                   #$initrd))))
-
   (mlet %store-monad ((sugar (eye-candy config
-                                        (boot-parameters-store-device
+                                        (menu-entry-device
                                          (first all-entries))
-                                        (boot-parameters-store-mount-point
+                                        (menu-entry-device-mount-point
                                          (first all-entries))
                                         #:system system
                                         #:port #~port)))
@@ -357,12 +354,12 @@ set default=~a
 set timeout=~a~%"
                     #$(bootloader-configuration-default-entry config)
                     #$(bootloader-configuration-timeout config))
-            #$@(map boot-parameters->gexp all-entries)
+            #$@(map menu-entry->gexp all-entries)
 
             #$@(if (pair? old-entries)
                    #~((format port "
 submenu \"GNU system, old configurations...\" {~%")
-                      #$@(map boot-parameters->gexp old-entries)
+                      #$@(map menu-entry->gexp old-entries)
                       (format port "}~%"))
                    #~()))))
 
diff --git a/gnu/system.scm b/gnu/system.scm
index 5632029f7..f312a7daa 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -112,7 +112,7 @@
             boot-parameters-initrd
             read-boot-parameters
             read-boot-parameters-file
-            menu-entry->boot-parameters
+            boot-parameters->menu-entry
 
             local-host-aliases
             %setuid-programs
@@ -301,17 +301,15 @@ The object has its kernel-arguments extended in order to make it bootable."
                                                      root-device)))
       #f)))
 
-(define (menu-entry->boot-parameters menu-entry)
-  "Convert a <menu-entry> instance to a corresponding <boot-parameters>."
-  (boot-parameters
-   (label (menu-entry-label menu-entry))
-   (root-device #f)
-   (bootloader-name 'custom)
-   (store-device #f)
-   (store-mount-point #f)
-   (kernel (menu-entry-linux menu-entry))
-   (kernel-arguments (menu-entry-linux-arguments menu-entry))
-   (initrd (menu-entry-initrd menu-entry))))
+(define (boot-parameters->menu-entry conf)
+  (menu-entry
+   (label (boot-parameters-label conf))
+   (device (boot-parameters-store-device conf))
+   (device-mount-point (boot-parameters-store-mount-point conf))
+   (linux (boot-parameters-kernel conf))
+   (linux-arguments (boot-parameters-kernel-arguments conf))
+   (initrd (boot-parameters-initrd conf))))
+
 
 
 ;;;
@@ -861,15 +859,16 @@ listed in OS.  The C library expects to find it under
   (store-file-system (operating-system-file-systems os)))
 
 (define* (operating-system-bootcfg os #:optional (old-entries '()))
-  "Return the bootloader configuration file for OS.  Use OLD-ENTRIES to
-populate the \"old entries\" menu."
+  "Return the bootloader configuration file for OS.  Use OLD-ENTRIES
+(which is a list of <menu-entry>) to populate the \"old entries\" menu."
   (mlet* %store-monad
       ((system      (operating-system-derivation os))
        (root-fs ->  (operating-system-root-file-system os))
        (root-device -> (if (eq? 'uuid (file-system-title root-fs))
                            (uuid->string (file-system-device root-fs))
                            (file-system-device root-fs)))
-       (entry (operating-system-boot-parameters os system root-device))
+       (params (operating-system-boot-parameters os system root-device))
+       (entry -> (boot-parameters->menu-entry params))
        (bootloader-conf -> (operating-system-bootloader os)))
     ((bootloader-configuration-file-generator
       (bootloader-configuration-bootloader bootloader-conf))
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 35675cc01..f27ff12b0 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -431,8 +431,6 @@ generation as its default entry.  STORE is an open connection to the store."
   "Re-install bootloader for existing system profile generation NUMBER.
 STORE is an open connection to the store."
   (let* ((generation (generation-file-name %system-profile number))
-         (params (unless-file-not-found
-                  (read-boot-parameters-file generation)))
          ;; Detect the bootloader used in %system-profile.
          (bootloader (lookup-bootloader-by-name (system-bootloader-name)))
 
@@ -442,10 +440,12 @@ STORE is an open connection to the store."
                              (bootloader bootloader)))
 
          ;; Make the specified system generation the default entry.
-         (entries (profile-boot-parameters %system-profile (list number)))
+         (params (profile-boot-parameters %system-profile (list number)))
          (old-generations (delv number (generation-numbers %system-profile)))
-         (old-entries (profile-boot-parameters
-                       %system-profile old-generations)))
+         (old-params (profile-boot-parameters
+                       %system-profile old-generations))
+         (entries (map boot-parameters->menu-entry params))
+         (old-entries (map boot-parameters->menu-entry old-params)))
     (run-with-store store
       (mlet* %store-monad
           ((bootcfg ((bootloader-configuration-file-generator bootloader)




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Sun, 02 Jul 2017 15:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 27529 <at> debbugs.gnu.org
Subject: Re: [bug#27529] [PATCH] bootloader: Use <menu-entry> for the
 bootloader side.
Date: Sun, 02 Jul 2017 16:59:55 +0200
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> * gnu/bootloader.scm (menu-entry-device-mount-point): New variable.  Export it.
> (<menu-entry>: New field "device".
> * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
> entries.
> * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
> <menu-entry> entries.
> * gnu/system.scm (menu->entry->boot-parameters): Delete variable.
> (boot-parameters->menu-entry): New variable.  Export it.
> (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
> * guix/script/system.scm (reinstall-bootloader):  Fix bootcfg usage.
> ---
>  gnu/bootloader.scm          |  3 +++
>  gnu/bootloader/extlinux.scm | 19 +++++++++----------
>  gnu/bootloader/grub.scm     | 27 ++++++++++++---------------
>  gnu/system.scm              | 29 ++++++++++++++---------------
>  guix/scripts/system.scm     | 10 +++++-----
>  5 files changed, 43 insertions(+), 45 deletions(-)

Could you explain the rationale?

IIRC there was the idea that implementations of the bootloader API
should use <boot-parameters>, and that <menu-entry> would be used only
in the user-facing APIs (it had even disappeared with the initial
thing.)

I don’t have anything against it at first sight but I just want to make
sure we don’t enter a loop.  :-)

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Sun, 02 Jul 2017 18:28:02 GMT) Full text and rfc822 format available.

Message #11 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 27529 <at> debbugs.gnu.org
Subject: Re: [bug#27529] [PATCH] bootloader: Use <menu-entry> for the
 bootloader side.
Date: Sun, 2 Jul 2017 20:26:56 +0200
Hi Ludo,

On Sun, 02 Jul 2017 16:59:55 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> 
> > * gnu/bootloader.scm (menu-entry-device-mount-point): New variable.  Export it.
> > (<menu-entry>: New field "device".
> > * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
> > entries.
> > * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
> > <menu-entry> entries.
> > * gnu/system.scm (menu->entry->boot-parameters): Delete variable.
> > (boot-parameters->menu-entry): New variable.  Export it.
> > (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
> > * guix/script/system.scm (reinstall-bootloader):  Fix bootcfg usage.
> > ---
> >  gnu/bootloader.scm          |  3 +++
> >  gnu/bootloader/extlinux.scm | 19 +++++++++----------
> >  gnu/bootloader/grub.scm     | 27 ++++++++++++---------------
> >  gnu/system.scm              | 29 ++++++++++++++---------------
> >  guix/scripts/system.scm     | 10 +++++-----
> >  5 files changed, 43 insertions(+), 45 deletions(-)  
> 
> Could you explain the rationale?
> 
> IIRC there was the idea that implementations of the bootloader API
> should use <boot-parameters>, and that <menu-entry> would be used only
> in the user-facing APIs (it had even disappeared with the initial
> thing.)

Yeah, it's preparation for chainloading support (non-Linux OSes etc).  I don't feel strongly one way or another but I think those chainloading entries would actually be menu entries and not really boot-parameters as in Guix-can-use-them-for-anything.

What this does is use boot-parameters for stuff which Guix needs for itself, and menu entries (which could be a poem by Goethe as much as Guix cares) for the rest.  *Some* boot-parameters will end up as menu entries, but not all (for example think of chainloading: There would only be a menu-entry for chainloading, but both a boot-parameter and a (generated) menu-entry for the Guix Linux kernel).

There would be no way to get from a <menu-entry> to a <boot-parameter> because it could as well make no sense to do that.

In short, the bootloader would always and only get menu-entries, but the remainder of Guix would only use them as support under wobbly chairs or something :)

On the other hand, boot-parameters are things which Guix needs and manages.

If we want that (or want it again - it was that way before), this patch would be a way to do it.  If not, I'm fine with it as well.  It just bothered me a bit even when the (otherwise great) multi bootloader support went in that it used boot-parameters as some kind of menu-entry substitute.  In the beginning, <menu-entry> was grub-private, so that was the only way to get the multi bootloader support to work.  But now the <menu-entry> is public.  Then why not use it for what it is?




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Sun, 09 Jul 2017 19:32:01 GMT) Full text and rfc822 format available.

Message #14 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 27529 <at> debbugs.gnu.org
Subject: Re: [bug#27529] [PATCH] bootloader: Use <menu-entry> for the
 bootloader side.
Date: Sun, 09 Jul 2017 21:30:59 +0200
Hi Danny,

[+Cc Mathieu.]

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> On Sun, 02 Jul 2017 16:59:55 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>> 
>> > * gnu/bootloader.scm (menu-entry-device-mount-point): New variable.  Export it.
>> > (<menu-entry>: New field "device".
>> > * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
>> > entries.
>> > * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
>> > <menu-entry> entries.
>> > * gnu/system.scm (menu->entry->boot-parameters): Delete variable.
>> > (boot-parameters->menu-entry): New variable.  Export it.
>> > (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
>> > * guix/script/system.scm (reinstall-bootloader):  Fix bootcfg usage.
>> > ---
>> >  gnu/bootloader.scm          |  3 +++
>> >  gnu/bootloader/extlinux.scm | 19 +++++++++----------
>> >  gnu/bootloader/grub.scm     | 27 ++++++++++++---------------
>> >  gnu/system.scm              | 29 ++++++++++++++---------------
>> >  guix/scripts/system.scm     | 10 +++++-----
>> >  5 files changed, 43 insertions(+), 45 deletions(-)  
>> 
>> Could you explain the rationale?
>> 
>> IIRC there was the idea that implementations of the bootloader API
>> should use <boot-parameters>, and that <menu-entry> would be used only
>> in the user-facing APIs (it had even disappeared with the initial
>> thing.)
>
> Yeah, it's preparation for chainloading support (non-Linux OSes etc).  I don't feel strongly one way or another but I think those chainloading entries would actually be menu entries and not really boot-parameters as in Guix-can-use-them-for-anything.
>
> What this does is use boot-parameters for stuff which Guix needs for itself, and menu entries (which could be a poem by Goethe as much as Guix cares) for the rest.  *Some* boot-parameters will end up as menu entries, but not all (for example think of chainloading: There would only be a menu-entry for chainloading, but both a boot-parameter and a (generated) menu-entry for the Guix Linux kernel).

OK, makes sense to me.  So users can provide menu entries for, say,
GNU/Hurd or GNU/kFreeBSD; Guix would not try to interpret them and
instead pass them directly to GRUB & co., right?

> There would be no way to get from a <menu-entry> to a <boot-parameter> because it could as well make no sense to do that.
>
> In short, the bootloader would always and only get menu-entries, but the remainder of Guix would only use them as support under wobbly chairs or something :)

OK.

> On the other hand, boot-parameters are things which Guix needs and manages.
>
> If we want that (or want it again - it was that way before), this patch would be a way to do it.  If not, I'm fine with it as well.  It just bothered me a bit even when the (otherwise great) multi bootloader support went in that it used boot-parameters as some kind of menu-entry substitute.  In the beginning, <menu-entry> was grub-private, so that was the only way to get the multi bootloader support to work.  But now the <menu-entry> is public.  Then why not use it for what it is?

That makes sense to me.

Mathieu, WDYT?

Thanks for explaining,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Mon, 10 Jul 2017 07:31:01 GMT) Full text and rfc822 format available.

Message #17 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org> ,Danny Milosavljevic
 <dannym <at> scratchpost.org>
Cc: 27529 <at> debbugs.gnu.org
Subject: Re: [bug#27529] [PATCH] bootloader: Use <menu-entry> for the
 bootloader side.
Date: Mon, 10 Jul 2017 09:30:10 +0200
Hi Danny and Ludo,

> That makes sense to me.
>
> Mathieu, WDYT?

Sorry for the late answer. Yes, this patch LGTM too. 

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Wed, 26 Jul 2017 08:45:01 GMT) Full text and rfc822 format available.

Message #20 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 27529 <at> debbugs.gnu.org
Subject: Re: [bug#27529] [PATCH] bootloader: Use <menu-entry> for the
 bootloader side.
Date: Wed, 26 Jul 2017 10:43:50 +0200
Hello,

Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:

>> That makes sense to me.
>>
>> Mathieu, WDYT?
>
> Sorry for the late answer. Yes, this patch LGTM too. 

So I think you can go ahead with this patch, Danny.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Thu, 27 Jul 2017 12:56:03 GMT) Full text and rfc822 format available.

Message #23 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 27529 <at> debbugs.gnu.org
Subject: Guix system tests
Date: Thu, 27 Jul 2017 14:55:26 +0200
Hi Ludo,

On Wed, 26 Jul 2017 10:43:50 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Hello,
> 
> Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:
> 
> >> That makes sense to me.
> >>
> >> Mathieu, WDYT?  
> >
> > Sorry for the late answer. Yes, this patch LGTM too.   
> 
> So I think you can go ahead with this patch, Danny.

Yes, but I'd like the system tests to run successfully first.

Even without the patch, lots and lots of system tests, including installed-os, failed for me (in guix environment guix --fallback --pure).

So next I tried to isolate the environment more and more, using a networked container.

$ guix environment guix --fallback --pure -C -N --expose=/var/guix --expose=/gnu/store
[env]$ ln -s /var/guix /etc/guix
[env]$ make check-system

I get:
----------------------------------------------
phase `patch-source-shebangs' succeeded after 5.6 seconds
starting phase `copy-bootstrap-guile'
Backtrace:
In ice-9/boot-9.scm:
 160: 13 [catch #t #<catch-closure 8c5b40> ...]
In unknown file:
   ?: 12 [apply-smob/1 #<catch-closure 8c5b40>]
In ice-9/boot-9.scm:
  66: 11 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 10 [eval # #]
In ice-9/boot-9.scm:
2412: 9 [save-module-excursion #<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
4089: 8 [#<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
1734: 7 [%start-stack load-stack #<procedure 8f6ba0 at ice-9/boot-9.scm:4080:10 ()>]
1739: 6 [#<procedure 8f8960 ()>]
In unknown file:
   ?: 5 [primitive-load "/gnu/store/i079v3fgvxkxwz2ml0islbz2dyphkzqh-guix-0.13.0-4.f1ddfe4+-guile-builder"]
In ice-9/eval.scm:
 387: 4 [eval # ()]
In srfi/srfi-1.scm:
 827: 3 [every1 #<procedure aca140 at /gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:649:9 (expr)> ...]
In /gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:
 653: 2 [#<procedure aca140 at /gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:649:9 (expr)> #]
In ice-9/eval.scm:
 432: 1 [eval # #]
In unknown file:
   ?: 0 [copy-file "/gnu/store/dgncc5wmw8prxq09y71hqjc6g7rxqvvb-guile-2.0.9.tar.xz" ...]

ERROR: In procedure copy-file:
ERROR: In procedure copy-file: Permission denied
note: keeping build directory `/tmp/guix-build-guix-0.13.0-4.f1ddfe4+.drv-2'

cannot build derivation `/gnu/store/qn63kv6kwjxp3azigm225ixpq18nsw8i-installed-os.drv': 1 dependencies couldn't be built

----------------------------------------------

Please please can we disable the automatic ellipsisaztion ?

>   ?: 0 [copy-file "/gnu/store/dgncc5wmw8prxq09y71hqjc6g7rxqvvb-guile-2.0.9.tar.xz" ...]
                                                                                     ^^^ grr

So I manually checked the relevant parts of ./gnu/packages/package-management.scm :

                                (target (string-append "gnu/packages/bootstrap/"
                                                       arch "-linux/"
                                                       "/guile-"
                                                       (boot-guile-version arch)
                                                       ".tar.xz")))
                            (mkdir-p (dirname target)) ;XXX: eventually unneeded
                            (copy-file guile target)))

                        (copy "i686")
                        (copy "x86_64")
                        (copy "mips64el")
                        (copy "armhf")
                        (copy "aarch64")

Not sure what the problem is.  Help?




Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Thu, 27 Jul 2017 14:58:01 GMT) Full text and rfc822 format available.

Message #26 received at 27529 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 27529 <at> debbugs.gnu.org
Subject: Re: Guix system tests
Date: Thu, 27 Jul 2017 16:57:29 +0200
Hi,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> Yes, but I'd like the system tests to run successfully first.
>
> Even without the patch, lots and lots of system tests, including installed-os, failed for me (in guix environment guix --fallback --pure).
>
> So next I tried to isolate the environment more and more, using a networked container.
>
> $ guix environment guix --fallback --pure -C -N --expose=/var/guix --expose=/gnu/store
> [env]$ ln -s /var/guix /etc/guix
> [env]$ make check-system
>
> I get:
> ----------------------------------------------
> phase `patch-source-shebangs' succeeded after 5.6 seconds
> starting phase `copy-bootstrap-guile'
> Backtrace:
> In ice-9/boot-9.scm:
>  160: 13 [catch #t #<catch-closure 8c5b40> ...]
> In unknown file:
>    ?: 12 [apply-smob/1 #<catch-closure 8c5b40>]
> In ice-9/boot-9.scm:
>   66: 11 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
>  432: 10 [eval # #]
> In ice-9/boot-9.scm:
> 2412: 9 [save-module-excursion #<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
> 4089: 8 [#<procedure 8e6840 at ice-9/boot-9.scm:4084:3 ()>]
> 1734: 7 [%start-stack load-stack #<procedure 8f6ba0 at ice-9/boot-9.scm:4080:10 ()>]
> 1739: 6 [#<procedure 8f8960 ()>]
> In unknown file:
>    ?: 5 [primitive-load "/gnu/store/i079v3fgvxkxwz2ml0islbz2dyphkzqh-guix-0.13.0-4.f1ddfe4+-guile-builder"]
> In ice-9/eval.scm:
>  387: 4 [eval # ()]
> In srfi/srfi-1.scm:
>  827: 3 [every1 #<procedure aca140 at /gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:649:9 (expr)> ...]
> In /gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:
>  653: 2 [#<procedure aca140 at /gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:649:9 (expr)> #]
> In ice-9/eval.scm:
>  432: 1 [eval # #]
> In unknown file:
>    ?: 0 [copy-file "/gnu/store/dgncc5wmw8prxq09y71hqjc6g7rxqvvb-guile-2.0.9.tar.xz" ...]
>
> ERROR: In procedure copy-file:
> ERROR: In procedure copy-file: Permission denied

Someone reported it before: this error happens while building
‘current-guix’, and it happens because guile-2.0.9.tar.xz is already
present in the source tree under gnu/packages/bootstrap, and it’s
read-only.

Why is it already present?  Because the environment you created above
lacks Git, and thus ‘git-predicate’ cannot determine which files are
part of the Guix checkout and which files are byproducts.  Thus, it
considers that all the files present in your directory are part of the
checkout, including that guile-2.0.9.tar.xz file.  Hence the error.

The fix is to add Git to the environment.

HTH!

Ludo’.




bug closed, send any further explanations to 27529 <at> debbugs.gnu.org and Danny Milosavljevic <dannym <at> scratchpost.org> Request was from Danny Milosavljevic <dannym <at> scratchpost.org> to control <at> debbugs.gnu.org. (Fri, 28 Jul 2017 20:01:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#27529; Package guix-patches. (Sat, 29 Jul 2017 11:51:01 GMT) Full text and rfc822 format available.

Message #31 received at 27529-done <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 27529-done <at> debbugs.gnu.org
Subject: Re: Guix system tests
Date: Sat, 29 Jul 2017 13:50:43 +0200
Hi Ludo,

On Thu, 27 Jul 2017 16:57:29 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> The fix is to add Git to the environment.

Yup, that worked.

Now, with the container, without the patch applied, I got this status:

TOTAL: 19
PASS: /gnu/store/6yd36pvdsh93jym6ncnfq00qq9pgi6hp-mcron
PASS: /gnu/store/0jk0ps5dbzzajqh4f3g57sm6hjcclr8v-basic
PASS: /gnu/store/9s0v47q3h3d9whb2a7vjndhxqm9xa6g3-encrypted-root-os
PASS: /gnu/store/cz9kbcxmar4bhmmn2i5r5v3nz2ni35x6-separate-store-os
PASS: /gnu/store/p12xzg2cjdqfma7i96pf5543gv32l1yd-separate-home-os
PASS: /gnu/store/8pb5nkmgqprlkl7jxwwhwvlakx1ndphs-btrfs-root-os
PASS: /gnu/store/szz1g25j46vplvy558m73gflrnchplwb-installed-os
PASS: /gnu/store/rcrjppbmf01jf77w760mn6bcg5b6bfb9-installed-extlinux-os
PASS: /gnu/store/5y0rm9cg2n5l2d8k43fvylxmg2jpxhsx-raid-root-os
PASS: /gnu/store/ym2pc10ghl103kbmg4gfqbh2zz378lar-exim-test
PASS: /gnu/store/6h99n5xjz68h3sgmbrizriakizlja0ap-opensmtpd-test
PASS: /gnu/store/yygq63j7f5pipkln5phcdgsprwyy4rwh-prosody
PASS: /gnu/store/qjlvj4zsszwmawwv708sm9z2mv278mcg-inetd-test
PASS: /gnu/store/i4in6vw5csfdswk000ppinkca80r6ycp-nfs
PASS: /gnu/store/z0hvniwi9qpa3wbszglv6p8gaqg93i6l-dropbear
PASS: /gnu/store/hw0vl7lk6fv2wr6h047r12b3f3s2735h-openssh
PASS: /gnu/store/5q882s4rnjixk603745xqy3kz4x7nsfd-nginx-test
FAIL: /gnu/store/wzlf2nri5s4x8g8q2b3cm3fmb8kky728-nss-mdns
FAIL: /gnu/store/fd36qb815ykhwp6iyc9gb9cpr0bkqndd-dicod

And with the container, with the patch applied, I got this status:

TOTAL: 19
PASS: /gnu/store/0jk0ps5dbzzajqh4f3g57sm6hjcclr8v-basic
PASS: /gnu/store/6yd36pvdsh93jym6ncnfq00qq9pgi6hp-mcron
PASS: /gnu/store/r5dj6yi7gdq768psm23cz2izk99kblqj-installed-os
PASS: /gnu/store/kdfpkapjv12kz5j3av1m7wrmczcb256k-encrypted-root-os
PASS: /gnu/store/agmnwggqrmdh6yrk130kdigcp06lcp4z-btrfs-root-os
PASS: /gnu/store/0l844jl09028sk14did0yr7mgbaziyd6-raid-root-os
PASS: /gnu/store/lj89zwwr6739n0l28rk8ahvyjg36qai5-separate-store-os
PASS: /gnu/store/7hm390x9vaiyn8r1l9amhcsj42ql0hhd-separate-home-os
PASS: /gnu/store/llipmfynsnj26wacnvsapybarkl1rca2-installed-extlinux-os
PASS: /gnu/store/ym2pc10ghl103kbmg4gfqbh2zz378lar-exim-test
PASS: /gnu/store/6h99n5xjz68h3sgmbrizriakizlja0ap-opensmtpd-test
PASS: /gnu/store/yygq63j7f5pipkln5phcdgsprwyy4rwh-prosody
PASS: /gnu/store/qjlvj4zsszwmawwv708sm9z2mv278mcg-inetd-test
PASS: /gnu/store/i4in6vw5csfdswk000ppinkca80r6ycp-nfs
PASS: /gnu/store/z0hvniwi9qpa3wbszglv6p8gaqg93i6l-dropbear
PASS: /gnu/store/hw0vl7lk6fv2wr6h047r12b3f3s2735h-openssh
PASS: /gnu/store/5q882s4rnjixk603745xqy3kz4x7nsfd-nginx-test
FAIL: /gnu/store/wzlf2nri5s4x8g8q2b3cm3fmb8kky728-nss-mdns
FAIL: /gnu/store/fd36qb815ykhwp6iyc9gb9cpr0bkqndd-dicod

Good :)

I've pushed the commit to master (as 1975c754f487eb4933724ca3b116442d21ef8dd9).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Aug 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.