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