summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2014-01-19 21:42:13 +0000
committerDoug Goldstein <cardoe@gentoo.org>2014-01-19 21:42:13 +0000
commited30af9976fe1e232d9f964ce3a606cb21a0bfc7 (patch)
treebe48df8ad549cf316f30ce5ffc18d50fceda4fd9 /app-emulation/libvirt
parentVersion bump. Fix CVE-2013-6458, CVE-2014-0028, CVE-2014-1447 (diff)
downloadhistorical-ed30af9976fe1e232d9f964ce3a606cb21a0bfc7.tar.gz
historical-ed30af9976fe1e232d9f964ce3a606cb21a0bfc7.tar.bz2
historical-ed30af9976fe1e232d9f964ce3a606cb21a0bfc7.zip
Bump stable series to fix outstanding CVEs.
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xD7DFA8D318FA9AEF!
Diffstat (limited to 'app-emulation/libvirt')
-rw-r--r--app-emulation/libvirt/ChangeLog7
-rw-r--r--app-emulation/libvirt/Manifest20
-rw-r--r--app-emulation/libvirt/libvirt-1.1.3.3.ebuild433
3 files changed, 450 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index 312dcb5655e9..83381efa266f 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.346 2014/01/19 21:35:51 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.347 2014/01/19 21:42:08 cardoe Exp $
+
+*libvirt-1.1.3.3 (19 Jan 2014)
+
+ 19 Jan 2014; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.1.3.3.ebuild:
+ Bump stable series to fix outstanding CVEs.
*libvirt-1.2.1 (19 Jan 2014)
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index c7ada57530bc..feb0aa0e8bba 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -8,6 +8,7 @@ AUX virtlockd.init 437 SHA256 0894a839f85dff6f97bde514437935f4c1589ba4f2cbd3e0ef
DIST libvirt-1.0.5.6.tar.gz 23998470 SHA256 171e2497d4d4109f4839f6f4b727b92f02530776b87b7246189d7ca6b44372bf SHA512 119c8c7a584a0fb6ea8e6385d5d5aac814e9f0a975adf4e75ee012d116a139c558ecb121da544e073700f1eb95a9b360fb457ce6cfebeddfb703fe42d41546a7 WHIRLPOOL 5f3b17f07e124816facf847d43bde74cbcd90213206085f770b1cb86240b0ba2a7cde8f1846665ecdaaf261d1ca44eb14226d27223e98b652efcbb834d00a103
DIST libvirt-1.1.3-062ad8b2.tar.xz 18836 SHA256 a16a72d9cc6b49564e234b39f94a987e20da9fd511203ec1cb4534ccf4570121 SHA512 0734836972ef3e7a2d8bcb1d1ab001b3f15202c2921107c28a17f6ccf4002849c920133969b611560a88ca7f969eea468b1a8bc14b432b270f624c6594fc1ade WHIRLPOOL 340ca175f7322ede982455ba311a19cd5cbb33ea49e1fa3a7ab13a0fdb31c37a8a0fc58cec189efb19a861a21d6c677c3c3533e58e9fb9eaa4ce0f3dde721ec9
DIST libvirt-1.1.3.1.tar.gz 26595900 SHA256 00383e0beef1854610d8d47fd9347564b3654ce0e4a263e06b0de364a118c93e SHA512 59f79d0fc52ae0c9ae97bcc8fd90f799d6daf63c9a36d38738ec7d7392e630e39347f0c472b02434e83888b3ee0ab62d2b0b4eaa92eed3102ff36ca30f2598aa WHIRLPOOL 92be678e7ef84f9437bb91b1a621e6b35f9ce1383b945e466b4b864c0df1cfb95900da6267263bb1984663ea8e2b5b358bd516748a934835a87be822f5d27e90
+DIST libvirt-1.1.3.3.tar.gz 26611343 SHA256 81f3527b5e647d128af18b21ea924ffb4f8b6420fe87d19f09829af7b31982e9 SHA512 01fb1b70fc537cdb0986f09066df3af61ed3d949814c42438842e4ceb44e919a1a1a4f1d9e3d4adaab050fbcb4dffc218b1b9f7fbbae1d035a7c0edc2fc3f03e WHIRLPOOL cf5cc9d298deac77c7f6ff5a3a8edac8f63bdf93a423fefa8a4969fa0d03ec35864a7fd1894c4fd37daad731c018d3c0b7e55fe92321bbc3f106fb73728f1e8d
DIST libvirt-1.1.3.tar.gz 26578000 SHA256 af83e65b4b26520662ddd183c1358be0d05138dba3e66745419f06441eff5a7c SHA512 895f8ccf1fdf7a36918e4d460b44b1bf67d06842e39142c89c620f6191e299b53c50f80ab47677d7cba6bd570177d79b5ee0d7d2a11472991590389db51fab9d WHIRLPOOL c046f1182976bbd6bf65b460b2017996e63f67b5cce44f0af859d90f892278d0236192e6e7172e16c85183da6e258a003d9c8757af2079ab4d77de9ca300d986
DIST libvirt-1.1.4.tar.gz 26799019 SHA256 5910f5cf607a50c606d959e6b1e5d6e67966b7aa7324982afd7f85d9c24bd98f SHA512 64455585b8d7e5c0f701e9803ae00d277ee27f9bec92b9890e487cd0298f5f8ff9075d0b2bc81be67e8d8e03bfe58eb2e4fd6292439acd9d22a3f3e7f5b87efc WHIRLPOOL c8de6024b51988415847463064ccf2bcc9d7cb42be8765fbfcf901b594d963351f312d962ca4fb2a5ecce7c2247a60b6201e57a41ba44caa6211148585d65352
DIST libvirt-1.2.0-36378d1a.tar.xz 5200 SHA256 1c1448051bad702eccd7a122496f7995427218152b65de12e3d418f7faaf6412 SHA512 4c01d90dc1e2c46ed65a61321887d1337ea2733dfda1361de9560bd5aba68ff51e425190bbe140893dd96f902111ed5be1ba9bc72a356abc0251f30fff645746 WHIRLPOOL f3778cfd56c0a0857607af1c301e3cf8a96ecf87b5ec85d23dbf98512692fd2bb428c923eab69234e6fdad95ed6e195bb01ebdd843df7a18e910e55bb6dccf82
@@ -17,23 +18,24 @@ EBUILD libvirt-1.0.5.6.ebuild 12203 SHA256 76c27356932b38556846b16aa48a3c9f2cc7e
EBUILD libvirt-1.1.3-r1.ebuild 12174 SHA256 9431604bfc84faa8384a5735a94520fd6f7003f7f2e6745ef940e3033b25487f SHA512 eac6c9b1d7f5d1d5e10145b7d00f8f30ae7851128769a1a6aecd5265bddfb274e9f40d19d0c59f12caa55a9af047cfcb1eda4c4da490bbae1dca5090573930e8 WHIRLPOOL 33046a59ff42a54001a5d115494d02ae19d5e208e82d435cfaab3ee57a094cd07f9c4df2e0ed454abccfa5c84cacf62ae96b72139a831e79b2dc068b90b68f99
EBUILD libvirt-1.1.3-r2.ebuild 12235 SHA256 41b97566f7eb6ec1dae8d990a95bbc8b58730a6a3b7bbfbb613cfce39604998d SHA512 8b97c87d96f4b7e760fafc1143de83b26f9bfd9960d7d1e64dda11669c99d7da2ba8e00701f9957bad42df1f5de2ba96c6b5b16e30d4a5935f8766a7dfe368bf WHIRLPOOL 8a2768d371ee42ba022c4eab51886ff30bd469624bb97fb48b35d8e5944d75256c735491bd3d192629cda0c302e698a49abf71fafd50d1e2436335d0f2aeacc0
EBUILD libvirt-1.1.3.1.ebuild 12249 SHA256 bf2335674e69bb0fb4975e5914a339e7eba128213a97e2c94d7cd8b10f06fd06 SHA512 593bc1b2a2c6cf854ab86dda5cacd8a72e39b852831d452a23f9159bba85bb4ddad1af5b8e81cf1480c82b74fe5a72170ca23eb3bfb7658549047369202cf8e2 WHIRLPOOL bc038a83bc5a175d63221066dc55231802b35cb9595b57c9d6b45e4bfc506c50a56264863b54540f95e757a9975874b1bd79733bd90e277ff538c22931bf6cf4
+EBUILD libvirt-1.1.3.3.ebuild 12250 SHA256 dcc02e28cd21963c4424d4cd1b5338cae646698fbc0541867e5d9fb6837f277b SHA512 b7cb1fac78e401c5dffe4ee2aafce7b9de4ff1a7d3b788ec4ec6262090fa3517b31bd2ddb797bd253b079ea75a58ae5fe02e43b4bdca08859851bc3cfd5fa55c WHIRLPOOL 5986cfb9e841327f0df3ae028ecce312b09b3ceb76b6c13369586111af8691428528ac427e7dd9da6dcac52e9933245469954a3acad9a030df7b754be16787f5
EBUILD libvirt-1.1.4.ebuild 12248 SHA256 09025e92efbd85ac651ec092aafec34981394dd6363d0aa93476d3b5d356fbfb SHA512 f009c470a40fa60aacc341b7cffe40b74d14c8d06cbf5721a3d02aef2ffe6d7697263e32eeef39e05e8913983424e3bda5f5d27bc66ae4a7755e3614f1dadfbe WHIRLPOOL a8c8dfd15f04f61afc5d9927a1fe6894269b5601391bd6f39d9b4b51f3a13ad188413849f1098f13e8c6c97a1dbab48fbaa6131d22e8ca2fcdcf76d77986ffe8
EBUILD libvirt-1.2.0-r1.ebuild 12076 SHA256 d60726eaab3b791c7891a0b96dcb9bc274e1d72277a6e709c35f30ac0e35c350 SHA512 303b9c0dabc85b6590a8b2a2df0b0ec4d0f060a911808a354e13ba25e46f101678044fe85e7b0c811587c2abe2ad772a78a9b05cb9b788873d26f66315fab335 WHIRLPOOL 42891da2c59d87d4953da2100ff630c7eec983ffb882c8c847d1504216f7f1eb0a0c471498d8a4e96aaa3b13a924727c34399c7039b70705fdaa5230b5304ba7
EBUILD libvirt-1.2.0.ebuild 12074 SHA256 197804f5776c68297c990dda843fa2cbe9b830a004ad9934465c91737431ab0d SHA512 26a2e932ecba606a01d4480e1200a89731f85809b7c122b052da6c8ed7d657fbb99ae808d9820cfdb100dbf742c189011bbfa50fae741d3e75b4230981802979 WHIRLPOOL 98facfd9d861125052001c794ecf809ffb3c1b30723fb244b5cfa5bb598c4b426b2a22ac0f4eee56797d198ec83aec17c28be08bfcd0ce17b0ea79f83c7cca03
EBUILD libvirt-1.2.1.ebuild 12074 SHA256 622582bc51decd79b240ebceb8084609a0b8fefdbbe721e7b085a75f11c1cc24 SHA512 ba73efc0d315d8e218156888d0e3e7993bfe1e77e6575bf3c52a82345e15f44a57d45ad4d7e290313b92a8c50ea4500dee6bd720502905362a475b70b010fc9c WHIRLPOOL 9f20f46b97a4f5a3e5f3bf3c216d6e717e097922220bb596c846a79edb3d1fda3e3e1cd58aa41ce0bb62580557224e8153060e479dfbfd09b33ea28115b5bd5d
EBUILD libvirt-9999.ebuild 12068 SHA256 8f02e85824b26d9c3b4a69784eca8702ab6754725fa533abcfce30cc44677dab SHA512 c39e437689437e47305fa6b10132b2c31e2290b57ed29f1ff87d97426bef87bc1b6c7e7072e66dac0b50422cb4e787aba06a11a3b2b3d15e894e83431e3734ca WHIRLPOOL 56c056adc0a15f4e9e98c7db0dae4fbcdd2459eb62622d862041d746618180292006a10f876343159bc241d720685823fae6db7eec3ff7f52f513640be3698b9
-MISC ChangeLog 15472 SHA256 afbadeecc3f0e85ecdb38cd08fc55cc7a8353800e2024a40eb3b469738e90f8d SHA512 66d789943d1771bc701cc8bfb0c83af42b761249365af99cfbc5d4d3a7b9355e001e2851401fe3875e59dbfdc7b25516999943217ce0bdbecf33c3b3605ea647 WHIRLPOOL 89faa9f0909e22df43cda170f17d952336deb89c3d5f6b3f8cb8ed474fc0d7fec1d9e7db57c2cb177994476cc36a80925b9871dc753745b061a04c0aa165084c
+MISC ChangeLog 15626 SHA256 36731b3a643888570b08c96596c54c0eca6e8e293bc2667ed08b9de01523af5f SHA512 6a1fc46fc515e90e3ebd1614b4348698b2283530ade5444d7c8928b9289b45235d018ff53ade446f0d23e14dd49e6e7f18270614d105c1b23b385508f1459aed WHIRLPOOL ade44280cd66f5a25110d8679e883aebe571bcc6223ccecfa52b7cbf416a2fffaea0735f08409c43e762fad7e9a80358b8ded1a40a1f0bf82eed8a0ab6a42af7
MISC metadata.xml 3534 SHA256 8678edfd233eaa04266d7e15f71102fb45d1e4843697ba0cd04fe57b45dbb6c6 SHA512 e4b2cc5f9001697b784034ae6e58fea39e9fdc223192772592bcb671a4e1436186ed7757fc72993ee81c1e4005502fbb8c0a2d4588666a186d42024a98c052a2 WHIRLPOOL 9f32ac2763d17e5204da7396eae2a8c79c63e1e82b4a1035c86d93c029902159d3f5697aad86b7307b6e8acee0a4f0f02023d0e5e824a471cdad80a5cebc6886
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQF8BAEBCABmBQJS3EU7XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+iQF8BAEBCABmBQJS3EaxXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE
-N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvceoIAJBMDrLGeRYwK3DmS1lyLgoC
-LTjULIrE4HdeL/t1QFyx7WLlITmc5jiSo1BciNo5PIVwLE3sT9ikRL2uZ3GbsqUR
-SqC79Hrb1d+DEZ21jgob0IgnMUCnx2xm5UCAdmgNEU3crc3cpoDNS7YhTgqK9bRx
-AGqQQWJ2FR6Ja2ZU5p6WUw8wThweYAIiFq4S+Bpo21BTtEGk2/mGyKustSo4ASau
-WROLZdWY2Uf5iyn4kcNDyDIHvARTE6ECe2nTjB/T50LpzUmYOZUs9aliGBLvp+DR
-SMamVazZ7imtw4ycuTNtywTEb4JU1kJTMwsTm+9NoS20KTy4M+hmX+tJ0EJRmmA=
-=bcNm
+N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvd+IIAKUe4Ai+lrzCrtQZWWJ/yE0S
+oooaN8gNKQMFl+xzTxQas+DdwHlLl5xPh9v/O+QevDlr41zrCJUv9yS7qlnlXHK3
+wlFdV/Q3XMuoC4rNbKgAWHOJ9wVaygnAlDfoO4oQ9KvvgJBNARUSTKvKRYSiNc9u
+BEfhsQvGmQnuh4+u0zgCe7ovVMQYxbPFNEmVURru2+kNkpHUlJUk8vKByh2uXhk3
+IMlM0gPfn2AqQNxhTOnWDgx62Z9W28yDhMp9F0E/nJF1J0NzytiZhTuXbF5JAnQi
+TimR7igdnJmN0O7d15YuzVHZE/lZIprmk2ffH4an5k17JTC8XRidH3Am6o3RGLI=
+=BQdV
-----END PGP SIGNATURE-----
diff --git a/app-emulation/libvirt/libvirt-1.1.3.3.ebuild b/app-emulation/libvirt/libvirt-1.1.3.3.ebuild
new file mode 100644
index 000000000000..45a31ca9043b
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-1.1.3.3.ebuild
@@ -0,0 +1,433 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-1.1.3.3.ebuild,v 1.1 2014/01/19 21:42:08 cardoe Exp $
+
+EAPI=5
+
+#BACKPORTS=062ad8b2
+AUTOTOOLIZE=yes
+
+MY_P="${P/_rc/-rc}"
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit eutils python-single-r1 user autotools linux-info systemd readme.gentoo
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://libvirt.org/libvirt.git"
+ AUTOTOOLIZE=yes
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://libvirt.org/sources/stable_updates/${MY_P}.tar.gz
+ ftp://libvirt.org/libvirt/${MY_P}.tar.gz
+ ${BACKPORTS:+
+ http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+ KEYWORDS="~amd64 ~x86"
+fi
+S="${WORKDIR}/${P%_rc*}"
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="http://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="audit avahi +caps firewalld fuse iscsi +libvirtd lvm lxc +macvtap nfs \
+ nls numa openvz parted pcap phyp policykit python +qemu rbd sasl \
+ selinux +udev uml +vepa virtualbox virt-network xen elibc_glibc \
+ systemd"
+REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
+ lxc? ( caps libvirtd )
+ openvz? ( libvirtd )
+ qemu? ( libvirtd )
+ uml? ( libvirtd )
+ vepa? ( macvtap )
+ virtualbox? ( libvirtd )
+ xen? ( libvirtd )
+ virt-network? ( libvirtd )
+ firewalld? ( virt-network )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# 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="sys-libs/readline
+ sys-libs/ncurses
+ >=net-misc/curl-7.18.0
+ dev-libs/libgcrypt
+ >=dev-libs/libxml2-2.7.6
+ dev-libs/libnl:3
+ >=net-libs/gnutls-1.0.25
+ net-libs/libssh2
+ sys-apps/dmidecode
+ >=sys-apps/util-linux-2.17
+ sys-devel/gettext
+ >=net-analyzer/netcat6-1.0-r2
+ app-misc/scrub
+ audit? ( sys-process/audit )
+ avahi? ( >=net-dns/avahi-0.6[dbus] )
+ caps? ( sys-libs/libcap-ng )
+ fuse? ( >=sys-fs/fuse-2.8.6 )
+ iscsi? ( sys-block/open-iscsi )
+ lxc? ( sys-power/pm-utils )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
+ nfs? ( net-fs/nfs-utils )
+ numa? (
+ >sys-process/numactl-2.0.2
+ sys-process/numad
+ )
+ openvz? ( sys-kernel/openvz-sources )
+ parted? (
+ >=sys-block/parted-1.8[device-mapper]
+ sys-fs/lvm2
+ )
+ pcap? ( >=net-libs/libpcap-1.0.0 )
+ policykit? ( >=sys-auth/polkit-0.9 )
+ python? ( ${PYTHON_DEPS} )
+ qemu? (
+ >=app-emulation/qemu-0.13.0
+ dev-libs/yajl
+ sys-power/pm-utils
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
+ xen? ( app-emulation/xen-tools app-emulation/xen )
+ udev? ( virtual/udev >=x11-libs/libpciaccess-0.10.9 )
+ virt-network? ( net-dns/dnsmasq
+ >=net-firewall/iptables-1.4.10
+ net-misc/radvd
+ net-firewall/ebtables
+ sys-apps/iproute2[-minimal]
+ firewalld? ( net-firewall/firewalld )
+ )
+ elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )"
+# one? ( dev-libs/xmlrpc-c )
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-text/xhtml1
+ dev-lang/perl
+ dev-libs/libxslt"
+
+DOC_CONTENTS="For the basic networking support (bridged and routed networks)
+you don't need any extra software. For more complex network modes
+including but not limited to NATed network, you can enable the
+'virt-network' USE flag.\n\n
+If you are using dnsmasq on your system, you will have
+to configure /etc/dnsmasq.conf to enable the following settings:\n\n
+ bind-interfaces\n
+ interface or except-interface\n\n
+Otherwise you might have issues with your existing DNS server."
+
+LXC_CONFIG_CHECK="
+ ~CGROUPS
+ ~CGROUP_FREEZER
+ ~CGROUP_DEVICE
+ ~CGROUP_CPUACCT
+ ~CGROUP_SCHED
+ ~CGROUP_PERF
+ ~BLK_CGROUP
+ ~NET_CLS_CGROUP
+ ~NETPRIO_CGROUP
+ ~CPUSETS
+ ~RESOURCE_COUNTERS
+ ~NAMESPACES
+ ~UTS_NS
+ ~IPC_NS
+ ~PID_NS
+ ~NET_NS
+ ~USER_NS
+ ~DEVPTS_MULTIPLE_INSTANCES
+ ~VETH
+ ~MACVLAN
+ ~POSIX_MQUEUE
+ ~SECURITYFS
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS
+"
+
+VIRTNET_CONFIG_CHECK="
+ ~BRIDGE_NF_EBTABLES
+ ~BRIDGE_EBT_MARK_T
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_TARGET_CHECKSUM
+ ~NETFILTER_XT_CONNMARK
+ ~NETFILTER_XT_MARK
+"
+
+MACVTAP_CONFIG_CHECK=" ~MACVTAP"
+
+LVM_CONFIG_CHECK=" ~BLK_DEV_DM ~DM_SNAPSHOT ~DM_MULTIPATH"
+
+pkg_setup() {
+ enewgroup qemu 77
+ enewuser qemu 77 -1 -1 qemu kvm
+
+ # Some people used the masked ebuild which was not adding the qemu
+ # user to the kvm group originally. This results in VMs failing to
+ # start for some users. bug #430808
+ egetent group kvm | grep -q qemu
+ if [[ $? -ne 0 ]]; then
+ gpasswd -a qemu kvm
+ fi
+
+ python-single-r1_pkg_setup
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 6 && LXC_CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
+ kernel_is ge 3 6 && LXC_CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP ~MEMCG_KMEM"
+
+ CONFIG_CHECK=""
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use lvm && CONFIG_CHECK+="${LVM_CONFIG_CHECK}"
+ use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}"
+ use macvtap && CONFIG_CHECK+="${MACVTAP_CONFIG_CHECK}"
+ use virt-network && CONFIG_CHECK+="${VIRTNET_CONFIG_CHECK}"
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ touch "${S}/.mailmap"
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
+ epatch
+
+ 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
+
+ epatch_user
+
+ [[ -n ${AUTOTOOLIZE} ]] && eautoreconf
+
+ # Tweak the init script
+ local avahi_init=
+ local iscsi_init=
+ local rbd_init=
+ local firewalld_init=
+ cp "${FILESDIR}/libvirtd.init-r13" "${S}/libvirtd.init"
+ use avahi && avahi_init='avahi-daemon'
+ use iscsi && iscsi_init='iscsid'
+ use rbd && rbd_init='ceph'
+ use firewalld && firewalld_init='need firewalld'
+
+ sed -e "s/USE_FLAG_FIREWALLD/${firewalld_init}/" -i "${S}/libvirtd.init"
+ sed -e "s/USE_FLAG_AVAHI/${avahi_init}/" -i "${S}/libvirtd.init"
+ sed -e "s/USE_FLAG_ISCSI/${iscsi_init}/" -i "${S}/libvirtd.init"
+ sed -e "s/USE_FLAG_RBD/${rbd_init}/" -i "${S}/libvirtd.init"
+}
+
+src_configure() {
+ local myconf=""
+
+ ## enable/disable daemon, otherwise client only utils
+ myconf="${myconf} $(use_with libvirtd)"
+
+ ## enable/disable the daemon using avahi to find VMs
+ myconf="${myconf} $(use_with avahi)"
+
+ ## hypervisors on the local host
+ myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
+ myconf+=" --without-xenapi"
+ if use xen && has_version ">=app-emulation/xen-tools-4.2.0"; then
+ myconf+=" --with-libxl"
+ else
+ myconf+=" --without-libxl"
+ fi
+ myconf="${myconf} $(use_with openvz)"
+ myconf="${myconf} $(use_with lxc)"
+ if use virtualbox && has_version app-emulation/virtualbox-ose; then
+ myconf="${myconf} --with-vbox=/usr/lib/virtualbox-ose/"
+ else
+ myconf="${myconf} $(use_with virtualbox vbox)"
+ fi
+ myconf="${myconf} $(use_with uml)"
+ myconf="${myconf} $(use_with qemu)"
+ myconf="${myconf} $(use_with qemu yajl)" # Use QMP over HMP
+ myconf="${myconf} $(use_with phyp)"
+ myconf="${myconf} --with-esx"
+ myconf="${myconf} --with-vmware"
+
+ ## additional host drivers
+ myconf="${myconf} $(use_with virt-network network)"
+ myconf="${myconf} --with-storage-fs"
+ myconf="${myconf} $(use_with lvm storage-lvm)"
+ myconf="${myconf} $(use_with iscsi storage-iscsi)"
+ myconf="${myconf} $(use_with parted storage-disk)"
+ myconf="${myconf} $(use_with lvm storage-mpath)"
+ myconf="${myconf} $(use_with rbd storage-rbd)"
+ myconf="${myconf} $(use_with numa numactl)"
+ myconf="${myconf} $(use_with numa numad)"
+ myconf="${myconf} $(use_with selinux)"
+ myconf="${myconf} $(use_with fuse)"
+
+ # udev for device support details
+ myconf="${myconf} $(use_with udev)"
+
+ # linux capability support so we don't need privileged accounts
+ myconf="${myconf} $(use_with caps capng)"
+
+ ## auth stuff
+ myconf="${myconf} $(use_with policykit polkit)"
+ myconf="${myconf} $(use_with sasl)"
+
+ # network bits
+ myconf="${myconf} $(use_with macvtap)"
+ myconf="${myconf} $(use_with pcap libpcap)"
+ myconf="${myconf} $(use_with vepa virtualport)"
+ myconf="${myconf} $(use_with firewalld)"
+
+ ## other
+ myconf="${myconf} $(use_enable nls)"
+ myconf="${myconf} $(use_with python)"
+
+ # user privilege bits fir qemu/kvm
+ if use caps; then
+ myconf="${myconf} --with-qemu-user=qemu"
+ myconf="${myconf} --with-qemu-group=qemu"
+ else
+ myconf="${myconf} --with-qemu-user=root"
+ myconf="${myconf} --with-qemu-group=root"
+ fi
+
+ # audit support
+ myconf="${myconf} $(use_with audit)"
+
+ ## stuff we don't yet support
+ myconf="${myconf} --without-netcf"
+
+ # we use udev over hal
+ myconf="${myconf} --without-hal"
+
+ # locking support
+ myconf="${myconf} --without-sanlock"
+
+ # systemd unit files
+ use systemd && myconf="${myconf} --with-init-script=systemd"
+
+ # this is a nasty trick to work around the problem in bug
+ # #275073. The reason why we don't solve this properly is that
+ # it'll require us to rebuild autotools (and we don't really want
+ # to do that right now). The proper solution has been sent
+ # upstream and should hopefully land in 0.7.7, in the mean time,
+ # mime the same functionality with this.
+ case ${CHOST} in
+ *cygwin* | *mingw* )
+ ;;
+ *)
+ ac_cv_prog_WINDRES=no
+ ;;
+ esac
+
+ econf \
+ ${myconf} \
+ --disable-static \
+ --docdir=/usr/share/doc/${PF} \
+ --with-remote \
+ --localstatedir=/var
+
+ if [[ ${PV} = *9999* ]]; then
+ # Restore gnulib's config.sub and config.guess
+ # bug #377279
+ (cd .gnulib && git reset --hard > /dev/null)
+ fi
+}
+
+src_test() {
+ # Explicitly allow parallel build of tests
+ export VIR_TEST_DEBUG=1
+ HOME="${T}" emake check || die "tests failed"
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ HTML_DIR=/usr/share/doc/${PF}/html \
+ DOCS_DIR=/usr/share/doc/${PF} \
+ EXAMPLE_DIR=/usr/share/doc/${PF}/examples \
+ SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" \
+ || die "emake install failed"
+
+ find "${D}" -name '*.la' -delete || die
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ newinitd "${S}/libvirtd.init" libvirtd || die
+ newconfd "${FILESDIR}/libvirtd.confd-r4" libvirtd || die
+ newinitd "${FILESDIR}/virtlockd.init" virtlockd || die
+
+ keepdir /var/lib/libvirt/images
+
+ use python && python_optimize
+
+ 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
+
+ # We really don't want to use or support old PolicyKit cause it
+ # screws with the new polkit integration
+ if has_version sys-auth/policykit; then
+ rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy
+ fi
+
+ # Only sysctl files ending in .conf work
+ dodir /etc/sysctl.d
+ mv "${D}"/usr/lib/sysctl.d/libvirtd.conf "${D}"/etc/sysctl.d/libvirtd.conf
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
+ fi
+
+ # support for dropped privileges
+ if use qemu; then
+ fperms 0750 "${EROOT}/var/lib/libvirt/qemu"
+ fperms 0750 "${EROOT}/var/cache/libvirt/qemu"
+ fi
+
+ if use caps && use qemu; then
+ fowners -R qemu:qemu "${EROOT}/var/lib/libvirt/qemu"
+ fowners -R qemu:qemu "${EROOT}/var/cache/libvirt/qemu"
+ elif use qemu; then
+ fowners -R root:root "${EROOT}/var/lib/libvirt/qemu"
+ fowners -R root:root "${EROOT}/var/cache/libvirt/qemu"
+ fi
+
+ if ! use policykit; then
+ elog "To allow normal users to connect to libvirtd you must change the"
+ elog "unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
+ fi
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ readme.gentoo_print_elog
+
+ if use caps && use qemu; then
+ elog "libvirt will now start qemu/kvm VMs with non-root privileges."
+ elog "Ensure any resources your VMs use are accessible by qemu:qemu"
+ fi
+}