efraim pushed a commit to branch wip-ppc
in repository guix.
commit 120cb874fe6298cfae7d5190a70bed28b7ef5070
Author: Efraim Flashner <[email protected]>
AuthorDate: Sun May 3 11:01:22 2020 +0300
gnu: Use qemu-self when available.
* gnu/system/vm.scm (expression->derivation-in-linux-vm, iso9660-image,
qemu-image): Replace qemu-minimal with qemu-self.
* gnu/tests/install.scm (run-install, qemu-command/writable-image): Same.
---
gnu/system/vm.scm | 7 ++++---
gnu/tests/install.scm | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 1d5ee39..b335c87 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
;;; Copyright © 2017 Marius Bakke <[email protected]>
;;; Copyright © 2018 Chris Marusich <[email protected]>
+;;; Copyright © 2020 Efraim Flashner <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -144,7 +145,7 @@
(system (%current-system)) target
(linux linux-libre)
initrd
- (qemu qemu-minimal)
+ (qemu qemu-self)
(env-vars '())
(guile-for-build
(%guile-for-build))
@@ -275,7 +276,7 @@ substitutable."
file-system-uuid
(system (%current-system))
(target (%current-target-system))
- (qemu qemu-minimal)
+ (qemu qemu-self)
os
bootcfg-drv
bootloader
@@ -362,7 +363,7 @@ INPUTS is a list of inputs (as for packages)."
(name "qemu-image")
(system (%current-system))
(target (%current-target-system))
- (qemu qemu-minimal)
+ (qemu qemu-self)
(disk-image-size 'guess)
(disk-image-format "qcow2")
(file-system-type "ext4")
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 343fdc6..f98e9fa 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <[email protected]>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <[email protected]>
;;; Copyright © 2020 Mathieu Othacehe <[email protected]>
+;;; Copyright © 2020 Efraim Flashner <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -245,7 +246,7 @@ packages defined in installation-os."
(gnu build marionette))
(set-path-environment-variable "PATH" '("bin")
- (list #$qemu-minimal))
+ (list #$qemu-self))
(system* "qemu-img" "create" "-f" "qcow2"
#$output #$(number->string target-size))
@@ -310,7 +311,7 @@ IMAGE, a disk image. The QEMU VM has access to MEMORY-SIZE
MiB of RAM."
(return #~(let ((image #$image))
;; First we need a writable copy of the image.
(format #t "creating writable image from '~a'...~%" image)
- (unless (zero? (system* #+(file-append qemu-minimal
+ (unless (zero? (system* #+(file-append qemu-self
"/bin/qemu-img")
"create" "-f" "qcow2"
"-o"
@@ -319,7 +320,7 @@ IMAGE, a disk image. The QEMU VM has access to MEMORY-SIZE
MiB of RAM."
(error "failed to create writable QEMU image" image))
(chmod "disk.img" #o644)
- `(,(string-append #$qemu-minimal "/bin/"
+ `(,(string-append #$qemu-self "/bin/"
#$(qemu-command system))
,@(if (file-exists? "/dev/kvm")
'("-enable-kvm")