[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/12: services: qemu-guest-agent: Fix implementation.
From: |
guix-commits |
Subject: |
05/12: services: qemu-guest-agent: Fix implementation. |
Date: |
Fri, 18 Feb 2022 08:15:57 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 01821914e272ed682dc83b5163c17a0345dcaf17
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Feb 18 11:29:10 2022 +0100
services: qemu-guest-agent: Fix implementation.
Previously, by accessing the raw <qemu-guest-agent-configuration>
fields, 'qemu' would match the first field, which is the '%location'
field, not the 'qemu' field.
It would seem this bug has always been present since the addition of the
'location' field in d132d9f96ba34bca58b18e293e03b393054fd962 predates
the addition of 'qemu-guest-agent-service-type' in
f634a0baab85454a6feac25e29905f564b276c9e.
Fixes <https://issues.guix.gnu.org/54041>.
Reported by Ricardo Wurmus <rekado@elephly.net>.
* gnu/services/virtualization.scm (qemu-guest-agent-shepherd-service):
Use accessors for <qemu-guest-agent-configuration>.
---
gnu/services/virtualization.scm | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 66ae1a1565..9b4512cff7 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ryan Moe <ryan.moe@gmail.com>
-;;; Copyright © 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2020-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Timotej Lazar <timotej.lazar@araneo.si>
;;;
@@ -866,23 +866,23 @@ functionality of the kernel Linux.")))
"Path to device or socket used to communicate with the host. If not
specified, the QEMU default path is used."))
-(define qemu-guest-agent-shepherd-service
- (match-lambda
- (($ <qemu-guest-agent-configuration> qemu device)
- (list
- (shepherd-service
- (provision '(qemu-guest-agent))
- (documentation "Run the QEMU guest agent.")
- (start #~(make-forkexec-constructor
- `(,(string-append #$qemu "/bin/qemu-ga") "--daemon"
- "--pidfile=/var/run/qemu-ga.pid"
- "--statedir=/var/run"
- ,@(if #$device
- (list (string-append "--path=" #$device))
- '()))
- #:pid-file "/var/run/qemu-ga.pid"
- #:log-file "/var/log/qemu-ga.log"))
- (stop #~(make-kill-destructor)))))))
+(define (qemu-guest-agent-shepherd-service config)
+ (let ((qemu (qemu-guest-agent-configuration-qemu config))
+ (device (qemu-guest-agent-configuration-device config)))
+ (list
+ (shepherd-service
+ (provision '(qemu-guest-agent))
+ (documentation "Run the QEMU guest agent.")
+ (start #~(make-forkexec-constructor
+ `(,(string-append #$qemu "/bin/qemu-ga") "--daemon"
+ "--pidfile=/var/run/qemu-ga.pid"
+ "--statedir=/var/run"
+ ,@(if #$device
+ (list (string-append "--path=" #$device))
+ '()))
+ #:pid-file "/var/run/qemu-ga.pid"
+ #:log-file "/var/log/qemu-ga.log"))
+ (stop #~(make-kill-destructor))))))
(define qemu-guest-agent-service-type
(service-type
- branch master updated (40d418b326 -> 33ce3f1c86), guix-commits, 2022/02/18
- 05/12: services: qemu-guest-agent: Fix implementation.,
guix-commits <=
- 02/12: packages: 'package-transitive-supported-systems' ignores '%current-target-system'., guix-commits, 2022/02/18
- 07/12: gnu: upower: Update to 0.99.15., guix-commits, 2022/02/18
- 06/12: gnu: upower: Make it auto-updatable., guix-commits, 2022/02/18
- 11/12: gnu: upower: Remove obsolete phase, guix-commits, 2022/02/18
- 08/12: gnu: umockdev: Use G-expressions., guix-commits, 2022/02/18
- 04/12: guix build: Warn when attempting to build an unsupported package., guix-commits, 2022/02/18
- 03/12: profiles: 'profile-derivation' rejects unsupported packages., guix-commits, 2022/02/18
- 01/12: doc: Typographical tweaks., guix-commits, 2022/02/18
- 10/12: gnu: umockdev: Reference libumockdev by absolute path., guix-commits, 2022/02/18
- 09/12: gnu: umockdev: Reference 'env' and 'sh' by absolute path., guix-commits, 2022/02/18