Subject: bug#26339: [PATCH 06/18] vm: Reword grub.cfg to boot.cfg

From: Mathieu Othacehe <[email-masked]>
Date: Sun, 2 Apr 2017 15:52:30 +0200

* gnu/build/vm.scm (register-bootcfg-root): Reword grub.cfg to boot.cfg,
(initialize-hard-disk): ditto,
* gnu/system/vm.scm (system-disk-image): ditto,
(system-qemu-image): ditto,
(system-qemu-image/shared-store): ditto.
---
 gnu/build/vm.scm  |  5 +++--
 gnu/system/vm.scm | 21 +++++++++++----------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index c536f4f44..766163e1d 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016 Christopher Allan Webber <[email-masked]>
 ;;; Copyright © 2016 Leo Famulari <[email-masked]>
+;;; Copyright © 2017 Mathieu Othacehe <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -284,7 +285,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
       (reset-timestamps target))))
 
 (define (register-bootcfg-root target bootcfg)
-  "On file system TARGET, register GRUB.CFG as a GC root."
+  "On file system TARGET, register BOOTCFG as a GC root."
   (let ((directory (string-append target "/var/guix/gcroots")))
     (mkdir-p directory)
     (symlink bootcfg (string-append directory "/bootcfg"))))
@@ -297,7 +298,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
                                install-bootloader
                                (partitions '()))
   "Initialize DEVICE as a disk containing all the <partition> objects listed
-in PARTITIONS, and using GRUB.CFG as its bootloader configuration file.
+in PARTITIONS, and using BOOTCFG as its bootloader configuration file.
 
 Each partition is initialized by calling its 'initializer' procedure,
 passing it a directory name where it is mounted."
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 6f852d7ea..7efbc872c 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2016 Christopher Allan Webber <[email-masked]>
 ;;; Copyright © 2016 Leo Famulari <[email-masked]>
+;;; Copyright © 2017 Mathieu Othacehe <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -294,10 +295,10 @@ to USB sticks meant to be read-only."
                                   file-systems-to-keep)))))
 
     (mlet* %store-monad ((os-drv   (operating-system-derivation os))
-                         (grub.cfg (operating-system-grub.cfg os)))
+                         (bootcfg  (operating-system-bootcfg os)))
       (qemu-image #:name name
                   #:os.drv os-drv
-                  #:bootcfg.drv grub.cfg
+                  #:bootcfg.drv bootcfg
                   #:bootloader-configuration (operating-system-bootloader os)
                   #:disk-image-size disk-image-size
                   #:disk-image-format "raw"
@@ -306,7 +307,7 @@ to USB sticks meant to be read-only."
                   #:copy-inputs? #t
                   #:register-closures? #t
                   #:inputs `(("system" ,os-drv)
-                             ("grub.cfg" ,grub.cfg))))))
+                             ("bootcfg" ,bootcfg))))))
 
 (define* (system-qemu-image os
                             #:key
@@ -339,14 +340,14 @@ of the GNU system as described by OS."
                                   file-systems-to-keep)))))
     (mlet* %store-monad
         ((os-drv      (operating-system-derivation os))
-         (grub.cfg    (operating-system-grub.cfg os)))
+         (bootcfg     (operating-system-bootcfg os)))
       (qemu-image  #:os.drv os-drv
-                   #:bootcfg.drv grub.cfg
+                   #:bootcfg.drv bootcfg
                    #:bootloader-configuration (operating-system-bootloader os)
                    #:disk-image-size disk-image-size
                    #:file-system-type file-system-type
                    #:inputs `(("system" ,os-drv)
-                              ("grub.cfg" ,grub.cfg))
+                              ("bootcfg" ,bootcfg))
                    #:copy-inputs? #t))))
 
 
@@ -435,17 +436,17 @@ When FULL-BOOT? is true, return an image that does a complete boot sequence,
 bootloaded included; thus, make a disk image that contains everything the
 bootloader refers to: OS kernel, initrd, bootloader data, etc."
   (mlet* %store-monad ((os-drv   (operating-system-derivation os))
-                       (grub.cfg (operating-system-grub.cfg os)))
+                       (bootcfg  (operating-system-bootcfg os)))
     ;; XXX: When FULL-BOOT? is true, we end up creating an image that contains
-    ;; GRUB.CFG and all its dependencies, including the output of OS-DRV.
+    ;; BOOTCFG and all its dependencies, including the output of OS-DRV.
     ;; This is more than needed (we only need the kernel, initrd, GRUB for its
     ;; font, and the background image), but it's hard to filter that.
     (qemu-image #:os.drv os-drv
-                #:bootcfg.drv grub.cfg
+                #:bootcfg.drv bootcfg
                 #:bootloader-configuration (operating-system-bootloader os)
                 #:disk-image-size disk-image-size
                 #:inputs (if full-boot?
-                             `(("grub.cfg" ,grub.cfg))
+                             `(("bootcfg" ,bootcfg))
                              '())
 
                 ;; XXX: Passing #t here is too slow, so let it off by default.
-- 
2.12.2