diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-05-21 21:26:14 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-05-21 21:26:14 +0000 |
commit | db8be2acd6b1eb3b99a85e68257ed8e74d13a718 (patch) | |
tree | cbd25c46ee4191b7dbf837a9c624545e54d99946 /app-emulation | |
parent | Unmask python_targets_python3_3 and python_single_target_python3_3. (diff) | |
download | historical-db8be2acd6b1eb3b99a85e68257ed8e74d13a718.tar.gz historical-db8be2acd6b1eb3b99a85e68257ed8e74d13a718.tar.bz2 historical-db8be2acd6b1eb3b99a85e68257ed8e74d13a718.zip |
Upstream fixes release
Package-Manager: portage-2.1.11.62/cvs/Linux x86_64
Manifest-Sign-Key: 0xD7DFA8D318FA9AEF!
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/libvirt/ChangeLog | 7 | ||||
-rw-r--r-- | app-emulation/libvirt/Manifest | 20 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-1.0.5.1.ebuild | 426 |
3 files changed, 443 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index 30ea5edfc7b8..3fbec95ac089 100644 --- a/app-emulation/libvirt/ChangeLog +++ b/app-emulation/libvirt/ChangeLog @@ -1,6 +1,11 @@ # 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.267 2013/05/12 01:51:26 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.268 2013/05/21 21:25:56 cardoe Exp $ + +*libvirt-1.0.5.1 (21 May 2013) + + 21 May 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.5.1.ebuild: + Upstream fixes release 12 May 2013; Doug Goldstein <cardoe@gentoo.org> libvirt-1.0.3-r2.ebuild, libvirt-1.0.4.ebuild, libvirt-1.0.5.ebuild, libvirt-9999.ebuild: diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index f5b754f9ee6a..4c9f83745384 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -12,26 +12,28 @@ DIST libvirt-1.0.3-2102e03d.tar.xz 4180 SHA256 a66e7b5f60461d203caa7fc38237d1742 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 DIST libvirt-1.0.4.tar.gz 23353253 SHA256 d94c99ce286f5a89eb02c9f3d9d620930df1f9348262a60199b4a565a222c9a0 SHA512 5e867e48c12180840fcdfebb85e7349b704ae923cdb188d41009788d39ff64c25483e608805ccb0e91eee164c8c6e89ac08643649e495ad04668a11f7aa5a8f6 WHIRLPOOL cb44708897b485a5a63b2ae107d869c9deb09cbbb9288c32ee73cb513a6e895cf4ceae948719e449cf2f5eeed4b490e7c421dc2ea3bcec865a946a56f0a01e15 +DIST libvirt-1.0.5.1.tar.gz 23928327 SHA256 38a67d9dc979ed28440791eb3fd63e94e4d04e4efbe7554a83bdf0cc614d0a6e SHA512 8cc3850dcda93b2d4efcd055a91ca9f2a619ccb9585e5b9fd7e2daf6ee8e93c1a0354fbc7fa06f6d5663913f358c2fbd9569a5e307b90e91607b0e049f00c89d WHIRLPOOL 51298d87cddee79f352609306c77d3f1813684c931b11ea577d96560e366b112dfc625553a86fe21c291d7e9bba86024055b236029be56c3c6390cde49875e8b DIST libvirt-1.0.5.tar.gz 23928547 SHA256 337f1cd6611462b6e3cdf94541c49477df678074321fb7923274e4e30398209f SHA512 ee069f6047bad26b59cc14f7811725801d96525e7943e7abc31d33d256c77ae6024cf5ff841af9441a6853a3c24ba6aa5e0f437dcf2c5b2cfe860364b01719fc WHIRLPOOL d26107a400711dad468bfcb28cd88e0e7269a7cc7edbb487ed43b6ced22219d5e317af790ae69dc92e514cf29d68c88c8c7f18439679c142bf51d549d8cff8b7 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 12057 SHA256 af7521bd6c4c3d45d0205c3515168e9b38f42cc87cc4aa8daf7afbc47a97007b SHA512 f9d01fd92419299805412161b1336459eaabbe800948158e91d37b65d13ee70bf2864c259052d1e138102b63ce2890d47dc1dab63fb0921eab8313bccf113ea6 WHIRLPOOL 72258a05309d9e5ccbd536f1069fbe5488c0c13b8f4ed96d8eb6a24c9566f0d0b6c7ff33517a0574b7ef742ed126f7f5b1b9ca96ce138c9386f313282abb59c7 EBUILD libvirt-1.0.4.ebuild 12057 SHA256 7cad58aa831fbc0fd87edff2755d3024eafac7796c185aa593ba9c6b48b4ba47 SHA512 4fe31a585ee93fbb2bb874cc6c4398b9c0b2033f4138c9e7594a1a9ab1916dffef5c4e7e32e233591347e75ba794ce45a3e80c52be6d4cd331eaf8e6db77e7f6 WHIRLPOOL 582e909a746bfef35a352499c7a7b405c156050731805f5879482bcd0e915b7fd3348eeaf64c56df4277f9445dfb7f8bfd4bace34a070137f3be9ace80f3d444 +EBUILD libvirt-1.0.5.1.ebuild 12089 SHA256 8b4ad9ae16b3f7664ce2389d9cd0b13b7c79285486578a5adb1ea9bf456d0f9c SHA512 8bf712a2dbbb0a8a89a6f61e9e379562c0cc0f238c796703816d90be8b21f38fddd607d663407d355bdef109150be4a38685c54156b8cb735f8d12b2c3d6a5ae WHIRLPOOL 013f50cd5da2f4554e71893264abb28a15776281f40a2906c115fe2d9fffa67f823a17f8e7226ab919e97a619646f642fd3f8fc752dfb90f317561a554e6971a EBUILD libvirt-1.0.5.ebuild 12153 SHA256 33ee6e8abb8143efca7b6d94faaace1dbf4209160bda10622dd65ac84032be0f SHA512 87e29eb36e5fb2595e38663a649f13130951c9b9c637bee696a1592f4a10502942219aba60fd73e20827a0e447a18fa5246db1a82781f4e304b99333750e319f WHIRLPOOL c36a3623537bceb966e07470079cea1653f1277c4fbbac98c5129d76607fa90c0457d22037540742ce1304c6006c72a26524894901e5105d48369aacad5d34d4 EBUILD libvirt-9999.ebuild 12057 SHA256 855e788f7f52afcd47c5d621af4919f9ba420386d65ca934924feca27d0d7a8b SHA512 f4b95251c6f5aee94d259cb92e1e687963f20a9ffd438781f5b81931d43b4bee2d15f916231588f36413321b7ac6b29854c433da50a57a240ec4de1587d3b535 WHIRLPOOL 58d0d87828172b3e6b07c7f6bc6b06e456351a6f0c0d4f9f92e2243aaed0130c94d402a248eed353af9272e15d65550cade5ce06fe668405b9f052e75a81c71a -MISC ChangeLog 2787 SHA256 d8625a4b9a986f584d419f14419bb27e27ba5e42cbf5cbd739d47bf7dd2b3ca7 SHA512 435608184ab2cd3c3e1fe21b777c20663e46e3f5229abaea880528008bd26ba6111c748b1c511b292eaa7ea962b82c129172c47b653ccb61083585f223609feb WHIRLPOOL accfb2a33084beffb91a7cecd72a9e47377a57c20a71a5a5d75fbbf0966f5d86f8aca9fa9f563acadd591aea274c97bfcb3a085abb800c8cb8ae346a02e7fc44 +MISC ChangeLog 2920 SHA256 f6a339cb945043acb35eb53d72d8d2d39637f7c109c47a21eaa6e4a92b131571 SHA512 7f198ea26a65fdef26a95ea3fb14148099cda85b9263763eb6bb5ab12fb8beb05a0fe7b2841b50a895102f6b5c88f4e314b6e620b58f8c93c87fc1fa10f24efd WHIRLPOOL e312f65867da7e8548ae4eb458f902064fa1db01046d1afb5aa71bf1e545f39b440b8e3389984ba9180dc2e0cfd6cbb51372ed9f12dda36c2dd68a64d8722bce MISC metadata.xml 3518 SHA256 b4d7597acd9441b02afd05f1f4d51522f657f9ecafc9a77c66e1633b4991ee8a SHA512 f5fbd24db303d44b0801d5ea78815c169a668d090e039450979b495e00a852a8fbc8bf3bd65534cfcdb7540834af3f1496ce2a9abf449e39f83975b6892a6d87 WHIRLPOOL 086aa2e815bc5bb2ad8a0c54b6d1522e40b5c60662839c5792f7f96e03af9f5706a195f2c940ed82d04267ed8c0d40838326fb714848be006fac8982ecd80485 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQF8BAEBCABmBQJRjvWkXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +iQF8BAEBCABmBQJRm+ZqXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE -N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prv10EH/RZMvUMz833ScEgZDf0RdBiL -Xd6G3AldK4FhrSz8Goo7QBiPeC1C+6tFpUaZkI14sCOtfWalHnCIBPCQkvbsCXgd -fjyzzumx5ot18RbriNS8oe1sU5KoDjA4MbIx4PR6IAWXZoxAvQiGkcm4m2Gy4u/6 -g7/QlZOQ2KhnwqB/NI/Vo6gCKqQB6JzRVZ+RT3gqDwOjAByUquik2qJ0jJf3eQzO -8nptgro2fp00DgqpsHQHVaOme7qVacdJ2D02u5so74hhx9hAWWus/5CMh/Y/Z7Fl -BRf4Nh12FY9c5qDG5zFd8Ud+T0UKAkEXnfc1RM8ehSKGtWlu1BkDxbInW54IGIw= -=6sBa +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvBbMH/Ar5L77UPVa5KtxIKpl68+/5 +IDZZax7vrajL3W1IdV1uVeJkp8Yx6fePGoUy38TNr/a5FR13pvB7pZMJDa4mqXcn +cE9312H2vcpGr+hF/IFwHDFmgcEQJBBohxIi5TcmIksWeFAWTgYdQ/3h9X2zExYb +ODOJ9LogDQXKKFqj0WJStTA5rRkk+Ti5ccbDDLkNo7f6MfOcGrh2nuKMrezxu4Fk +zdOgSryA0LjOXrhFtzIpqLnOGiRexODSg+lLv6ejQddQeF8qaLplVJ3MjKNM4DVd +/AwHwmRwBDsbOwxSAJB1gzneDUUFvGYvyF7g7t3mt0sBLY6HgaBKUoq3GAbgGyE= +=rfWG -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.0.5.1.ebuild b/app-emulation/libvirt/libvirt-1.0.5.1.ebuild new file mode 100644 index 000000000000..55e4abe74678 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.0.5.1.ebuild @@ -0,0 +1,426 @@ +# 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.5.1.ebuild,v 1.1 2013/05/21 21:25:56 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/stable_updates/${MY_P}.tar.gz + ftp://libvirt.org/libvirt/stable_updates/${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 + ~BRIDGE_EBT_MARK_T + ~NETFILTER_ADVANCED + ~NETFILTER_XT_TARGET_CHECKSUM + ~NETFILTER_XT_CONNMARK + ~NETFILTER_XT_MARK +" + +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" + kernel_is ge 3 6 && LXC_CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP ~MEMCG_KMEM" + kernel_is ge 3 8 && LXC_CONFIG_CHECK+=" ~USER_NS" + + 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}"/usr/lib/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 +} |