summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2015-06-14 15:40:09 +0000
committerMatthias Maier <tamiko@gentoo.org>2015-06-14 15:40:09 +0000
commit4ee7677929e4b1bda239dafdabbb1ebf820f5d7c (patch)
tree8853f1d2c2e3a5e9c3d45667c02ec8be82b012b3 /app-emulation
parentVersion bump. Add ruby22 target. (diff)
downloadhistorical-4ee7677929e4b1bda239dafdabbb1ebf820f5d7c.tar.gz
historical-4ee7677929e4b1bda239dafdabbb1ebf820f5d7c.tar.bz2
historical-4ee7677929e4b1bda239dafdabbb1ebf820f5d7c.zip
version bump, bug #550992, thanks to Thomas Stein for reporting
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0xBD3A97A3
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog7
-rw-r--r--app-emulation/libvirt/Manifest30
-rw-r--r--app-emulation/libvirt/libvirt-1.2.16.ebuild465
3 files changed, 487 insertions, 15 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index 6552b6dbcd82..6579a7f1b6ae 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.428 2015/05/24 21:05:42 tamiko Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.429 2015/06/14 15:39:58 tamiko Exp $
+
+*libvirt-1.2.16 (14 Jun 2015)
+
+ 14 Jun 2015; Matthias Maier <tamiko@gentoo.org> +libvirt-1.2.16.ebuild:
+ version bump, bug #550992, thanks to Thomas Stein for reporting
*libvirt-1.2.15-r1 (24 May 2015)
*libvirt-1.2.12-r2 (24 May 2015)
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index 088630368cae..52c747a080c1 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -18,6 +18,7 @@ DIST libvirt-1.2.12.tar.gz 30710487 SHA256 eff5227f774560d97f0b44402a444e821c51e
DIST libvirt-1.2.14-20150524.tar.xz 2404 SHA256 5f2bafd9643c1aca78390400ecd88222ae88882ac11f43bbf0e5e8a25f380738 SHA512 4656d8e215514d3afd35ab06f5a2d653591d38cfd09f164cabfa078b86b13a48d5333654fc53ad62b32d04e0339b742a9aeeecbf007c3df8f5fbb35d739ecde3 WHIRLPOOL 2df415ab668e37a6cfe797780bba896f398fa1cdd79257b26e6670e080c36d99b248a1033a33677eeab164d0ca16bca3b2f62085fd4edb171ba410599819dbee
DIST libvirt-1.2.14.tar.gz 28947850 SHA256 b8e8e6f1fc91eb8694fa21f9c57a736fa4a5af10562e14e4aa2c7e23510c4c07 SHA512 ea5a68211ce3940f73444777ae5e2c8de7405df3e1a78d2871a9e18591bc8bf036288a6733da5ab23180b6ed88e03347e898554a46c0ad440da48590b32340ad WHIRLPOOL 8a9791a780c3daa416abeff711a9204093b4f979a2bb1ee8d2adb93f033b48ff3c576811b1f8d943a3f93a95cab9592293d9b4309f11eb2b16515b32cf5cc033
DIST libvirt-1.2.15.tar.gz 29094868 SHA256 5f88041b8c212f8f687c672fe583108833240d6175b512ce4de92ab6660194c6 SHA512 c5dd3af86e89e3804d6c3b527c6dbd98c79d87d2591725a13af33530e0e9a9a2e9aeb9491844469d44ec4f4d17adb036c76391f964158ada23ec042a75556fbc WHIRLPOOL a43aad4caeff707c8d7a6872ff3c46911c96fd90ece02a7f6ceabb4ccd00e467b5341ab9d922912cc2968a2bb8826e970b253b257c5a8981b37364550f9b3616
+DIST libvirt-1.2.16.tar.gz 29157627 SHA256 419bee553442024b9ee8a1fa94023b1189bb52b7c3021fa37d8e4c108490060d SHA512 ad2892d143b28784146191ec0c4e3fc1f3d246b51c39c8bcdfc6ecff59a4021b94277fc14cef04436046d3614baeb4edff753d0158c5da35cbb718ab8692950b WHIRLPOOL c48cb4f4e4be0994600f924d616112e112bd3a9a695cede70512995b4d563c92f82918298313472c440751213c893cbdc54d54b2e175b969df157bd486ef7207
EBUILD libvirt-1.2.10-r4.ebuild 12915 SHA256 352ce0ac69cdff431d5aeb68d0f73158f726eef46c6fd1ccac6a270c72076736 SHA512 609609bc7db8fcf1ada6861ef5db2838517f5f9990f8f15584aa4dafae0e9d5cb5233f5ed48a625d43f397c174f1bc8c7b9578abd5a4475414a5d73fbd3d7968 WHIRLPOOL d9ae46d78532dc25f172854ce80b8f99d7499f17911feb320c368a6694d71109eaf1d542c121033df1dcccf81379e83458c2aac343522ed5d3e971da447976b5
EBUILD libvirt-1.2.10-r6.ebuild 12938 SHA256 f7df596c03f06d4c54c299113de0665ef3e9b7f53453684d594956e9a1a83e4e SHA512 6938956d4c8df04b488494c35ba2e9cdfcfb20f5527d8d37eca893883f9ac2b3e62d593c82047912c9897f4d72935c757f3dab5df3baa9c94243d847c7e83e7d WHIRLPOOL 692a584aefbed4f39f3894ee330ed5fac519ae5aa004c5c55745ffb5448c0e2ff1702c08b78f1fb1323dcd9b77a851f6c95076cd0bb2dbf0c931c31de80b4c79
EBUILD libvirt-1.2.12-r2.ebuild 13031 SHA256 c2c352e932bc837b3568f0df8f9a9812f59a96474015a6f076f841fc28e0b550 SHA512 0e19b30203b71f2fd0d40a33f519f67ed9a14c28a4594d0136f355ce6e11cc60c51650564ccdb9bc69f377dade8747c5e3a5f23277bbeb767187f9e9425bedae WHIRLPOOL 5e482e3acd71c51344149d73789acb4d7b668f2046cc29ed0e22a081ac7c70b9ecfdeef135c231b49643053425ab6a03580e02299dbf2ed7709d750bc44deb94
@@ -25,23 +26,24 @@ EBUILD libvirt-1.2.12.ebuild 12997 SHA256 3e9f2b3d54ca10193aa2d52295d725e31066e8
EBUILD libvirt-1.2.14-r2.ebuild 13131 SHA256 7978f6a672ecd2afb2dc9d10247a0476a5a28b08d79d8cf2a5cffbdeacf2b0cf SHA512 574154434fa1982a2c7e06f1c7d8f1edb77db26016f58d88cc4512970b61b3ca3639a6e759ce06d96140ae7294db94ed69759cc7e5e0de88d375a174ff7ade75 WHIRLPOOL c60aedc9f46d9a4db5043eddce4493ef285397d4789750951c6d41a564755448592324f48a04fc1e59571faaa52fea4eb92717eece90aed86078213bbcd1f811
EBUILD libvirt-1.2.14-r3.ebuild 13144 SHA256 1e00042fc1a72d50ad0e5160f04fa719ee321d4698d389af48770bc98f5ce59c SHA512 4af27fda665f4bab06ebaaecab3e25d90f7570e5cf7c4e25f33c7c7e03c6542d2775ff1c3acf86dae3afdee5427f4dae16f5d6ab37a984b090b59a048cf14f80 WHIRLPOOL 058a6074ad6a3474c0924ec0c5e92959f9f6cbd5f35d4b68b89fd380b1bc94a0e9996814a77751a36e05a1c730b2472d8130c820c321218f6b017807a0d7ff83
EBUILD libvirt-1.2.15-r1.ebuild 13136 SHA256 b56858fc905b375002cd7d5f11d312132cb3d58eb039231ce54da7ed3ade2f20 SHA512 488972b16939ccd7b53c86884931d2d3ae8734ae555a7ffceee06679b46805bb4991fd2f99420a0045bbbc4235d7cb22597bbe8fca329fc2e00e16b79fc89918 WHIRLPOOL 606389efea8a1e761258e64d64a45068de25e1ceb47c424d5979e4a23ce6b7a9ead9a3d510a59ca03bac6278ed124af310fe47799cd01fee4042a147eef634ce
+EBUILD libvirt-1.2.16.ebuild 13133 SHA256 d0a816d07aea85ebe3db6683ab4c9ff965687e99b9cfae3d00ab17fd40ca9a0b SHA512 830e7817c603a27be9ed5e4172cfb24886f1a75c9650fb5d511254134708483de9bbb71c910c879ebb3296559067305919fc29d967953aeaf260f373e725972c WHIRLPOOL ca2181288c40945b961d1c94b40a28652a0bc8a0738fa5f3ed8e31a997983e377323c68bf81936ef2d4f1f91f5ee0cffc1a718b43e52acf8de3570548cf85325
EBUILD libvirt-9999.ebuild 13092 SHA256 53430ab82678257e62c86e5d13e4811476e0d3ad4a5f1050c2920c50a590d1f9 SHA512 bf468105ef362ec939be0bd7990da535b4e16070627e2a4b83ce96207b5db5110647b94b6e3c91bff4d5b3f60b0818b0a83d4552459c6468c83bc17d0ca16d03 WHIRLPOOL ab383f95df310af2e4c42c03318e7a4788b5f765b6390e1ed3e70852c88c223db94290c8025dee2aa047ae4c8817dbe9c5803a6c7a451310df2eeef9331b91ac
-MISC ChangeLog 29782 SHA256 14aef6989328ab4be1511c8857c6c18cd8a12c15fb5db5a40da047a901bb6ec5 SHA512 b7e88d90936a240bd7b33e2c1e50c29fa5b5153b2b00399c62e1b1cea7fcedfa7bd0827fba01449e7e1912c9da1904da26684a18888795eaa485fd642ebaa5fc WHIRLPOOL 13deca1fb16abcc80823412384b91718a55358baf65e26bae864a871a38f95b13afee753e7cb2d6f7e5e344311f774e946c9ceae4994324fde0b2f56ed4321f1
+MISC ChangeLog 29954 SHA256 b10c11ebffafd299662436e7adbfafb711771a4a1893fa345bbd5b267f9c5e7b SHA512 9b3cddc1c428b5d2bb0f34ffcdb81be9f6b9e924fd811d6a50497c815b84980e3063519cbf69594b656cbfdea1b29410bf3e3c60bc8fc12f7f0b7e3ddb631773 WHIRLPOOL 9f623615e83f7a400ccd1793b138f446da25b3ae9ffbeb1c68beaa02fca75af9ae4640de778f8e2025a16a12a65d5dc7e73cf8eb1ef58f782b60c0b7b5da6da2
MISC metadata.xml 3604 SHA256 90d98bcf32df9c4ff5d3fc90cdcac46ddc486efa9706b945cbf749d4a1ddcd30 SHA512 35b1fd9faa961efddec324d3721699068b9b2aefb49271f064b3930c9c246a71829f55566438754c34f294db9b8c2ad55386113a72ab11b31cbb604e4afe7816 WHIRLPOOL 6315f8a01134f62a1f7b9845f0e89624bb1edd713b4965a53209b199609ba4f510f0cbb4ee85f348947556cdeee27ab7ae7fcf52b1b9ed82176076d149c00116
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1
-iQIcBAEBCAAGBQJVYj0mAAoJELhOzYlK7nn/BsAP/AjPzibZio5ZnSSfaYPJhj81
-KmQ5A4BXGLOx/ted9JxUiiA3JSp4wfyE4CsuPHnu4+iwq64xfT4wP6r21zNzeAxf
-OsExDuhma3yEWliiZZCMsoArzttC0vMQ05UeycS8PPCaY24kMue24QtSBti6w0hc
-hDKlyXe+w4N8XFRbvYVtv7Bj8SY1iEwbW1aVE2rMr+xhWyLxi2KaWIf7FhNVbyGS
-e9SKIT+V3gcJWM2pJLrgCCFM3rxCcCXnCyfgp5wCAIQdQpgH2twcrDD3qDFn0L6z
-g9Y+dDjeITzUJIMCh8pv9f0xncBm94GBg6ugB779U5ExmXzbNH4FZieUhpT+mmmc
-GHY92QL5+aXmqpG0C3GNHAOlhr7FMGBtD8knN4/KKvXTkXSVe5+trKFNC8J3Kt1u
-SnZbpU79UFAfIcpBmbIrtgSvS1r0nxyq0DVXwfX7e7cO2j1OUHddFWljUijfLK3S
-0mdN/rviCM8P2xCiIUpCBBvse3CguY/y6t/gWsA1pOzVA4LtGN+cax5Oc3CfLRUD
-eC5BvMIXeXYdNXVEPUL2c643m5rWRXVKrCqglJnUb2Z1LhEjtt1hpUKNm6Gs03Hq
-rwtmq6kSbCc6BqSq0D6UaBXQ67AEFP/YqLXExBfRjtf/DF55is0G+jH47pmNrmhm
-IgZwqPAcpzK8m3emUq9/
-=jZWg
+iQIcBAEBCAAGBQJVfaBQAAoJELhOzYlK7nn/AJEP/3FGepp7vPR/8cGmDGV8TqYp
+udrCJmeESwfoWjGybRYtqw4fWAltaATIitMMk0c3v6E4hmcE61dS87CtexnVwoja
+i/WBLl42o99GjvCiPSsk5hgAAikUJ92sBM4Zq0XJq2zb0rF4awezIRFxkgPWSit1
+QRhAJXkbXeCSPFlyjSkwT+SvKTERJx9y0JG7aJrtenGKKcZ3qlOSJKvsUMTSluBY
+gegbB4oWNUO8avEqa8srMDzvNAKq8ZZN+WPvXLPcRQzFrkttUDxc+PxCMTisR9fR
+dJVUWwToS/o3jvwcVXZanVJzTuKE2MH2EockcfMV1Cyerwc4VzC1SXztnxut7IW2
+COFJp369zTmJs5IpjJkR9vSmNRDLxvgumAET5KvRACnCp3XGHWKJKPj7Ho+Mqyt3
+8ga2gwEhV0LFFXe0p/B4IUe4XNkJWg+c3onzDTrhH1YWXFPJnvMl0h9agw2uAktj
+NvB5Sy0xWQ38JbIcTMT4i1uqp56EdHp+eZNDGwh7zS1pk3eHUUsk8d6FCL+spvLH
+LD3/+Q5glFWBcR7BSlSH0KXLRUei8fq0J/eURyMVyWymX7+AI7aoOZIuMQuRPsu5
+OJYyLryvTIbahbomoqyel1rcXs+eHFovJK1EU9CDHzqnHR4SkXzCnR6XPL+ga6pb
+DaPtubup4XY+Q6wEz7Zw
+=oG8X
-----END PGP SIGNATURE-----
diff --git a/app-emulation/libvirt/libvirt-1.2.16.ebuild b/app-emulation/libvirt/libvirt-1.2.16.ebuild
new file mode 100644
index 000000000000..c9d1257e8cb5
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-1.2.16.ebuild
@@ -0,0 +1,465 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-1.2.16.ebuild,v 1.1 2015/06/14 15:39:58 tamiko Exp $
+
+EAPI=5
+
+AUTOTOOLIZE=yes
+
+MY_P="${P/_rc/-rc}"
+
+inherit eutils user autotools linux-info systemd readme.gentoo
+
+BACKPORTS=""
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://libvirt.org/libvirt.git"
+ SRC_URI=""
+ KEYWORDS=""
+ SLOT="0"
+else
+ # Versions with 4 numbers are stable updates:
+ if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
+ SRC_URI="http://libvirt.org/sources/stable_updates/${MY_P}.tar.gz"
+ else
+ SRC_URI="http://libvirt.org/sources/${MY_P}.tar.gz"
+ fi
+ SRC_URI+=" ${BACKPORTS:+
+ http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz
+ http://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}"
+ KEYWORDS="~amd64 ~x86"
+ SLOT="0/${PV}"
+fi
+S="${WORKDIR}/${P%_rc*}"
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="http://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+# TODO: Reenable IUSE wireshark-plugins
+IUSE="audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm lxc \
+ +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \
+ selinux +udev uml +vepa virtualbox virt-network wireshark-plugins 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:0
+ >=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 )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
+ iscsi? ( sys-block/open-iscsi )
+ lxc? ( !systemd? ( 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
+ !systemd? ( sys-power/pm-utils )
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ systemd? ( sys-apps/systemd )
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
+ wireshark-plugins? ( net-analyzer/wireshark:= )
+ xen? ( app-emulation/xen-tools app-emulation/xen )
+ udev? ( virtual/udev >=x11-libs/libpciaccess-0.10.9 )
+ virt-network? ( net-dns/dnsmasq[script]
+ >=net-firewall/iptables-1.4.10[ipv6]
+ 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 ) )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-text/xhtml1
+ dev-lang/perl
+ dev-perl/XML-XPath
+ 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
+ ~CGROUP_NET_PRIO
+ ~CPUSETS
+ ~RESOURCE_COUNTERS
+ ~NAMESPACES
+ ~UTS_NS
+ ~IPC_NS
+ ~PID_NS
+ ~NET_NS
+ ~USER_NS
+ ~DEVPTS_MULTIPLE_INSTANCES
+ ~VETH
+ ~MACVLAN
+ ~POSIX_MQUEUE
+ ~SECURITYFS
+ ~!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
+"
+
+BWLMT_CONFIG_CHECK="
+ ~BRIDGE_EBT_T_NAT
+ ~NET_SCH_HTB
+ ~NET_SCH_SFQ
+ ~NET_SCH_INGRESS
+ ~NET_CLS_FW
+ ~NET_CLS_U32
+ ~NET_ACT_POLICE
+"
+
+MACVTAP_CONFIG_CHECK=" ~MACVTAP"
+
+LVM_CONFIG_CHECK=" ~BLK_DEV_DM ~DM_SNAPSHOT ~DM_MULTIPATH"
+
+ERROR_USER_NS="Optional depending on LXC configuration."
+
+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 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}"
+ # Bandwidth Limiting Support
+ use virt-network && CONFIG_CHECK+="${BWLMT_CONFIG_CHECK}"
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ touch "${S}/.mailmap"
+
+ 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 "${FILESDIR}"/${PN}-1.2.9-do_not_use_sysconf.patch
+
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \
+ EPATCH_SOURCE="${WORKDIR}/patches" epatch
+
+ 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-r14" "${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+=" $(use_with libvirtd)"
+
+ ## enable/disable the daemon using avahi to find VMs
+ myconf+=" $(use_with avahi)"
+
+ ## hypervisors on the local host
+ 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+=" $(use_with openvz)"
+ myconf+=" $(use_with lxc)"
+ if use virtualbox && has_version app-emulation/virtualbox-ose; then
+ myconf+=" --with-vbox=/usr/lib/virtualbox-ose/"
+ else
+ myconf+=" $(use_with virtualbox vbox)"
+ fi
+ myconf+=" $(use_with uml)"
+ myconf+=" $(use_with qemu)"
+ myconf+=" $(use_with qemu yajl)" # Use QMP over HMP
+ myconf+=" $(use_with phyp)"
+ myconf+=" --with-esx"
+ myconf+=" --with-vmware"
+
+ ## additional host drivers
+ myconf+=" $(use_with virt-network network)"
+ myconf+=" --with-storage-fs"
+ myconf+=" $(use_with lvm storage-lvm)"
+ myconf+=" $(use_with iscsi storage-iscsi)"
+ myconf+=" $(use_with parted storage-disk)"
+ mycond+=" $(use_with glusterfs)"
+ mycond+=" $(use_with glusterfs storage-gluster)"
+ myconf+=" $(use_with lvm storage-mpath)"
+ myconf+=" $(use_with rbd storage-rbd)"
+ myconf+=" $(use_with numa numactl)"
+ myconf+=" $(use_with numa numad)"
+ myconf+=" $(use_with selinux)"
+ myconf+=" $(use_with fuse)"
+
+ # udev for device support details
+ myconf+=" $(use_with udev)"
+ myconf+=" --without-hal"
+
+ # linux capability support so we don't need privileged accounts
+ myconf+=" $(use_with caps capng)"
+
+ ## auth stuff
+ myconf+=" $(use_with policykit polkit)"
+ myconf+=" $(use_with sasl)"
+
+ # network bits
+ myconf+=" $(use_with macvtap)"
+ myconf+=" $(use_with pcap libpcap)"
+ myconf+=" $(use_with vepa virtualport)"
+ myconf+=" $(use_with firewalld)"
+
+ ## other
+ myconf+=" $(use_enable nls)"
+
+ # user privilege bits fir qemu/kvm
+ if use caps; then
+ myconf+=" --with-qemu-user=qemu"
+ myconf+=" --with-qemu-group=qemu"
+ else
+ myconf+=" --with-qemu-user=root"
+ myconf+=" --with-qemu-group=root"
+ fi
+
+ # audit support
+ myconf+=" $(use_with audit)"
+
+ # wireshark dissector
+ myconf+=" $(use_with wireshark-plugins wireshark-dissector)"
+
+ ## stuff we don't yet support
+ myconf+=" --without-netcf"
+
+ # locking support
+ myconf+=" --without-sanlock"
+
+ # systemd unit files
+ myconf+=" $(use_with systemd systemd-daemon)"
+ use systemd && 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 \
+ --disable-werror \
+ --with-remote \
+ --docdir=/usr/share/doc/${PF} \
+ --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
+
+ # Remove bogus, empty directories. They are either not used, or
+ # libvirtd is able to create them on demand
+ rm -rf "${D}"/etc/sysconf
+ rm -rf "${D}"/var/cache
+ rm -rf "${D}"/var/run
+ rm -rf "${D}"/var/log
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ use systemd && systemd_install_serviced \
+ "${FILESDIR}"/libvirtd.service.conf libvirtd.service
+
+ systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
+
+ newinitd "${S}/libvirtd.init" libvirtd || die
+ newconfd "${FILESDIR}/libvirtd.confd-r4" libvirtd || die
+ newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
+
+ 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
+
+ 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
+
+ if [[ -n "${REPLACING_VERSIONS}" ]]; then
+ elog ""
+ elog "The systemd service-file configuration under /etc/sysconfig has"
+ elog "been removed. Please use"
+ elog " /etc/systemd/system/libvirtd.service.d/00gentoo.conf"
+ elog "to control the '--listen' parameter for libvirtd. The configuration"
+ elog "for the libvirt-guests.service is now found under"
+ elog " /etc/libvirt/libvirt-guests.conf"
+ elog "The openrc configuration has not been changed. Thus no action is"
+ elog "required for the openrc service manager."
+ elog ""
+ fi
+}