diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2010-10-28 09:54:24 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2010-10-28 09:54:24 +0000 |
commit | 3560c906758397ff13db301c643c65fe681fdfec (patch) | |
tree | dbb02a4bc2acd4096c8d0fee51d7a7649b43b1b6 /app-emulation | |
parent | fix quoting and built_with_use to has_version (diff) | |
download | historical-3560c906758397ff13db301c643c65fe681fdfec.tar.gz historical-3560c906758397ff13db301c643c65fe681fdfec.tar.bz2 historical-3560c906758397ff13db301c643c65fe681fdfec.zip |
New version, user targets support improved
Package-Manager: portage-2.1.9.22/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/qemu-kvm/ChangeLog | 7 | ||||
-rw-r--r-- | app-emulation/qemu-kvm/Manifest | 4 | ||||
-rw-r--r-- | app-emulation/qemu-kvm/qemu-kvm-0.13.0.ebuild | 247 |
3 files changed, 256 insertions, 2 deletions
diff --git a/app-emulation/qemu-kvm/ChangeLog b/app-emulation/qemu-kvm/ChangeLog index 7516113a25a3..8705b2d9dd3f 100644 --- a/app-emulation/qemu-kvm/ChangeLog +++ b/app-emulation/qemu-kvm/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-emulation/qemu-kvm # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.43 2010/09/06 11:07:09 jmbsvicetto Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.44 2010/10/28 09:54:24 lu_zero Exp $ + +*qemu-kvm-0.13.0 (28 Oct 2010) + + 28 Oct 2010; Luca Barbato <lu_zero@gentoo.org> +qemu-kvm-0.13.0.ebuild: + New version, user targets support improved 06 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> qemu-kvm-9999.ebuild: diff --git a/app-emulation/qemu-kvm/Manifest b/app-emulation/qemu-kvm/Manifest index e220d95b0115..037803530b6e 100644 --- a/app-emulation/qemu-kvm/Manifest +++ b/app-emulation/qemu-kvm/Manifest @@ -10,11 +10,13 @@ DIST qemu-kvm-0.12.3.tar.gz 4718791 RMD160 fe88117e6e32188e097a86f95bffc4b74422a DIST qemu-kvm-0.12.4.tar.gz 4720232 RMD160 63a18ff3b95de2b4d0dfac130cf850c1cd7caec0 SHA1 955c8dad1f65df0eb5403f40a6c92d93a0a252be SHA256 1489fe5a0def7b857256817a998768bb21662167d10e7c372312c5939e64181e DIST qemu-kvm-0.12.5-backports-1.tar.bz2 3668 RMD160 59e1d7e3d64377e2b77faf26c45206fbde4ee847 SHA1 5a4eb644243d11a96c2430546f7335c780ec9243 SHA256 c822969f0a86106d5cba97fae33c76eeea0bcc3ea13d617647474557ed0e4dbf DIST qemu-kvm-0.12.5.tar.gz 4722351 RMD160 dc2686e70384a40601589cac2f2665254240710a SHA1 c316ac8a1b040e28275bf34911fbce14209c1563 SHA256 24c085aecbc784ea8b4837ca02bfe5086c7f91c8a88a0f607826692234af583f +DIST qemu-kvm-0.13.0.tar.gz 5153895 RMD160 7b8f4d8cdbb9730bb9d7fbf4cec165a8703696c4 SHA1 b8cfb8e8dbd403281a98a41f7d3eeaecc0aac8f1 SHA256 6db2600d7e3c1ed12feb6dc7596c23324bc2036a72f101cf580cef252ea9be53 EBUILD qemu-kvm-0.11.1-r1.ebuild 5834 RMD160 14a6c25f17ca1585e6ae214faabbee03836c46be SHA1 fdd7b21a81beb3ab0e90631f995778bfe02c2b66 SHA256 5b13106de57e452c3b5b13e86b9eb472ed299442ab501c74e1a193b743bc0e2b EBUILD qemu-kvm-0.12.3-r1.ebuild 7490 RMD160 6e1372313a61822b6aa8aecd2adbb96aceced6e7 SHA1 97de1efe8be68f47f367988c463244d9201e409d SHA256 52f6e7351467fece7504b5a2a9641d737656213f68bdb82c6ac2c128873425af EBUILD qemu-kvm-0.12.4-r1.ebuild 7502 RMD160 c16a2e641bd879b8eabf27c2e317d250f3554d5f SHA1 e2bc0954389e96d01ef8ecc5f0e32797477f37eb SHA256 33c99cb7f99a73c9845ddfc0565c0d1a1c0b6ba3a2d25d3239c21912a2fbcb25 EBUILD qemu-kvm-0.12.5-r1.ebuild 7784 RMD160 be817bf412de0ec282f9acd5d9d0c5f74394f571 SHA1 ad6b4f15c2e0defe95804be92b432afdf8afa393 SHA256 6f42a15962d8ff1b0ea00bf57c1d4eacb0aea75e7cffcc1baeae4043fb024515 EBUILD qemu-kvm-0.12.5.ebuild 7639 RMD160 f9ddc850b4f35539834de213f6063875ea1a7233 SHA1 702e1638d36b27c2571e08551268da087ca168ca SHA256 fa61415340a418deee2f100e245b674922e1e7816749ac8c26912bb2497b5ea8 +EBUILD qemu-kvm-0.13.0.ebuild 7523 RMD160 0d13c13884bb98358a3af12c004ac65406ed5a7c SHA1 d588382f205240ab4ee37d928676a698741cdf5b SHA256 c1426629d979249ce1753f8ff36caa3eabc9a214ae5a83d2cb18d5995af07d8d EBUILD qemu-kvm-9999.ebuild 7954 RMD160 4637e692e9df562f5db88b3c2561ca8a2ce9361f SHA1 76eaa4e457dc83602582c710cf86e8022edd1835 SHA256 80090bf54711b22278380ebe5a043583caa4a2db1676210020fe7e1b3098baa1 -MISC ChangeLog 9449 RMD160 84a6686a4b312e05238844567299160ebfabef4a SHA1 1b9083431a64b3c4f807b73e705d5b12d072dbaf SHA256 a21887bd5823a5d7306dca2ad4b7d5fdcdf100983c83fb4d189a2782b491a0aa +MISC ChangeLog 9597 RMD160 4f0a27ba213d0cee3ba88b723e7588678bb36f40 SHA1 4aa388d17f36d7f4c8d9bbcc32efdb8fb873de55 SHA256 4bea4f325cfd85a435b20fb0f54f2fb363c696c0f29382a8422ae94680f24fc5 MISC metadata.xml 1319 RMD160 2114f55e1cb1df8481ba0790699f038ef0f54a47 SHA1 b198150ccedb003d270b4582ff572b4dadaf6c53 SHA256 2fa55ff737cfff70381260ccc3c9c76bc679039ca58d3e6d499bbc317c410054 diff --git a/app-emulation/qemu-kvm/qemu-kvm-0.13.0.ebuild b/app-emulation/qemu-kvm/qemu-kvm-0.13.0.ebuild new file mode 100644 index 000000000000..7a70d8099d78 --- /dev/null +++ b/app-emulation/qemu-kvm/qemu-kvm-0.13.0.ebuild @@ -0,0 +1,247 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.13.0.ebuild,v 1.1 2010/10/28 09:54:24 lu_zero Exp $ + +EAPI="2" + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git" + GIT_ECLASS="git" +fi + +inherit eutils flag-o-matic ${GIT_ECLASS} linux-info toolchain-funcs + +if [[ ${PV} = *9999* ]]; then + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://sourceforge/kvm/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="http://www.linux-kvm.org" + +LICENSE="GPL-2" +SLOT="0" +# xen is disabled until the deps are fixed +IUSE="+aio alsa bluetooth brltty curl esd fdt hardened kvm-trace \ +ncurses pulseaudio qemu-ifup sasl sdl ssl static vde" + +COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64" +IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb" +IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus" + +for target in ${IUSE_SOFTMMU_TARGETS}; do + IUSE="${IUSE} +qemu_softmmu_targets_${target}" +done + +for target in ${IUSE_USER_TARGETS}; do + IUSE="${IUSE} +qemu_user_targets_${target}" +done + +RESTRICT="test" + +RDEPEND=" + !app-emulation/kqemu + !app-emulation/qemu + !app-emulation/qemu-softmmu + !app-emulation/qemu-user + !app-emulation/qemu-kvm-spice + sys-apps/pciutils + >=sys-apps/util-linux-2.16.0 + sys-libs/zlib + aio? ( dev-libs/libaio ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bluetooth? ( net-wireless/bluez ) + brltty? ( app-accessibility/brltty ) + curl? ( net-misc/curl ) + esd? ( media-sound/esound ) + fdt? ( sys-apps/dtc ) + ncurses? ( sys-libs/ncurses ) + pulseaudio? ( media-sound/pulseaudio ) + qemu-ifup? ( sys-apps/iproute2 net-misc/bridge-utils ) + sasl? ( dev-libs/cyrus-sasl ) + sdl? ( >=media-libs/libsdl-1.2.11[X] ) + ssl? ( net-libs/gnutls ) + vde? ( net-misc/vde ) +" + +DEPEND="${RDEPEND} + app-text/texi2html + >=sys-kernel/linux-headers-2.6.29 + ssl? ( dev-util/pkgconfig ) +" + +kvm_kern_warn() { + eerror "Please enable KVM support in your kernel, found at:" + eerror + eerror " Virtualization" + eerror " Kernel-based Virtual Machine (KVM) support" + eerror +} + +pkg_setup() { + for target in ${IUSE_SOFTMMU_TARGETS} ; do + use "qemu_softmmu_targets_${target}" && \ + softmmu_targets="${softmmu_targets} ${target}-softmmu" + done + + for target in ${IUSE_USER_TARGETS} ; do + use "qemu_user_targets_${target}" && \ + user_targets="${user_targets} ${target}-linux-user" + done + + if [ -z "${softmmu_targets}" ]; then + return + fi + + use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64" + + if 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 + 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 + fi + + enewgroup kvm +} + +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 + + # remove part to make udev happy + sed -e 's~NAME="%k", ~~' -i kvm/scripts/65-kvm.rules || die + + epatch "${FILESDIR}"/qemu-0.11.0-mips64-user-fix.patch \ + "${FILESDIR}"/${PN}-0.12.3-include-madvise-defines.patch +} + +src_configure() { + local conf_opts audio_opts + + if [ ! -z "${softmmu_targets}" ]; then + einfo "Building the following softmmu targets: ${softmmu_targets}" + else + conf_opts="${conf_opts} --disable-system" + fi + + if [ ! -z "${user_targets}" ]; then + einfo "Building the following user targets: ${user_targets}" + conf_opts="${conf_opts} --enable-linux-user" + else + conf_opts="${conf_opts} --disable-linux-user" + fi + + # Fix QA issues. QEMU needs executable heaps and we need to mark it as such + conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap" + + # Add support for static builds + use static && conf_opts="${conf_opts} --static" + + #config options + conf_opts="${conf_opts} $(use_enable aio linux-aio)" + conf_opts="${conf_opts} $(use_enable bluetooth bluez)" + conf_opts="${conf_opts} $(use_enable brltty brlapi)" + conf_opts="${conf_opts} $(use_enable curl)" + conf_opts="${conf_opts} $(use_enable fdt)" + conf_opts="${conf_opts} $(use_enable hardened user-pie)" + use kvm-trace && conf_opts="${conf_opts} --with-kvm-trace" + conf_opts="${conf_opts} $(use_enable ncurses curses)" + conf_opts="${conf_opts} $(use_enable sasl vnc-sasl)" + conf_opts="${conf_opts} $(use_enable sdl)" + conf_opts="${conf_opts} $(use_enable ssl vnc-tls)" + conf_opts="${conf_opts} $(use_enable vde)" +# conf_opts="${conf_opts} $(use_enable xen)" + conf_opts="${conf_opts} --disable-xen" + conf_opts="${conf_opts} --disable-darwin-user --disable-bsd-user" + + # audio options + audio_opts="oss" + use alsa && audio_opts="alsa ${audio_opts}" + use esd && audio_opts="esd ${audio_opts}" + use pulseaudio && audio_opts="pa ${audio_opts}" + use sdl && audio_opts="sdl ${audio_opts}" + ./configure --prefix=/usr \ + --disable-strip \ + --disable-werror \ + --enable-kvm \ + --enable-nptl \ + --enable-uuid \ + ${conf_opts} \ + --audio-drv-list="${audio_opts}" \ + --target-list="${softmmu_targets} ${user_targets}" \ + --cc="$(tc-getCC)" \ + --host-cc="$(tc-getBUILD_CC)" \ + || 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 \ +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + if [ ! -z "${softmmu_targets}" ]; then + insinto /etc/udev/rules.d/ + doins kvm/scripts/65-kvm.rules || die + + if use qemu-ifup; then + insinto /etc/qemu/ + insopts -m0755 + doins kvm/scripts/qemu-ifup || die + fi + + if use qemu_softmmu_targets_x86_64 ; then + dobin "${FILESDIR}"/qemu-kvm + dosym /usr/bin/qemu-kvm /usr/bin/kvm + else + elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64,"\ + " this disables install" + elog "of /usr/bin/qemu-kvm and /usr/bin/kvm" + 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 +} + +pkg_postinst() { + if [ -z "${softmmu_targets}" ]; then + return + fi + elog "If you don't have kvm compiled into the kernel, make sure you have" + elog "the kernel module loaded before running kvm. The easiest way to" + elog "ensure that the kernel module is loaded is to load it on boot." + elog "For AMD CPUs the module is called 'kvm-amd'" + elog "For Intel CPUs the module is called 'kvm-intel'" + elog "Please review /etc/conf.d/modules for how to load these" + elog + 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 "kvm-ifup script from /etc/kvm." + elog + elog "The gnutls use flag was renamed to ssl, so adjust your use flags." + echo +} |