Gentoo Archives: gentoo-commits

From: "Jorge Manuel B. S. Vicetto (jmbsvicetto)" <jmbsvicetto@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/qemu-kvm: ChangeLog qemu-kvm-0.13.0-r1.ebuild qemu-kvm-9999.ebuild qemu-kvm-0.12.5.ebuild
Date: Tue, 02 Nov 2010 16:29:24
Message-Id: 20101102162919.647FB20051@flycatcher.gentoo.org
1 jmbsvicetto 10/11/02 16:29:19
2
3 Modified: ChangeLog qemu-kvm-9999.ebuild
4 Added: qemu-kvm-0.13.0-r1.ebuild
5 Removed: qemu-kvm-0.12.5.ebuild
6 Log:
7 Synced the qemu-kvm-0.13.0-r1 ebuild with qemu-kvm-9999 ebuild.
8 Added missing jpeg and png use flags. Dropped the non-existent kvm-trace use flag - fixes bug 343317.
9 Moved some checks from pkg_setup to src_configure. Applied the fix to the $(prefix)/etc issue.
10 Dropped unused qemu-kvm-0.12.1-kvm_save_mpstate-workaround.patch file - fixes bug 340727.
11 Included patch file to fix issues with usb, bug 337988 , but won't use it until upstream commits it to the git tree or gives an ok.
12 Dropped old version.
13
14 (Portage version: 2.2.0_alpha3/cvs/Linux x86_64)
15
16 Revision Changes Path
17 1.45 app-emulation/qemu-kvm/ChangeLog
18
19 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.45&view=markup
20 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.45&content-type=text/plain
21 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?r1=1.44&r2=1.45
22
23 Index: ChangeLog
24 ===================================================================
25 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v
26 retrieving revision 1.44
27 retrieving revision 1.45
28 diff -u -r1.44 -r1.45
29 --- ChangeLog 28 Oct 2010 09:54:24 -0000 1.44
30 +++ ChangeLog 2 Nov 2010 16:29:19 -0000 1.45
31 @@ -1,6 +1,23 @@
32 # ChangeLog for app-emulation/qemu-kvm
33 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
34 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.44 2010/10/28 09:54:24 lu_zero Exp $
35 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.45 2010/11/02 16:29:19 jmbsvicetto Exp $
36 +
37 +*qemu-kvm-0.13.0-r1 (02 Nov 2010)
38 +
39 + 02 Nov 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@g.o>
40 + -files/qemu-kvm-0.12.1-kvm_save_mpstate-workaround.patch,
41 + -qemu-kvm-0.12.5.ebuild, +qemu-kvm-0.13.0-r1.ebuild, qemu-kvm-9999.ebuild,
42 + +files/qemu-kvm-guest-hang-on-usb-add.patch:
43 + Synced the qemu-kvm-0.13.0-r1 ebuild with qemu-kvm-9999 ebuild.
44 + Added missing jpeg and png use flags. Dropped the non-existent kvm-trace
45 + use flag - fixes bug 343317.
46 + Moved some checks from pkg_setup to src_configure. Applied the fix to the
47 + $(prefix)/etc issue.
48 + Dropped unused qemu-kvm-0.12.1-kvm_save_mpstate-workaround.patch file -
49 + fixes bug 340727.
50 + Included patch file to fix issues with usb, bug 337988 , but won't use it
51 + until upstream commits it to the git tree or gives an ok.
52 + Dropped old version.
53
54 *qemu-kvm-0.13.0 (28 Oct 2010)
55
56
57
58
59 1.13 app-emulation/qemu-kvm/qemu-kvm-9999.ebuild
60
61 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild?rev=1.13&view=markup
62 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild?rev=1.13&content-type=text/plain
63 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild?r1=1.12&r2=1.13
64
65 Index: qemu-kvm-9999.ebuild
66 ===================================================================
67 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild,v
68 retrieving revision 1.12
69 retrieving revision 1.13
70 diff -u -r1.12 -r1.13
71 --- qemu-kvm-9999.ebuild 6 Sep 2010 11:07:09 -0000 1.12
72 +++ qemu-kvm-9999.ebuild 2 Nov 2010 16:29:19 -0000 1.13
73 @@ -1,6 +1,6 @@
74 # Copyright 1999-2010 Gentoo Foundation
75 # Distributed under the terms of the GNU General Public License v2
76 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild,v 1.12 2010/09/06 11:07:09 jmbsvicetto Exp $
77 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-9999.ebuild,v 1.13 2010/11/02 16:29:19 jmbsvicetto Exp $
78
79 EAPI="2"
80
81 @@ -90,8 +90,8 @@
82 }
83
84 pkg_setup() {
85 -
86 local counter="0" check
87 +
88 use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
89 for check in ${IUSE_SOFTMMU_TARGETS} ; do
90 use "qemu_softmmu_targets_${check}" && counter="1"
91 @@ -188,6 +188,7 @@
92 use sdl && audio_opts="sdl ${audio_opts}"
93 ./configure --prefix=/usr \
94 --disable-strip \
95 + --disable-werror \
96 --enable-kvm \
97 --enable-nptl \
98 --enable-uuid \
99 @@ -217,10 +218,6 @@
100 doins kvm/scripts/qemu-ifup || die
101 fi
102
103 - dodoc Changelog MAINTAINERS TODO pci-ids.txt || die
104 - newdoc pc-bios/README README.pc-bios || die
105 - dohtml qemu-doc.html qemu-tech.html || die
106 -
107 if use qemu_softmmu_targets_x86_64 ; then
108 dobin "${FILESDIR}"/qemu-kvm
109 dosym /usr/bin/qemu-kvm /usr/bin/kvm
110 @@ -228,6 +225,10 @@
111 elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install"
112 elog "of /usr/bin/qemu-kvm and /usr/bin/kvm"
113 fi
114 +
115 + dodoc Changelog MAINTAINERS TODO pci-ids.txt || die
116 + newdoc pc-bios/README README.pc-bios || die
117 + dohtml qemu-doc.html qemu-tech.html || die
118 }
119
120 pkg_postinst() {
121
122
123
124 1.1 app-emulation/qemu-kvm/qemu-kvm-0.13.0-r1.ebuild
125
126 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.13.0-r1.ebuild?rev=1.1&view=markup
127 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.13.0-r1.ebuild?rev=1.1&content-type=text/plain
128
129 Index: qemu-kvm-0.13.0-r1.ebuild
130 ===================================================================
131 # Copyright 1999-2010 Gentoo Foundation
132 # Distributed under the terms of the GNU General Public License v2
133 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.13.0-r1.ebuild,v 1.1 2010/11/02 16:29:19 jmbsvicetto Exp $
134
135 EAPI="2"
136
137 if [[ ${PV} = *9999* ]]; then
138 EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git"
139 GIT_ECLASS="git"
140 fi
141
142 inherit eutils flag-o-matic ${GIT_ECLASS} linux-info toolchain-funcs
143
144 if [[ ${PV} = *9999* ]]; then
145 SRC_URI=""
146 KEYWORDS=""
147 else
148 SRC_URI="mirror://sourceforge/kvm/${PN}/${P}.tar.gz"
149 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
150 fi
151
152 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
153 HOMEPAGE="http://www.linux-kvm.org"
154
155 LICENSE="GPL-2"
156 SLOT="0"
157 # xen is disabled until the deps are fixed
158 IUSE="+aio alsa bluetooth brltty curl esd fdt hardened jpeg ncurses \
159 png pulseaudio qemu-ifup sasl sdl ssl static vde"
160
161 COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64"
162 IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb"
163 IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus"
164
165 for target in ${IUSE_SOFTMMU_TARGETS}; do
166 IUSE="${IUSE} +qemu_softmmu_targets_${target}"
167 done
168
169 for target in ${IUSE_USER_TARGETS}; do
170 IUSE="${IUSE} +qemu_user_targets_${target}"
171 done
172
173 RESTRICT="test"
174
175 RDEPEND="
176 !app-emulation/kqemu
177 !app-emulation/qemu
178 !app-emulation/qemu-softmmu
179 !app-emulation/qemu-user
180 !app-emulation/qemu-kvm-spice
181 sys-apps/pciutils
182 >=sys-apps/util-linux-2.16.0
183 sys-libs/zlib
184 aio? ( dev-libs/libaio )
185 alsa? ( >=media-libs/alsa-lib-1.0.13 )
186 bluetooth? ( net-wireless/bluez )
187 brltty? ( app-accessibility/brltty )
188 curl? ( net-misc/curl )
189 esd? ( media-sound/esound )
190 fdt? ( sys-apps/dtc )
191 jpeg? ( media-libs/jpeg )
192 ncurses? ( sys-libs/ncurses )
193 png? ( media-libs/libpng )
194 pulseaudio? ( media-sound/pulseaudio )
195 qemu-ifup? ( sys-apps/iproute2 net-misc/bridge-utils )
196 sasl? ( dev-libs/cyrus-sasl )
197 sdl? ( >=media-libs/libsdl-1.2.11[X] )
198 ssl? ( net-libs/gnutls )
199 vde? ( net-misc/vde )
200 "
201
202 DEPEND="${RDEPEND}
203 app-text/texi2html
204 >=sys-kernel/linux-headers-2.6.29
205 ssl? ( dev-util/pkgconfig )
206 "
207
208 kvm_kern_warn() {
209 eerror "Please enable KVM support in your kernel, found at:"
210 eerror
211 eerror " Virtualization"
212 eerror " Kernel-based Virtual Machine (KVM) support"
213 eerror
214 }
215
216 pkg_setup() {
217 use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
218
219 if kernel_is lt 2 6 25; then
220 eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
221 eerror "Either upgrade your kernel"
222 else
223 if ! linux_config_exists; then
224 eerror "Unable to check your kernel for KVM support"
225 kvm_kern_warn
226 elif ! linux_chkconfig_present KVM; then
227 kvm_kern_warn
228 fi
229 fi
230
231 enewgroup kvm
232 }
233
234 src_prepare() {
235 # prevent docs to get automatically installed
236 sed -i '/$(DESTDIR)$(docdir)/d' Makefile || die
237 # Alter target makefiles to accept CFLAGS set via flag-o
238 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
239 Makefile Makefile.target || die
240 # append CFLAGS while linking
241 sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak || die
242
243 # remove part to make udev happy
244 sed -e 's~NAME="%k", ~~' -i kvm/scripts/65-kvm.rules || die
245
246 # ${PN}-guest-hang-on-usb-add.patch was sent by Timothy Jones
247 # to the qemu-devel ml - bug 337988
248 epatch "${FILESDIR}/qemu-0.11.0-mips64-user-fix.patch" \
249 "${FILESDIR}/${PN}-0.12.3-include-madvise-defines.patch"
250 # "${FILESDIR}/${PN}-guest-hang-on-usb-add.patch"
251 }
252
253 src_configure() {
254 local conf_opts audio_opts softmmu_targets user_targets
255
256 for target in ${IUSE_SOFTMMU_TARGETS} ; do
257 use "qemu_softmmu_targets_${target}" && \
258 softmmu_targets="${softmmu_targets} ${target}-softmmu"
259 done
260
261 for target in ${IUSE_USER_TARGETS} ; do
262 use "qemu_user_targets_${target}" && \
263 user_targets="${user_targets} ${target}-linux-user"
264 done
265
266 if [ -z "${softmmu_targets}" ]; then
267 conf_opts="${conf_opts} --disable-system"
268 else
269 einfo "Building the following softmmu targets: ${softmmu_targets}"
270 fi
271
272 if [ ! -z "${user_targets}" ]; then
273 einfo "Building the following user targets: ${user_targets}"
274 conf_opts="${conf_opts} --enable-linux-user"
275 else
276 conf_opts="${conf_opts} --disable-linux-user"
277 fi
278
279 # Fix QA issues. QEMU needs executable heaps and we need to mark it as such
280 conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap"
281
282 # Add support for static builds
283 use static && conf_opts="${conf_opts} --static"
284
285 # Fix the $(prefix)/etc issue
286 conf_opts="${conf_opts} --sysconfdir=/etc"
287
288 #config options
289 conf_opts="${conf_opts} $(use_enable aio linux-aio)"
290 conf_opts="${conf_opts} $(use_enable bluetooth bluez)"
291 conf_opts="${conf_opts} $(use_enable brltty brlapi)"
292 conf_opts="${conf_opts} $(use_enable curl)"
293 conf_opts="${conf_opts} $(use_enable fdt)"
294 conf_opts="${conf_opts} $(use_enable hardened user-pie)"
295 conf_opts="${conf_opts} $(use_enable jpeg vnc-jpeg)"
296 conf_opts="${conf_opts} $(use_enable ncurses curses)"
297 conf_opts="${conf_opts} $(use_enable png vnc-png)"
298 conf_opts="${conf_opts} $(use_enable sasl vnc-sasl)"
299 conf_opts="${conf_opts} $(use_enable sdl)"
300 conf_opts="${conf_opts} $(use_enable ssl vnc-tls)"
301 conf_opts="${conf_opts} $(use_enable vde)"
302 # conf_opts="${conf_opts} $(use_enable xen)"
303 conf_opts="${conf_opts} --disable-xen"
304 conf_opts="${conf_opts} --disable-darwin-user --disable-bsd-user"
305
306 # audio options
307 audio_opts="oss"
308 use alsa && audio_opts="alsa ${audio_opts}"
309 use esd && audio_opts="esd ${audio_opts}"
310 use pulseaudio && audio_opts="pa ${audio_opts}"
311 use sdl && audio_opts="sdl ${audio_opts}"
312 ./configure --prefix=/usr \
313 --disable-strip \
314 --disable-werror \
315 --enable-kvm \
316 --enable-nptl \
317 --enable-uuid \
318 ${conf_opts} \
319 --audio-drv-list="${audio_opts}" \
320 --target-list="${softmmu_targets} ${user_targets}" \
321 --cc="$(tc-getCC)" \
322 --host-cc="$(tc-getBUILD_CC)" \
323 || die "configure failed"
324
325 # this is for qemu upstream's threaded support which is
326 # in development and broken
327 # the kvm project has its own support for threaded IO
328 # which is always on and works
329 # --enable-io-thread \
330 }
331
332 src_install() {
333 emake DESTDIR="${D}" install || die "make install failed"
334
335 if [ ! -z "${softmmu_targets}" ]; then
336 insinto /etc/udev/rules.d/
337 doins kvm/scripts/65-kvm.rules || die
338
339 if use qemu-ifup; then
340 insinto /etc/qemu/
341 insopts -m0755
342 doins kvm/scripts/qemu-ifup || die
343 fi
344
345 if use qemu_softmmu_targets_x86_64 ; then
346 dobin "${FILESDIR}"/qemu-kvm
347 dosym /usr/bin/qemu-kvm /usr/bin/kvm
348 else
349 elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install"
350 elog "of /usr/bin/qemu-kvm and /usr/bin/kvm"
351 fi
352 fi
353
354 dodoc Changelog MAINTAINERS TODO pci-ids.txt || die
355 newdoc pc-bios/README README.pc-bios || die
356 dohtml qemu-doc.html qemu-tech.html || die
357 }
358
359 pkg_postinst() {
360
361 if [ ! -z "${softmmu_targets}" ]; then
362 elog "If you don't have kvm compiled into the kernel, make sure you have"
363 elog "the kernel module loaded before running kvm. The easiest way to"
364 elog "ensure that the kernel module is loaded is to load it on boot."
365 elog "For AMD CPUs the module is called 'kvm-amd'"
366 elog "For Intel CPUs the module is called 'kvm-intel'"
367 elog "Please review /etc/conf.d/modules for how to load these"
368 elog
369 elog "Make sure your user is in the 'kvm' group"
370 elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
371 elog
372 elog "You will need the Universal TUN/TAP driver compiled into your"
373 elog "kernel or loaded as a module to use the virtual network device"
374 elog "if using -net tap. You will also need support for 802.1d"
375 elog "Ethernet Bridging and a configured bridge if using the provided"
376 elog "kvm-ifup script from /etc/kvm."
377 elog
378 elog "The gnutls use flag was renamed to ssl, so adjust your use flags."
379 fi
380 }