diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2012-07-08 22:07:51 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2012-07-08 22:07:51 +0000 |
commit | ae6a198276643196a22f3138c30666df89d9a7eb (patch) | |
tree | a8da0cb70cd800449839bf8ecaf4487c4b703b84 /app-emulation | |
parent | ppc stable (bug 415861) (diff) | |
download | gentoo-2-ae6a198276643196a22f3138c30666df89d9a7eb.tar.gz gentoo-2-ae6a198276643196a22f3138c30666df89d9a7eb.tar.bz2 gentoo-2-ae6a198276643196a22f3138c30666df89d9a7eb.zip |
Update the live ebuild to the latest version
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/qemu-kvm/ChangeLog | 5 | ||||
-rw-r--r-- | app-emulation/qemu-kvm/qemu-kvm-9999.ebuild | 305 |
2 files changed, 162 insertions, 148 deletions
diff --git a/app-emulation/qemu-kvm/ChangeLog b/app-emulation/qemu-kvm/ChangeLog index 16964d4c687a..ab9435380cfa 100644 --- a/app-emulation/qemu-kvm/ChangeLog +++ b/app-emulation/qemu-kvm/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-emulation/qemu-kvm # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.125 2012/07/08 22:03:30 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.126 2012/07/08 22:07:51 cardoe Exp $ + + 08 Jul 2012; Doug Goldstein <cardoe@gentoo.org> qemu-kvm-9999.ebuild: + Update the live ebuild to the latest version 08 Jul 2012; Doug Goldstein <cardoe@gentoo.org> qemu-kvm-1.1.0.ebuild, metadata.xml: diff --git a/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild b/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild index a9b7aeb9ebde..6ec7b7a2602c 100644 --- a/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild +++ b/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild @@ -1,27 +1,23 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild,v 1.39 2012/05/31 23:35:44 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild,v 1.40 2012/07/08 22:07:51 cardoe Exp $ -#BACKPORTS=1 +EAPI="4" + +PYTHON_DEPEND="2" +inherit eutils flag-o-matic linux-info toolchain-funcs multilib python user -EAPI="3" if [[ ${PV} = *9999* ]]; then EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git" inherit git-2 -fi - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python user - -if [[ ${PV} = *9999* ]]; then SRC_URI="" KEYWORDS="" else SRC_URI="mirror://sourceforge/kvm/${PN}/${P}.tar.gz ${BACKPORTS:+ - http://dev.gentoo.org/~flameeyes/${PN}/${P}-backports-${BACKPORTS}.tar.bz2 - http://dev.gentoo.org/~cardoe/distfiles/${P}-backports-${BACKPORTS}.tar.bz2}" - KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + http://dev.gentoo.org/~cardoe/distfiles/${P}-bp-${BACKPORTS}.tar.bz2}" + KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -29,14 +25,12 @@ HOMEPAGE="http://www.linux-kvm.org" LICENSE="GPL-2" SLOT="0" -IUSE="+aio alsa bluetooth brltty curl debug fdt hardened jpeg ncurses nss -opengl png pulseaudio qemu-ifup rbd sasl sdl spice ssl threads usbredir vde -+vhost-net xattr xen" -# static, depends on libsdl being built with USE=static-libs, which can not -# be expressed in current EAPI's +IUSE="+aio alsa bluetooth brltty +curl debug doc fdt kernel_linux \ +kernel_FreeBSD ncurses opengl pulseaudio python rbd sasl sdl \ +smartcard spice static tci test tls usbredir vde +vhost-net xattr xen xfs" COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64 s390x" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 mips64 mips64el ppcemb xtensa xtensaeb" +IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb xtensa xtensaeb" IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32" # Setup the default SoftMMU targets, while using the loops @@ -45,7 +39,7 @@ IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32" IUSE="${IUSE} +qemu_softmmu_targets_x86_64" for target in ${IUSE_SOFTMMU_TARGETS}; do - if [[ ${target} = x86_64 ]]; then + if [ "x${target}" = "xx86_64" ]; then continue fi IUSE="${IUSE} qemu_softmmu_targets_${target}" @@ -55,16 +49,18 @@ for target in ${IUSE_USER_TARGETS}; do IUSE="${IUSE} qemu_user_targets_${target}" done -RESTRICT="test" +REQUIRED_USE="static? ( !alsa !pulseaudio ) + amd64? ( qemu_softmmu_targets_x86_64 ) + x86? ( qemu_softmmu_targets_x86_64 )" RDEPEND=" !app-emulation/kqemu !app-emulation/qemu - !app-emulation/qemu-user + !<app-emulation/qemu-1.0 >=dev-libs/glib-2.0 + media-libs/libpng sys-apps/pciutils - >=sys-apps/util-linux-2.16.0 - sys-libs/zlib + virtual/jpeg amd64? ( sys-apps/seabios sys-apps/vgabios ) x86? ( sys-apps/seabios @@ -73,39 +69,36 @@ RDEPEND=" alsa? ( >=media-libs/alsa-lib-1.0.13 ) bluetooth? ( net-wireless/bluez ) brltty? ( app-accessibility/brltty ) - curl? ( net-misc/curl ) + curl? ( >=net-misc/curl-7.15.4 ) fdt? ( >=sys-apps/dtc-1.2.0 ) - jpeg? ( virtual/jpeg ) + kernel_linux? ( >=sys-apps/util-linux-2.16.0 ) ncurses? ( sys-libs/ncurses ) - nss? ( dev-libs/nss ) - opengl? ( - virtual/opengl - x11-libs/libX11 - ) - png? ( media-libs/libpng ) + opengl? ( virtual/opengl ) pulseaudio? ( media-sound/pulseaudio ) - qemu-ifup? ( - sys-apps/iproute2 - net-misc/bridge-utils - ) + python? ( =dev-lang/python-2*[ncurses] ) rbd? ( sys-cluster/ceph ) sasl? ( dev-libs/cyrus-sasl ) - sdl? ( >=media-libs/libsdl-1.2.11[X] ) - spice? ( - >=app-emulation/spice-0.9.0 - >=app-emulation/spice-protocol-0.8.1 + sdl? ( static? ( >=media-libs/libsdl-1.2.11[static-libs,X] ) + !static? ( >=media-libs/libsdl-1.2.11[X] ) ) + static? ( sys-libs/zlib[static-libs(+)] ) + !static? ( sys-libs/zlib ) + smartcard? ( dev-libs/nss ) + spice? ( >=app-emulation/spice-protocol-0.8.1 + static? ( >=app-emulation/spice-0.9.0[static-libs] ) + !static? ( >=app-emulation/spice-0.9.0 ) ) - ssl? ( net-libs/gnutls ) + tls? ( net-libs/gnutls ) usbredir? ( sys-apps/usbredir ) vde? ( net-misc/vde ) xattr? ( sys-apps/attr ) xen? ( app-emulation/xen-tools ) -" + xfs? ( sys-fs/xfsprogs )" DEPEND="${RDEPEND} app-text/texi2html virtual/pkgconfig - >=sys-kernel/linux-headers-2.6.35" + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + test? ( dev-libs/check )" STRIP_MASK="/usr/share/qemu/palcode-clipper" @@ -113,18 +106,16 @@ QA_PRESTRIPPED=" usr/share/qemu/openbios-ppc usr/share/qemu/openbios-sparc64 usr/share/qemu/openbios-sparc32 - usr/share/qemu/palcode-clipper -" -# keep sorted + usr/share/qemu/palcode-clipper" + QA_WX_LOAD="${QA_PRESTRIPPED} + usr/bin/qemu-i386 + usr/bin/qemu-x86_64 usr/bin/qemu-alpha usr/bin/qemu-arm - usr/bin/qemu-armeb usr/bin/qemu-cris - usr/bin/qemu-i386 usr/bin/qemu-m68k usr/bin/qemu-microblaze - usr/bin/qemu-microblazeel usr/bin/qemu-mips usr/bin/qemu-mipsel usr/bin/qemu-ppc @@ -133,73 +124,75 @@ QA_WX_LOAD="${QA_PRESTRIPPED} usr/bin/qemu-sh4 usr/bin/qemu-sh4eb usr/bin/qemu-sparc - usr/bin/qemu-sparc32plus usr/bin/qemu-sparc64 - usr/bin/qemu-s390x - usr/bin/qemu-unicore32 - usr/bin/qemu-x86_64 -" - -kvm_kern_warn() { - eerror "Please enable KVM support in your kernel, found at:" - eerror - eerror " Virtualization" - eerror " Kernel-based Virtual Machine (KVM) support" - eerror -} + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus" pkg_pretend() { - if ! use qemu_softmmu_targets_x86_64 && use amd64 ; then - eerror "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64" - fi - - if ! use qemu_softmmu_targets_x86_64 && use x86 ; then - eerror "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64" - fi - - if kernel_is lt 2 6 25; then + if use kernel_linux && kernel_is lt 2 6 25; then eerror "This version of KVM requres a host kernel of 2.6.25 or higher." - eerror "Either upgrade your kernel" - else + elif use kernel_linux; then if ! linux_config_exists; then eerror "Unable to check your kernel for KVM support" - kvm_kern_warn - elif ! linux_chkconfig_present KVM; then - kvm_kern_warn - fi - if use vhost-net && ! linux_chkconfig_present VHOST_NET ; then - ewarn "You have to enable CONFIG_VHOST_NET in the kernel" - ewarn "to have vhost-net support." + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CHECK_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" + fi + + use python && CONFIG_CHECK+="~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config fi fi } pkg_setup() { - python_set_active_version 2 - enewgroup kvm + enewgroup kvm 78 } src_prepare() { # prevent docs to get automatically installed sed -i '/$(DESTDIR)$(docdir)/d' Makefile || die + # Alter target makefiles to accept CFLAGS set via flag-o + sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ + Makefile Makefile.target || die + # append CFLAGS while linking + sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak || die - # drop '-g' by default as it tends to eat - # A LOT (~2GB) of ram for each job #355861 - sed -e 's/CFLAGS="-g $CFLAGS"/CFLAGS="$CFLAGS"/g' \ - -i configure || die + # remove part to make udev happy + sed -e 's~NAME="%k", ~~' -i kvm/scripts/65-kvm.rules || die - # ${PN}-guest-hang-on-usb-add.patch was sent by Timothy Jones - # to the qemu-devel ml - bug 337988 epatch "${FILESDIR}/qemu-0.11.0-mips64-user-fix.patch" + # Patch the use of sys/sysctl.h on FreeBSD + epatch "${FILESDIR}"/${P}-freebsd-sysctl-header.patch + + python_convert_shebangs scripts/kvm/kvm_stat + [[ -n ${BACKPORTS} ]] && \ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ epatch - # Fix underlinking. - # Fault reproducer: USE=nss QEMU_SOFTMMU_TARGETS=lm32 QEMU_USER_TARGETS= - sed -i 's/opengl_libs="-lGL"/opengl_libs="-lGL -lX11"/' configure || die + + epatch_user } src_configure() { @@ -233,36 +226,7 @@ src_configure() { conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap" # Add support for static builds - #use static && conf_opts="${conf_opts} --static" - - # Support debug USE flag - use debug && conf_opts="${conf_opts} --enable-debug --disable-strip" - - #config options - conf_opts="${conf_opts} - $(use_enable aio linux-aio) - $(use_enable bluetooth bluez) - $(use_enable brltty brlapi) - $(use_enable curl) - $(use_enable fdt) - $(use_enable hardened pie) - $(use_enable jpeg vnc-jpeg) - $(use_enable ncurses curses) - $(use_enable nss smartcard-nss) - $(use_enable opengl) - $(use_enable png vnc-png) - $(use_enable rbd) - $(use_enable sasl vnc-sasl) - $(use_enable sdl) - $(use_enable spice) - $(use_enable ssl vnc-tls) - $(use_enable threads vnc-thread) - $(use_enable vde) - $(use_enable vhost-net) - $(use_enable xen) - $(use_enable xattr attr) - --disable-bsd-user - " + use static && conf_opts="${conf_opts} --static" # audio options audio_opts="oss" @@ -270,51 +234,103 @@ src_configure() { use pulseaudio && audio_opts="pa ${audio_opts}" use sdl && audio_opts="sdl ${audio_opts}" - set -- --prefix="${EPREFIX}"/usr \ - --sysconfdir="${EPREFIX}"/etc \ + # conditionally making UUID work on Linux only is wrong + # but the Gentoo/FreeBSD guys need to figure out what + # provides libuuid on their platform + # --enable-vnc-thread will go away in 1.2 + # $(use_enable xen xen-pci-passthrough) for 1.2 + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --disable-darwin-user \ + --disable-bsd-user \ + --disable-libiscsi \ --disable-strip \ --disable-werror \ - --enable-kvm \ - --disable-libiscsi \ - --enable-nptl \ - --enable-uuid \ - ${conf_opts} \ - --audio-card-list="ac97 es1370 sb16 cs4231a adlib gus hda" \ + --enable-guest-agent \ + --enable-pie \ + --enable-virtfs \ + --enable-vnc-jpeg \ + --enable-vnc-png \ + --enable-vnc-thread \ + --python=python2 \ + $(use_enable aio linux-aio) \ + $(use_enable bluetooth bluez) \ + $(use_enable brltty brlapi) \ + $(use_enable curl) \ + $(use_enable debug debug-info) \ + $(use_enable debug debug-mon) \ + $(use_enable debug debug-tcg) \ + $(use_enable doc docs) \ + $(use_enable fdt) \ + $(use_enable kernel_linux kvm) \ + $(use_enable kernel_linux kvm-device-assignment) \ + $(use_enable kernel_linux kvm-pit) \ + $(use_enable kernel_linux nptl) \ + $(use_enable kernel_linux uuid) \ + $(use_enable ncurses curses) \ + $(use_enable opengl) \ + $(use_enable rbd) \ + $(use_enable sasl vnc-sasl) \ + $(use_enable sdl) \ + $(use_enable smartcard smartcard) \ + $(use_enable smartcard smartcard-nss) \ + $(use_enable spice) \ + $(use_enable tci tcg-interpreter) \ + $(use_enable test check-utests) \ + $(use_enable tls vnc-tls) \ + $(use_enable usbredir usb-redir) \ + $(use_enable vde) \ + $(use_enable vhost-net) \ + $(use_enable xattr attr) \ + $(use_enable xen) \ + $(use_enable xfs xfsctl) \ --audio-drv-list="${audio_opts}" \ --target-list="${softmmu_targets} ${user_targets}" \ --cc="$(tc-getCC)" \ - --host-cc="$(tc-getBUILD_CC)" - - echo ./configure "$@" # show actual options - ./configure "$@" || die "configure failed" + --host-cc="$(tc-getBUILD_CC)" \ + ${conf_opts} \ + || die "configure failed" + + # this is for qemu upstream's threaded support which is + # in development and broken + # the kvm project has its own support for threaded IO + # which is always on and works + # --enable-io-thread \ + + # FreeBSD's kernel does not support QEMU assigning/grabbing + # host USB devices yet + use kernel_FreeBSD && \ + sed -E -e "s|^(HOST_USB=)bsd|\1stub|" -i "${S}"/config-host.mak } src_install() { emake DESTDIR="${ED}" install || die "make install failed" if [[ -n ${softmmu_targets} ]]; then - insinto /lib/udev/rules.d/ - doins "${FILESDIR}"/65-gentoo-kvm.rules || die + if use kernel_linux; then + insinto /lib/udev/rules.d/ + doins kvm/scripts/65-kvm.rules || die + fi if use qemu_softmmu_targets_x86_64 ; then dobin "${FILESDIR}"/qemu-kvm - dosym /usr/bin/qemu-kvm /usr/bin/kvm + ewarn "The depreciated '/usr/bin/kvm' symlink is no longer installed" + ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit" + ewarn "your libvirt configs or other wrappers for ${PN}" else elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install" elog "of /usr/bin/qemu-kvm and /usr/bin/kvm" fi - - if use qemu-ifup; then - insinto /etc/qemu/ - insopts -m0755 - doins "${FILESDIR}"/qemu-ifup || die - fi fi dodoc Changelog MAINTAINERS TODO pci-ids.txt || die newdoc pc-bios/README README.pc-bios || die dohtml qemu-doc.html qemu-tech.html || die + if use python; then + dobin scripts/kvm/kvm_stat || die + fi + # FIXME: Need to come up with a solution for non-x86 based systems if use x86 || use amd64; then # Remove SeaBIOS since we're using the SeaBIOS packaged one @@ -348,12 +364,7 @@ pkg_postinst() { elog "Make sure your user is in the 'kvm' group" elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." elog - elog "You will need the Universal TUN/TAP driver compiled into your" - elog "kernel or loaded as a module to use the virtual network device" - elog "if using -net tap. You will also need support for 802.1d" - elog "Ethernet Bridging and a configured bridge if using the provided" - elog "qemu-ifup script from /etc/qemu." - elog - elog "The gnutls use flag was renamed to ssl, so adjust your use flags." + elog "The ssl USE flag was renamed to tls, so adjust your USE flags." + elog "The nss USE flag was renamed to smartcard, so adjust your USE flags." fi } |