unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37209: [PATCH] gnu: libvirt: Don't wrap with PATH
@ 2019-08-28 13:05 宋文武
  2019-09-11 11:18 ` 宋文武
  0 siblings, 1 reply; 2+ messages in thread
From: 宋文武 @ 2019-08-28 13:05 UTC (permalink / raw)
  To: 37209

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-libvirt-Don-t-wrap-with-PATH.patch --]
[-- Type: text/x-patch, Size: 3532 bytes --]

From e463ef6952009a46c96981df0647cee414fb71a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#37209: [PATCH] gnu: libvirt: Don't wrap with PATH
  2019-08-28 13:05 bug#37209: [PATCH] gnu: libvirt: Don't wrap with PATH 宋文武
@ 2019-09-11 11:18 ` 宋文武
  0 siblings, 0 replies; 2+ messages in thread
From: 宋文武 @ 2019-09-11 11:18 UTC (permalink / raw)
  To: 37209-done

iyzsong@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@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>..

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-11 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 13:05 bug#37209: [PATCH] gnu: libvirt: Don't wrap with PATH 宋文武
2019-09-11 11:18 ` 宋文武

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).