diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-04-04 18:14:29 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-04-04 18:14:29 +0000 |
commit | 8d6f02097afad6a2ff756eb670df000547e98165 (patch) | |
tree | 9fb5a0a130a2f8a9c7d578f8b2b6f8f76e3b0f3d /app-emulation | |
parent | Tolerate --nodeps at beginning of stage1 for catalyst. (diff) | |
download | historical-8d6f02097afad6a2ff756eb670df000547e98165.tar.gz historical-8d6f02097afad6a2ff756eb670df000547e98165.tar.bz2 historical-8d6f02097afad6a2ff756eb670df000547e98165.zip |
Version bump
Package-Manager: portage-2.1.11.55/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.4.ebuild | 422 |
3 files changed, 439 insertions, 10 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index aab8ee61525b..bc30cf54fadb 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.261 2013/03/23 20:30:09 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.262 2013/04/04 18:14:18 cardoe Exp $ + +*libvirt-1.0.4 (04 Apr 2013) + + 04 Apr 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.4.ebuild: + Version bump 23 Mar 2013; Doug Goldstein <cardoe@gentoo.org> libvirt-9999.ebuild: Update the live ebuild with the fixes from recent releases. diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 3967a1a393d6..a02a5725a9df 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -10,23 +10,25 @@ DIST libvirt-1.0.2.tar.gz 22971729 SHA256 9b8c2752f78658b65ef1c608b3775be0978d60 DIST libvirt-1.0.3-2102e03d.tar.xz 4180 SHA256 a66e7b5f60461d203caa7fc38237d1742c6e550e9d8baa8835ea7df584cb70c0 SHA512 55c7c7fe7285ff399d2b13756653ebfe9a7e9e21ce2e9b91a366a7867ef10ffac9846dcf72af2941abd996efb9d115982f980abc88d1c629f0833c5e20f1f692 WHIRLPOOL 644ff645393367c69c97d19c73bc2e0e8eac8a219f67041ae0c44069a760e03527f77d41c7d37c2483896bfe4439f450fe35af64f6316fa634d947665f105149 DIST libvirt-1.0.3-9bf6bec4.tar.xz 7032 SHA256 841f062bd4185ac36a5633103c899d4ef5da6a2092ef1a2f7125298ec336b18b SHA512 7eeba343a27c4dbe5e984641082c6f8c59ba0c04a22c5a3e390c0bf03e65a966e7db15be732c61473d2dfb245bdd53f950d3a848980153b90310439b781bbcdc WHIRLPOOL 8d90ebc9fc17a7c8ac119f34b2e64679322878c0c8dd7eb837f2b5e89047b084ec87e9966841d0aaf7ed19e75548b9d5f5f66d461e2f177a5e817669471a27c8 DIST libvirt-1.0.3.tar.gz 23238381 SHA256 f64f4acd7cdcfc6ab5e803195ed58b949f262b54e3659d8c37b33f0fec112757 SHA512 f0002d40a018e22bd05c9bc990db0b14e0ec815613f54d04fc3b631081d87b6659620188da9f0ba376f290206d979467013274ab99b7394c66bde54c82e08fb4 WHIRLPOOL 29dad8e6b1e4d61fe83fc450436c0fdc200b360f93772c2fefe40ab443ec2a7cb6566e634d15290beb4f7ea1f461503b1cd86accddde59659ed46b60b56e3d76 +DIST libvirt-1.0.4.tar.gz 23353253 SHA256 d94c99ce286f5a89eb02c9f3d9d620930df1f9348262a60199b4a565a222c9a0 SHA512 5e867e48c12180840fcdfebb85e7349b704ae923cdb188d41009788d39ff64c25483e608805ccb0e91eee164c8c6e89ac08643649e495ad04668a11f7aa5a8f6 WHIRLPOOL cb44708897b485a5a63b2ae107d869c9deb09cbbb9288c32ee73cb513a6e895cf4ceae948719e449cf2f5eeed4b490e7c421dc2ea3bcec865a946a56f0a01e15 EBUILD libvirt-1.0.0.ebuild 11574 SHA256 1277354f747515fda62740224ff1d8dd967640d0ad3a3231aa292f8c42dc6e29 SHA512 2c55fe9f0dc27765aed9989ff624d3dd3b31d5d015eb666b53b5c9f8f156c9bd4aa904a0f2a1bc22771aab01d46c2ea56d066adcb6d2add9f18486f0b1bb75bf WHIRLPOOL 73e0d6892b78766ae5e744af6b822fc64e37fe3f4737b495e766f08902c9b26d6f6b833be49397a8aa4f26d37e02de62af3f7365f88ecc39eb3b93d5a5cb2d3c EBUILD libvirt-1.0.2-r2.ebuild 11904 SHA256 e23eab142c43e637887624cb7a4ac938628e2cc7b91334aae5dab6f79b45b0ee SHA512 10b89f40ea02f331edc37e224bcc9b82475b1a8a94dc4abef6f76a9576c16b4d23d0beb29f3b96577d16b60010cb73afa747cd69d35b6cdf4610acf09f338757 WHIRLPOOL c62d046708d2e389aff31ebfc779eb670a9dfa30bf04161a118b09a6623e2376d15c0d2df05f99a296fa1c5f762771426e26efd57e159f2801d019e44a1d9b38 EBUILD libvirt-1.0.3-r1.ebuild 11906 SHA256 8ad34603ca9f08a668c10a5b02fdad4b539fe497ab8f488e11c7072a5edc8263 SHA512 16361396f9584de6f5df6f8b6c8c616aaf61bcc256649f9fff8d9d5a1197dad37cbb68db8d072b7b6ae48693fc19b49e2339b4636f5a998c35e1cd54b5d888d2 WHIRLPOOL 5dbfc30285a7b243ff24e01535114bc35ab1b459a6ab246726bc9f923c0a745e3108c0484bd424167b184ae8b48d682a30eceb0b2f370328b9bd556b977237d6 EBUILD libvirt-1.0.3-r2.ebuild 11910 SHA256 fab604a30f2a525db79439beacc89b990213cbbf43e031bb10d00f58838a1206 SHA512 92666c1eeb93ed21dc71f22c3ac11e255504e7580efd0a74930b6e7bd35abba84fafe7989a140b68313445f6141b779b5190ff59e368444ac12ea881b2288ffe WHIRLPOOL 75def1c72897507250efc7aafb7eefa142c5fc4e78b34672cd4dd89e51fa896f109b441566d7c7f2ea7ef65b4fbac006390808e9ccbc19a5d6612d626aa47039 +EBUILD libvirt-1.0.4.ebuild 11908 SHA256 d25c856e3e04fbb23a4e15ff529bda489fe615cc699bd6f6eff27606d7e75bff SHA512 da272e4130879d83c1b0da9584f3b4252510dbef868a41728dd9fa61b736cecb1ebff63b8d713ee651349e1f11c19299a36bb8cc2bad7191e6a40ab0345c4cb5 WHIRLPOOL 2ea972b81d69013c71f48f32703fd103f21c3c569c9bd786f57cdf354512c4342cc0587b020b1c43bf8c11a3a6e4e038d54113e0862d7b4d7f17d3ce4bb6f116 EBUILD libvirt-9999.ebuild 11908 SHA256 1ec3af7be1f4c0866daa2873d195b73cd850d7a80023ae10bac53e1a045e9843 SHA512 4b79a1bad0107f4d733341b468ee1762822e98d0c6e8ac5b6181d24cc9fe6d68c0b42feb2f4644a96dc809bc6816defe16f52b0b724bb920f2edd809fd06c7b4 WHIRLPOOL b38f9cf2e3513f50d98eefbb43e437e5b7e426e38efaf76cac966e2e0161bfa0494757873d0c64ef7bef5bc91bb1e572f6e9a7e9bf584592ebc39ad21cb59586 -MISC ChangeLog 1881 SHA256 bf177936beed05c7d31bcfe24bf516510580c66d6206d9d542e57303346413f1 SHA512 09e313e7901aa497f81a389ba408f95d1f5dbe5c2a7a4cce456e734252e89ccaf12d8b09233c71703f4eb29beaea2d0e2214a75407c4dc0ee77e751806d95997 WHIRLPOOL 7f6f48ca3b12d76c19b930d79dbe5be9a015fec900e6ca53234f1e399408a6a220b08cfb1a1db24306e0b2c1c139020f3e645cb03d06c7d8ab9be5d7b12b40e4 +MISC ChangeLog 2000 SHA256 d32661565f4100e7f999d734ce59f9b6ed908c23a82da8283341ce3742044b1a SHA512 9db5999825f2c13fd51e8706f7b17f7e5b43f19c1f0d6c5d8248246abf6dda57867b7ba5398cf3303ee50fb14f04f8ce720837ac3a488a8cb7146edd7f72f14b WHIRLPOOL 30c57b8112e1a5ec3668f5cf35554dbaf12bd21b52f3299303030a97ed18f627b70b3e1a4e8d1e6eb43cb62a82fd39e092fd9b4055c23b57321d2304a38a97d7 MISC metadata.xml 3518 SHA256 b4d7597acd9441b02afd05f1f4d51522f657f9ecafc9a77c66e1633b4991ee8a SHA512 f5fbd24db303d44b0801d5ea78815c169a668d090e039450979b495e00a852a8fbc8bf3bd65534cfcdb7540834af3f1496ce2a9abf449e39f83975b6892a6d87 WHIRLPOOL 086aa2e815bc5bb2ad8a0c54b6d1522e40b5c60662839c5792f7f96e03af9f5706a195f2c940ed82d04267ed8c0d40838326fb714848be006fac8982ecd80485 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQF8BAEBCABmBQJRThDWXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +iQF8BAEBCABmBQJRXcL/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE -N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvR3AH/01f3Hn9FquhzoLrHBGniDDM -g/gRger6ggQ58TSu55shV8AjBKcE6FDnskVqQK2LIGcxu1k/WK8j2KSP990lzIse -18aAhHYBYhU00XWHkHnp+aBChTUcy5MIBdzT4+X69fG+7C94x2eZRlEwx5lFq19h -JYvxSHfPMhC0WJPx/lDTJ/v6VT3ZsOOD8MoXISD7JbE7xuF5Rys5EuE1RFmI2rPY -A30Q5CHyq+uVHj3dPI/Ui+ouaIhy5rrEhpVZLv1ix9dzRnVhzNuevfjbeEMVAl7L -KfLPvsd2RlVRfGQatndG3nazC6yNaoBZgnuAGPXxoLCCEtcrd4RTNYZm0j38IXI= -=X8Qo +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvwSMH/RTHqlz3B8rFKVvetz3Y35t9 +OIoTDq9ZI05j2dRH0hJnW6Vgv7vUvwJRUJwAequ0x2KHa8dI4FoN4fxdjERQ7VbA +UAP9YM9UdtsR++QGubRU+ktveav3zaLm/Tu80AJWWeF5zkAe3UI01NBAoQQPs/zI +gcCHg99DBNZsjJNWZVlNE+LXXwsGuC9VmH7Q37F/ZT/HurIIBVMo62k2FlkzJMwi +V9t8eGux9b/VSvsXfhHu8umUxkCAW6y27DGvAIfkQ5RgBMjVTKqUqEfDuqBcuujI +9wfyKTSY0/4cQlu3b/I7FcJyn0KHtSVkD1vbmuWdX7tj7IINney5picwKxENET4= +=lAr2 -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.0.4.ebuild b/app-emulation/libvirt/libvirt-1.0.4.ebuild new file mode 100644 index 000000000000..f1de9e9a1f83 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.0.4.ebuild @@ -0,0 +1,422 @@ +# 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.4.ebuild,v 1.1 2013/04/04 18:14:18 cardoe Exp $ + +EAPI=5 + +#BACKPORTS=9bf6bec4 +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 + +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" +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 + ~CPUSETS + ~CGROUP_CPUACCT + ~RESOURCE_COUNTERS + ~CGROUP_SCHED + ~BLK_CGROUP + ~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 + ~NETFILTER_ADVANCED + ~NETFILTER_XT_TARGET_CHECKSUM +" + +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 5 && LXC_CONFIG_CHECK+=" ~USER_NS" + kernel_is lt 3 6 && LXC_CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" || \ + LXC_CONFIG_CHECK+=" ~MEMCG" + + 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-r11" "${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" + + # 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 \ + || 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 "${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 +} |