diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-09-02 03:43:51 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-09-02 03:43:51 +0000 |
commit | 2d704965f9ce246904bcfe2ddd35f351eb51a4a8 (patch) | |
tree | dc22472a36a2e21014c70da7ee9102dd3bcd2e15 /app-emulation | |
parent | Bump (diff) | |
download | historical-2d704965f9ce246904bcfe2ddd35f351eb51a4a8.tar.gz historical-2d704965f9ce246904bcfe2ddd35f351eb51a4a8.tar.bz2 historical-2d704965f9ce246904bcfe2ddd35f351eb51a4a8.zip |
Version bump
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 | 28 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-1.1.2.ebuild | 430 |
3 files changed, 449 insertions, 16 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index 836d2ed725fe..50b321c2017a 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.316 2013/08/31 10:14:07 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.317 2013/09/02 03:43:42 cardoe Exp $ + +*libvirt-1.1.2 (02 Sep 2013) + + 02 Sep 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.1.2.ebuild: + Version bump 31 Aug 2013; Agostino Sarubbo <ago@gentoo.org> libvirt-1.1.1-r5.ebuild: Stable for amd64, wrt bug #483048 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 285825eea162..1d664f576c14 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 +Hash: SHA256 AUX libvirtd.confd-r4 2015 SHA256 c2ca5d9a2d4ed433e91bd215c2ca678109cc981072897a497955e36760dc3b9f SHA512 b3e1d2433be7838a35386747422a8f98f2a7f6a92a03089f9472eb8ee2efb7d10d2becd363fea7cdaf8771da31b58cd60d192b25e089b6257ad5341b1074e540 WHIRLPOOL 284e72e704b759433d5ddc1a3e4019164dda6b48cb2734ea9a6780747938bba2855a99dcf1b125ab3f500a6145315cafa4a3531ff6938c0c62e5b1a6f99ea9b3 AUX libvirtd.init-r12 3668 SHA256 bae1b0766423b8ff879a7490a2b3e6381029638558923d8c0047414e97b881a5 SHA512 b24cf7dd0f6db454bb23bf4e9c4d40050f6d5aaa43f5b95a04238e028f1cb5c735ba605f6f01caf814f2d2a36407abc6fd1d751e66887fc7af78d543e4b61dd6 WHIRLPOOL 3c04c3acfa061144d16e1e9f2b35e37437855b0162d3ce0d7d3d39618fcfe855d8e82fdf4e16aee8d6cc591424d3d0875a32edd02646e02203b5ca239b7f5d64 @@ -7,26 +7,24 @@ DIST libvirt-1.0.5.4.tar.gz 23972364 SHA256 fe51da9d5c3d5e8521d0c89a3379ec3b1908 DIST libvirt-1.1.1-864bcb0e.tar.xz 2108 SHA256 71bc272a7726a1a46926aca1abb8b4a8ee7f973671781e6ea4c9b29432ec9f63 SHA512 c04ec503161b03454895079cd9bbf2345ee6b489e08a7bef92c4a54237ca75a08048fed522baa759a5689735d9608f4ad3ad69ce47a630a72d5995ef955e81ab WHIRLPOOL 25ef1c2f212ab619afc0490cd613ed14a3ac80c7dafd824edc2264fc51ac092b0042d7399f9d49ab1f9411c85e10cde02ae150fb88fe81d17989b7708e3a0a6e DIST libvirt-1.1.1-dfae2d62.tar.xz 9104 SHA256 725f2b53547e513dbda7a26ba7410e99b81cff19df72ff6084c32d6eaaf4e603 SHA512 b5517d956b3d6f76b3b18897b9d6f90028fbed739d4ccfe0dcd3cf091f0ccdd918b297ce7eccf877bda5e32c9c701b68cd424d8c931150655cb9577552134aa7 WHIRLPOOL fd2faaeb31848e3eb37d14b61f89c8baa22746369ff45149959ff85fe0a82a01488df18e5e4dc9c76acee9512f43c3a8be775a799e2d494dd2c9305c551fc38c DIST libvirt-1.1.1.tar.gz 25420278 SHA256 dc6f1e1e15b9b190eaa706e76edabcfc94b239c012f5afc22b22357a4b3b22c2 SHA512 9f121827913cd99ba14ebf5755e679da5010e8784a16bc9ef9f49cfd8bf4d4335e6c200401b0592fe77a431d3de9a1b360695a515e5eb789cf675f087194cc4a WHIRLPOOL dca3fd4daebf1ba7c1d428d7a8ce7fb08b281751718fb8d7016537cbad3e08355953f1682d1239c312602b424b682d96d715085ed2e8e4ea6985140f08367093 +DIST libvirt-1.1.2.tar.gz 26069691 SHA256 16648af54d3e162f5cc5445d970ec29a0bd55b1dbcb568a05533c4c2f25965e3 SHA512 9244640221393abe3c4e48a5a5b87838af4f20ae0664949a5c116aa1dd4568818c41b52077274ade907310fd22a627bde69df1cd53c6c398d10f98f83c217b2c WHIRLPOOL 7fcf575016f26a3570fafe9fc22edc0bd35d01dfeb93a3c90d5c90770677cd07bafb3057de0857961f082c174bd42fd9a88ecb049c42a7388557ab7f51737c86 EBUILD libvirt-1.0.5.4.ebuild 12203 SHA256 52763c34f2758614268ca4b9b69689769cc02dba5b465d4a10a914cd2706409b SHA512 7ecc6a2bdf703ee0302e376d545f7ec77abd90d95ac2db34bb39a34217a3106021c7246de8c507741845b352a4fa66e32f99a1f7c3390a027f50c68014ee58ff WHIRLPOOL 7b99823e66b400402ec332e399f0b153dda55a88bc16e2e8a6e2abbb57b878d98992177764a3474e9bf136441f82317ff17d9d58472f8dde92dd78131ffa35bf EBUILD libvirt-1.1.1-r1.ebuild 12210 SHA256 7d536cb24988b18f61d83b77cc6c2019e3517869a5ab7c2fdbdfb93452e7cc56 SHA512 a4c7f18afedc1e7c18dc230bc7f81bae2841e4fd39e225c955e0fa5f4d97da9df399969cd3ab5d9ed520fd7e1dabe469b67a0ce73de8fe967435d28133c82e14 WHIRLPOOL 333a115b710b6012895acea8ded7c6f6472e963ff15b917f5369f3e6eb805ae80c18f3ef6206087b8291ab4d4e8de6ccc1842c3afa6b9e0e27eac385dcd390d8 EBUILD libvirt-1.1.1-r5.ebuild 12156 SHA256 f7b6f1663fd30fc0bcf82079777a28deaf4e74e623ac1d30ac6b89318401e9c1 SHA512 2e4a465eff68b0d25f4de8ca41238f650c4318643066a052da4ae4ab9e63cbd312e2b7352458be7a525c3d7a3f539dacb4d8769f851352801f8b365b93eed1b8 WHIRLPOOL ae83643b229026cae2a99a77e995326c3658d023059cc2944be6922cb1b8169e613783eff0e05f38158389a68106bdebc1d8a6e4fb47a4d9cdc272f9deff2eac +EBUILD libvirt-1.1.2.ebuild 12158 SHA256 f255837b4f890cc3a4904c8d73e305871c55f2613c5caaf563c7b8294adf7723 SHA512 e604ec2f1c66960e8807c093565b07487a40eb0266fa67748b5f4dc9f1b0c76f7387d3a75e9695e160cc2507d50dfd66c920f777cbd26ec8197830b5a68c5860 WHIRLPOOL 5ef25c0096eb8e5b5678dba1fb913e1dc71fb03bf24ecdc65c54ea22dd46cea4240197d4678cef95592a8f49afdb71eac633f55bb1eb96ad3ff63af8d91916e4 EBUILD libvirt-9999.ebuild 12212 SHA256 7eb7b50bfbd5afa1120ed7344c899e97e118a15c25e35a0bc33290b12f99c708 SHA512 6f99a6df3eb85c7430c7d8433adae8dcec79837a0205818e6d7ba0ca67ba7e05036e7250c534b88f26f9368a1dbb33c59477cbbd0cd3e5facfa9def9ba38f07f WHIRLPOOL 33790b4500d77d75dd30445e2d15a70decd75084cdcf05f7d8ddeb84cc2081e659f0e75cbf5a35a38dc7d703ebeef693a2d869ea6f8f9816dcc765e4e7be1a07 -MISC ChangeLog 11067 SHA256 326df46702d66ab0f002144211cb0cc8cbc9d6e02cc49d493b8f4bd3abf4d076 SHA512 783a1934ef1c29797cb036a55eb9dbd735064a004914636658d6cfd35643097587fe2a8dbd0947da3902a2562ac0201188c17da8a2645e3cd6fdab60cfbf1220 WHIRLPOOL 6f2fbe8624cd1e3373ebd6508b3703cdd571560d1df40af8a58b36f7acc4004358e135a620803a2e190b48173fe067eae15eb28d64e8811e369c0bdd22c44e34 +MISC ChangeLog 11189 SHA256 105a957e51b6adf563c43abbd319972f22a34feed7b50b4861730e37859e97ef SHA512 7128f2446943ff5533a488d6f7784fa7256eafe0c64e3a19e89170df4589088e70fc543fd22bda4a230d70e84eea774c617c992a17285546f26f377cc6704ca6 WHIRLPOOL 5a1af6600c761a90ae70c9477e56aeeb81db06487d891af4fc63dd0a831daa1d4ed856ba97871840fba4867501aa5f7e2c2adc036b172fc99f62c041e4ca5b50 MISC metadata.xml 3534 SHA256 8678edfd233eaa04266d7e15f71102fb45d1e4843697ba0cd04fe57b45dbb6c6 SHA512 e4b2cc5f9001697b784034ae6e58fea39e9fdc223192772592bcb671a4e1436186ed7757fc72993ee81c1e4005502fbb8c0a2d4588666a186d42024a98c052a2 WHIRLPOOL 9f32ac2763d17e5204da7396eae2a8c79c63e1e82b4a1035c86d93c029902159d3f5697aad86b7307b6e8acee0a4f0f02023d0e5e824a471cdad80a5cebc6886 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iQIcBAEBCgAGBQJSIcHvAAoJELp701BxlEWfHGMP/iCRocTj1uIwmWxddvZTce9R -1b+G2YsLFfNLXaV2+N5SHPb4In59ERKuapAWV629s1L4Y3hMOH//mANfeewAbYzW -7kXgKuav+UavAIhJTJICJ9a0lyDRUSiPaU4tkmlAl47PH4ECaNaYUbjyTlzeu3u+ -q8TuWFBZP0uDqoF0oBxHBqbvxaxlok8qCU2Ah4LS7On9u+QfdkmArzbRde9e2mO7 -GCPgs6280abAZKyrju4fBM64OlwJapFLmI1e/axaUJN6jJKmkt8Dp2U0TVyI+sQr -bCZm0SROO/bth8PrObkKYzbNEY9MnDqpcH2UpcgoXaE5w6TPAOB7yEkYYGvwa8am -DlyslFFv8Dk9aoEc6TwCIBjcJb2a80DVu+1bQBGCgVpGhkFRnV/N+lsCKF75wwwL -6pTepIQBHsxXjWPOTc0sqGJggXghZ1AR9tbMER8ZtYRkzN1AqnxHccF+xN9SPu6D -mRZaF6mY+UHOs6F067mCVvAMIJTJ4YFbKHo3R/Fy8R3zCKebVjRgPQPPw75RFKgR -jWGFmPRlgcRUPNYJ78gPdzovwqLoYUQ7feASzBG3wmbXoQzoUSZLdos3tyZc4NKl -mFYCJJUePIonK1CPUsS7McEOcebKV9wVzL2fxoGNZBh5+1BimgNyAO35BILVsqQC -4bm9Ttu0hR5WVmgBpHyt -=0NpK +iQF8BAEBCABmBQJSJAlzXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prv2FEH/31LpVF+RHeet1wnhPtlOU2R +EOhhxzg5C4yqyxNlwPuWfJyEd9Id0nEkoDOlsK285wLDU/U5zke52hZni4lBAg7e +yh2cl1L6aytQGzNHk3hvE86AYmj43VaesjA9on3/x8aafnzaeI3ozGqqjRiw6aXc +4bd4b+n3y9qU9K26/u9t1mOPFCA5Xsh0AisOOrp91XUVdbA2fjGU26xKprDrjAx7 +M0RaaRNBflbc2HNISYZpUTLU2/TzdgOHjrmq8oRashWI6IIbOrHlYbq20sha90F3 +F5j9C4/Gwg0znVJKkYkVsAQ32wNcPrxUCwbXq8fj9ZQBe45gmwDEK/0ODpX1Jmo= +=ZZbs -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.1.2.ebuild b/app-emulation/libvirt/libvirt-1.1.2.ebuild new file mode 100644 index 000000000000..de9f5d2e85c6 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.1.2.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.2.ebuild,v 1.1 2013/09/02 03:43:42 cardoe Exp $ + +EAPI=5 + +#BACKPORTS=dfae2d62 +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 +} |