GNU bug report logs - #37209
[PATCH] gnu: libvirt: Don't wrap with PATH

Previous Next

Package: guix;

Reported by: iyzsong <at> member.fsf.org (宋文武)

Date: Wed, 28 Aug 2019 13:06:02 UTC

Severity: normal

Tags: patch

Done: iyzsong <at> member.fsf.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 37209 in the body.
You can then email your comments to 37209 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 bug-guix <at> gnu.org:
bug#37209; Package guix. (Wed, 28 Aug 2019 13:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to iyzsong <at> member.fsf.org (宋文武):
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 28 Aug 2019 13:06:02 GMT) Full text and rfc822 format available.

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

From: iyzsong <at> member.fsf.org (宋文武)
To: bug-guix <at> gnu.org
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, Christopher Baines <mail <at> cbaines.net>
Subject: [PATCH] gnu: libvirt: Don't wrap with PATH
Date: Wed, 28 Aug 2019 21:05:25 +0800
[Message part 1 (text/plain, inline)]
Hello, this patch will make libvirt use
  "<emulator>/run/current-system/profile/bin/qemu-system-x86_64</emulator>"
in machine's definition, and it can use 'ovs-vsctl' in PATH:

[0001-gnu-libvirt-Don-t-wrap-with-PATH.patch (text/x-patch, inline)]
From e463ef6952009a46c96981df0647cee414fb71a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> member.fsf.org>
Date: Wed, 28 Aug 2019 20:49:40 +0800
Subject: [PATCH] gnu: libvirt: Don't wrap with PATH.

This reverts commit 903e051a71467bc96a054c9b4ed89348fdae8977 to fix
<https://bugs.gnu.org/31365>.  The full path of the 'ip' command is already
embedded, and we want to search 'qemu' in PATH.

* gnu/packages/virtualization.scm (libvirt): Remove 'wrap-libvirtd phase.  Add
configure flags to run qemu as 'nobody:kvm'.
* gnu/services/virtualization.scm (libvirt-service-type): Add 'qemu' to the
system profile.
---
 gnu/packages/virtualization.scm | 17 +++++------------
 gnu/services/virtualization.scm |  6 ++++--
 2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 26477714e4..f46c31df1f 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -401,7 +401,10 @@ manage system or application containers.")
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
-       (list "--with-polkit"
+       (list "--with-qemu"
+             "--with-qemu-user=nobody"
+             "--with-qemu-group=kvm"
+             "--with-polkit"
              (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
                             ,name "-" ,version)
              "--sysconfdir=/etc"
@@ -431,23 +434,13 @@ manage system or application containers.")
              (apply invoke "make" "install"
                     "sysconfdir=/tmp/etc"
                     "localstatedir=/tmp/var"
-                    make-flags)))
-         (add-after 'install 'wrap-libvirtd
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (wrap-program (string-append out "/sbin/libvirtd")
-                 `("PATH" = (,(string-append (assoc-ref inputs "iproute")
-                                             "/sbin")
-                             ,(string-append (assoc-ref inputs "qemu")
-                                             "/bin"))))
-               #t))))))
+                    make-flags))))))
     (inputs
      `(("libxml2" ,libxml2)
        ("eudev" ,eudev)
        ("libpciaccess" ,libpciaccess)
        ("gnutls" ,gnutls)
        ("dbus" ,dbus)
-       ("qemu" ,qemu)
        ("libpcap" ,libpcap)
        ("libnl" ,libnl)
        ("libuuid" ,util-linux)
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 705ed84d06..03aedd326c 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -442,8 +442,10 @@ potential infinite waits blocking libvirt."))
                   (service-extension polkit-service-type
                                      (compose list libvirt-configuration-libvirt))
                   (service-extension profile-service-type
-                                     (compose list
-                                              libvirt-configuration-libvirt))
+                                     (lambda (config)
+                                       (list
+                                        (libvirt-configuration-libvirt config)
+                                        qemu)))
                   (service-extension activation-service-type
                                      %libvirt-activation)
                   (service-extension shepherd-root-service-type
-- 
2.19.2


Reply sent to iyzsong <at> member.fsf.org (宋文武):
You have taken responsibility. (Wed, 11 Sep 2019 11:20:01 GMT) Full text and rfc822 format available.

Notification sent to iyzsong <at> member.fsf.org (宋文武):
bug acknowledged by developer. (Wed, 11 Sep 2019 11:20:02 GMT) Full text and rfc822 format available.

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

From: iyzsong <at> member.fsf.org (宋文武)
To: 37209-done <at> debbugs.gnu.org
Subject: Re: bug#37209: [PATCH] gnu: libvirt: Don't wrap with PATH
Date: Wed, 11 Sep 2019 19:18:56 +0800
iyzsong <at> member.fsf.org (宋文武) writes:

> Hello, this patch will make libvirt use
>   "<emulator>/run/current-system/profile/bin/qemu-system-x86_64</emulator>"
> in machine's definition, and it can use 'ovs-vsctl' in PATH:
>
>>From e463ef6952009a46c96981df0647cee414fb71a6 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> member.fsf.org>
> Date: Wed, 28 Aug 2019 20:49:40 +0800
> Subject: [PATCH] gnu: libvirt: Don't wrap with PATH.
>

Pushed, well I should sent it <guix-patches>..




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 172 days ago.

Previous Next


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