diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-12-03 18:35:43 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-12-03 18:35:43 +0000 |
commit | 52cf05bc20b87074d210ae823848182df26b574f (patch) | |
tree | 5c3105ff92a6106c5c1e8691f9b4dbd2d7017dcc /app-emulation | |
parent | x86 stable, bug #482298 (diff) | |
download | historical-52cf05bc20b87074d210ae823848182df26b574f.tar.gz historical-52cf05bc20b87074d210ae823848182df26b574f.tar.bz2 historical-52cf05bc20b87074d210ae823848182df26b574f.zip |
Version bump. Python bindings are now in their own package called dev-python/libvirt-python. Update the live ebuild to the latest changes from 1.2.0.
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xD7DFA8D318FA9AEF!
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/libvirt/ChangeLog | 9 | ||||
-rw-r--r-- | app-emulation/libvirt/Manifest | 18 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-1.2.0.ebuild | 426 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-9999.ebuild | 53 |
4 files changed, 471 insertions, 35 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog index cb04fc1b5e81..7e40dbd98f7b 100644 --- a/app-emulation/libvirt/ChangeLog +++ b/app-emulation/libvirt/ChangeLog @@ -1,6 +1,13 @@ # 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.341 2013/11/11 03:41:44 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.342 2013/12/03 18:35:31 cardoe Exp $ + +*libvirt-1.2.0 (03 Dec 2013) + + 03 Dec 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.2.0.ebuild, + libvirt-9999.ebuild: + Version bump. Python bindings are now in their own package called dev-python + /libvirt-python. Update the live ebuild to the latest changes from 1.2.0. 11 Nov 2013; Mike Gilbert <floppym@gentoo.org> libvirt-1.1.4.ebuild, libvirt-9999.ebuild: diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 928ed32c496d..ed47103e86c5 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -10,18 +10,26 @@ DIST libvirt-1.1.3-062ad8b2.tar.xz 18836 SHA256 a16a72d9cc6b49564e234b39f94a987e DIST libvirt-1.1.3.1.tar.gz 26595900 SHA256 00383e0beef1854610d8d47fd9347564b3654ce0e4a263e06b0de364a118c93e SHA512 59f79d0fc52ae0c9ae97bcc8fd90f799d6daf63c9a36d38738ec7d7392e630e39347f0c472b02434e83888b3ee0ab62d2b0b4eaa92eed3102ff36ca30f2598aa WHIRLPOOL 92be678e7ef84f9437bb91b1a621e6b35f9ce1383b945e466b4b864c0df1cfb95900da6267263bb1984663ea8e2b5b358bd516748a934835a87be822f5d27e90 DIST libvirt-1.1.3.tar.gz 26578000 SHA256 af83e65b4b26520662ddd183c1358be0d05138dba3e66745419f06441eff5a7c SHA512 895f8ccf1fdf7a36918e4d460b44b1bf67d06842e39142c89c620f6191e299b53c50f80ab47677d7cba6bd570177d79b5ee0d7d2a11472991590389db51fab9d WHIRLPOOL c046f1182976bbd6bf65b460b2017996e63f67b5cce44f0af859d90f892278d0236192e6e7172e16c85183da6e258a003d9c8757af2079ab4d77de9ca300d986 DIST libvirt-1.1.4.tar.gz 26799019 SHA256 5910f5cf607a50c606d959e6b1e5d6e67966b7aa7324982afd7f85d9c24bd98f SHA512 64455585b8d7e5c0f701e9803ae00d277ee27f9bec92b9890e487cd0298f5f8ff9075d0b2bc81be67e8d8e03bfe58eb2e4fd6292439acd9d22a3f3e7f5b87efc WHIRLPOOL c8de6024b51988415847463064ccf2bcc9d7cb42be8765fbfcf901b594d963351f312d962ca4fb2a5ecce7c2247a60b6201e57a41ba44caa6211148585d65352 +DIST libvirt-1.2.0.tar.gz 26916717 SHA256 a8e578ae7861db2ac5f454073293d2ef3229fd3f6c4f9029101763244db22ddd SHA512 834274b0249eb39439d21cd9b494fa2acbaee9e5337557b8d57977b483f3e5d00fd0a6743f8f4a02e826114c15d2468ab0c9385e4e4c9537abba18da3d8c5fa6 WHIRLPOOL 057a91ad4296710833721d3a7f9eff616755422462479709b72e5fe679ed8825c5bbfd47fde9f7abaf1e6f4104a680ad874c41bf9759cf45ac7d863061a38cd0 EBUILD libvirt-1.0.5.6.ebuild 12203 SHA256 76c27356932b38556846b16aa48a3c9f2cc7eef96b63a9811fee508bfe13a321 SHA512 9c0cb354ca8692999c60e3dc59086e7a50340115e9cb9aa53dde50fe0b31dce38283afd6933611e6285a8175331b98db545a93e4d6ab200cc4febe4e9cc14b68 WHIRLPOOL 8d728ec87a9ae26e062124c845045f6fe67a5aff40b5c99dfdf701de0c02e4616f9c882b9bb47ff5ee2f9cd4d53e3c308abf226f1c532bf21619a5130faa808f EBUILD libvirt-1.1.3-r1.ebuild 12174 SHA256 9431604bfc84faa8384a5735a94520fd6f7003f7f2e6745ef940e3033b25487f SHA512 eac6c9b1d7f5d1d5e10145b7d00f8f30ae7851128769a1a6aecd5265bddfb274e9f40d19d0c59f12caa55a9af047cfcb1eda4c4da490bbae1dca5090573930e8 WHIRLPOOL 33046a59ff42a54001a5d115494d02ae19d5e208e82d435cfaab3ee57a094cd07f9c4df2e0ed454abccfa5c84cacf62ae96b72139a831e79b2dc068b90b68f99 EBUILD libvirt-1.1.3-r2.ebuild 12235 SHA256 41b97566f7eb6ec1dae8d990a95bbc8b58730a6a3b7bbfbb613cfce39604998d SHA512 8b97c87d96f4b7e760fafc1143de83b26f9bfd9960d7d1e64dda11669c99d7da2ba8e00701f9957bad42df1f5de2ba96c6b5b16e30d4a5935f8766a7dfe368bf WHIRLPOOL 8a2768d371ee42ba022c4eab51886ff30bd469624bb97fb48b35d8e5944d75256c735491bd3d192629cda0c302e698a49abf71fafd50d1e2436335d0f2aeacc0 EBUILD libvirt-1.1.3.1.ebuild 12250 SHA256 e88c8b4c126ceca6d8b1b54e5e9a62f54d9ab76eb8bdcaf89bfd54e96a9bd50f SHA512 e9b6a4dfaf422ec4659ef6bf2c640fab130dbc821d08e9374a3d5047daa4241c57dcfa83ee5b16d96b53aca7789579071ee66d07b69991ad8a8819083fb72144 WHIRLPOOL 78d8e353efb53f5c88a27756ca9131bb971751e445fe91d68791bf108ac9a0ad01ad7ad92b42ab8e3fd102603143b0b9a3634edd43fe8e698f72e92b346ee29b EBUILD libvirt-1.1.4.ebuild 12248 SHA256 09025e92efbd85ac651ec092aafec34981394dd6363d0aa93476d3b5d356fbfb SHA512 f009c470a40fa60aacc341b7cffe40b74d14c8d06cbf5721a3d02aef2ffe6d7697263e32eeef39e05e8913983424e3bda5f5d27bc66ae4a7755e3614f1dadfbe WHIRLPOOL a8c8dfd15f04f61afc5d9927a1fe6894269b5601391bd6f39d9b4b51f3a13ad188413849f1098f13e8c6c97a1dbab48fbaa6131d22e8ca2fcdcf76d77986ffe8 -EBUILD libvirt-9999.ebuild 12223 SHA256 70e00441d34ec79fc3e0b539af7a2f1ab6e0cd713954c423f4c8dae542cc6cd1 SHA512 fa18027e369115631a61f97723cd8616a6ef09bad67b9c1232c9b0b42dff878412275a9b65579480a17ffe59d8b4795cece468df37ae16f7c54f0e47826b3713 WHIRLPOOL ff272d88d6fd784e2cbed80ab03e3438056caf4f7f4aa49c79ae9aec6055636f9580d3d90aea8ed4082e9620869e205023a15e8bd64111f3588d018686a679ef -MISC ChangeLog 14576 SHA256 33778ad3d47d5f1111610b725b26a1d192010d68d0b60c81a0e508e8d266e7c7 SHA512 91765e847ad84531cfa54e919e3b9b23e9d265cf4608f97c2b28aa459d44c8f13443e939cddea978045bed67d11dd2bce8a98e86b4fd1a73760049cb75f8b159 WHIRLPOOL f6b013971abc44ea35fdc369d5a5f0c80691f44f5ee181bb6cbf1aa102eff52ec5ac42950ca50fbec648aebea8ba8ac80d6fb8ed49bf2f6100822631fc9598ce +EBUILD libvirt-1.2.0.ebuild 12068 SHA256 bf01e45eef81340dc6c925ee4ee53c8b82c02a4a8c885d075ee72dfeaf996877 SHA512 1f660bf1bf5f92c3c3e5b095a1ba4037882419f39007609d451540e10673948f1a3002a28d0c5c5ced3315ddba0deea27601fc2d47698dea15e8ccfa84b2f669 WHIRLPOOL 07743d8fd1f9fa6b5fc6ac6c56fcd2b807f8daaee5497942f910ceedc130381738b581bb0a1bd876786a822f53509f4c85e25936d4bd852ad77b942e5fd476b8 +EBUILD libvirt-9999.ebuild 12068 SHA256 8f02e85824b26d9c3b4a69784eca8702ab6754725fa533abcfce30cc44677dab SHA512 c39e437689437e47305fa6b10132b2c31e2290b57ed29f1ff87d97426bef87bc1b6c7e7072e66dac0b50422cb4e787aba06a11a3b2b3d15e894e83431e3734ca WHIRLPOOL 56c056adc0a15f4e9e98c7db0dae4fbcdd2459eb62622d862041d746618180292006a10f876343159bc241d720685823fae6db7eec3ff7f52f513640be3698b9 +MISC ChangeLog 14857 SHA256 f7103b51c1a23b99232b2d6080bad3af336d62e563773f8dd588214470f73efe SHA512 10ef52e067d2c4ea957a6e0c0557420c9599b633c48450886f8d6d1ffde9e0122cb33189d7d8073202758efb56d9d42051dc8fe911fa8244b6081042d106480a WHIRLPOOL 89aa3db032119a4525d2d3e023b63748e158414385e9d71de439b259e236a57b8884ba5c70236fb945860828b9905eba49b8fcb73020589a35937f7778664597 MISC metadata.xml 3534 SHA256 8678edfd233eaa04266d7e15f71102fb45d1e4843697ba0cd04fe57b45dbb6c6 SHA512 e4b2cc5f9001697b784034ae6e58fea39e9fdc223192772592bcb671a4e1436186ed7757fc72993ee81c1e4005502fbb8c0a2d4588666a186d42024a98c052a2 WHIRLPOOL 9f32ac2763d17e5204da7396eae2a8c79c63e1e82b4a1035c86d93c029902159d3f5697aad86b7307b6e8acee0a4f0f02023d0e5e824a471cdad80a5cebc6886 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iF4EAREIAAYFAlKAUfkACgkQC77qH+pIQ6Rn4AD/bgI4WKjruDbvSn09s86w2UZ+ -dC9fzDSKx9Bpx+1yxEgA/0IsSwiXOxg7S2lLBxIhB3zHY4kDdjCj8WdwLb28D+Go -=inNU +iQF8BAEBCABmBQJSniR6XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prvXqUH/jpEN4YB5hpIWWMbZLV6M01e +IuQv6ui3EBRTXp9JJoWfyswbK35dQlNlNQd3pcWHc5E0+1Hljoh2nXmr9Fx7jmM2 +KbDK4ZPMX7H2/u9q+nnLAmsgcLAJPGEFRMlQ9Q+EL/VVLc0McfFs2ohZGeC9zMC1 +bBaxCM+ewAgiJkiiEWbnowWR0HihGxJoOfltyt1rrInne6PhbcBRQ9iAxUkZbj33 +Hk57aSAJwMRYTUzCUppJg7a72i2f0Au/PriQWVUxH/fj99e8x9VR4vdNGTyAFXSe +UDNwo0yDITl4u4kQ15CKpoC6JqhdgTQYphjGsBgjI3FYOdsbNR1yqA6AGKniswc= +=ujT9 -----END PGP SIGNATURE----- diff --git a/app-emulation/libvirt/libvirt-1.2.0.ebuild b/app-emulation/libvirt/libvirt-1.2.0.ebuild new file mode 100644 index 000000000000..17681673bcc8 --- /dev/null +++ b/app-emulation/libvirt/libvirt-1.2.0.ebuild @@ -0,0 +1,426 @@ +# 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.2.0.ebuild,v 1.1 2013/12/03 18:35:31 cardoe Exp $ + +EAPI=5 + +#BACKPORTS=062ad8b2 +AUTOTOOLIZE=yes + +MY_P="${P/_rc/-rc}" + +inherit eutils 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 +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-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 + ~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 +" + +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}" + 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-r13" "${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)" + + # 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 + newinitd "${FILESDIR}/virtlockd.init" virtlockd || die + + keepdir /var/lib/libvirt/images + + 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 +} diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index 1197728fbc76..d078afe09439 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -1,17 +1,15 @@ # 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-9999.ebuild,v 1.53 2013/11/11 03:41:44 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-9999.ebuild,v 1.54 2013/12/03 18:35:31 cardoe Exp $ EAPI=5 -#BACKPORTS=864bcb0e +#BACKPORTS=062ad8b2 AUTOTOOLIZE=yes MY_P="${P/_rc/-rc}" -PYTHON_COMPAT=( python{2_6,2_7} ) - -inherit eutils python-single-r1 user autotools linux-info systemd +inherit eutils user autotools linux-info systemd readme.gentoo if [[ ${PV} = *9999* ]]; then inherit git-2 @@ -24,7 +22,7 @@ else ftp://libvirt.org/libvirt/${MY_P}.tar.gz ${BACKPORTS:+ http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" - KEYWORDS="amd64 ~x86" + KEYWORDS="~amd64 ~x86" fi S="${WORKDIR}/${P%_rc*}" @@ -33,7 +31,7 @@ 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 \ + nls numa openvz parted pcap phyp policykit +qemu rbd sasl \ selinux +udev uml +vepa virtualbox virt-network xen elibc_glibc \ systemd" REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) @@ -45,8 +43,7 @@ REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) virtualbox? ( libvirtd ) xen? ( libvirtd ) virt-network? ( libvirtd ) - firewalld? ( virt-network ) - python? ( ${PYTHON_REQUIRED_USE} )" + firewalld? ( virt-network )" # gettext.sh command is used by the libvirt command wrappers, and it's # non-optional, so put it into RDEPEND. @@ -85,7 +82,6 @@ RDEPEND="sys-libs/readline ) 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 @@ -112,6 +108,16 @@ DEPEND="${RDEPEND} 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 @@ -129,10 +135,12 @@ LXC_CONFIG_CHECK=" ~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 @@ -153,6 +161,8 @@ 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 @@ -165,8 +175,6 @@ pkg_setup() { gpasswd -a qemu kvm fi - use python && 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" @@ -209,7 +217,7 @@ src_prepare() { local iscsi_init= local rbd_init= local firewalld_init= - cp "${FILESDIR}/libvirtd.init-r12" "${S}/libvirtd.init" + cp "${FILESDIR}/libvirtd.init-r13" "${S}/libvirtd.init" use avahi && avahi_init='avahi-daemon' use iscsi && iscsi_init='iscsid' use rbd && rbd_init='ceph' @@ -283,7 +291,6 @@ src_configure() { ## other myconf="${myconf} $(use_enable nls)" - myconf="${myconf} $(use_with python)" # user privilege bits fir qemu/kvm if use caps; then @@ -359,10 +366,11 @@ src_install() { newinitd "${S}/libvirtd.init" libvirtd || die newconfd "${FILESDIR}/libvirtd.confd-r4" libvirtd || die + newinitd "${FILESDIR}/virtlockd.init" virtlockd || die keepdir /var/lib/libvirt/images - use python && python_optimize + readme.gentoo_create_doc } pkg_preinst() { @@ -409,20 +417,7 @@ pkg_postinst() { 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 + readme.gentoo_print_elog if use caps && use qemu; then elog "libvirt will now start qemu/kvm VMs with non-root privileges." |