1 |
dang 09/04/28 13:35:24 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: kvm-85-r1.ebuild |
5 |
Removed: kvm-85.ebuild |
6 |
Log: |
7 |
Brown paper bag; kvm support was disabled |
8 |
(Portage version: 2.2_rc31/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.33 app-emulation/kvm/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/kvm/ChangeLog?rev=1.33&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/kvm/ChangeLog?rev=1.33&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/kvm/ChangeLog?r1=1.32&r2=1.33 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/kvm/ChangeLog,v |
20 |
retrieving revision 1.32 |
21 |
retrieving revision 1.33 |
22 |
diff -u -r1.32 -r1.33 |
23 |
--- ChangeLog 28 Apr 2009 01:47:35 -0000 1.32 |
24 |
+++ ChangeLog 28 Apr 2009 13:35:23 -0000 1.33 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for app-emulation/kvm |
27 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/ChangeLog,v 1.32 2009/04/28 01:47:35 dang Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/ChangeLog,v 1.33 2009/04/28 13:35:23 dang Exp $ |
30 |
+ |
31 |
+*kvm-85-r1 (28 Apr 2009) |
32 |
+ |
33 |
+ 28 Apr 2009; Daniel Gryniewicz <dang@g.o> -kvm-85.ebuild, |
34 |
+ +kvm-85-r1.ebuild: |
35 |
+ Brown paper bag; kvm support was disabled |
36 |
|
37 |
*kvm-85 (28 Apr 2009) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 app-emulation/kvm/kvm-85-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/kvm/kvm-85-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/kvm/kvm-85-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: kvm-85-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2009 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/kvm/kvm-85-r1.ebuild,v 1.1 2009/04/28 13:35:23 dang Exp $ |
52 |
|
53 |
EAPI="2" |
54 |
|
55 |
inherit eutils flag-o-matic toolchain-funcs |
56 |
|
57 |
MY_PN="qemu-${PN}-devel" |
58 |
MY_P="${MY_PN}-${PV}" |
59 |
|
60 |
# Patchset git repo is at http://github.com/dang/kvm-patches/tree/master |
61 |
PATCHSET="kvm-patches-20090218" |
62 |
SRC_URI="mirror://sourceforge/kvm/${MY_P}.tar.gz |
63 |
http://apollo.fprintf.net/downloads/${PATCHSET}.tar.gz" |
64 |
|
65 |
DESCRIPTION="Kernel-based Virtual Machine userland tools" |
66 |
HOMEPAGE="http://www.linux-kvm.org" |
67 |
|
68 |
LICENSE="GPL-2" |
69 |
SLOT="0" |
70 |
KEYWORDS="-* ~amd64 ~x86" |
71 |
# Add bios back when it builds again |
72 |
IUSE="alsa esd gnutls havekernel +modules ncurses pulseaudio +sdl test vde" |
73 |
RESTRICT="test" |
74 |
|
75 |
RDEPEND="sys-libs/zlib |
76 |
alsa? ( >=media-libs/alsa-lib-1.0.13 ) |
77 |
esd? ( media-sound/esound ) |
78 |
pulseaudio? ( media-sound/pulseaudio ) |
79 |
gnutls? ( net-libs/gnutls ) |
80 |
ncurses? ( sys-libs/ncurses ) |
81 |
sdl? ( >=media-libs/libsdl-1.2.11[X] ) |
82 |
vde? ( net-misc/vde ) |
83 |
modules? ( =app-emulation/kvm-kmod-${PV} )" |
84 |
|
85 |
# bios? ( |
86 |
# sys-devel/dev86 |
87 |
# dev-lang/perl |
88 |
# sys-power/iasl |
89 |
# ) |
90 |
DEPEND="${RDEPEND} |
91 |
gnutls? ( dev-util/pkgconfig ) |
92 |
app-text/texi2html" |
93 |
|
94 |
QA_TEXTRELS="usr/bin/kvm" |
95 |
|
96 |
S="${WORKDIR}/${MY_P}" |
97 |
|
98 |
pkg_setup() { |
99 |
if use havekernel && use modules ; then |
100 |
ewarn "You have the 'havekernel' and 'modules' use flags enabled." |
101 |
ewarn "'havekernel' trumps 'modules'; the kvm modules will not" |
102 |
ewarn "be built. You must ensure you have a compatible kernel" |
103 |
ewarn "with the kvm modules on your own" |
104 |
elif use havekernel ; then |
105 |
ewarn "You have the 'havekernel' use flag set. This means you" |
106 |
ewarn "must ensure you have a compatible kernel on your own." |
107 |
elif use modules ; then |
108 |
:; |
109 |
elif kernel_is lt 2 6 25; then |
110 |
eerror "This version of KVM requres a host kernel of 2.6.25 or higher." |
111 |
eerror "Either upgrade your kernel, or enable the 'modules' USE flag." |
112 |
die "kvm version not compatible" |
113 |
elif ! linux_chkconfig_present KVM; then |
114 |
eerror "Please enable KVM support in your kernel, found at:" |
115 |
eerror |
116 |
eerror " Virtualization" |
117 |
eerror " Kernel-based Virtual Machine (KVM) support" |
118 |
eerror |
119 |
eerror "or enable the 'modules' USE flag." |
120 |
die "KVM support not detected!" |
121 |
fi |
122 |
|
123 |
enewgroup kvm |
124 |
} |
125 |
|
126 |
src_prepare() { |
127 |
cd "${S}" |
128 |
# prevent docs to get automatically installed |
129 |
sed -i '/$(DESTDIR)$(docdir)/d' qemu/Makefile |
130 |
# Alter target makefiles to accept CFLAGS set via flag-o |
131 |
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ |
132 |
qemu/Makefile qemu/Makefile.target |
133 |
[[ -x /sbin/paxctl ]] && \ |
134 |
sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \ |
135 |
qemu/Makefile.target |
136 |
# avoid strip |
137 |
sed -i 's/$(INSTALL) -m 755 -s/$(INSTALL) -m 755/' qemu/Makefile |
138 |
|
139 |
# Kernel patch; doesn't apply |
140 |
rm "${WORKDIR}/${PATCHSET}"/07_all_kernel-longmode.patch |
141 |
# evdev patch is upstream |
142 |
rm "${WORKDIR}/${PATCHSET}"/10_all_evdev_keycode_map.patch |
143 |
|
144 |
# apply patchset |
145 |
EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" |
146 |
EPATCH_SUFFIX="patch" |
147 |
epatch |
148 |
|
149 |
# Fix docs manually |
150 |
sed -i -e 's/QEMU/KVM/g;s/qemu/kvm/g;s/Qemu/Kvm/g;s/kvm-options.texi/qemu-options.texi/' \ |
151 |
qemu/qemu-doc.texi qemu/qemu-img.texi qemu/qemu-nbd.texi |
152 |
} |
153 |
|
154 |
src_configure() { |
155 |
local mycc conf_opts audio_opts |
156 |
|
157 |
audio_opts="oss" |
158 |
use gnutls || conf_opts="$conf_opts --disable-vnc-tls" |
159 |
use ncurses || conf_opts="$conf_opts --disable-curses" |
160 |
use sdl || conf_opts="$conf_opts --disable-gfx-check --disable-sdl" |
161 |
use vde || conf_opts="$conf_opts --disable-vde" |
162 |
use alsa && audio_opts="alsa $audio_opts" |
163 |
use esd && audio_opts="esd $audio_opts" |
164 |
use pulseaudio && audio_opts="pa $audio_opts" |
165 |
use sdl && audio_opts="sdl $audio_opts" |
166 |
conf_opts="$conf_opts --prefix=/usr" |
167 |
if has_multilib_profile && [[ "${DEFAULT_ABI}" == "x86" ]] ; then |
168 |
conf_opts="$conf_opts --arch=i686" |
169 |
fi |
170 |
|
171 |
# set up asm symlink; not done now there's no kernel source |
172 |
cd kernel/include && ln -sf asm-x86 asm && cd ../.. |
173 |
|
174 |
./configure ${conf_opts} --audio-drv-list="$audio_opts" || die "econf failed" |
175 |
} |
176 |
|
177 |
src_compile() { |
178 |
emake libkvm || die "emake libkvm failed" |
179 |
|
180 |
if use test; then |
181 |
emake user || die "emake user failed" |
182 |
fi |
183 |
|
184 |
mycc=$(cat qemu/config-host.mak | egrep "^CC=" | cut -d "=" -f 2) |
185 |
|
186 |
filter-flags -fpie -fstack-protector |
187 |
|
188 |
# If using gentoo's compiler set the SPEC to non-hardened |
189 |
if [ ! -z ${GCC_SPECS} -a -f ${GCC_SPECS} ]; then |
190 |
local myccver=$(${mycc} -dumpversion) |
191 |
local gccver=$($(tc-getBUILD_CC) -dumpversion) |
192 |
|
193 |
#Is this a SPEC for the right compiler version? |
194 |
myspec="${GCC_SPECS/${gccver}/${myccver}}" |
195 |
if [ "${myspec}" == "${GCC_SPECS}" ]; then |
196 |
shopt -s extglob |
197 |
GCC_SPECS="${GCC_SPECS/%hardened*specs/vanilla.specs}" |
198 |
shopt -u extglob |
199 |
else |
200 |
unset GCC_SPECS |
201 |
fi |
202 |
fi |
203 |
|
204 |
# if use bios; then |
205 |
# emake bios || die "emake bios failed" |
206 |
# emake vgabios || die "emake vgabios failed" |
207 |
# fi |
208 |
|
209 |
emake qemu || die "emake qemu failed" |
210 |
} |
211 |
|
212 |
src_install() { |
213 |
emake DESTDIR="${D}" install || die "make install failed" |
214 |
|
215 |
exeinto /usr/bin/ |
216 |
doexe "${S}/kvm_stat" |
217 |
|
218 |
mv "${D}"/usr/share/man/man1/qemu.1 "${D}"/usr/share/man/man1/kvm.1 |
219 |
mv "${D}"/usr/share/man/man1/qemu-img.1 "${D}"/usr/share/man/man1/kvm-img.1 |
220 |
mv "${D}"/usr/share/man/man8/qemu-nbd.8 "${D}"/usr/share/man/man8/kvm-nbd.8 |
221 |
mv "${D}"/usr/bin/qemu-img "${D}"/usr/bin/kvm-img |
222 |
mv "${D}"/usr/bin/qemu-nbd "${D}"/usr/bin/kvm-nbd |
223 |
|
224 |
insinto /etc/udev/rules.d/ |
225 |
doins scripts/65-kvm.rules |
226 |
|
227 |
insinto /etc/kvm/ |
228 |
insopts -m0755 |
229 |
newins scripts/qemu-ifup kvm-ifup |
230 |
newins scripts/qemu-ifdown kvm-ifdown |
231 |
|
232 |
dodoc qemu/pc-bios/README |
233 |
newdoc qemu/qemu-doc.html kvm-doc.html |
234 |
newdoc qemu/qemu-tech.html kvm-tech.html |
235 |
} |
236 |
|
237 |
pkg_postinst() { |
238 |
elog "If you don't have kvm compiled into the kernel, make sure you have" |
239 |
elog "the kernel module loaded before running kvm. The easiest way to" |
240 |
elog "ensure that the kernel module is loaded is to load it on boot." |
241 |
elog "For AMD CPUs the module is called 'kvm-amd'" |
242 |
elog "For Intel CPUs the module is called 'kvm-intel'" |
243 |
elog "Please review /etc/conf.d/modules for how to load these" |
244 |
elog |
245 |
elog "Make sure your user is in the 'kvm' group" |
246 |
elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." |
247 |
elog |
248 |
elog "You will need the Universal TUN/TAP driver compiled into your" |
249 |
elog "kernel or loaded as a module to use the virtual network device" |
250 |
elog "if using -net tap. You will also need support for 802.1d" |
251 |
elog "Ethernet Bridging and a configured bridge if using the provided" |
252 |
elog "kvm-ifup script from /etc/kvm." |
253 |
echo |
254 |
} |