gnu: libvirt: Don't wrap with PATH.
This reverts commit 903e051a71
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.
This commit is contained in:
parent
e135ef9686
commit
ef640db2f5
|
@ -401,7 +401,10 @@ manage system or application containers.")
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#: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/"
|
(string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
|
||||||
,name "-" ,version)
|
,name "-" ,version)
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
|
@ -431,23 +434,13 @@ manage system or application containers.")
|
||||||
(apply invoke "make" "install"
|
(apply invoke "make" "install"
|
||||||
"sysconfdir=/tmp/etc"
|
"sysconfdir=/tmp/etc"
|
||||||
"localstatedir=/tmp/var"
|
"localstatedir=/tmp/var"
|
||||||
make-flags)))
|
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))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("libxml2" ,libxml2)
|
`(("libxml2" ,libxml2)
|
||||||
("eudev" ,eudev)
|
("eudev" ,eudev)
|
||||||
("libpciaccess" ,libpciaccess)
|
("libpciaccess" ,libpciaccess)
|
||||||
("gnutls" ,gnutls)
|
("gnutls" ,gnutls)
|
||||||
("dbus" ,dbus)
|
("dbus" ,dbus)
|
||||||
("qemu" ,qemu)
|
|
||||||
("libpcap" ,libpcap)
|
("libpcap" ,libpcap)
|
||||||
("libnl" ,libnl)
|
("libnl" ,libnl)
|
||||||
("libuuid" ,util-linux)
|
("libuuid" ,util-linux)
|
||||||
|
|
|
@ -442,8 +442,10 @@ potential infinite waits blocking libvirt."))
|
||||||
(service-extension polkit-service-type
|
(service-extension polkit-service-type
|
||||||
(compose list libvirt-configuration-libvirt))
|
(compose list libvirt-configuration-libvirt))
|
||||||
(service-extension profile-service-type
|
(service-extension profile-service-type
|
||||||
(compose list
|
(lambda (config)
|
||||||
libvirt-configuration-libvirt))
|
(list
|
||||||
|
(libvirt-configuration-libvirt config)
|
||||||
|
qemu)))
|
||||||
(service-extension activation-service-type
|
(service-extension activation-service-type
|
||||||
%libvirt-activation)
|
%libvirt-activation)
|
||||||
(service-extension shepherd-root-service-type
|
(service-extension shepherd-root-service-type
|
||||||
|
|
Loading…
Reference in New Issue