diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-08-23 15:34:00 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-08-23 15:34:00 +0000 |
commit | 634602f927080ea1447e5b2d194c52d64590a2b3 (patch) | |
tree | 1a6d9cee49bfafb455921b19b146f3c9ae00f95f /app-emulation | |
parent | Version bump. (diff) | |
download | historical-634602f927080ea1447e5b2d194c52d64590a2b3.tar.gz historical-634602f927080ea1447e5b2d194c52d64590a2b3.tar.bz2 historical-634602f927080ea1447e5b2d194c52d64590a2b3.zip |
Grab the latest upstream fixes
Package-Manager: portage-2.1.12.2/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.1.1-r4.ebuild | 430 |
3 files changed, 447 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index b39ec7c61ba1..9d2a26ff16c0 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.311 2013/08/12 14:15:16 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.312 2013/08/23 15:33:51 cardoe Exp $ + +*libvirt-1.1.1-r4 (23 Aug 2013) + + 23 Aug 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.1.1-r4.ebuild: + Grab the latest upstream fixes *libvirt-1.1.1-r3 (12 Aug 2013) diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index e0bdb6b91030..1f4e8ae6f43b 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -4,25 +4,27 @@ Hash: SHA256 AUX libvirtd.confd-r4 2015 SHA256 c2ca5d9a2d4ed433e91bd215c2ca678109cc981072897a497955e36760dc3b9f SHA512 b3e1d2433be7838a35386747422a8f98f2a7f6a92a03089f9472eb8ee2efb7d10d2becd363fea7cdaf8771da31b58cd60d192b25e089b6257ad5341b1074e540 WHIRLPOOL 284e72e704b759433d5ddc1a3e4019164dda6b48cb2734ea9a6780747938bba2855a99dcf1b125ab3f500a6145315cafa4a3531ff6938c0c62e5b1a6f99ea9b3 AUX libvirtd.init-r12 3668 SHA256 bae1b0766423b8ff879a7490a2b3e6381029638558923d8c0047414e97b881a5 SHA512 b24cf7dd0f6db454bb23bf4e9c4d40050f6d5aaa43f5b95a04238e028f1cb5c735ba605f6f01caf814f2d2a36407abc6fd1d751e66887fc7af78d543e4b61dd6 WHIRLPOOL 3c04c3acfa061144d16e1e9f2b35e37437855b0162d3ce0d7d3d39618fcfe855d8e82fdf4e16aee8d6cc591424d3d0875a32edd02646e02203b5ca239b7f5d64 DIST libvirt-1.0.5.4.tar.gz 23972364 SHA256 fe51da9d5c3d5e8521d0c89a3379ec3b19083a31e30bc4eb54a860aa6ccf2771 SHA512 f44006f5cf00e4682266a306c819075471abb52cd9816bd75e0b83962bcb4a085fc0ffc94b688bedbc4042489a2997b77ebd1aad6f1560abe808140a24682865 WHIRLPOOL 0d6609f9d437e344f6c5b74f1c34c24004e256efd784b61f35fa68483086213a47fe27e2ec5f5f4e2ce7bbb7a02c2dabe75511e8686221b6b9be6d2719dccd0e +DIST libvirt-1.1.1-02340c7f.tar.xz 7884 SHA256 1bd6f273cbbea21dd4afdac92b100e0434b5e4e84577f68c4b913fd1f7a370f8 SHA512 fadb053679e0915b604e80442b846bb8e225537aea32025538787b0cb8a27dd76d075b44d5cec5731b4f9ea5b87fcea717fc144fe3c5bce25d844915f09a001a WHIRLPOOL e48e07e46ebaab52cf131e567e157d151422585fa933c21b54d1bf1b52750b8febe2a0cbcf29c930d7b4559ec1d51ef3600bb61d2f11b9b4d3cf09a75775ec0e DIST libvirt-1.1.1-864bcb0e.tar.xz 2108 SHA256 71bc272a7726a1a46926aca1abb8b4a8ee7f973671781e6ea4c9b29432ec9f63 SHA512 c04ec503161b03454895079cd9bbf2345ee6b489e08a7bef92c4a54237ca75a08048fed522baa759a5689735d9608f4ad3ad69ce47a630a72d5995ef955e81ab WHIRLPOOL 25ef1c2f212ab619afc0490cd613ed14a3ac80c7dafd824edc2264fc51ac092b0042d7399f9d49ab1f9411c85e10cde02ae150fb88fe81d17989b7708e3a0a6e DIST libvirt-1.1.1-a5cfeac2.tar.xz 4860 SHA256 e506597fe1ffe0eec341904358a46568bcdc2893a9c19b5c9182ca2996460225 SHA512 5ed21cc207b6e49b2200657091ea9e6e1f221482f8f633833fdee4cefeade1beac48b9a42ea2e24bf358f75f8302b8b1067d776a493d64c9676da5523a3c2b9e WHIRLPOOL 9f2a9081efb82a40e7a44c7567094a30ff9005b6e569070cd1419e7873ab3cadcae36af24654164818f3051b1770eaa08684969d9e1cd7930e10e150c60affba DIST libvirt-1.1.1.tar.gz 25420278 SHA256 dc6f1e1e15b9b190eaa706e76edabcfc94b239c012f5afc22b22357a4b3b22c2 SHA512 9f121827913cd99ba14ebf5755e679da5010e8784a16bc9ef9f49cfd8bf4d4335e6c200401b0592fe77a431d3de9a1b360695a515e5eb789cf675f087194cc4a WHIRLPOOL dca3fd4daebf1ba7c1d428d7a8ce7fb08b281751718fb8d7016537cbad3e08355953f1682d1239c312602b424b682d96d715085ed2e8e4ea6985140f08367093 EBUILD libvirt-1.0.5.4.ebuild 12203 SHA256 52763c34f2758614268ca4b9b69689769cc02dba5b465d4a10a914cd2706409b SHA512 7ecc6a2bdf703ee0302e376d545f7ec77abd90d95ac2db34bb39a34217a3106021c7246de8c507741845b352a4fa66e32f99a1f7c3390a027f50c68014ee58ff WHIRLPOOL 7b99823e66b400402ec332e399f0b153dda55a88bc16e2e8a6e2abbb57b878d98992177764a3474e9bf136441f82317ff17d9d58472f8dde92dd78131ffa35bf EBUILD libvirt-1.1.1-r1.ebuild 12214 SHA256 b0e7740008c8b48fbc4ae1868ca3009da84987b79eb43d457e01271f3260b5f2 SHA512 2fd83ce180d0964834a25d930316b07836e33f4e6a4162ae41b03f0c0653d31a6a40bc8c900d40c761a1ca7cdc7a404efeb8bedad9bf015bf14bf35216db7a7d WHIRLPOOL 794e1b613d9ee7619c7351ae4d20c06ae3bcb120201a6339d1956d5a3e20fd64f77417a522944f21bbf541da25ec9c86770fc88fbdbfda350fd89a8204dae13a EBUILD libvirt-1.1.1-r3.ebuild 12160 SHA256 91a27a4555050610be0a99409598af8e851269c18bb9fd6c034f9e8d59c60dad SHA512 678927ce53b382ee553d243e0bdde7002566ff279a3e4d27986fe2a8c4215e63efcfbf68900bd77397dd9fd4195125cfb3e8c1ce9afa42ce6dff5394b62653d3 WHIRLPOOL 0bdc73b5babd3fdcc418f221de5f753324334e10ab8477f77ef96998c8fc5d1250fee97188dfcb2cb5b3cd031659be4d313f3eef56f68a6f730b8aff683d63b6 +EBUILD libvirt-1.1.1-r4.ebuild 12160 SHA256 69adf1465c8345b219847757f5e345e144120a3d9840fce5d028cc58cae9fc97 SHA512 36265737314307bce5d111e2b20b9d2c975a058ce0e3e0c7572f54c409c4d4248799e6d6767e7a9e58d45c621380dd6c3c5d23a583672e8aef35601b3fd8bda4 WHIRLPOOL b1454973454d6926435dfc23cb867abc318b95ffb3ad6fb385afb5185d26a3df94e7d97ba9dee7e526b7f7464de6d72a10ba29dc758f99cac8a9d1bc026a03c2 EBUILD libvirt-9999.ebuild 12212 SHA256 7eb7b50bfbd5afa1120ed7344c899e97e118a15c25e35a0bc33290b12f99c708 SHA512 6f99a6df3eb85c7430c7d8433adae8dcec79837a0205818e6d7ba0ca67ba7e05036e7250c534b88f26f9368a1dbb33c59477cbbd0cd3e5facfa9def9ba38f07f WHIRLPOOL 33790b4500d77d75dd30445e2d15a70decd75084cdcf05f7d8ddeb84cc2081e659f0e75cbf5a35a38dc7d703ebeef693a2d869ea6f8f9816dcc765e4e7be1a07 -MISC ChangeLog 10439 SHA256 f6128ef43438bd1ef053360065fa1556f6231a767006b910c14d99f1f2688e2f SHA512 9068760118b93266d84bc4cd1f4fe19bb4efa2ab0f3fcbc6cfbd214c6aeb19799971b793c4b979e6c3effa53e9128b92c525381cc91a1872fc7e4e5f17257b4f WHIRLPOOL 168d45ef9ab8749df16a9549463aea64ef66f6444df00b4590b392fca9a9cebc95b32c08506c971cddf4a5c61978959f52718a7c412fb5460436d9971595cb00 +MISC ChangeLog 10582 SHA256 ab3d9ce625e1ae9d5ddc91f9b34b107c619fa16901af9605b5d51641e5631172 SHA512 179e8722fb6d60ae8bb800101e47c7c250e84af4cc1ab9cd876f1e28a0cadd793143999283a6d12d42e606ee3c73c424c65a2889728077e4560fb6492bcbfbc6 WHIRLPOOL 4290c073cdb4d2515dfe47a18a46e84e53a18db54d9b3d3c7b267f66f1f9c6ab6707bdf29f15052dfee1bd033c1a5b704312ed7f2f2736105bc4d5553e8ba8d0 MISC metadata.xml 3534 SHA256 8678edfd233eaa04266d7e15f71102fb45d1e4843697ba0cd04fe57b45dbb6c6 SHA512 e4b2cc5f9001697b784034ae6e58fea39e9fdc223192772592bcb671a4e1436186ed7757fc72993ee81c1e4005502fbb8c0a2d4588666a186d42024a98c052a2 WHIRLPOOL 9f32ac2763d17e5204da7396eae2a8c79c63e1e82b4a1035c86d93c029902159d3f5697aad86b7307b6e8acee0a4f0f02023d0e5e824a471cdad80a5cebc6886 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iQF7BAEBCABmBQJSCO37XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +iQF8BAEBCABmBQJSF4DjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE -N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prv9u8H+IzPaJE9e8gujlu0Ay8Dwtmn -gqIlUc5Gpu9ctL+FQnuDOp/f8Tjw93sIHIm2+dT2LHwJ7TAORXwsRYYBKEQo6la2 -YWDHlLuB0lYB5usXJyGSPEGlkcRf81IKwlWXZrG1fqffmmfIhlwlF4jL4VE1W9sx -8VhDy3LWyfz/99YPUGc+ycYNehhtigJj7U+B+sitr11MqOZOlYc1potgxSpJLPKf -YvNwy1hTALTW12/EXTXNz9YzRSQDvO2VSU33+oFIpRjnRg4928hbjvbdXN+j+72H -kRqbaBWx3Ftpwvl+PUVF4b65YrGFYUzqCTzbvI2ikxEbS2ffucWAgeEFSjCYog== -=JhvH +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prv5WgIAKH7f5Tsye71wLfH/SUo0o6i +NAfjs0i5KiFfsSJOwDg73tsjx0zQMPEYJ4yfuM6XR6V/41Qak3qVHIDp53gK15ki +/aW50sua+nBwBdCO42ctty0KMmRBSUNv22HGLT5mMU8TwvsihEcCDm1tmqgT1Yth +oyYAYQWBg8R8rphgezBRsyyNYtSJf8hwdz+PJk/op4SSLjb+s5PHvuDoTVS9uXUr +T3GNefMBxI0r9U1xkVj0azw7uTKVQhD+5+5S2mwwEu8WbuGZa3WCrCTzeor7TddN +VRTF9pOLOv8nYjq4cCtwcfURYcW8CcbqSXb24aheLFf4V+t/eEQcYSUFF8gbqiE= +=9d+4 -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.1.1-r4.ebuild b/app-emulation/libvirt/libvirt-1.1.1-r4.ebuild new file mode 100644 index 000000000000..d9fc43ce32c4 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.1.1-r4.ebuild @@ -0,0 +1,430 @@ +# 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.1.1-r4.ebuild,v 1.1 2013/08/23 15:33:51 cardoe Exp $ + +EAPI=5 + +BACKPORTS=02340c7f +AUTOTOOLIZE=yes + +MY_P="${P/_rc/-rc}" + +PYTHON_COMPAT=( python{2_5,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/${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 + ~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" + +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-r12" "${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 + + 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 +} |