1 |
cardoe 12/02/19 23:19:22 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: qemu-kvm-1.0-r3.ebuild |
5 |
Log: |
6 |
Major overhaul to the qemu-kvm ebuild to clean up depends, messages, and support for missing features. |
7 |
|
8 |
(Portage version: 2.1.10.44/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.14 app-emulation/qemu-kvm/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/metadata.xml?rev=1.14&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/metadata.xml?rev=1.14&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/metadata.xml?r1=1.13&r2=1.14 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/metadata.xml,v |
20 |
retrieving revision 1.13 |
21 |
retrieving revision 1.14 |
22 |
diff -u -r1.13 -r1.14 |
23 |
--- metadata.xml 23 Jan 2012 22:10:14 -0000 1.13 |
24 |
+++ metadata.xml 19 Feb 2012 23:19:22 -0000 1.14 |
25 |
@@ -19,6 +19,7 @@ |
26 |
<flag name='sdl'>Enable the SDL-based console</flag> |
27 |
<flag name='spice'>Enable Spice protocol support via <pkg>app-emulation/spice</pkg></flag> |
28 |
<flag name='ssl'>Enable TLS support for the VNC console server</flag> |
29 |
+ <flag name='tls'>Enable TLS support for the VNC console server</flag> |
30 |
<flag name="usbredir">Use <pkg>sys-apps/usbredir</pkg> to redirect USB |
31 |
devices to another machine over TCP</flag> |
32 |
<flag name='vde'>Enable VDE-based networking</flag> |
33 |
|
34 |
|
35 |
|
36 |
1.99 app-emulation/qemu-kvm/ChangeLog |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.99&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.99&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?r1=1.98&r2=1.99 |
41 |
|
42 |
Index: ChangeLog |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v |
45 |
retrieving revision 1.98 |
46 |
retrieving revision 1.99 |
47 |
diff -u -r1.98 -r1.99 |
48 |
--- ChangeLog 16 Feb 2012 19:09:18 -0000 1.98 |
49 |
+++ ChangeLog 19 Feb 2012 23:19:22 -0000 1.99 |
50 |
@@ -1,6 +1,13 @@ |
51 |
# ChangeLog for app-emulation/qemu-kvm |
52 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
53 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.98 2012/02/16 19:09:18 phajdan.jr Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.99 2012/02/19 23:19:22 cardoe Exp $ |
55 |
+ |
56 |
+*qemu-kvm-1.0-r3 (19 Feb 2012) |
57 |
+ |
58 |
+ 19 Feb 2012; Doug Goldstein <cardoe@g.o> +qemu-kvm-1.0-r3.ebuild, |
59 |
+ metadata.xml: |
60 |
+ Major overhaul to the qemu-kvm ebuild to clean up depends, messages, and |
61 |
+ support for missing features. |
62 |
|
63 |
16 Feb 2012; Pawel Hajdan jr <phajdan.jr@g.o> |
64 |
qemu-kvm-0.15.1-r1.ebuild: |
65 |
|
66 |
|
67 |
|
68 |
1.1 app-emulation/qemu-kvm/qemu-kvm-1.0-r3.ebuild |
69 |
|
70 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-1.0-r3.ebuild?rev=1.1&view=markup |
71 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-1.0-r3.ebuild?rev=1.1&content-type=text/plain |
72 |
|
73 |
Index: qemu-kvm-1.0-r3.ebuild |
74 |
=================================================================== |
75 |
# Copyright 1999-2012 Gentoo Foundation |
76 |
# Distributed under the terms of the GNU General Public License v2 |
77 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-1.0-r3.ebuild,v 1.1 2012/02/19 23:19:22 cardoe Exp $ |
78 |
|
79 |
#BACKPORTS=1 |
80 |
|
81 |
EAPI="3" |
82 |
|
83 |
if [[ ${PV} = *9999* ]]; then |
84 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git" |
85 |
GIT_ECLASS="git-2" |
86 |
fi |
87 |
|
88 |
inherit eutils flag-o-matic ${GIT_ECLASS} linux-info toolchain-funcs multilib python |
89 |
|
90 |
if [[ ${PV} = *9999* ]]; then |
91 |
SRC_URI="" |
92 |
KEYWORDS="" |
93 |
else |
94 |
SRC_URI="mirror://sourceforge/kvm/${PN}/${P}.tar.gz |
95 |
${BACKPORTS:+ |
96 |
http://dev.gentoo.org/~flameeyes/${PN}/${P}-backports-${BACKPORTS}.tar.bz2 |
97 |
http://dev.gentoo.org/~cardoe/distfiles/${P}-backports-${BACKPORTS}.tar.bz2}" |
98 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
99 |
fi |
100 |
|
101 |
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" |
102 |
HOMEPAGE="http://www.linux-kvm.org" |
103 |
|
104 |
LICENSE="GPL-2" |
105 |
SLOT="0" |
106 |
# xen is disabled until the deps are fixed |
107 |
IUSE="+aio alsa bluetooth brltty curl debug esd fdt ncurses \ |
108 |
opengl pulseaudio qemu-ifup rbd sasl sdl smartcard spice +threads tls \ |
109 |
usbredir vde +vhost-net xattr xen" |
110 |
# static, depends on libsdl being built with USE=static-libs, which can not |
111 |
# be expressed in current EAPI's |
112 |
|
113 |
COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64" |
114 |
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb" |
115 |
IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus" |
116 |
|
117 |
# Setup the default SoftMMU targets, while using the loops |
118 |
# below to setup the other targets. x86_64 should be the only |
119 |
# defaults on for qemu-kvm |
120 |
IUSE="${IUSE} +qemu_softmmu_targets_x86_64" |
121 |
|
122 |
for target in ${IUSE_SOFTMMU_TARGETS}; do |
123 |
if [ "x${target}" = "xx86_64" ]; then |
124 |
continue |
125 |
fi |
126 |
IUSE="${IUSE} qemu_softmmu_targets_${target}" |
127 |
done |
128 |
|
129 |
for target in ${IUSE_USER_TARGETS}; do |
130 |
IUSE="${IUSE} qemu_user_targets_${target}" |
131 |
done |
132 |
|
133 |
RDEPEND=" |
134 |
!app-emulation/kqemu |
135 |
!app-emulation/qemu |
136 |
!app-emulation/qemu-user |
137 |
>=dev-libs/glib-2.0 |
138 |
media-libs/libpng |
139 |
sys-apps/pciutils |
140 |
>=sys-apps/util-linux-2.16.0 |
141 |
sys-libs/zlib |
142 |
virtual/jpeg |
143 |
amd64? ( sys-apps/seabios |
144 |
sys-apps/vgabios ) |
145 |
x86? ( sys-apps/seabios |
146 |
sys-apps/vgabios ) |
147 |
aio? ( dev-libs/libaio ) |
148 |
alsa? ( >=media-libs/alsa-lib-1.0.13 ) |
149 |
bluetooth? ( net-wireless/bluez ) |
150 |
brltty? ( app-accessibility/brltty ) |
151 |
curl? ( >=net-misc/curl-7.15.4 ) |
152 |
esd? ( media-sound/esound ) |
153 |
fdt? ( >=sys-apps/dtc-1.2.0 ) |
154 |
ncurses? ( sys-libs/ncurses ) |
155 |
opengl? ( virtual/opengl ) |
156 |
pulseaudio? ( media-sound/pulseaudio ) |
157 |
qemu-ifup? ( sys-apps/iproute2 net-misc/bridge-utils ) |
158 |
rbd? ( sys-cluster/ceph ) |
159 |
sasl? ( dev-libs/cyrus-sasl ) |
160 |
sdl? ( >=media-libs/libsdl-1.2.11[X] ) |
161 |
smartcard? ( dev-libs/nss ) |
162 |
spice? ( >=app-emulation/spice-0.9.0 |
163 |
>=app-emulation/spice-protocol-0.8.1 ) |
164 |
tls? ( net-libs/gnutls ) |
165 |
usbredir? ( sys-apps/usbredir ) |
166 |
vde? ( net-misc/vde ) |
167 |
xattr? ( sys-apps/attr ) |
168 |
xen? ( app-emulation/xen-tools ) |
169 |
" |
170 |
|
171 |
DEPEND="${RDEPEND} |
172 |
app-text/texi2html |
173 |
dev-util/pkgconfig |
174 |
>=sys-kernel/linux-headers-2.6.35 |
175 |
test? ( dev-libs/check )" |
176 |
|
177 |
STRIP_MASK="/usr/share/qemu/palcode-clipper" |
178 |
|
179 |
QA_PRESTRIPPED=" |
180 |
usr/share/qemu/openbios-ppc |
181 |
usr/share/qemu/openbios-sparc64 |
182 |
usr/share/qemu/openbios-sparc32 |
183 |
usr/share/qemu/palcode-clipper" |
184 |
|
185 |
QA_WX_LOAD="${QA_PRESTRIPPED} |
186 |
usr/bin/qemu-i386 |
187 |
usr/bin/qemu-x86_64 |
188 |
usr/bin/qemu-alpha |
189 |
usr/bin/qemu-arm |
190 |
usr/bin/qemu-cris |
191 |
usr/bin/qemu-m68k |
192 |
usr/bin/qemu-microblaze |
193 |
usr/bin/qemu-mips |
194 |
usr/bin/qemu-mipsel |
195 |
usr/bin/qemu-ppc |
196 |
usr/bin/qemu-ppc64 |
197 |
usr/bin/qemu-ppc64abi32 |
198 |
usr/bin/qemu-sh4 |
199 |
usr/bin/qemu-sh4eb |
200 |
usr/bin/qemu-sparc |
201 |
usr/bin/qemu-sparc64 |
202 |
usr/bin/qemu-armeb |
203 |
usr/bin/qemu-sparc32plus" |
204 |
|
205 |
pkg_pretend() { |
206 |
if ! use qemu_softmmu_targets_x86_64 && use amd64 ; then |
207 |
eerror "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64" |
208 |
fi |
209 |
|
210 |
if ! use qemu_softmmu_targets_x86_64 && use x86 ; then |
211 |
eerror "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64" |
212 |
fi |
213 |
|
214 |
if kernel_is lt 2 6 25; then |
215 |
eerror "This version of KVM requres a host kernel of 2.6.25 or higher." |
216 |
eerror "Either upgrade your kernel" |
217 |
else |
218 |
if ! linux_config_exists; then |
219 |
eerror "Unable to check your kernel for KVM support" |
220 |
else |
221 |
CONFIG_CHECK="KVM KVM_AMD KVM_INTEL ~TUN ~BRIDGE" |
222 |
ERROR_KVM="You must enable KVM in your kernel to continue" |
223 |
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in \ |
224 |
your kernel configuration." |
225 |
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable \ |
226 |
KVM_INTEL in your kernel configuration." |
227 |
ERROR_TUN="You will need the Universal TUN/TAP driver compiled \ |
228 |
into your kernel or loaded as a module to use the virtual \ |
229 |
network device if using -net tap." |
230 |
ERROR_BRIDGE="You will also need support for 802.1d \ |
231 |
Ethernet Bridging for some network configurations." |
232 |
use vhost-net && CHECK_CHECK+="~VHOST_NET" |
233 |
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net \ |
234 |
support" |
235 |
|
236 |
# Now do the actual checks setup above |
237 |
check_extra_config |
238 |
fi |
239 |
fi |
240 |
} |
241 |
|
242 |
pkg_setup() { |
243 |
python_set_active_version 2 |
244 |
|
245 |
enewgroup kvm |
246 |
} |
247 |
|
248 |
src_prepare() { |
249 |
# prevent docs to get automatically installed |
250 |
sed -i '/$(DESTDIR)$(docdir)/d' Makefile || die |
251 |
# Alter target makefiles to accept CFLAGS set via flag-o |
252 |
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ |
253 |
Makefile Makefile.target || die |
254 |
# append CFLAGS while linking |
255 |
sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak || die |
256 |
|
257 |
# remove part to make udev happy |
258 |
sed -e 's~NAME="%k", ~~' -i kvm/scripts/65-kvm.rules || die |
259 |
|
260 |
# ${PN}-guest-hang-on-usb-add.patch was sent by Timothy Jones |
261 |
# to the qemu-devel ml - bug 337988 |
262 |
epatch "${FILESDIR}/qemu-0.11.0-mips64-user-fix.patch" |
263 |
|
264 |
# drop '-g' by default as it tends to eat |
265 |
# A LOT (~2GB) of ram for each job #355861 |
266 |
sed -e 's/CFLAGS="-g $CFLAGS"/CFLAGS="$CFLAGS"/g' \ |
267 |
-i configure || die |
268 |
|
269 |
epatch "${FILESDIR}"/${PN}-1.0-per-target-i8259.patch #400597 |
270 |
epatch "${FILESDIR}"/${PN}-1.0-fix-nonkvm-arches.patch |
271 |
epatch "${FILESDIR}"/${PN}-1.0-fix-qemu-system-ppc.patch |
272 |
|
273 |
# bug #400595 / CVE-2012-0029 |
274 |
epatch "${FILESDIR}"/${P}-e1000-bounds-packet-size-against-buffer-size.patch |
275 |
|
276 |
[[ -n ${BACKPORTS} ]] && \ |
277 |
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ |
278 |
epatch |
279 |
} |
280 |
|
281 |
src_configure() { |
282 |
local conf_opts audio_opts user_targets |
283 |
|
284 |
for target in ${IUSE_SOFTMMU_TARGETS} ; do |
285 |
use "qemu_softmmu_targets_${target}" && \ |
286 |
softmmu_targets="${softmmu_targets} ${target}-softmmu" |
287 |
done |
288 |
|
289 |
for target in ${IUSE_USER_TARGETS} ; do |
290 |
use "qemu_user_targets_${target}" && \ |
291 |
user_targets="${user_targets} ${target}-linux-user" |
292 |
done |
293 |
|
294 |
if [[ -z ${softmmu_targets} ]]; then |
295 |
eerror "All SoftMMU targets are disabled. This is invalid for qemu-kvm" |
296 |
die "At least 1 SoftMMU target must be enabled" |
297 |
else |
298 |
einfo "Building the following softmmu targets: ${softmmu_targets}" |
299 |
fi |
300 |
|
301 |
if [[ -n ${user_targets} ]]; then |
302 |
einfo "Building the following user targets: ${user_targets}" |
303 |
conf_opts="${conf_opts} --enable-linux-user" |
304 |
else |
305 |
conf_opts="${conf_opts} --disable-linux-user" |
306 |
fi |
307 |
|
308 |
# Fix QA issues. QEMU needs executable heaps and we need to mark it as such |
309 |
conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap" |
310 |
|
311 |
# Add support for static builds |
312 |
#use static && conf_opts="${conf_opts} --static" |
313 |
|
314 |
# Support debug USE flag |
315 |
use debug && conf_opts="${conf_opts} --enable-debug" |
316 |
|
317 |
# audio options |
318 |
audio_opts="oss" |
319 |
use alsa && audio_opts="alsa ${audio_opts}" |
320 |
use esd && audio_opts="esd ${audio_opts}" |
321 |
use pulseaudio && audio_opts="pa ${audio_opts}" |
322 |
use sdl && audio_opts="sdl ${audio_opts}" |
323 |
|
324 |
./configure --prefix=/usr \ |
325 |
--sysconfdir=/etc \ |
326 |
--disable-darwin-user \ |
327 |
--disable-bsd-user \ |
328 |
--disable-libiscsi \ |
329 |
--disable-strip \ |
330 |
--disable-werror \ |
331 |
--enable-kvm \ |
332 |
--enable-kvm-device-assignment \ |
333 |
--enable-kvm-pit \ |
334 |
--enable-pie \ |
335 |
--enable-nptl \ |
336 |
--enable-tcg-interpreter \ |
337 |
--enable-uuid \ |
338 |
--enable-vnc-jpeg \ |
339 |
--enable-vnc-png \ |
340 |
--python=python2 \ |
341 |
$(use_enable aio linux-aio) \ |
342 |
$(use_enable bluetooth bluez) \ |
343 |
$(use_enable brltty brlapi) \ |
344 |
$(use_enable curl) \ |
345 |
$(use_enable fdt) \ |
346 |
$(use_enable ncurses curses) \ |
347 |
$(use_enable opengl) \ |
348 |
$(use_enable rbd) \ |
349 |
$(use_enable sasl vnc-sasl) \ |
350 |
$(use_enable sdl) \ |
351 |
$(use_enable smartcard smartcard) \ |
352 |
$(use_enable smartcard smartcard-nss) \ |
353 |
$(use_enable spice) \ |
354 |
$(use_enable test check-utests) \ |
355 |
$(use_enable tls vnc-tls) \ |
356 |
$(use_enable threads vnc-thread) \ |
357 |
$(use_enable usbredir usb-redir) \ |
358 |
$(use_enable vde) \ |
359 |
$(use_enable vhost-net) \ |
360 |
$(use_enable xen) \ |
361 |
$(use_enable xattr attr) \ |
362 |
--audio-drv-list="${audio_opts}" \ |
363 |
--target-list="${softmmu_targets} ${user_targets}" \ |
364 |
--cc="$(tc-getCC)" \ |
365 |
--host-cc="$(tc-getBUILD_CC)" \ |
366 |
|| die "configure failed" |
367 |
|
368 |
# this is for qemu upstream's threaded support which is |
369 |
# in development and broken |
370 |
# the kvm project has its own support for threaded IO |
371 |
# which is always on and works |
372 |
# --enable-io-thread \ |
373 |
} |
374 |
|
375 |
src_install() { |
376 |
emake DESTDIR="${D}" install || die "make install failed" |
377 |
|
378 |
if [[ -n ${softmmu_targets} ]]; then |
379 |
insinto /lib/udev/rules.d/ |
380 |
doins kvm/scripts/65-kvm.rules || die |
381 |
|
382 |
if use qemu-ifup; then |
383 |
insinto /etc/qemu/ |
384 |
insopts -m0755 |
385 |
doins kvm/scripts/qemu-ifup || die |
386 |
fi |
387 |
|
388 |
if use qemu_softmmu_targets_x86_64 ; then |
389 |
dobin "${FILESDIR}"/qemu-kvm |
390 |
ewarn "The depreciated '/usr/bin/kvm' symlink is no longer installed" |
391 |
ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit" |
392 |
ewarn "your libvirt configs or other wrappers for ${PN}" |
393 |
else |
394 |
elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install" |
395 |
elog "of /usr/bin/qemu-kvm and /usr/bin/kvm" |
396 |
fi |
397 |
fi |
398 |
|
399 |
dodoc Changelog MAINTAINERS TODO pci-ids.txt || die |
400 |
newdoc pc-bios/README README.pc-bios || die |
401 |
dohtml qemu-doc.html qemu-tech.html || die |
402 |
|
403 |
# FIXME: Need to come up with a solution for non-x86 based systems |
404 |
if use x86 || use amd64; then |
405 |
# Remove SeaBIOS since we're using the SeaBIOS packaged one |
406 |
rm "${D}/usr/share/qemu/bios.bin" |
407 |
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin |
408 |
|
409 |
# Remove vgabios since we're using the vgabios packaged one |
410 |
rm "${D}/usr/share/qemu/vgabios.bin" |
411 |
rm "${D}/usr/share/qemu/vgabios-cirrus.bin" |
412 |
rm "${D}/usr/share/qemu/vgabios-qxl.bin" |
413 |
rm "${D}/usr/share/qemu/vgabios-stdvga.bin" |
414 |
rm "${D}/usr/share/qemu/vgabios-vmware.bin" |
415 |
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin |
416 |
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin |
417 |
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin |
418 |
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin |
419 |
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin |
420 |
fi |
421 |
} |
422 |
|
423 |
pkg_postinst() { |
424 |
|
425 |
if [[ -n ${softmmu_targets} ]]; then |
426 |
elog "If you don't have kvm compiled into the kernel, make sure you have" |
427 |
elog "the kernel module loaded before running kvm. The easiest way to" |
428 |
elog "ensure that the kernel module is loaded is to load it on boot." |
429 |
elog "For AMD CPUs the module is called 'kvm-amd'" |
430 |
elog "For Intel CPUs the module is called 'kvm-intel'" |
431 |
elog "Please review /etc/conf.d/modules for how to load these" |
432 |
elog |
433 |
elog "Make sure your user is in the 'kvm' group" |
434 |
elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." |
435 |
elog |
436 |
elog "The ssl USE flag was renamed to tls, so adjust your USE flags." |
437 |
elog "The nss USE flag was renamed to smartcard, so adjust your USE flags." |
438 |
fi |
439 |
|
440 |
use qemu-ifup && \ |
441 |
ewarn "qemu-ifup is deprecated, be prepared for it to disappear next release" |
442 |
} |