summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-31 20:30:04 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-31 20:30:04 +0000
commit4650985dd0e898b82e0d2ec225931297d4fadccf (patch)
treeeb0e8002cf3ebf1009110b6fec47fa90f873d824 /app-emulation/libvirt
parent67f76a858f1ac826bd8a550d756d9ec6e340ed4f (diff)
gentoo resync : 31.01.2018
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r--app-emulation/libvirt/Manifest9
-rw-r--r--app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch (renamed from app-emulation/libvirt/files/libvirt-3.10.0-fix_paths_for_apparmor.patch)91
-rw-r--r--app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch42
-rw-r--r--app-emulation/libvirt/libvirt-3.10.0-r2.ebuild (renamed from app-emulation/libvirt/libvirt-3.10.0-r1.ebuild)2
-rw-r--r--app-emulation/libvirt/libvirt-4.0.0.ebuild386
-rw-r--r--app-emulation/libvirt/libvirt-9999.ebuild7
6 files changed, 465 insertions, 72 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index befbc0e5a641..41b478c362ac 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -4,8 +4,9 @@ AUX libvirt-1.3.0-do_not_use_sysconf.patch 4072 BLAKE2B 2281954430dbc38262221bb4
AUX libvirt-1.3.4-glibc-2.23.patch 2049 BLAKE2B 8e283846a2442ef4bf3fd5ca88033387d150818972e1b8f4732584423652179d2d6f8df964a8b8a4e51219a946eec30450838207446e20e9bd77ff97c31996de SHA512 022b610c2e343c9cb595babcc8b2e5e0e0db1a19d6bfc9babdc817bc1e093ff12ee1c26304c188151fecc32481ffd225d7a3d36324613dd5b4ea7139280629c4
AUX libvirt-3.0.0-fix_paths_for_apparmor.patch 2904 BLAKE2B f84b684f4eaeee85a406730285be852226960e69694356007461911a34a68fe7031775f827fd76b016124cb809f3d3b2f52e4f02c1dc51738252644e502d3d8c SHA512 be4aba4b9bd44bb2f1b4f269f573caafce746783e0a7c08ff72d03a96b9675261346ededaf1d6b6c89afaa6d2b88fe7fb0d9f120d40fd714179e6f9d209a6724
AUX libvirt-3.1.0-musl-fix-includes.patch 221 BLAKE2B 65f486f4055c0ccae59601970d770f23f570f127ba26ce1d932855e784b83fce99389f22f12630005be61e5de2e64e0125d0bf5270024f736fe597fa5b81ff78 SHA512 876c7dacedcce1d69938779b978b3a23b2f51128f121b4aa53f5f301d7740f90d77f335523210ed492b68b5f7a0b864b25a694ee562fb5e8ab1b6411d3da48e7
-AUX libvirt-3.10.0-fix_paths_for_apparmor.patch 3504 BLAKE2B a304fd23e06db3567c37ee1c0bf7189589f44163b65bfa04e41d77fdeae11436101b8b1a191e7ec564d586eea3dda41ba4ecdf17244c1b5a59b9bf5877e9507c SHA512 4fc444f73f69c03c46e21ba51a8ecb9d089fa944ddf22985ca1d595a40535bf2e93f8d76ae64e5abc3b51f5f9007f84dea5e29533629297623abd116b700f6e3
+AUX libvirt-3.10.0-r2-fix_paths_for_apparmor.patch 2730 BLAKE2B ae92a37cdfb929862bd58d1cd208e3f8a3aab10dae98ec8e51d6c3ab579295e3f59ff091970499c6c57b625edec77b98421502df625b1d10c1c3d0be3dfbe489 SHA512 751b971fd0f109f3a4147feea8481adb9c868313ea57d293a89ee548661514f124318324823d9380839a7a5c8ae7c1e3ae8c4c6e62027587f163c8856e353a6a
AUX libvirt-3.8.0-CVE-2017-1000256.patch 3737 BLAKE2B 47f73e5296b8a41148781a4bf1e95e1571b4a9571825d18eb59a267b9c7d9b6e9f301e7818326be6c29392febd42083e8a4696adfe5cef81b029f7d21314670e SHA512 2c3e88670ec9531207c60b89e8e2ec6188834e795cd0e698d63781209182801209d4097fd72607166853b54a9f301a160b575f757741da5aeb995d752bbcb80a
+AUX libvirt-4.0.0-bash_completion_bugfixes.patch 1863 BLAKE2B ed54b4e308297907001bb2fbcba76197c341c292fc29139f50b9c03cb9ea61696dbd177a4d0055cdca3184a9ecbd283f576c491d2d3c581e31415465bd8e92e1 SHA512 f718408ce57c0abd68023356d5980c5e85dfb5c90759a6758309408dea7115b0ae18a18be2e625401d985fab7b1a374ab1e10caa27527ed002a852bb3f08ca73
AUX libvirt-guests.confd 2430 BLAKE2B 9d56477c9377e02503782e6d653579c6d149b292c43f37926f4646374e8aae05ca812b6a3a561811482861f8fe67dfdbe63851963326ddbbf2f4644c85411120 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc
AUX libvirt-guests.init-r2 5412 BLAKE2B 139c39b65e6297883ab13bb65f8799f6e417a3de841bca3b31fd161a7dd9f64b18dedc1a942d9ee6577c1253e9b45859dec006a17b25da9e6cde2507b88cd302 SHA512 0f46ec5776c61d1776248779fa894b1a6d7b98d0eb8e8374b320c785c25d92468f087e350233b9152eb2cd0680f6b334c3a61684dabc7c5b559d3b55fdcb712d
AUX libvirtd.confd-r5 740 BLAKE2B 74a069f4902dd1352f06029c886200615a35870ff88496c91956d23a3172db0789086622422f545498e92b7f8de41225022185fe291dd580cbacdeb783163f4b SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91
@@ -16,7 +17,9 @@ AUX virtlockd.init-r1 570 BLAKE2B 734d582d867b79649f863504fcd7c87fe3c59569b56b09
AUX virtlogd.init-r1 569 BLAKE2B 20df60c23cee575577592d41d1a9913923255633d12de789c036e6085f9e7b4360e017155c61e3688332b493a0e96ffca55753bcc67a33bb877539b80eef81fe SHA512 0a3e083e742f9e0d8206ab9a48c63bbd395bdc24e5551e2cbeddffa3fb576a817b73dbafe646c392a35c354d6b65426a9b6f3ce3dcafc30077715e90684968c1
DIST libvirt-3.10.0.tar.xz 14952220 BLAKE2B 6af2f4c07dc71d8aa283460640d3fdeccd78616d1678da1decf6b1702984ca0c685d8074963e55a2776ac834e18dbb61d86c20c6032320bf9aa6e02b480526dd SHA512 c2dfe0629bd90e8d7ae85f2a31dc027475c9614d497063fec6905aa2da4db68ce96e8f20d3290b0c0542b6ea31c85700b2727008bac65997ff0901b45f1b7260
DIST libvirt-3.8.0.tar.xz 14868712 BLAKE2B 4d97a03c3fe4eadb6d6eb3548231527c7d1a95e2134e63af63e72dcff8fd8d1cc8b5332f03d60edc2b200037ec0276b69a38c3379ce830a595bb5e83c3507e6f SHA512 fc48f29b493a5ec2b3586f6c5df0b8cb81f3f26be847bc42acfb6481d45970edc760dda0232ad57b95b8cf13382d0269dd3edf4a744040cda15b835d32d8c672
-EBUILD libvirt-3.10.0-r1.ebuild 9623 BLAKE2B 3f6f5c5b00811cdaf1c3de74f6767960811b185f40799b74ad54eafd40b984e16dc80781b09c693f268c26e09aef322d68079a2c768f8a69264240e131100da6 SHA512 bac17a99509ad580929830016c55fa7efa8a1db24890ab07ff2a135bb0820724ca96d7c7e64fada39d9b8bb8b7088c399db9db3820fed6a9a9ec2c1be263d895
+DIST libvirt-4.0.0.tar.xz 15002248 BLAKE2B 066794909d02be04a7d70ebd5e6d423736fdaf95b7521edd47ef19f9bec4f16d6d3e64117356394ce5916761ad77d5afab84ace2f4828c1f97373d0053b6924b SHA512 c99ea305f427859eb070b5f0c43de48645a5c53a2aa8efc60f54f278ec3fa0b504307861309e1852f8d7bff4436afe00c859aac27691366a0c36c91341cea7a1
+EBUILD libvirt-3.10.0-r2.ebuild 9626 BLAKE2B 8e01b077482188921afc8c76b2384a2fa5d02f35d060df9279967703510f19ce6c2d36da91f4f563c5f75b25d6b5dfbec6ca950ef6c2fdf9ada0067224ba879d SHA512 5133a0d242b3dcb70a9b0daf1153e3c9cb282deed7d94b40fee9e9a543635c61c795a9b70fb8025ed05a8b86613d24568123f0069c82f53e4f7a5473e5fae58b
EBUILD libvirt-3.8.0-r1.ebuild 9661 BLAKE2B d6afc9ed4f228d62466d825c02e0ff24595c70ee98d5f62c0fe78ec846964ac6de99e6d2de4cd297804da13699afb21f1bd1400917ead16da3fbfa8cdce7c2a9 SHA512 66a28a319d1ed7263524c9c13e4331c3451ad321ccb39b4e608e05ad1e9d40fd1b4a75a05d5910a0a83c3bc47f8c5746aa80eedd16b1c0e8b0a4a4e093d79169
-EBUILD libvirt-9999.ebuild 9506 BLAKE2B a9946fd7e60606b808d63b072cbf35cfbf141b2d1b10857c4cdc638127ed940e836bcc99641230588d4f7e00b320ea80c6efc5b4c9b9944ea360ed250a9abe2e SHA512 669472ae963372efc043f20dcf3a38d06fcdf45eb80ca13c7b76e6fed35590255206731ebd4a42b95017399bba309d49e734c14c07c9b5dc22cc7ae7819dbac2
+EBUILD libvirt-4.0.0.ebuild 9807 BLAKE2B 37010d9cbb5b9c6aee28fc1592fb7f16d0f6bd9390e5ed1e005d5d45cc494c415921c5a90bbd27ad21fba890facddc1633ce22c44d1eb36829079f30716c4e66 SHA512 b0de684a990dd7b5b849a73f8e87cc88693b5e33d86c3b585c7382ec060d09e53486811af8a3e6d0c83baf0ee8c6147fab872bc0c4c85d3c8645075857dec1f3
+EBUILD libvirt-9999.ebuild 9613 BLAKE2B 144ed8e703529bb4b9eeaa6048f0015459c8ab79f843e57fbcb882f44d47bda3e45685384d09b7debbd80ae173b39635724c84f525ae513bf918347aa1a87b54 SHA512 60c3061d9b24fd3e66f73555ed4649c35fe1a850e355e1c0262ffdd2113d7563afe4c2bf7df13f8132cf7818b520b29ee86dbdf4199579ad4cbc1704b4e87af0
MISC metadata.xml 3766 BLAKE2B 38d8b1dfb815871ca19c35c80ab390a422e1833b6ef09c6691889d5d6c01e25bb9fb5d187231456c443cb22764583312a56ed8e1a772f810b58050752ba9f2de SHA512 10d96f652bdcf32e34ea415a37de0c3c4aae3a716403a0ca73228af640788734119cbf4ade26a450cc3cda81ef6182391a6f590a851a6834d52394b7c81c49ed
diff --git a/app-emulation/libvirt/files/libvirt-3.10.0-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
index 0e386c1e00b0..f1360ae4e4e9 100644
--- a/app-emulation/libvirt/files/libvirt-3.10.0-fix_paths_for_apparmor.patch
+++ b/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
@@ -1,5 +1,5 @@
diff --git a/examples/Makefile.am b/examples/Makefile.am
-index ef2f79d..d8cdb9b 100644
+index ef2f79db3..d8cdb9b3f 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST = \
@@ -21,7 +21,7 @@ index ef2f79d..d8cdb9b 100644
$(NULL)
diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
-index d4fad85..0b22009 100644
+index d4fad85a1..0b22009e5 100644
--- a/examples/apparmor/libvirt-qemu
+++ b/examples/apparmor/libvirt-qemu
@@ -86,6 +86,8 @@
@@ -33,74 +33,33 @@ index d4fad85..0b22009 100644
# access PKI infrastructure
/etc/pki/libvirt-vnc/** r,
-diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-deleted file mode 100644
-index bd6181d..0000000
+diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
+similarity index 92%
+rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
+rename to examples/apparmor/usr.libexec.virt-aa-helper
+index bd6181d00..4086f140a 100644
--- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ /dev/null
-@@ -1,60 +0,0 @@
--# Last Modified: Mon Apr 5 15:10:27 2010
--#include <tunables/global>
--
++++ b/examples/apparmor/usr.libexec.virt-aa-helper
+@@ -1,7 +1,7 @@
+ # Last Modified: Mon Apr 5 15:10:27 2010
+ #include <tunables/global>
+
-profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-- #include <abstractions/base>
--
-- # needed for searching directories
-- capability dac_override,
-- capability dac_read_search,
--
-- # needed for when disk is on a network filesystem
-- network inet,
-- network inet6,
--
-- deny @{PROC}/[0-9]*/mounts r,
-- @{PROC}/[0-9]*/net/psched r,
-- owner @{PROC}/[0-9]*/status r,
-- @{PROC}/filesystems r,
--
-- /etc/libnl-3/classid r,
--
-- # for hostdev
-- /sys/devices/ r,
-- /sys/devices/** r,
-- deny /dev/sd* r,
-- deny /dev/vd* r,
-- deny /dev/dm-* r,
-- deny /dev/drbd[0-9]* r,
-- deny /dev/dasd* r,
-- deny /dev/nvme* r,
-- deny /dev/zd[0-9]* r,
-- deny /dev/mapper/ r,
-- deny /dev/mapper/* r,
--
++profile virt-aa-helper /usr/libexec/virt-aa-helper {
+ #include <abstractions/base>
+
+ # needed for searching directories
+@@ -32,7 +32,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
+ deny /dev/mapper/ r,
+ deny /dev/mapper/* r,
+
- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
-- /{usr/,}sbin/apparmor_parser Ux,
--
-- /etc/apparmor.d/libvirt/* r,
-- /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
--
-- # for backingstore -- allow access to non-hidden files in @{HOME} as well
-- # as storage pools
-- audit deny @{HOME}/.* mrwkl,
-- audit deny @{HOME}/.*/ rw,
-- audit deny @{HOME}/.*/** mrwkl,
-- audit deny @{HOME}/bin/ rw,
-- audit deny @{HOME}/bin/** mrwkl,
-- @{HOME}/ r,
-- @{HOME}/** r,
-- /var/lib/libvirt/images/ r,
-- /var/lib/libvirt/images/** r,
-- /{media,mnt,opt,srv}/** r,
--
-- /**.img r,
-- /**.qcow{,2} r,
-- /**.qed r,
-- /**.vmdk r,
-- /**.[iI][sS][oO] r,
-- /**/disk{,.*} r,
--}
++ /usr/libexec/virt-aa-helper mr,
+ /{usr/,}sbin/apparmor_parser Ux,
+
+ /etc/apparmor.d/libvirt/* r,
diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
-index 8d61d15..656a559 100644
+index 8d61d154e..656a5595b 100644
--- a/examples/apparmor/usr.sbin.libvirtd
+++ b/examples/apparmor/usr.sbin.libvirtd
@@ -84,8 +84,10 @@
diff --git a/app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch b/app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch
new file mode 100644
index 000000000000..65894ed4e1d8
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch
@@ -0,0 +1,42 @@
+https://www.redhat.com/archives/libvir-list/2018-January/msg00903.html
+https://www.redhat.com/archives/libvir-list/2018-January/msg00904.html
+
+diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
+index e216d9076..e3b8234b4 100644
+--- a/tools/virsh-completer.c
++++ b/tools/virsh-completer.c
+@@ -45,18 +45,11 @@ virshDomainNameCompleter(vshControl *ctl,
+
+ virCheckFlags(VIR_CONNECT_LIST_DOMAINS_ACTIVE |
+ VIR_CONNECT_LIST_DOMAINS_INACTIVE |
++ VIR_CONNECT_LIST_DOMAINS_OTHER |
++ VIR_CONNECT_LIST_DOMAINS_PAUSED |
+ VIR_CONNECT_LIST_DOMAINS_PERSISTENT |
+- VIR_CONNECT_LIST_DOMAINS_TRANSIENT |
+ VIR_CONNECT_LIST_DOMAINS_RUNNING |
+- VIR_CONNECT_LIST_DOMAINS_PAUSED |
+- VIR_CONNECT_LIST_DOMAINS_SHUTOFF |
+- VIR_CONNECT_LIST_DOMAINS_OTHER |
+- VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE |
+- VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE |
+- VIR_CONNECT_LIST_DOMAINS_AUTOSTART |
+- VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART |
+- VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT |
+- VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT,
++ VIR_CONNECT_LIST_DOMAINS_SHUTOFF,
+ NULL);
+
+ if (!priv->conn || virConnectIsAlive(priv->conn) <= 0)
+diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
+index 0f329d6d7..5a0e0c1b2 100644
+--- a/tools/virsh-domain.c
++++ b/tools/virsh-domain.c
+@@ -1037,7 +1037,7 @@ static const vshCmdInfo info_autostart[] = {
+ };
+
+ static const vshCmdOptDef opts_autostart[] = {
+- VIRSH_COMMON_OPT_DOMAIN_FULL(0),
++ VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_PERSISTENT),
+ {.name = "disable",
+ .type = VSH_OT_BOOL,
+ .help = N_("disable autostarting")
diff --git a/app-emulation/libvirt/libvirt-3.10.0-r1.ebuild b/app-emulation/libvirt/libvirt-3.10.0-r2.ebuild
index cfdcbb6c9942..e918ac7a33e8 100644
--- a/app-emulation/libvirt/libvirt-3.10.0-r1.ebuild
+++ b/app-emulation/libvirt/libvirt-3.10.0-r2.ebuild
@@ -124,7 +124,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch
"${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
- "${FILESDIR}"/${PN}-3.10.0-fix_paths_for_apparmor.patch
+ "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch
"${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
"${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488
)
diff --git a/app-emulation/libvirt/libvirt-4.0.0.ebuild b/app-emulation/libvirt/libvirt-4.0.0.ebuild
new file mode 100644
index 000000000000..1107c986520c
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-4.0.0.ebuild
@@ -0,0 +1,386 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils user linux-info systemd readme.gentoo-r1 bash-completion-r1
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://libvirt.org/libvirt.git"
+ SRC_URI=""
+ KEYWORDS=""
+ SLOT="0"
+else
+ # Versions with 4 numbers are stable updates:
+ if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
+ SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz"
+ else
+ SRC_URI="http://libvirt.org/sources/${P}.tar.xz"
+ fi
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ SLOT="0/${PV}"
+fi
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="http://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+IUSE="
+ apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm
+ libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit
+ +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network
+ wireshark-plugins xen zeroconf zfs
+"
+
+REQUIRED_USE="
+ firewalld? ( virt-network )
+ libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
+ lxc? ( caps libvirtd )
+ openvz? ( libvirtd )
+ policykit? ( dbus )
+ qemu? ( libvirtd )
+ uml? ( libvirtd )
+ vepa? ( macvtap )
+ virt-network? ( libvirtd )
+ virtualbox? ( libvirtd )
+ xen? ( libvirtd )"
+
+# gettext.sh command is used by the libvirt command wrappers, and it's
+# non-optional, so put it into RDEPEND.
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
+# package will use 3 by default. Since we don't have slot pinning in an API,
+# we must go with the most recent
+RDEPEND="
+ app-misc/scrub
+ dev-libs/libgcrypt:0
+ dev-libs/libnl:3
+ >=dev-libs/libxml2-2.7.6
+ || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 )
+ >=net-libs/gnutls-1.0.25:0=
+ net-libs/libssh2
+ net-libs/libtirpc
+ net-libs/rpcsvc-proto
+ >=net-misc/curl-7.18.0
+ sys-apps/dmidecode
+ >=sys-apps/util-linux-2.17
+ sys-devel/gettext
+ sys-libs/ncurses:0=
+ sys-libs/readline:=
+ apparmor? ( sys-libs/libapparmor )
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap-ng )
+ dbus? ( sys-apps/dbus )
+ firewalld? ( net-firewall/firewalld )
+ fuse? ( >=sys-fs/fuse-2.8.6:= )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
+ iscsi? ( sys-block/open-iscsi )
+ libssh? ( net-libs/libssh )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
+ nfs? ( net-fs/nfs-utils )
+ numa? (
+ >sys-process/numactl-2.0.2
+ sys-process/numad
+ )
+ parted? (
+ >=sys-block/parted-1.8[device-mapper]
+ sys-fs/lvm2[-device-mapper-only(-)]
+ )
+ pcap? ( >=net-libs/libpcap-1.0.0 )
+ policykit? ( >=sys-auth/polkit-0.9 )
+ qemu? (
+ >=app-emulation/qemu-0.13.0
+ dev-libs/yajl
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virt-network? (
+ net-dns/dnsmasq[script]
+ net-firewall/ebtables
+ >=net-firewall/iptables-1.4.10[ipv6]
+ net-misc/radvd
+ sys-apps/iproute2[-minimal]
+ )
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
+ wireshark-plugins? ( net-analyzer/wireshark:= )
+ xen? (
+ app-emulation/xen
+ app-emulation/xen-tools:=
+ )
+ udev? (
+ virtual/udev
+ >=x11-libs/libpciaccess-0.10.9
+ )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+ zfs? ( sys-fs/zfs )"
+
+DEPEND="${RDEPEND}
+ app-text/xhtml1
+ dev-lang/perl
+ dev-libs/libxslt
+ dev-perl/XML-XPath
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch
+ "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
+ "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch
+ "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
+ "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488
+ "${FILESDIR}"/${PN}-4.0.0-bash_completion_bugfixes.patch # bug #644632
+)
+
+pkg_setup() {
+ if use qemu; then
+ enewgroup qemu 77
+ enewuser qemu 77 -1 -1 "qemu,kvm"
+ fi
+
+ use policykit && enewgroup libvirt
+
+ # Check kernel configuration:
+ CONFIG_CHECK=""
+ use fuse && CONFIG_CHECK+="
+ ~FUSE_FS"
+
+ use lvm && CONFIG_CHECK+="
+ ~BLK_DEV_DM
+ ~DM_MULTIPATH
+ ~DM_SNAPSHOT"
+
+ use lxc && CONFIG_CHECK+="
+ ~BLK_CGROUP
+ ~CGROUP_CPUACCT
+ ~CGROUP_DEVICE
+ ~CGROUP_FREEZER
+ ~CGROUP_NET_PRIO
+ ~CGROUP_PERF
+ ~CGROUPS
+ ~CGROUP_SCHED
+ ~CPUSETS
+ ~IPC_NS
+ ~MACVLAN
+ ~NAMESPACES
+ ~NET_CLS_CGROUP
+ ~NET_NS
+ ~PID_NS
+ ~POSIX_MQUEUE
+ ~SECURITYFS
+ ~USER_NS
+ ~UTS_NS
+ ~VETH
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS"
+
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
+ ~DEVPTS_MULTIPLE_INSTANCES"
+
+ use macvtap && CONFIG_CHECK+="
+ ~MACVTAP"
+
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_MARK_T
+ ~BRIDGE_NF_EBTABLES
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_CONNMARK
+ ~NETFILTER_XT_MARK
+ ~NETFILTER_XT_TARGET_CHECKSUM"
+ # Bandwidth Limiting Support
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_T_NAT
+ ~NET_ACT_POLICE
+ ~NET_CLS_FW
+ ~NET_CLS_U32
+ ~NET_SCH_HTB
+ ~NET_SCH_INGRESS
+ ~NET_SCH_SFQ"
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
+ if kernel_is ge 3 6; then
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
+ fi
+
+ ERROR_USER_NS="Optional depending on LXC configuration."
+
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ touch "${S}/.mailmap"
+
+ default
+
+ if [[ ${PV} = *9999* ]]; then
+ # git checkouts require bootstrapping to create the configure script.
+ # Additionally the submodules must be cloned to the right locations
+ # bug #377279
+ ./bootstrap || die "bootstrap failed"
+ (
+ git submodule status | sed 's/^[ +-]//;s/ .*//'
+ git hash-object bootstrap.conf
+ ) >.git-module-status
+ fi
+
+ # Tweak the init script:
+ cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
+ -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \
+ -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \
+ -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \
+ -i "${S}/libvirtd.init" || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with apparmor)
+ $(use_with apparmor apparmor-profiles)
+ $(use_with audit)
+ $(use_with caps capng)
+ $(use_with dbus)
+ $(use_with firewalld)
+ $(use_with fuse)
+ $(use_with glusterfs)
+ $(use_with glusterfs storage-gluster)
+ $(use_with iscsi storage-iscsi)
+ $(use_with libvirtd)
+ $(use_with libssh)
+ $(use_with lvm storage-lvm)
+ $(use_with lvm storage-mpath)
+ $(use_with lxc)
+ $(use_with macvtap)
+ $(use_enable nls)
+ $(use_with numa numactl)
+ $(use_with numa numad)
+ $(use_with openvz)
+ $(use_with parted storage-disk)
+ $(use_with pcap libpcap)
+ $(use_with phyp)
+ $(use_with policykit polkit)
+ $(use_with qemu)
+ $(use_with qemu yajl)
+ $(use_with rbd storage-rbd)
+ $(use_with sasl)
+ $(use_with selinux)
+ $(use_with udev)
+ $(use_with uml)
+ $(use_with vepa virtualport)
+ $(use_with virt-network network)
+ $(use_with wireshark-plugins wireshark-dissector)
+ $(use_with xen)
+ $(use_with xen xen-inotify)
+ $(use_with xen libxl)
+ $(use_with zeroconf avahi)
+ $(use_with zfs storage-zfs)
+
+ --without-hal
+ --without-netcf
+ --without-sanlock
+ --without-xenapi
+
+ --with-esx
+ --with-init-script=systemd
+ --with-qemu-group=$(usex caps qemu root)
+ --with-qemu-user=$(usex caps qemu root)
+ --with-remote
+ --with-storage-fs
+ --with-vmware
+
+ --disable-static
+ --disable-werror
+
+ --with-html-subdir=${PF}/html
+ --localstatedir=/var
+ )
+
+ if use virtualbox && has_version app-emulation/virtualbox-ose; then
+ myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
+ else
+ myeconfargs+=( $(use_with virtualbox vbox) )
+ fi
+
+ econf "${myeconfargs[@]}"
+
+ if [[ ${PV} = *9999* ]]; then
+ # Restore gnulib's config.sub and config.guess
+ # bug #377279
+ (cd .gnulib && git reset --hard > /dev/null)
+ fi
+}
+
+src_test() {
+ cd "${BUILD_DIR}"
+
+ # remove problematic tests, bug #591416, bug #591418
+ sed -i -e 's#commandtest$(EXEEXT) # #' \
+ -e 's#virfirewalltest$(EXEEXT) # #' \
+ -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
+ -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
+ tests/Makefile
+
+ export VIR_TEST_DEBUG=1
+ HOME="${T}" emake check || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
+
+ find "${D}" -name '*.la' -delete || die
+
+ # Remove bogus, empty directories. They are either not used, or
+ # libvirtd is able to create them on demand
+ rm -rf "${D}"/etc/sysconfig
+ rm -rf "${D}"/var/cache
+ rm -rf "${D}"/var/run
+ rm -rf "${D}"/var/log
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ systemd_install_serviced \
+ "${FILESDIR}"/libvirtd.service.conf libvirtd.service
+
+ systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
+
+ newinitd "${S}/libvirtd.init" libvirtd || die
+ newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die
+ newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
+ newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
+
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
+
+ newbashcomp "${S}/tools/bash-completion/vsh" vsh
+ bashcomp_alias vsh virsh virt-admin
+
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
+ DISABLE_AUTOFORMATTING=true
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # we only ever want to generate this once
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
+ fi
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
+ fi
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
index 3716e896837b..84ae6b580a78 100644
--- a/app-emulation/libvirt/libvirt-9999.ebuild
+++ b/app-emulation/libvirt/libvirt-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit autotools eutils user linux-info systemd readme.gentoo-r1
+inherit autotools eutils user linux-info systemd readme.gentoo-r1 bash-completion-r1
if [[ ${PV} = *9999* ]]; then
inherit git-r3
@@ -355,6 +355,9 @@ src_install() {
newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
+ newbashcomp "${S}/tools/bash-completion/vsh" vsh
+ bashcomp_alias vsh virsh virt-admin
+
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
DISABLE_AUTOFORMATTING=true
readme.gentoo_create_doc