diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-09-24 19:47:41 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-09-24 19:47:41 +0000 |
commit | 467a0826f81a2ed9c89cf9dd4a722cd7c6d11d6f (patch) | |
tree | d18c7be5dc9d28f2869e850e93b1fec1444b4a25 /app-emulation | |
parent | Stable for amd64 wrt bug #485864 (diff) | |
download | historical-467a0826f81a2ed9c89cf9dd4a722cd7c6d11d6f.tar.gz historical-467a0826f81a2ed9c89cf9dd4a722cd7c6d11d6f.tar.bz2 historical-467a0826f81a2ed9c89cf9dd4a722cd7c6d11d6f.zip |
Add back stable version that was over zealously removed.
Package-Manager: portage-2.2.1/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.6.ebuild | 433 |
3 files changed, 450 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index e6a8539d1b11..9f9462aefb66 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.326 2013/09/24 16:57:41 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.327 2013/09/24 19:47:19 cardoe Exp $ + +*libvirt-1.0.5.6 (24 Sep 2013) + + 24 Sep 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.5.6.ebuild: + Add back stable version that was over zealously removed. *libvirt-1.1.2-r3 (24 Sep 2013) diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index c104115e9c4a..595900161090 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -3,24 +3,26 @@ 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.6.tar.gz 23998470 SHA256 171e2497d4d4109f4839f6f4b727b92f02530776b87b7246189d7ca6b44372bf SHA512 119c8c7a584a0fb6ea8e6385d5d5aac814e9f0a975adf4e75ee012d116a139c558ecb121da544e073700f1eb95a9b360fb457ce6cfebeddfb703fe42d41546a7 WHIRLPOOL 5f3b17f07e124816facf847d43bde74cbcd90213206085f770b1cb86240b0ba2a7cde8f1846665ecdaaf261d1ca44eb14226d27223e98b652efcbb834d00a103 DIST libvirt-1.1.2-2a32bbbf.tar.xz 8824 SHA256 38d49c3c5f28b809ccce011f23690181f0191a8f50ea2fce882f26637b29af58 SHA512 6fc13dd3766502a2dcb8dc452b8a69c89e1bf84fd800cadc407d6f927294e795814e42e6479d0bd228f457abdb89c7220b19d4c24e60a0c44ba4f1d5385034af WHIRLPOOL 1bcd0ba80eb603ccce5cfe3ac18e143327ecc098b640351bbc5e727f44b1963758a375718e71e33d3e80a5541633d816d8729a3ce431df8d139321b0af8b9d30 DIST libvirt-1.1.2-e89bdf01.tar.xz 1776 SHA256 ff85291f594221a6fbf8ad39d577bdec776f4c22081c7904c4463f8bed50ce5b SHA512 357b03c7e1b4a4b3e0a862d92fd81b800c58cd702c4c88228397ef06b1125f1b565b28821a3a62d93a01338ad70987509836d677051718c1174dc82078ae6855 WHIRLPOOL e3e8dec57def09e9f1aed29571befcb73095ec0b61730361556e745a5732f1744d58e448db768aef82bd6033cd40471f7c7c7a2432623f6e3ee921fca1e2f571 DIST libvirt-1.1.2.tar.gz 26069691 SHA256 16648af54d3e162f5cc5445d970ec29a0bd55b1dbcb568a05533c4c2f25965e3 SHA512 9244640221393abe3c4e48a5a5b87838af4f20ae0664949a5c116aa1dd4568818c41b52077274ade907310fd22a627bde69df1cd53c6c398d10f98f83c217b2c WHIRLPOOL 7fcf575016f26a3570fafe9fc22edc0bd35d01dfeb93a3c90d5c90770677cd07bafb3057de0857961f082c174bd42fd9a88ecb049c42a7388557ab7f51737c86 +EBUILD libvirt-1.0.5.6.ebuild 12205 SHA256 20c104ed84fb850487f096eb618c8c3369215403969cd8c00d9633de06b101bb SHA512 ad0ba8164cc8c298e7ec6b81f52c4a91355a9bfd3a6fb467f887b087bb93555e0c5dc4cc5bd1b5239453a9885ebc18342e9177d3a1d84d640b9ebfdc67803037 WHIRLPOOL f40672d2adf8381ef60f1a98d3fe29d25cce6aa92549ff446f714e6ba6541581c41668507ae9313e0d7cc528e5b990544b42dee039844e2224aea2dda4e211eb EBUILD libvirt-1.1.2-r1.ebuild 12177 SHA256 5dace7992556f39d2edabe1b5b22c248342ef1a23ee80249225dbd56a5300a0b SHA512 c15f5b26e36e0c9d76570496d5c92d73089ee002d37b6c7b55e70234bac189b5052c7b84735433bb6dc3225654b0fccb4e449119d3250405019f8ab6e845a03c WHIRLPOOL de2343768f3a91749f9cb97a4ff3bea72ace005343ae462f53b3a609c08b93ac33c235427c009dc5eed714d6e922a58a27ed0a958dc8639fde268a94a54d3d16 EBUILD libvirt-1.1.2-r3.ebuild 12179 SHA256 e95c0ac3247197b6bf792b7b2019992900f993c5cec866fb280053a1783e4c43 SHA512 017c886cfbb267d44888130f2921a8a3f305e8f955ee5c5c46d8fffed3134ba05301d8a824c45bf09f926fd7bc7c7ef61dae17e6d2909d487970f43a8a984520 WHIRLPOOL 0dba1c2b61d8ba4991c037398f835fef5db3b47b89944c577f1d2cdd6c7a16a5b82ff93b46e7f8c4cf02abd7611f561384d9faad33e37e6517fb8ce8dcdb9de4 EBUILD libvirt-9999.ebuild 12208 SHA256 e1ea83ef974e4df786f5596bf4175837cb8f1831de4663563601407cb467350e SHA512 4f6e6fae2f3cd91d564a0e165f68549c2d1dc6041439069ada6413dcd52479f1fc555ddc551dcd3b9fd8cdd70bbfbc3d703deba48ecb11cee1a91669c97834ff WHIRLPOOL cf62713f0bd424483983c5c5cf2493c67d236b0831de1d6c7038b142098b48e3a7920ee024727b1d5da3c6d2f998907dafa29a9ae6ab517a835d2d957df56908 -MISC ChangeLog 12535 SHA256 7a66a811a76b0246de6e257fb637f44e8f337ca11bb59dd64ea2015565859f7e SHA512 00fc08e62561fe645a601c4f2f15841239c9d4c511b0636ceb17ef325f536ad07a668ccf11be612e5c0545dd3659cedf7a9d66dc3185ff33021aafe4941b9872 WHIRLPOOL c35f5ffb7469f904c2a0cc95f085fcd42047c18ca26fa73b8ec99a1d67965e5c82ece5061774c9cff029f2accd327d05f1d2943c3ce9157688f34ec224e00008 +MISC ChangeLog 12702 SHA256 2ee72e9cb471a5ad4f515d5b0e9740f51e23664d1430ba4bd6e5492588f44d85 SHA512 68a6e78c06df6ef4a0a351ca56de6c9cb097a851121da6660d6d90943d707b7f201be902ed4663e9943ffe6aa586954421ad0f7573affd155129b29462de2109 WHIRLPOOL dc9768e4ccc7a802cd80ac4c1960fd96c0434a043033fe980b88f2451324baf1e1d8f2bad12c2944fe7102c5d59b0813cbfa980352178101e26a14a594e9d2fc MISC metadata.xml 3534 SHA256 8678edfd233eaa04266d7e15f71102fb45d1e4843697ba0cd04fe57b45dbb6c6 SHA512 e4b2cc5f9001697b784034ae6e58fea39e9fdc223192772592bcb671a4e1436186ed7757fc72993ee81c1e4005502fbb8c0a2d4588666a186d42024a98c052a2 WHIRLPOOL 9f32ac2763d17e5204da7396eae2a8c79c63e1e82b4a1035c86d93c029902159d3f5697aad86b7307b6e8acee0a4f0f02023d0e5e824a471cdad80a5cebc6886 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iQF8BAEBCABmBQJSQcSKXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +iQF8BAEBCABmBQJSQexZXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE -N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvpDkH/RKWheMURihgyWC9dgTDSgv5 -rjCP47NYd0VGY2+kBLtvG4iafwRqr76bbBGyOOgdbMk40rLa3Aixj7Piq0DmILh6 -PXroXgXmIj38TTm3hj6Y92Wo0TsryFtF+tTbb+ZowIhUrrSynyETEXI5adPB9YEw -xibPYmruG6HNi85fgpceyhXzKlwXW+hWt9OPcnPNKRXNKF9sGC+V0F0sgp1X1G+1 -Lf6nPYYd+zCeHh484CJk+lAsCK20FzXoGubADpwB7pdei+S8MEekodpJCNbK6wVP -1FROLd4gt/7J8xONQOIvAbNLn2WZElfPObDeslprIeex+BCut5vlxTusMVCOATc= -=OKJH +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prveFMH/iuBxqL8Bxu3xFDSPvLS+q4F +pnfGwY3eEwYf/508x0cpk5SVNxOZv84mvmGZoru4m7hEHLc/OldNHwJx9x2tlvOW +gVBGDDrrX1lNiDlPxlOpO2q+p+6GLPeuAnRzNfCoJCt4O3SHgUsqloKVDh9WG7dG +s3lAOaUWKciUstamP8hWTbq4AJLQBB0MpXJVo7D5aevogirz2YJGRV5i23dJUB/U +egZxdesa+UFrzkP56wNLN86QXFKwawIY2i6McxZof+YqhO8NWfLucLFXs9kux7tC +1jmtjDw77fco3JNVxORtiZMk5UvDCzkcNhcF20r9l9NL35fk2+HPsnEARk++LwU= +=+YLb -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.0.5.6.ebuild b/app-emulation/libvirt/libvirt-1.0.5.6.ebuild new file mode 100644 index 000000000000..4ef44434b0cc --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.0.5.6.ebuild @@ -0,0 +1,433 @@ +# 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.6.ebuild,v 1.1 2013/09/24 19:47:19 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/perl + =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 +} |