guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: libvirt: Don't wrap with PATH.


From: guix-commits
Subject: 01/01: gnu: libvirt: Don't wrap with PATH.
Date: Wed, 11 Sep 2019 07:16:09 -0400 (EDT)

iyzsong pushed a commit to branch master
in repository guix.

commit ef640db2f509f51ebfe3a6a66ba837ef3103bbb7
Author: 宋文武 <address@hidden>
Date:   Wed Aug 28 20:49:40 2019 +0800

    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 2647771..f46c31d 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 705ed84..03aedd3 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]