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