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: ChangeLog qemu-1.1.2-r3.ebuild
Date: Wed, 21 Nov 2012 21:56:17
Message-Id: 20121121215607.18D7720C65@flycatcher.gentoo.org
1 cardoe 12/11/21 21:56:06
2
3 Modified: ChangeLog
4 Added: qemu-1.1.2-r3.ebuild
5 Log:
6 Bump 1.1.2 with more patches from the 1.1.x stabilization queue.
7
8 (Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.147 app-emulation/qemu/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.147&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.147&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?r1=1.146&r2=1.147
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v
20 retrieving revision 1.146
21 retrieving revision 1.147
22 diff -u -r1.146 -r1.147
23 --- ChangeLog 21 Nov 2012 21:03:34 -0000 1.146
24 +++ ChangeLog 21 Nov 2012 21:56:06 -0000 1.147
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-emulation/qemu
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.146 2012/11/21 21:03:34 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.147 2012/11/21 21:56:06 cardoe Exp $
30 +
31 +*qemu-1.1.2-r3 (21 Nov 2012)
32 +
33 + 21 Nov 2012; Doug Goldstein <cardoe@g.o> +qemu-1.1.2-r3.ebuild:
34 + Bump 1.1.2 with more patches from the 1.1.x stabilization queue.
35
36 21 Nov 2012; Agostino Sarubbo <ago@g.o> qemu-1.1.2-r2.ebuild:
37 Stable for x86, wrt to bug #440092
38
39
40
41 1.1 app-emulation/qemu/qemu-1.1.2-r3.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-1.1.2-r3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-1.1.2-r3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: qemu-1.1.2-r3.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.1.2-r3.ebuild,v 1.1 2012/11/21 21:56:06 cardoe Exp $
51
52 EAPI="4"
53
54 MY_PN="qemu-kvm"
55 MY_P=${MY_PN}-${PV}
56
57 PYTHON_DEPEND="2"
58 inherit eutils flag-o-matic linux-info toolchain-funcs multilib python user
59 BACKPORTS=91ef50cf
60
61 if [[ ${PV} = *9999* ]]; then
62 EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git"
63 inherit git-2
64 SRC_URI=""
65 KEYWORDS=""
66 else
67 SRC_URI="mirror://sourceforge/kvm/${MY_PN}/${MY_P}.tar.gz
68 ${BACKPORTS:+
69 http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
70 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
71 fi
72
73 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
74 HOMEPAGE="http://www.linux-kvm.org"
75
76 LICENSE="GPL-2 LGPL-2 BSD-2"
77 SLOT="0"
78 IUSE="+aio alsa bluetooth brltty +caps +curl debug doc fdt +jpeg kernel_linux \
79 kernel_FreeBSD mixemu ncurses opengl +png pulseaudio python rbd sasl sdl \
80 smartcard spice static systemtap tci +threads tls usbredir +uuid vde +vhost-net \
81 virtfs +vnc xattr xen xfs"
82
83 COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64 s390x"
84 IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 mips64 mips64el ppcemb xtensa xtensaeb"
85 IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32"
86
87 # Setup the default SoftMMU targets, while using the loops
88 # below to setup the other targets.
89 REQUIRED_USE="|| ("
90
91 for target in ${IUSE_SOFTMMU_TARGETS}; do
92 IUSE="${IUSE} qemu_softmmu_targets_${target}"
93 REQUIRED_USE="${REQUIRED_USE} qemu_softmmu_targets_${target}"
94 done
95 REQUIRED_USE="${REQUIRED_USE} )"
96
97 for target in ${IUSE_USER_TARGETS}; do
98 IUSE="${IUSE} qemu_user_targets_${target}"
99 done
100
101 # Block USE flag configurations known to not work
102 REQUIRED_USE="${REQUIRED_USE}
103 static? ( !alsa !pulseaudio !bluetooth )
104 virtfs? ( xattr )"
105
106 # Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
107 LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
108 sys-apps/pciutils[static-libs(+)]
109 sys-libs/zlib[static-libs(+)]
110 aio? ( dev-libs/libaio[static-libs(+)] )
111 caps? ( sys-libs/libcap-ng[static-libs(+)] )
112 curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
113 fdt? ( >=sys-apps/dtc-1.2.0[static-libs(+)] )
114 jpeg? ( virtual/jpeg[static-libs(+)] )
115 ncurses? ( sys-libs/ncurses[static-libs(+)] )
116 png? ( media-libs/libpng[static-libs(+)] )
117 rbd? ( sys-cluster/ceph[static-libs(+)] )
118 sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
119 sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
120 spice? ( >=app-emulation/spice-0.9.0[static-libs(+)] )
121 tls? ( net-libs/gnutls[static-libs(+)] )
122 uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
123 vde? ( net-misc/vde[static-libs(+)] )
124 xattr? ( sys-apps/attr[static-libs(+)] )
125 xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
126 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
127 !app-emulation/kqemu
128 >=sys-firmware/seabios-1.7.0
129 sys-firmware/sgabios
130 sys-firmware/vgabios
131 alsa? ( >=media-libs/alsa-lib-1.0.13 )
132 bluetooth? ( net-wireless/bluez )
133 brltty? ( app-accessibility/brltty )
134 opengl? ( virtual/opengl )
135 pulseaudio? ( media-sound/pulseaudio )
136 python? ( =dev-lang/python-2*[ncurses] )
137 sdl? ( media-libs/libsdl[X] )
138 smartcard? ( dev-libs/nss )
139 spice? ( >=app-emulation/spice-protocol-0.8.1 )
140 systemtap? ( dev-util/systemtap )
141 usbredir? ( sys-apps/usbredir )
142 virtfs? ( sys-libs/libcap )
143 xen? ( app-emulation/xen-tools )"
144
145 DEPEND="${RDEPEND}
146 virtual/pkgconfig
147 doc? ( app-text/texi2html )
148 kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
149 static? ( ${LIB_DEPEND} )"
150
151 S="${WORKDIR}/${MY_P}"
152
153 STRIP_MASK="/usr/share/qemu/palcode-clipper"
154
155 QA_PREBUILT="
156 usr/share/qemu/openbios-ppc
157 usr/share/qemu/openbios-sparc64
158 usr/share/qemu/openbios-sparc32
159 usr/share/qemu/palcode-clipper"
160
161 QA_WX_LOAD="${QA_PRESTRIPPED}
162 usr/bin/qemu-i386
163 usr/bin/qemu-x86_64
164 usr/bin/qemu-alpha
165 usr/bin/qemu-arm
166 usr/bin/qemu-cris
167 usr/bin/qemu-m68k
168 usr/bin/qemu-microblaze
169 usr/bin/qemu-mips
170 usr/bin/qemu-mipsel
171 usr/bin/qemu-ppc
172 usr/bin/qemu-ppc64
173 usr/bin/qemu-ppc64abi32
174 usr/bin/qemu-sh4
175 usr/bin/qemu-sh4eb
176 usr/bin/qemu-sparc
177 usr/bin/qemu-sparc64
178 usr/bin/qemu-armeb
179 usr/bin/qemu-sparc32plus"
180
181 pkg_pretend() {
182 if use kernel_linux && kernel_is lt 2 6 25; then
183 eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
184 elif use kernel_linux; then
185 if ! linux_config_exists; then
186 eerror "Unable to check your kernel for KVM support"
187 else
188 CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
189 ERROR_KVM="You must enable KVM in your kernel to continue"
190 ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
191 ERROR_KVM_AMD+=" your kernel configuration."
192 ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
193 ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
194 ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
195 ERROR_TUN+=" into your kernel or loaded as a module to use the"
196 ERROR_TUN+=" virtual network device if using -net tap."
197 ERROR_BRIDGE="You will also need support for 802.1d"
198 ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
199 use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
200 ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
201 ERROR_VHOST_NET+=" support"
202
203 if use amd64 || use x86 || use amd64-linux || use x86-linux; then
204 CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
205 fi
206
207 use python && CONFIG_CHECK+=" ~DEBUG_FS"
208 ERROR_DEBUG_FS="debugFS support required for kvm_stat"
209
210 # Now do the actual checks setup above
211 check_extra_config
212 fi
213 fi
214
215 if use static; then
216 ewarn "USE=static is very much a moving target because of the packages"
217 ewarn "we depend on will have their static libs ripped out or wrapped"
218 ewarn "with USE=static-libs or USE=static due to continued dicsussion"
219 ewarn "on the mailing list about USE=static's place in Gentoo. As a"
220 ewarn "result what worked today may not work tomorrow."
221 fi
222 }
223
224 pkg_setup() {
225 python_set_active_version 2
226 python_pkg_setup
227
228 enewgroup kvm 78
229 }
230
231 src_prepare() {
232 # Alter target makefiles to accept CFLAGS set via flag-o
233 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
234 Makefile Makefile.target || die
235
236 python_convert_shebangs -r 2 "${S}/scripts/kvm/kvm_stat"
237
238 [[ -n ${BACKPORTS} ]] && \
239 EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
240 epatch
241
242 epatch_user
243 }
244
245 src_configure() {
246 local conf_opts audio_opts user_targets
247
248 for target in ${IUSE_SOFTMMU_TARGETS} ; do
249 use "qemu_softmmu_targets_${target}" && \
250 softmmu_targets="${softmmu_targets} ${target}-softmmu"
251 done
252
253 for target in ${IUSE_USER_TARGETS} ; do
254 use "qemu_user_targets_${target}" && \
255 user_targets="${user_targets} ${target}-linux-user"
256 done
257
258 einfo "Building the following softmmu targets: ${softmmu_targets}"
259
260 if [[ -n ${user_targets} ]]; then
261 einfo "Building the following user targets: ${user_targets}"
262 conf_opts="${conf_opts} --enable-linux-user"
263 else
264 conf_opts="${conf_opts} --disable-linux-user"
265 fi
266
267 # Add support for SystemTAP
268 use systemtap && conf_opts="${conf_opts} --enable-trace-backend=dtrace"
269
270 # Fix QA issues. QEMU needs executable heaps and we need to mark it as such
271 #conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap"
272
273 # Add support for static builds
274 use static && conf_opts="${conf_opts} --static --disable-pie"
275
276 # We always want to attempt to build with PIE support as it results
277 # in a more secure binary. But it doesn't work with static or if
278 # the current GCC doesn't have PIE support.
279 if ! use static && gcc-specs-pie; then
280 conf_opts="${conf_opts} --enable-pie"
281 fi
282
283 # audio options
284 audio_opts="oss"
285 use alsa && audio_opts="alsa,${audio_opts}"
286 use sdl && audio_opts="sdl,${audio_opts}"
287 use pulseaudio && audio_opts="pa,${audio_opts}"
288 use mixemu && conf_opts="${conf_opts} --enable-mixemu"
289
290 # --enable-vnc-thread will go away in 1.2
291 # $(use_enable xen xen-pci-passthrough) for 1.2
292 ./configure --prefix=/usr \
293 --sysconfdir=/etc \
294 --disable-bsd-user \
295 --disable-guest-agent \
296 --disable-libiscsi \
297 --disable-strip \
298 --disable-werror \
299 --python=python2 \
300 $(use_enable aio linux-aio) \
301 $(use_enable bluetooth bluez) \
302 $(use_enable brltty brlapi) \
303 $(use_enable caps cap-ng) \
304 $(use_enable curl) \
305 $(use_enable debug debug-info) \
306 $(use_enable debug debug-mon) \
307 $(use_enable debug debug-tcg) \
308 $(use_enable doc docs) \
309 $(use_enable fdt) \
310 $(use_enable jpeg vnc-jpeg) \
311 $(use_enable kernel_linux kvm) \
312 $(use_enable kernel_linux kvm-device-assignment) \
313 $(use_enable kernel_linux nptl) \
314 $(use_enable ncurses curses) \
315 $(use_enable opengl) \
316 $(use_enable png vnc-png) \
317 $(use_enable rbd) \
318 $(use_enable sasl vnc-sasl) \
319 $(use_enable sdl) \
320 $(use_enable smartcard smartcard) \
321 $(use_enable smartcard smartcard-nss) \
322 $(use_enable spice) \
323 $(use_enable tci tcg-interpreter) \
324 $(use_enable threads vnc-thread) \
325 $(use_enable tls vnc-tls) \
326 $(use_enable usbredir usb-redir) \
327 $(use_enable uuid) \
328 $(use_enable vde) \
329 $(use_enable vhost-net) \
330 $(use_enable virtfs) \
331 $(use_enable vnc) \
332 $(use_enable xattr attr) \
333 $(use_enable xen) \
334 $(use_enable xfs xfsctl) \
335 --audio-drv-list=${audio_opts} \
336 --target-list="${softmmu_targets} ${user_targets}" \
337 --cc="$(tc-getCC)" \
338 --host-cc="$(tc-getBUILD_CC)" \
339 ${conf_opts} \
340 || die "configure failed"
341
342 # FreeBSD's kernel does not support QEMU assigning/grabbing
343 # host USB devices yet
344 use kernel_FreeBSD && \
345 sed -E -e "s|^(HOST_USB=)bsd|\1stub|" -i "${S}"/config-host.mak
346 }
347
348 src_install() {
349 emake DESTDIR="${ED}" install
350
351 if [[ -n ${softmmu_targets} ]]; then
352 if use kernel_linux; then
353 insinto /lib/udev/rules.d/
354 doins "${FILESDIR}"/65-kvm.rules
355 fi
356
357 if use qemu_softmmu_targets_x86_64 ; then
358 dobin "${FILESDIR}"/qemu-kvm
359 ewarn "The depreciated '/usr/bin/kvm' symlink is no longer installed"
360 ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit"
361 ewarn "your libvirt configs or other wrappers for ${PN}"
362 else
363 elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install"
364 elog "of /usr/bin/qemu-kvm"
365 fi
366 fi
367
368 dodoc Changelog MAINTAINERS TODO pci-ids.txt
369 newdoc pc-bios/README README.pc-bios
370
371 if use doc; then
372 dohtml qemu-doc.html qemu-tech.html || die
373 fi
374
375 use python & dobin scripts/kvm/kvm_stat
376
377 # Avoid collision with app-emulation/libcacard
378 use smartcard && mv "${ED}/usr/bin/vscclient" "${ED}/usr/bin/qemu-vscclient"
379
380 # Remove SeaBIOS since we're using the SeaBIOS packaged one
381 rm "${ED}/usr/share/qemu/bios.bin"
382 dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
383
384 # Remove vgabios since we're using the vgabios packaged one
385 rm "${ED}/usr/share/qemu/vgabios.bin"
386 rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
387 rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
388 rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
389 rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
390 dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
391 dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
392 dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
393 dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
394 dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
395
396 # Remove sgabios since we're using the sgabios packaged one
397 rm "${ED}/usr/share/qemu/sgabios.bin"
398 dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
399 }
400
401 pkg_postinst() {
402 if [[ -n ${softmmu_targets} ]]; then
403 elog "If you don't have kvm compiled into the kernel, make sure you have"
404 elog "the kernel module loaded before running kvm. The easiest way to"
405 elog "ensure that the kernel module is loaded is to load it on boot."
406 elog "For AMD CPUs the module is called 'kvm-amd'"
407 elog "For Intel CPUs the module is called 'kvm-intel'"
408 elog "Please review /etc/conf.d/modules for how to load these"
409 elog
410 elog "Make sure your user is in the 'kvm' group"
411 elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
412 elog
413 elog "The ssl USE flag was renamed to tls, so adjust your USE flags."
414 elog "The nss USE flag was renamed to smartcard, so adjust your USE flags."
415 fi
416 }