Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 139324 Details for
Bug 157987
KVM user space (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
ebuild for kvm 57
kvm-57.ebuild (text/plain), 6.18 KB, created by
Carlo Marcelo Arenas Belon
on 2007-12-26 04:11:22 UTC
(
hide
)
Description:
ebuild for kvm 57
Filename:
MIME Type:
Creator:
Carlo Marcelo Arenas Belon
Created:
2007-12-26 04:11:22 UTC
Size:
6.18 KB
patch
obsolete
># Copyright 1999-2007 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >inherit eutils flag-o-matic toolchain-funcs linux-mod > >SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" > >DESCRIPTION="KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V)" >HOMEPAGE="http://kvm.qumranet.com/kvmwiki" > >LICENSE="GPL-2" >SLOT="0" >KEYWORDS="-* ~amd64 ~x86" >IUSE="alsa bios gcc4 gnutls kvm qemu sdl" >DEPEND="sys-libs/zlib > sdl? ( >=media-libs/libsdl-1.2.11 ) > alsa? ( >=media-libs/alsa-lib-1.0.13 ) > bios? ( > sys-devel/dev86 > dev-lang/perl > sys-power/iasl > ) > !gcc4? ( > amd64? ( =sys-devel/gcc-3.4.6-r2 ) > x86? ( <sys-devel/gcc-4 ) > ) > gnutls? ( net-libs/gnutls ) > app-text/texi2html" >RDEPEND="sys-libs/zlib > sdl? ( >=media-libs/libsdl-1.2.11 ) > alsa? ( >=media-libs/alsa-lib-1.0.13 ) > gnutls? ( net-libs/gnutls ) > qemu? ( app-emulation/qemu-softmmu ) > !qemu? ( !app-emulation/qemu-softmmu ) > dev-lang/python" > >QA_TEXTRELS="usr/bin/kvm" > >BUILD_TARGETS="all" >MODULE_NAMES="kvm(misc:${S}/kernel) > kvm-intel(misc:${S}/kernel) > kvm-amd(misc:${S}/kernel)" > >pkg_setup() { > if kernel_is lt 2 6 17; then > eerror "your kernel is too old for this version of kvm to work" > eerror "either update to a kernel >= 2.6.17 or use a version" > eerror "of kvm older than 37" > die "incompatible kernel, downgrade kvm or upgrade kernel" > fi > if kernel_is lt 2 6 18 && ! linux_chkconfig_present SMP; then > eerror "your kernel can only be used if CONFIG_SMP=y" > eerror "reconfigure/rebuild or upgrade your kernel" > die "incompatible kernel configuration, reconfig or upgrade kernel" > fi > if kernel_is lt 2 6 22 && ! use kvm; then > eerror "the module in your kernel requires an older version of" > eerror "kvm as shown in :" > eerror " http://kvm.qumranet.com/kvmwiki/Downloads" > die "kvm module not compatible, downgrade kvm or USE='kvm'" > fi > > #Don't continue if the KVM modules can't be found > if ! linux_chkconfig_present KVM && ! use kvm; then > eerror "kvm module not found on your kernel" > eerror "USE='kvm' or enable KVM and the kvm module for your CPU" > die "kvm module missing in kernel" > fi > > if use kvm; then > linux-mod_pkg_setup > else > ewarn "using the kernel provided module" > ewarn "some features may only be available in newer releases" > fi >} > >src_unpack() { > unpack ${A} > > cd "${S}" > # fix make install to not install modules > sed -i '/$(kcmd)/d' Makefile > # prevent docs to get automatically installed > sed -i '/$(DESTDIR)$(docdir)/d' qemu/Makefile > # avoid strip > sed -i 's/$(INSTALL) -m 755 -s/$(INSTALL) -m 755/' qemu/Makefile > > epatch ${FILESDIR}/kvm-47-configure-qemu.patch > epatch ${FILESDIR}/kvm-45-qemu-configure.patch > epatch ${FILESDIR}/kvm-45-qemu-kvm.patch > epatch ${FILESDIR}/kvm-57-qemu-kvm-doc.patch > epatch ${FILESDIR}/kvm-57-qemu-kvm-cmdline.patch > epatch ${FILESDIR}/kvm-48-kvm.patch > epatch ${FILESDIR}/kvm-43-qemu-ifup.patch > epatch ${FILESDIR}/kvm-50-libkvm-no-kernel.patch > epatch ${FILESDIR}/kvm-57-qemu-ramaddr.patch > epatch ${FILESDIR}/kvm-57-qemu-no-blobs.patch > epatch ${FILESDIR}/kvm-56-libkvm-slot.patch > epatch ${FILESDIR}/kvm-56-test-strcat.patch > epatch ${FILESDIR}/kvm-56-compat-string.patch > epatch ${FILESDIR}/kvm-56-compat-noioapic.patch > epatch ${FILESDIR}/kvm-57-kernel-longmode.patch > epatch ${FILESDIR}/kvm-57-qemu-ide-dvdrom.patch > epatch ${FILESDIR}/kvm-57-qemu-merge.patch > > if use qemu; then > epatch ${FILESDIR}/kvm-57-qemu-no-img.patch > fi > > if use gcc4; then > epatch ${FILESDIR}/kvm-45-qemu-gcc4.patch > fi >} > >src_compile() { > local mycc > > conf_opts="--prefix=/usr" > > if use kvm; then > conf_opts="$conf_opts --kerneldir=\"${KV_DIR}\"" > fi > > if use alsa; then > conf_opts="$conf_opts --enable-alsa" > fi > > if ! use gnutls; then > conf_opts="$conf_opts --disable-vnc-tls" > fi > > if ! use sdl; then > conf_opts="$conf_opts --disable-gfx-check --disable-sdl" > fi > > if use gcc4; then > conf_opts="$conf_opts --disable-gcc-check" > fi > > ./configure ${conf_opts} || die "./configure failed" > > if use bios; then > emake bios > fi > > emake libkvm user || die "emake failed" > if use kvm; then > linux-mod_src_compile > fi > > mycc=$(cat qemu/config-host.mak | egrep "^CC=" | cut -d "=" -f 2) > > filter-flags -fpie -fstack-protector > > # If using gentoo's compiler set the SPEC to non-hardened > if [ ! -z ${GCC_SPECS} -a -f ${GCC_SPECS} ]; then > local myccver=$(${mycc} -dumpversion) > local gccver=$($(tc-getBUILD_CC) -dumpversion) > > #Is this a SPEC for the right compiler version? > myspec="${GCC_SPECS/${gccver}/${myccver}}" > if [ "${myspec}" == "${GCC_SPECS}" ]; then > shopt -s extglob > GCC_SPECS="${GCC_SPECS/%hardened*specs/vanilla.specs}" > shopt -u extglob > else > unset GCC_SPECS > fi > fi > > emake qemu || die "emake failed" >} > >src_install() { > if use kvm; then > linux-mod_src_install > fi > make DESTDIR="${D}" install || die "make install failed" > exeinto /etc/kvm/utils/ > doexe ${S}/kvm ${S}/kvm_stat > mv ${D}/usr/share/man/man1/qemu.1 ${D}/usr/share/man/man1/kvm.1 > insinto /etc/udev/rules.d/ > doins ${S}/scripts/65-kvm.rules > insinto /etc/kvm/ > insopts -m0755 > doins ${S}/scripts/qemu-ifup > doins ${S}/config.mak > dodoc ${S}/qemu/pc-bios/README > dodoc ${S}/qemu/qemu-doc.html ${S}/qemu/qemu-tech.html >} > >pkg_postinst() { > if use kvm; then > linux-mod_pkg_postinst > fi > enewgroup kvm > > elog "If you don't have kvm compiled into the kernel, make sure you have the kernel" > elog "module loaded before running kvm. The easiest way to ensure that the kernel " > elog "module is loaded is to load it on boot:" > elog "For AMD CPUs:" > elog "echo kvm-amd >> /etc/modules.autoload.d/kernel-2.6" > elog "For Intel CPUs:" > elog "echo kvm-intel >> /etc/modules.autoload.d/kernel-2.6" > echo > elog "Make sure your user is in the 'kvm' group" > elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." > echo > 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/kvm." > echo > elog "To load the module at boot:" > elog "echo tun >> /etc/modules.autoload.d/kernel-2.6" >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 157987
:
108867
|
109180
|
109596
|
109612
|
109613
|
109614
|
109615
|
109929
|
110542
|
110544
|
111591
|
111593
|
111594
|
111721
|
111722
|
111725
|
111726
|
111727
|
111730
|
111731
|
111732
|
117585
|
117587
|
117589
|
117590
|
117592
|
117594
|
117595
|
117596
|
117597
|
119450
|
119452
|
119454
|
120155
|
120283
|
120488
|
121167
|
121170
|
121172
|
121174
|
121176
|
121177
|
121179
|
121181
|
121183
|
124934
|
124936
|
124937
|
124939
|
125905
|
125989
|
125991
|
125993
|
125994
|
125996
|
126072
|
130577
|
131298
|
132381
|
132382
|
132422
|
132486
|
132866
|
132899
|
133157
|
133510
|
133515
|
133859
|
137185
|
137723
|
137946
| 139324 |
139488
|
140913