summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2013-03-20 19:03:50 +0000
committerDoug Goldstein <cardoe@gentoo.org>2013-03-20 19:03:50 +0000
commitb7f43b609e28ecfd49ca36d1cdc2b3a879958f3b (patch)
tree44a6af2d7df41389598cf2e73ba4db0d6d80a08f /app-emulation
parentIntroduce an ability to override PYTHON_COMPAT for testing. (diff)
downloadhistorical-b7f43b609e28ecfd49ca36d1cdc2b3a879958f3b.tar.gz
historical-b7f43b609e28ecfd49ca36d1cdc2b3a879958f3b.tar.bz2
historical-b7f43b609e28ecfd49ca36d1cdc2b3a879958f3b.zip
Patches from the stable queue to fix a number of small outstanding issues and fix bug #455636
Package-Manager: portage-2.1.11.55/cvs/Linux x86_64 Manifest-Sign-Key: 0xD7DFA8D318FA9AEF!
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog8
-rw-r--r--app-emulation/libvirt/Manifest20
-rw-r--r--app-emulation/libvirt/libvirt-1.0.3-r2.ebuild422
3 files changed, 440 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index c3a2d8ca8e28..1e9ad11de3ae 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.257 2013/03/14 04:43:03 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.258 2013/03/20 19:03:29 cardoe Exp $
+
+*libvirt-1.0.3-r2 (20 Mar 2013)
+
+ 20 Mar 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.3-r2.ebuild:
+ Patches from the stable queue to fix a number of small outstanding issues and
+ fix bug #455636
14 Mar 2013; Doug Goldstein <cardoe@gentoo.org> libvirt-1.0.3-r1.ebuild:
Update tarball because it was missing a patch
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index a10e17ab4086..d46ada1cdb28 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -8,24 +8,26 @@ DIST libvirt-1.0.0.tar.gz 21868950 SHA256 14c8a30ebfb939c82cab5f759a95d09646b43b
DIST libvirt-1.0.2-1b2f2439.tar.xz 3184 SHA256 fb7cbd3add0b54927b1be4bc753e0f0279e11f5b85bb692d44fb9b99b85722da SHA512 a45cd0896dbf845472135cb3548eff731f6a6c89af2d90c44094d3c07a8f19c8c8422dc43228a0c4b0c04b1b11bae2bc2a271f02bea598d36b52c42fb60ddc19 WHIRLPOOL bf0760fcf5245d0c3347f1969605fcb3df86c93e183b468c0421b88801db5f0984c4d1ce5a3ebc7b72a53f585d17db7fa984f7fbfa6e8f1d2c65819f3fd3ed27
DIST libvirt-1.0.2.tar.gz 22971729 SHA256 9b8c2752f78658b65ef1c608b3775be0978d60855a9b5e2778f79c113201c179 SHA512 c35b6dc46594a93d4d633ad42df2cf1da7cbbf7327205ba4c608d4f95f0017cb4041518c3dafa3d5ab7dadaafad116779415c843e0d4e67ef1df31bd9a9295e7 WHIRLPOOL cf56954392f263fe686c79e320f238cc657424512bf3b136bd68747777640cd564affc38f7ed077a1e00f2d2511ab607b236a9b6ea4fbc8f089a2a0267b214ce
DIST libvirt-1.0.3-2102e03d.tar.xz 4180 SHA256 a66e7b5f60461d203caa7fc38237d1742c6e550e9d8baa8835ea7df584cb70c0 SHA512 55c7c7fe7285ff399d2b13756653ebfe9a7e9e21ce2e9b91a366a7867ef10ffac9846dcf72af2941abd996efb9d115982f980abc88d1c629f0833c5e20f1f692 WHIRLPOOL 644ff645393367c69c97d19c73bc2e0e8eac8a219f67041ae0c44069a760e03527f77d41c7d37c2483896bfe4439f450fe35af64f6316fa634d947665f105149
+DIST libvirt-1.0.3-9bf6bec4.tar.xz 7032 SHA256 841f062bd4185ac36a5633103c899d4ef5da6a2092ef1a2f7125298ec336b18b SHA512 7eeba343a27c4dbe5e984641082c6f8c59ba0c04a22c5a3e390c0bf03e65a966e7db15be732c61473d2dfb245bdd53f950d3a848980153b90310439b781bbcdc WHIRLPOOL 8d90ebc9fc17a7c8ac119f34b2e64679322878c0c8dd7eb837f2b5e89047b084ec87e9966841d0aaf7ed19e75548b9d5f5f66d461e2f177a5e817669471a27c8
DIST libvirt-1.0.3.tar.gz 23238381 SHA256 f64f4acd7cdcfc6ab5e803195ed58b949f262b54e3659d8c37b33f0fec112757 SHA512 f0002d40a018e22bd05c9bc990db0b14e0ec815613f54d04fc3b631081d87b6659620188da9f0ba376f290206d979467013274ab99b7394c66bde54c82e08fb4 WHIRLPOOL 29dad8e6b1e4d61fe83fc450436c0fdc200b360f93772c2fefe40ab443ec2a7cb6566e634d15290beb4f7ea1f461503b1cd86accddde59659ed46b60b56e3d76
EBUILD libvirt-1.0.0.ebuild 11574 SHA256 1277354f747515fda62740224ff1d8dd967640d0ad3a3231aa292f8c42dc6e29 SHA512 2c55fe9f0dc27765aed9989ff624d3dd3b31d5d015eb666b53b5c9f8f156c9bd4aa904a0f2a1bc22771aab01d46c2ea56d066adcb6d2add9f18486f0b1bb75bf WHIRLPOOL 73e0d6892b78766ae5e744af6b822fc64e37fe3f4737b495e766f08902c9b26d6f6b833be49397a8aa4f26d37e02de62af3f7365f88ecc39eb3b93d5a5cb2d3c
EBUILD libvirt-1.0.2-r2.ebuild 11904 SHA256 e23eab142c43e637887624cb7a4ac938628e2cc7b91334aae5dab6f79b45b0ee SHA512 10b89f40ea02f331edc37e224bcc9b82475b1a8a94dc4abef6f76a9576c16b4d23d0beb29f3b96577d16b60010cb73afa747cd69d35b6cdf4610acf09f338757 WHIRLPOOL c62d046708d2e389aff31ebfc779eb670a9dfa30bf04161a118b09a6623e2376d15c0d2df05f99a296fa1c5f762771426e26efd57e159f2801d019e44a1d9b38
EBUILD libvirt-1.0.3-r1.ebuild 11906 SHA256 8ad34603ca9f08a668c10a5b02fdad4b539fe497ab8f488e11c7072a5edc8263 SHA512 16361396f9584de6f5df6f8b6c8c616aaf61bcc256649f9fff8d9d5a1197dad37cbb68db8d072b7b6ae48693fc19b49e2339b4636f5a998c35e1cd54b5d888d2 WHIRLPOOL 5dbfc30285a7b243ff24e01535114bc35ab1b459a6ab246726bc9f923c0a745e3108c0484bd424167b184ae8b48d682a30eceb0b2f370328b9bd556b977237d6
+EBUILD libvirt-1.0.3-r2.ebuild 11906 SHA256 be84878ce4eb3b16130d838a130d40ba06aca0fb740586a0485cfd76e10abd36 SHA512 c8de2100bb2893427960c0b482268100178ae73b691ab6abf66afd66c19099ce5fd46e6ec51531e140d335d06015b61e15b86cc1e5fe7886fac07bb4aca4720f WHIRLPOOL 8b8c0ca7e7e3d7946a5fe125405be914bb9fa47e77b4454291941fa07ce2cb4d6ce6d6bfec0835d0ec44b2f99f9f65882ebb98a30dd96b1fabdae6741f1215c4
EBUILD libvirt-1.0.3.ebuild 11904 SHA256 147c71a4a7d804c27cb418e979faab574a7b1068d83998cb244dc51603efcaf4 SHA512 8034a572b47bcb205f976296c26b654fc6b97269b374afc742efd753da69180b104889ad44f5eb7d3803207c3a539592c56a36a798620c53b03c07012cb7eb81 WHIRLPOOL 30dbdd1e5164b60eae5a9cc27ac28569226f4cc2c271be0d40c7e63b5ca0515ec34d0084a75622c966cd2890cad8e65f964338028c9ebab7d60e7cb347bb64b8
EBUILD libvirt-9999.ebuild 11519 SHA256 97c4435c5719e3e94658fe3c66366afc37f1bdaffe6221183635212a5061837f SHA512 a152f25c2aa41db942f0d51dd65ae4412b31ae077b3e7ca48dbe721d2792df8fc6dead7bd03fccf2c7e95821b9bb4e167877343b549a4a6949af97fdf9a9b099 WHIRLPOOL 4ecef7a049e9610e7ce891eaa31dbbe41bffaaa08686d9bca23fd5b8770c8690c338a4a78fb64536a295b9cf1f43d379bba2891e391b935519d4f4b269c69d04
-MISC ChangeLog 1286 SHA256 000e59d750bbd917637646f76219f5d6cea1c2e83decaafd85e05205a56a47e5 SHA512 1256476e7018de6e54a4edf213de43d1381542a7b5fe8256b1affdefb94531227d246d760a7c506764dc15a2b3497591fc2af672fee798b97ba7146d6bfbd447 WHIRLPOOL e928bb08a0a7564b07b94cb6ab7c6317dd0fb6d0fcab8412efa0c76f81e6a6e1c3e62d39940cc084c655a2887e3532eabd46ed8db0777b264bf832b99cc1a249
+MISC ChangeLog 1494 SHA256 f4fd577482411e746b8bed8e49c79d56cad0f28cac13545db859fcbaa4503aac SHA512 3d3971e232d150f41166d12545682924d52311efdbee9829509d2859d38e3d305b2c76784a02b20ec8a354354dd06d8b8f0204e83bbd80635a9e93f9e7f324b4 WHIRLPOOL 16cc06846d6e20b644433eef2ac60ba8ead8fb975d8f25bb5fd01a930a205a62ac18c73c3c54fc8b1acb97df79a7821d26606b3060d5018e0eabdf09c306bf84
MISC metadata.xml 3518 SHA256 b4d7597acd9441b02afd05f1f4d51522f657f9ecafc9a77c66e1633b4991ee8a SHA512 f5fbd24db303d44b0801d5ea78815c169a668d090e039450979b495e00a852a8fbc8bf3bd65534cfcdb7540834af3f1496ce2a9abf449e39f83975b6892a6d87 WHIRLPOOL 086aa2e815bc5bb2ad8a0c54b6d1522e40b5c60662839c5792f7f96e03af9f5706a195f2c940ed82d04267ed8c0d40838326fb714848be006fac8982ecd80485
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQF8BAEBCABmBQJRQVVaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+iQF8BAEBCABmBQJRSggSXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE
-N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvk9MH/RKfUns8ttDBsRf7MwE2iOoP
-DOeUUe5FaHgA806MHf7dUvb7fP2BqF3QO5nQJO5EkTsaFGjAiqyBDosRW9QyDNjH
-E8/DXi1y9OcG7NJHRTQt4gJCtif7zkR8bXZb/uWbm1ucWXeR5ZZ6Yrx6Qdsn1GvD
-D7Gr2fgD1Ym1H/AWnEHwYOaeuY2fZXHSmTwmo8JMHSAoFMg4mPbpVAWnUUl0ZFqU
-AT2oMeo8Gy1pNc/nJe4NxSWs290ffSaq+yb/h+sIXdqxXC0BQHFuMKbZxI1LwVZ8
-3QFAylVieyvTq8gjRx2XZJtP1KdmPo+l1UnqMNjl2d4pK49LmBTwycJkSlXuhn0=
-=mLQ9
+N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvnFkH/j7z3L88qUiBaYhuiQxZSBLX
+TuPMkO4w5eNFDp3dNFoOVIV9gE1VS9P1D001decNSc6qNViw5aC+PXern9nofHaq
+aCaWxyWh142GSEvJzOcxK067xaTGQ6b8vmk0dQkxo7vBxFH6bLq/Y53ngySwm5rb
+0IaPMtS1B9x3X3d9vfK7nHkJPs81pWDAGYNYsdX1Ku8ggKghxT8jE1oI/Lcj2Ais
+2u6yMC3kIH0foQgqVc+Svh6DDyMEtibR8sTiISm22ZHgPnewiltHhJ8OIyyoKBuk
+PR1jMgX3swP3GttOmzr8fzHplGAGqyF1QBCDEE35PwVmsWqobbnGUUxPmYATCeA=
+=GjtX
-----END PGP SIGNATURE-----
diff --git a/app-emulation/libvirt/libvirt-1.0.3-r2.ebuild b/app-emulation/libvirt/libvirt-1.0.3-r2.ebuild
new file mode 100644
index 000000000000..6752a563dbb3
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-1.0.3-r2.ebuild
@@ -0,0 +1,422 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-1.0.3-r2.ebuild,v 1.1 2013/03/20 19:03:29 cardoe Exp $
+
+EAPI=5
+
+BACKPORTS=9bf6bec4
+AUTOTOOLIZE=yes
+
+MY_P="${P/_rc/-rc}"
+
+PYTHON_DEPEND="python? 2:2.5"
+#RESTRICT_PYTHON_ABIS="3.*"
+#SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils python user autotools linux-info
+
+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/${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"
+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 )"
+
+# 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 )
+ 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-libs/libxslt
+ =dev-lang/python-2*"
+
+LXC_CONFIG_CHECK="
+ ~CGROUPS
+ ~CGROUP_FREEZER
+ ~CGROUP_DEVICE
+ ~CPUSETS
+ ~CGROUP_CPUACCT
+ ~RESOURCE_COUNTERS
+ ~CGROUP_SCHED
+ ~BLK_CGROUP
+ ~NAMESPACES
+ ~UTS_NS
+ ~IPC_NS
+ ~PID_NS
+ ~NET_NS
+ ~DEVPTS_MULTIPLE_INSTANCES
+ ~VETH
+ ~MACVLAN
+ ~POSIX_MQUEUE
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS
+"
+
+VIRTNET_CONFIG_CHECK="
+ ~BRIDGE_NF_EBTABLES
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_TARGET_CHECKSUM
+"
+
+MACVTAP_CONFIG_CHECK="~MACVTAP"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_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
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 5 && LXC_CONFIG_CHECK+=" ~USER_NS"
+ kernel_is lt 3 6 && LXC_CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" || \
+ LXC_CONFIG_CHECK+=" ~MEMCG"
+
+ CONFIG_CHECK=""
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}"
+ use macvtap && CONFIG_CHECK+="${MACVTAP}"
+ 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-r11" "${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"
+
+ # 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}/python \
+ EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \
+ || 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
+
+ keepdir /var/lib/libvirt/images
+}
+
+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
+ mv "${D}"/etc/sysctl.d/libvirtd "${D}"/etc/sysctl.d/libvirtd.conf
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize libvirt.py
+
+ 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!
+
+ elog
+ elog "For the basic networking support (bridged and routed networks)"
+ elog "you don't need any extra software. For more complex network modes"
+ elog "including but not limited to NATed network, you can enable the"
+ elog "'virt-network' USE flag."
+ elog
+ if has_version net-dns/dnsmasq; then
+ ewarn "If you have a DNS server setup on your machine, you will have"
+ ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
+ ewarn " bind-interfaces"
+ ewarn " interface or except-interface"
+ ewarn
+ ewarn "Otherwise you might have issues with your existing DNS server."
+ fi
+
+ 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
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup libvirt.py
+}