diff options
author | 2013-07-20 13:02:03 +0000 | |
---|---|---|
committer | 2013-07-20 13:02:03 +0000 | |
commit | ea02332fa405145a6319e5c408a2d95e4bf91551 (patch) | |
tree | af6ea904b88e8c7abf83781d7cee58566f448885 /app-emulation | |
parent | Remove older versions from the tree (diff) | |
download | historical-ea02332fa405145a6319e5c408a2d95e4bf91551.tar.gz historical-ea02332fa405145a6319e5c408a2d95e4bf91551.tar.bz2 historical-ea02332fa405145a6319e5c408a2d95e4bf91551.zip |
Version bump stable series
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.0.5.4.ebuild | 432 |
3 files changed, 449 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index 8587c200f6e6..c387c02662bc 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.294 2013/07/20 13:00:41 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.295 2013/07/20 13:01:58 cardoe Exp $ + +*libvirt-1.0.5.4 (20 Jul 2013) + + 20 Jul 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.5.4.ebuild: + Version bump stable series 20 Jul 2013; Doug Goldstein <cardoe@gentoo.org> -libvirt-1.0.3-r2.ebuild, -libvirt-1.0.5.1-r3.ebuild, -libvirt-1.0.6-r1.ebuild: diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 085843c7fc5c..d8eb1f8d0783 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -8,23 +8,25 @@ AUX libvirtd.confd-r4 2015 SHA256 c2ca5d9a2d4ed433e91bd215c2ca678109cc981072897a AUX libvirtd.init-r11 3656 SHA256 51c3b79c1a71638211056f11085936d40874c5eb1440512309a5c0837f5a59e1 SHA512 c1743271fcf18eef38d9202ca58c7d052159262cb75283ce13739f6a21f3c6024cac567f52f082744c8f4321b857ace4489cc363281a7757920dc306b618d27f WHIRLPOOL 827f3908c5580e526ba83efd005c72d5024ed04072aab00e372347315d9cb6be88512c9148b5283d01190c2ef2ffa4fec477c28299afe70414c76188258103b2 AUX libvirtd.init-r12 3668 SHA256 bae1b0766423b8ff879a7490a2b3e6381029638558923d8c0047414e97b881a5 SHA512 b24cf7dd0f6db454bb23bf4e9c4d40050f6d5aaa43f5b95a04238e028f1cb5c735ba605f6f01caf814f2d2a36407abc6fd1d751e66887fc7af78d543e4b61dd6 WHIRLPOOL 3c04c3acfa061144d16e1e9f2b35e37437855b0162d3ce0d7d3d39618fcfe855d8e82fdf4e16aee8d6cc591424d3d0875a32edd02646e02203b5ca239b7f5d64 DIST libvirt-1.0.5.2.tar.gz 23953774 SHA256 79ba3ade0646c5500a333d2abfe52d3bfc1eeae8986c0ed433eeae2edd4799ef SHA512 00a369502a7ff4be17c547feca13b88419c55b0a6abec6dc83e7ea2306a17fe495e217e1b759aaea962b44da44cb7cad64f3866ae41a059820ed48c2144f7b21 WHIRLPOOL c7cff2f603a676c6810e0b3f95a91e3d8887ec5b9e3799afd13f025aebed52e43948ecf0a8e50b2bc955083fd62ef52be1dc4384086fa98e84283e4d7963b925 +DIST libvirt-1.0.5.4.tar.gz 23972364 SHA256 fe51da9d5c3d5e8521d0c89a3379ec3b19083a31e30bc4eb54a860aa6ccf2771 SHA512 f44006f5cf00e4682266a306c819075471abb52cd9816bd75e0b83962bcb4a085fc0ffc94b688bedbc4042489a2997b77ebd1aad6f1560abe808140a24682865 WHIRLPOOL 0d6609f9d437e344f6c5b74f1c34c24004e256efd784b61f35fa68483086213a47fe27e2ec5f5f4e2ce7bbb7a02c2dabe75511e8686221b6b9be6d2719dccd0e DIST libvirt-1.1.0-cafcec2f.tar.xz 8284 SHA256 ce68c2e6e54d1d3190c45cfe644d6af6c32dd8c4f661276868f90feeb8020b46 SHA512 95637c6577ac1cfbdfe087d5e5ad2671026f9ed35231780821a86db9ce610daceaeae55ce750ab345052cbbdeef030265e293de03c4a2add51d77b206df5586c WHIRLPOOL 5e21511ae6e0c4498c053133b4041aa9dab86b5638455639da97e05d177f2986c123b5c0cb61c41c7a60efe8d78592b789a06e25cf89ac0bbf5143c2ffacc167 DIST libvirt-1.1.0.tar.gz 24397962 SHA256 ce9e765697ecb595469489665043ce221d9b70babc16fec77ee938fe37676928 SHA512 0ac9c8b02a182ad4c66609bc949282455b362fc2aa576d1c2413366dfb1ce70d3737caad0101128f8629c34e0ca47295128bafe5608e3ac60e764c3f8178c7f0 WHIRLPOOL a526350aeef2d72cb079750bda0f18f9f9ebc4b2cf56e7655c9ee0e8a744b0fb540089f64da0820628779c1456435043bf8c6dc2c18bdba65c0e705a43777f90 EBUILD libvirt-1.0.5.2.ebuild 12185 SHA256 42e08f7da2c8179ffc4a4e34700d4c62d35fd2d977b0235f214abf93c6ae9303 SHA512 aa461a75d875fd50c50d5d06891ce9633d908825e1aa914fa22622ac953783681781be16479f7e6ff40a054492a36026cad44844483461e835f602f8f8032fa1 WHIRLPOOL f6581e9815408471cc51c6ec94a45ad5261743127fa440da599712de0ff3735a6f443ea4472f2a6ecf9e3d98c955aad38c4efd3420df5f2db471653c2cb6aaee +EBUILD libvirt-1.0.5.4.ebuild 12190 SHA256 4e3c5617fb590bec52c1f06d5d34dad86295096c503f615e4af02a745226e7eb SHA512 77d9c2a94b3396671bc670528a52260b9b0c668869396eb5ecd1a268ab11c2292516853c67655630f23d6779d51cbd2a02cb2bd90a4d5879e0b1ddef2d679f4c WHIRLPOOL 86917a9b961a24065e08537f1608b5a804d3ba15a155212d50402c3e41df654869141096a8b16462f2b336afb3180628fde67894ba65f0586d95d71ce3582a72 EBUILD libvirt-1.1.0-r3.ebuild 12057 SHA256 0fd48e1b79e01daecf200c22f72ea81ac42cd1819f270eec95ee407589e0e687 SHA512 09ce8a454c235a0000028ba32786e13518cd00556b07164e4a085aaa3593a7064b61e60038f7bd9053d67d5dc1c471d6a7aa6082abf77d0a1978dc24badf75cb WHIRLPOOL 5ad4456797d7e09444c80c311936b3533469cb631c7bd06cc149fe40117fa6372be7513a4b9e05c50d88192c2c02975ea20c39cebff370199d390c17ce48a9b5 EBUILD libvirt-9999.ebuild 12105 SHA256 76709a5ecd8cead07f1a596f4875a55f828047673361334047c33aea331b8463 SHA512 596b9ab9ed3fba45d7a518e1340eb81ac6f6aebebe67ff23e3e624f90fa0b7ce87c03517b9eb3e693a1f59db3c14fc2900f9a7a0876c35a1dcdc90a58e926012 WHIRLPOOL c5338f9b9fb26de8319bc772e728eaf18ef8b9c4b4423f2317d9b58a4bb596a488dd511c61cf0c0dd8a8b4971618d41ed4e2ab815cec01eacf9fe53da8d6a3fb -MISC ChangeLog 7694 SHA256 d5f4ddd563b3633e1476035eaf3bb5c5c79c954272f646d5b641eaf860e72fa9 SHA512 fbe676fd0fbe6a7d26beb2e1290e46fa423b956421677badffd78fa4d8a1ff6cd65bed82d3e0fb0982882acfcbbd72fec030b2f2078c5f87c1776b6a3971c16c WHIRLPOOL 7b39b4ba93e1d1885c5d7672693625378a7f537c5bbce98b0848c38654f92e44bf422470c800a2e527f3c5adc68a2f75179d569b35933a0279039d7073d5f82b +MISC ChangeLog 7831 SHA256 ff534b6432f421c9acb651ce106dc343a35d9b04a8c9636e769b63e64bf7a8c0 SHA512 37f30b99ab945a43ef96f897052ca4cdacacbf3784fd578c4093cf6626227196b553b50f60beecd9eb044bd60beab74e4df6ff21c8a43ef2e5ea891359b81d58 WHIRLPOOL b6fcf5fff5a59d0b7e89155a13f79425cf51dd56fd172efbcfe0df663f13b88e5aebb7f6f7e4b45892425e90233b0a2b57f087374c324dd298af7ba376f77f7f MISC metadata.xml 3534 SHA256 8678edfd233eaa04266d7e15f71102fb45d1e4843697ba0cd04fe57b45dbb6c6 SHA512 e4b2cc5f9001697b784034ae6e58fea39e9fdc223192772592bcb671a4e1436186ed7757fc72993ee81c1e4005502fbb8c0a2d4588666a186d42024a98c052a2 WHIRLPOOL 9f32ac2763d17e5204da7396eae2a8c79c63e1e82b4a1035c86d93c029902159d3f5697aad86b7307b6e8acee0a4f0f02023d0e5e824a471cdad80a5cebc6886 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iQF8BAEBCABmBQJR6on8XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +iQF8BAEBCABmBQJR6opHXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE -N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvUV4H/1aN97KC7U+yqh+9l/vQ+aTp -X13R0QPlJB58buSXZkWJh2CiHQcyS7UDmEM/gMbOi111uSIkAah4YZXBNhLLREhY -nTvVGJYwyG6mQu6lP/mRZZGUmAF39YgfVxCH7f3KnYIHk+UyxE8S4N9Oac6xMJn6 -PuxwJ3k4Nnf9iYFdU8YBd9bH+OndajSTLN0G8ln1rjw/quB23G67RDL+y/SJOATG -piojKCS/AmJn+1rpEkI3RQEAECQfglEIerD8lD+ZBdgqY7rM1aRUkxhHNtFeiL3q -qihH99Zef5Z5jsJEC1uLzo4JZIqZ1SxmnK2toRfq+MPbXwtbsHL7ZbLRZpK6Vjk= -=BIHy +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvZlMH/i0PA/xFfSsN9X1YVvnQ7SM3 +cg2aJQZgyvmiRP/zWC+gJ3s0sGQNVRGwuGrsFXxdNYfn3IoMe90is90UpXc+/3+P +ntygsqNetsNXTGuiMfbmkw4JOm9bWYhzvfsbU8Ua9eEmB8i4cbth0TrtFL7NwzCw +NXr0JaANDLehmdnP3WMd6l+o9k9J9VabVdWAtoIAM3Z5lMs15F+sSOmTfaPIz5Bj +BPw0KjGGa5qof92LZ5qU5vufCn4Q8YY9z3Js2c1nnklU2yCbBQ3YkYwGaKHXOZCz +nXxGe/yuS/fS4l7exfYceCEeFu0QTUba+v2hWYpQsUdBrM1yyQmNX5XRxW+m80A= +=NDzN -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.0.5.4.ebuild b/app-emulation/libvirt/libvirt-1.0.5.4.ebuild new file mode 100644 index 000000000000..e7a0aa0c674b --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.0.5.4.ebuild @@ -0,0 +1,432 @@ +# 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.4.ebuild,v 1.1 2013/07/20 13:01:58 cardoe Exp $ + +EAPI=5 + +#BACKPORTS=b8430867 +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 systemd + +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 \ + 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 )" + +# 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 + ~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" + +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 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 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-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}/python \ + EXAMPLE_DIR=/usr/share/doc/${PF}/python/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 +} + +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.conf "${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 +} |