Gentoo Archives: gentoo-commits

From: "Doug Goldstein (cardoe)" <cardoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/qemu: qemu-1.4.2.ebuild ChangeLog
Date: Thu, 30 May 2013 02:57:19
Message-Id: 20130530025712.7A1702171D@flycatcher.gentoo.org
1 cardoe 13/05/30 02:57:12
2
3 Modified: ChangeLog
4 Added: qemu-1.4.2.ebuild
5 Log:
6 Version bump. Install more python scripts for debugging purposes with USE=python. Fix man pages not being installed. bug #435534
7
8 (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key D7DFA8D318FA9AEF!)
9
10 Revision Changes Path
11 1.211 app-emulation/qemu/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.211&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.211&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?r1=1.210&r2=1.211
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v
20 retrieving revision 1.210
21 retrieving revision 1.211
22 diff -u -r1.210 -r1.211
23 --- ChangeLog 23 May 2013 17:24:13 -0000 1.210
24 +++ ChangeLog 30 May 2013 02:57:12 -0000 1.211
25 @@ -1,6 +1,12 @@
26 # ChangeLog for app-emulation/qemu
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.210 2013/05/23 17:24:13 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.211 2013/05/30 02:57:12 cardoe Exp $
30 +
31 +*qemu-1.4.2 (30 May 2013)
32 +
33 + 30 May 2013; Doug Goldstein <cardoe@g.o> +qemu-1.4.2.ebuild:
34 + Version bump. Install more python scripts for debugging purposes with
35 + USE=python. Fix man pages not being installed. bug #435534
36
37 23 May 2013; Agostino Sarubbo <ago@g.o> qemu-1.4.0-r1.ebuild:
38 Stable for amd64, wrt bug #468920
39
40
41
42 1.1 app-emulation/qemu/qemu-1.4.2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-1.4.2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-1.4.2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: qemu-1.4.2.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.4.2.ebuild,v 1.1 2013/05/30 02:57:12 cardoe Exp $
52
53 EAPI=5
54
55 PYTHON_COMPAT=( python{2_5,2_6,2_7} )
56 PYTHON_REQ_USE="ncurses,readline"
57
58 inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
59 user udev fcaps
60
61 BACKPORTS=6b5934f9
62
63 if [[ ${PV} = *9999* ]]; then
64 EGIT_REPO_URI="git://git.qemu.org/qemu.git"
65 inherit git-2
66 SRC_URI=""
67 KEYWORDS=""
68 else
69 SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2
70 ${BACKPORTS:+
71 http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}"
72 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
73 fi
74
75 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
76 HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
77
78 LICENSE="GPL-2 LGPL-2 BSD-2"
79 SLOT="0"
80 IUSE="+aio alsa bluetooth brltty +caps +curl debug fdt iscsi +jpeg \
81 kernel_linux kernel_FreeBSD mixemu ncurses opengl +png pulseaudio python \
82 rbd sasl +seccomp sdl selinux smartcard spice static static-softmmu \
83 static-user systemtap tci test +threads tls usbredir +uuid vde +vhost-net \
84 virtfs +vnc xattr xen xfs"
85
86 COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips
87 mipsel or32 ppc ppc64 sh4 sh4eb sparc sparc64 s390x unicore32"
88 IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 mips64 mips64el ppcemb xtensa xtensaeb"
89 IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus"
90
91 # Setup the default SoftMMU targets, while using the loops
92 # below to setup the other targets.
93 REQUIRED_USE="|| ("
94
95 for target in ${IUSE_SOFTMMU_TARGETS}; do
96 IUSE="${IUSE} qemu_softmmu_targets_${target}"
97 REQUIRED_USE="${REQUIRED_USE} qemu_softmmu_targets_${target}"
98 done
99 REQUIRED_USE="${REQUIRED_USE} )"
100
101 for target in ${IUSE_USER_TARGETS}; do
102 IUSE="${IUSE} qemu_user_targets_${target}"
103 done
104
105 # Block USE flag configurations known to not work
106 REQUIRED_USE="${REQUIRED_USE}
107 static? ( static-softmmu static-user )
108 static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl )
109 virtfs? ( xattr )"
110
111 # Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
112 LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
113 sys-apps/pciutils[static-libs(+)]
114 sys-libs/zlib[static-libs(+)]
115 >=x11-libs/pixman-0.28.0[static-libs(+)]
116 aio? ( dev-libs/libaio[static-libs(+)] )
117 caps? ( sys-libs/libcap-ng[static-libs(+)] )
118 curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
119 fdt? ( >=sys-apps/dtc-1.2.0[static-libs(+)] )
120 jpeg? ( virtual/jpeg[static-libs(+)] )
121 ncurses? ( sys-libs/ncurses[static-libs(+)] )
122 png? ( media-libs/libpng[static-libs(+)] )
123 rbd? ( sys-cluster/ceph[static-libs(+)] )
124 sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
125 sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
126 seccomp? ( >=sys-libs/libseccomp-1.0.1[static-libs(+)] )
127 spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] )
128 tls? ( net-libs/gnutls[static-libs(+)] )
129 uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
130 vde? ( net-misc/vde[static-libs(+)] )
131 xattr? ( sys-apps/attr[static-libs(+)] )
132 xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
133 RDEPEND="!static-softmmu? ( ${LIB_DEPEND//\[static-libs(+)]} )
134 !app-emulation/kqemu
135 qemu_softmmu_targets_i386? (
136 sys-firmware/ipxe
137 ~sys-firmware/seabios-1.7.2.1
138 ~sys-firmware/sgabios-0.1_pre8
139 ~sys-firmware/vgabios-0.7a
140 )
141 qemu_softmmu_targets_x86_64? (
142 sys-firmware/ipxe
143 ~sys-firmware/seabios-1.7.2.1
144 ~sys-firmware/sgabios-0.1_pre8
145 ~sys-firmware/vgabios-0.7a
146 )
147 alsa? ( >=media-libs/alsa-lib-1.0.13 )
148 bluetooth? ( net-wireless/bluez )
149 brltty? ( app-accessibility/brltty )
150 iscsi? ( net-libs/libiscsi )
151 opengl? ( virtual/opengl )
152 pulseaudio? ( media-sound/pulseaudio )
153 python? ( ${PYTHON_DEPS} )
154 sdl? ( media-libs/libsdl[X] )
155 selinux? ( sec-policy/selinux-qemu )
156 smartcard? ( dev-libs/nss !app-emulation/libcacard )
157 spice? ( >=app-emulation/spice-protocol-0.12.3 )
158 systemtap? ( dev-util/systemtap )
159 usbredir? ( >=sys-apps/usbredir-0.6 )
160 virtfs? ( sys-libs/libcap )
161 xen? ( app-emulation/xen-tools )"
162
163 DEPEND="${RDEPEND}
164 app-text/texi2html
165 =dev-lang/python-2*
166 virtual/pkgconfig
167 kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
168 static-softmmu? ( ${LIB_DEPEND} )
169 test? (
170 dev-libs/glib[utils]
171 sys-devel/bc
172 )"
173
174 STRIP_MASK="/usr/share/qemu/palcode-clipper"
175
176 QA_PREBUILT="
177 usr/share/qemu/openbios-ppc
178 usr/share/qemu/openbios-sparc64
179 usr/share/qemu/openbios-sparc32
180 usr/share/qemu/palcode-clipper"
181
182 QA_WX_LOAD="usr/bin/qemu-i386
183 usr/bin/qemu-x86_64
184 usr/bin/qemu-alpha
185 usr/bin/qemu-arm
186 usr/bin/qemu-cris
187 usr/bin/qemu-m68k
188 usr/bin/qemu-microblaze
189 usr/bin/qemu-microblazeel
190 usr/bin/qemu-mips
191 usr/bin/qemu-mipsel
192 usr/bin/qemu-or32
193 usr/bin/qemu-ppc
194 usr/bin/qemu-ppc64
195 usr/bin/qemu-ppc64abi32
196 usr/bin/qemu-sh4
197 usr/bin/qemu-sh4eb
198 usr/bin/qemu-sparc
199 usr/bin/qemu-sparc64
200 usr/bin/qemu-armeb
201 usr/bin/qemu-sparc32plus
202 usr/bin/qemu-s390x
203 usr/bin/qemu-unicore32"
204
205 qemu_support_kvm() {
206 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
207 use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
208 use qemu_softmmu_targets_s390x; then
209 return 0
210 fi
211
212 return 1
213 }
214
215 pkg_pretend() {
216 if use kernel_linux && kernel_is lt 2 6 25; then
217 eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
218 elif use kernel_linux; then
219 if ! linux_config_exists; then
220 eerror "Unable to check your kernel for KVM support"
221 else
222 CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
223 ERROR_KVM="You must enable KVM in your kernel to continue"
224 ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
225 ERROR_KVM_AMD+=" your kernel configuration."
226 ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
227 ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
228 ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
229 ERROR_TUN+=" into your kernel or loaded as a module to use the"
230 ERROR_TUN+=" virtual network device if using -net tap."
231 ERROR_BRIDGE="You will also need support for 802.1d"
232 ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
233 use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
234 ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
235 ERROR_VHOST_NET+=" support"
236
237 if use amd64 || use x86 || use amd64-linux || use x86-linux; then
238 CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
239 fi
240
241 use python && CONFIG_CHECK+=" ~DEBUG_FS"
242 ERROR_DEBUG_FS="debugFS support required for kvm_stat"
243
244 # Now do the actual checks setup above
245 check_extra_config
246 fi
247 fi
248 }
249
250 pkg_setup() {
251 enewgroup kvm 78
252
253 python_export_best
254 }
255
256 src_prepare() {
257 # Alter target makefiles to accept CFLAGS set via flag-o
258 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
259 Makefile Makefile.target || die
260
261 epatch "${FILESDIR}"/qemu-9999-cflags.patch
262 [[ -n ${BACKPORTS} ]] && \
263 EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
264 epatch
265
266 # Fix ld and objcopy being called directly
267 tc-export LD OBJCOPY
268
269 # Verbose builds
270 MAKEOPTS+=" V=1"
271
272 epatch_user
273 }
274
275 ##
276 # configures qemu based on the build directory and the build type
277 # we are using.
278 #
279 qemu_src_configure() {
280 debug-print-function $FUNCNAME "$@"
281
282 local buildtype=$1
283 local builddir=$2
284 local conf_opts audio_opts
285 local static_flag="static-${buildtype}"
286
287 conf_opts="--prefix=/usr"
288 conf_opts+=" --sysconfdir=/etc"
289 conf_opts+=" --libdir=/usr/$(get_libdir)"
290 conf_opts+=" --docdir=/usr/share/doc/${PF}/html"
291 conf_opts+=" --disable-bsd-user"
292 conf_opts+=" --disable-guest-agent"
293 conf_opts+=" --disable-strip"
294 conf_opts+=" --disable-werror"
295 conf_opts+=" --python=${PYTHON}"
296
297 # audio options
298 audio_opts="oss"
299 use alsa && audio_opts="alsa,${audio_opts}"
300 use sdl && audio_opts="sdl,${audio_opts}"
301 use pulseaudio && audio_opts="pa,${audio_opts}"
302
303 if [[ ${buildtype} == "user" ]]; then
304 conf_opts+=" --enable-linux-user"
305 conf_opts+=" --disable-system"
306 conf_opts+=" --target-list=${user_targets}"
307 conf_opts+=" --disable-blobs"
308 conf_opts+=" --disable-bluez"
309 conf_opts+=" --disable-curses"
310 conf_opts+=" --disable-kvm"
311 conf_opts+=" --disable-libiscsi"
312 conf_opts+=" $(use_enable seccomp)"
313 conf_opts+=" --disable-sdl"
314 conf_opts+=" --disable-smartcard-nss"
315 conf_opts+=" --disable-tools"
316 conf_opts+=" --disable-vde"
317 fi
318
319 if [[ ${buildtype} == "softmmu" ]]; then
320 conf_opts+=" --disable-linux-user"
321 conf_opts+=" --enable-system"
322 conf_opts+=" --with-system-pixman"
323 conf_opts+=" --target-list=${softmmu_targets}"
324 conf_opts+=" $(use_enable bluetooth bluez)"
325 conf_opts+=" $(use_enable sdl)"
326 conf_opts+=" $(use_enable aio linux-aio)"
327 conf_opts+=" $(use_enable brltty brlapi)"
328 conf_opts+=" $(use_enable caps cap-ng)"
329 conf_opts+=" $(use_enable curl)"
330 conf_opts+=" $(use_enable fdt)"
331 conf_opts+=" $(use_enable iscsi libiscsi)"
332 conf_opts+=" $(use_enable jpeg vnc-jpeg)"
333 conf_opts+=" $(use_enable kernel_linux kvm)"
334 conf_opts+=" $(use_enable kernel_linux nptl)"
335 conf_opts+=" $(use_enable ncurses curses)"
336 conf_opts+=" $(use_enable opengl)"
337 conf_opts+=" $(use_enable png vnc-png)"
338 conf_opts+=" $(use_enable rbd)"
339 conf_opts+=" $(use_enable sasl vnc-sasl)"
340 conf_opts+=" $(use_enable seccomp)"
341 conf_opts+=" $(use_enable smartcard smartcard-nss)"
342 conf_opts+=" $(use_enable spice)"
343 conf_opts+=" $(use_enable tls vnc-tls)"
344 conf_opts+=" $(use_enable tls vnc-ws)"
345 conf_opts+=" $(use_enable usbredir usb-redir)"
346 conf_opts+=" $(use_enable uuid)"
347 conf_opts+=" $(use_enable vde)"
348 conf_opts+=" $(use_enable vhost-net)"
349 conf_opts+=" $(use_enable virtfs)"
350 conf_opts+=" $(use_enable vnc)"
351 conf_opts+=" $(use_enable xattr attr)"
352 conf_opts+=" $(use_enable xen)"
353 conf_opts+=" $(use_enable xen xen-pci-passthrough)"
354 conf_opts+=" $(use_enable xfs xfsctl)"
355 use mixemu && conf_opts+=" --enable-mixemu"
356 conf_opts+=" --audio-drv-list=${audio_opts}"
357 conf_opts+=" --enable-migration-from-qemu-kvm"
358 fi
359
360 conf_opts+=" $(use_enable debug debug-info)"
361 conf_opts+=" $(use_enable debug debug-tcg)"
362 conf_opts+=" --enable-docs"
363 conf_opts+=" $(use_enable tci tcg-interpreter)"
364
365 # Add support for SystemTAP
366 use systemtap && conf_opts="${conf_opts} --enable-trace-backend=dtrace"
367
368 # Add support for static builds
369 use ${static_flag} && conf_opts="${conf_opts} --static --disable-pie"
370
371 # We always want to attempt to build with PIE support as it results
372 # in a more secure binary. But it doesn't work with static or if
373 # the current GCC doesn't have PIE support.
374 if ! use ${static_flag} && gcc-specs-pie; then
375 conf_opts="${conf_opts} --enable-pie"
376 fi
377
378 einfo "./configure ${conf_opts}"
379 cd ${builddir}
380 ../configure \
381 --cc="$(tc-getCC)" \
382 --host-cc="$(tc-getBUILD_CC)" \
383 ${conf_opts} \
384 || die "configure failed"
385
386 # FreeBSD's kernel does not support QEMU assigning/grabbing
387 # host USB devices yet
388 use kernel_FreeBSD && \
389 sed -E -e "s|^(HOST_USB=)bsd|\1stub|" -i "${S}"/config-host.mak
390 }
391
392 src_configure() {
393 softmmu_targets=
394 user_targets=
395
396 for target in ${IUSE_SOFTMMU_TARGETS} ; do
397 use "qemu_softmmu_targets_${target}" && \
398 softmmu_targets="${softmmu_targets},${target}-softmmu"
399 done
400
401 for target in ${IUSE_USER_TARGETS} ; do
402 use "qemu_user_targets_${target}" && \
403 user_targets="${user_targets},${target}-linux-user"
404 done
405
406 [[ -n ${softmmu_targets} ]] && \
407 einfo "Building the following softmmu targets: ${softmmu_targets}"
408
409 [[ -n ${user_targets} ]] && \
410 einfo "Building the following user targets: ${user_targets}"
411
412 if [[ -n ${softmmu_targets} ]]; then
413 mkdir "${S}/softmmu-build"
414 qemu_src_configure "softmmu" "${S}/softmmu-build"
415 fi
416
417 if [[ -n ${user_targets} ]]; then
418 mkdir "${S}/user-build"
419 qemu_src_configure "user" "${S}/user-build"
420 fi
421 }
422
423 src_compile() {
424 if [[ -n ${user_targets} ]]; then
425 cd "${S}/user-build"
426 default
427 fi
428
429 if [[ -n ${softmmu_targets} ]]; then
430 cd "${S}/softmmu-build"
431 default
432 fi
433 }
434
435 src_test() {
436 cd "${S}/softmmu-build"
437 emake -j1 check
438 emake -j1 check-report.html
439 }
440
441 qemu_python_install() {
442 python_domodule "${S}/QMP/qmp.py"
443
444 python_doscript "${S}/scripts/kvm/kvm_stat"
445 python_doscript "${S}/scripts/kvm/vmxcap"
446 python_doscript "${S}/QMP/qmp-shell"
447 python_doscript "${S}/QMP/qemu-ga-client"
448 }
449
450 src_install() {
451 if [[ -n ${user_targets} ]]; then
452 cd "${S}/user-build"
453 emake DESTDIR="${ED}" install
454
455 # Install binfmt handler init script for user targets
456 newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
457 fi
458
459 if [[ -n ${softmmu_targets} ]]; then
460 cd "${S}/softmmu-build"
461 emake DESTDIR="${ED}" install
462
463 if use test; then
464 dohtml check-report.html
465 fi
466
467 if use kernel_linux; then
468 udev_dorules "${FILESDIR}"/65-kvm.rules
469 fi
470
471 if use qemu_softmmu_targets_x86_64 ; then
472 newbin "${FILESDIR}/qemu-kvm-1.4" qemu-kvm
473 ewarn "The deprecated '/usr/bin/kvm' symlink is no longer installed"
474 ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit"
475 ewarn "your libvirt configs or other wrappers for ${PN}"
476 elif use x86 || use amd64; then
477 elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install"
478 elog "of the /usr/bin/qemu-kvm script."
479 fi
480
481 if use python; then
482 python_foreach_impl qemu_python_install
483 fi
484 fi
485
486 # Install config file example for qemu-bridge-helper
487 insinto "/etc/qemu"
488 doins "${FILESDIR}/bridge.conf"
489
490 # Remove the docdir placed qmp-commands.txt
491 mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/QMP/"
492
493 cd "${S}"
494 dodoc Changelog MAINTAINERS TODO docs/specs/pci-ids.txt
495 newdoc pc-bios/README README.pc-bios
496 dodoc QMP/qmp-commands.txt QMP/qmp-events.txt QMP/qmp-spec.txt
497
498 # Remove SeaBIOS since we're using the SeaBIOS packaged one
499 rm "${ED}/usr/share/qemu/bios.bin"
500 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
501 dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
502 fi
503
504 # Remove vgabios since we're using the vgabios packaged one
505 rm "${ED}/usr/share/qemu/vgabios.bin"
506 rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
507 rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
508 rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
509 rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
510 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
511 dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
512 dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
513 dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
514 dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
515 dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
516 fi
517
518 # Remove sgabios since we're using the sgabios packaged one
519 rm "${ED}/usr/share/qemu/sgabios.bin"
520 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
521 dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
522 fi
523
524 # Remove iPXE since we're using the iPXE packaged one
525 rm "${ED}"/usr/share/qemu/pxe-*.rom
526 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
527 dosym ../ipxe/808610de.rom /usr/share/qemu/pxe-e1000.rom
528 dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
529 dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
530 dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
531 dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
532 dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
533 fi
534 }
535
536 pkg_postinst() {
537 local virtfs_caps=
538
539 if qemu_support_kvm; then
540 elog "If you don't have kvm compiled into the kernel, make sure you have"
541 elog "the kernel module loaded before running kvm. The easiest way to"
542 elog "ensure that the kernel module is loaded is to load it on boot."
543 elog "For AMD CPUs the module is called 'kvm-amd'"
544 elog "For Intel CPUs the module is called 'kvm-intel'"
545 elog "Please review /etc/conf.d/modules for how to load these"
546 elog
547 elog "Make sure your user is in the 'kvm' group"
548 elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
549 elog
550 fi
551
552 virtfs_caps+="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,"
553 virtfs_caps+="cap_setgid,cap_mknod,cap_setuid"
554
555 fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
556 use virtfs && fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper
557
558 elog "The ssl USE flag was renamed to tls, so adjust your USE flags."
559 elog "The nss USE flag was renamed to smartcard, so adjust your USE flags."
560 }
561
562 pkg_info() {
563 echo "Using:"
564 echo " $(best_version app-emulation/spice-protocol)"
565 echo " $(best_version sys-firmware/ipxe)"
566 echo " $(best_version sys-firmware/seabios)"
567 if has_version sys-firmware/seabios[binary]; then
568 echo " USE=binary"
569 else
570 echo " USE=''"
571 fi
572 echo " $(best_version sys-firmware/vgabios)"
573 }