[PATCH] bootloader: Use <menu-entry> for the bootloader side.

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 8 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20170629104259.13537-1-dannym@scratchpost.org
* 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(-)

Toggle diff (208 lines)
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)
Ludovic Courtès wrote 8 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 27529@debbugs.gnu.org)
8737ae995g.fsf@gnu.org
Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (18 lines)
> * 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’.
Danny Milosavljevic wrote 8 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27529@debbugs.gnu.org)
20170702202656.60c2af09@scratchpost.org
Hi Ludo,

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

Toggle quote (27 lines)
> Danny Milosavljevic <dannym@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?
Ludovic Courtès wrote 8 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87pod9v24s.fsf@gnu.org
Hi Danny,

[+Cc Mathieu.]

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (34 lines)
> On Sun, 02 Jul 2017 16:59:55 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Danny Milosavljevic <dannym@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?

Toggle quote (4 lines)
> 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.

Toggle quote (4 lines)
> 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’.
Mathieu Othacehe wrote 8 years ago
(address . 27529@debbugs.gnu.org)
86k23gn3zx.fsf@gmail.com
Hi Danny and Ludo,

Toggle quote (4 lines)
> That makes sense to me.
>
> Mathieu, WDYT?

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

Thanks,

Mathieu
Ludovic Courtès wrote 8 years ago
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)
87mv7ra8qh.fsf@gnu.org
Hello,

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

Toggle quote (6 lines)
>> 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’.
Danny Milosavljevic wrote 8 years ago
Guix system tests
(name . Ludovic Courtès)(address . ludo@gnu.org)
20170727145526.2589c1a0@scratchpost.org
Hi Ludo,

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

Toggle quote (12 lines)
> Hello,
>
> Mathieu Othacehe <m.othacehe@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 ?

Toggle quote (1 lines)
> ?: 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?
Ludovic Courtès wrote 8 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87y3ra2ahy.fsf@gnu.org
Hi,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (44 lines)
> 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’.
Danny Milosavljevic wrote 8 years ago
(no subject)
(address . control@debbugs.gnu.org)
20170728215958.2f827394@scratchpost.org
close 27529
Danny Milosavljevic wrote 8 years ago
Re: Guix system tests
(name . Ludovic Courtès)(address . ludo@gnu.org)
20170729135043.1e541927@scratchpost.org
Hi Ludo,

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

Toggle quote (2 lines)
> 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).
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27529@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27529
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help