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-kvm: qemu-kvm-0.12.5.ebuild ChangeLog
Date: Tue, 27 Jul 2010 23:40:56
Message-Id: 20100727234050.8C8D32CE15@corvid.gentoo.org
1 cardoe 10/07/27 23:40:50
2
3 Modified: ChangeLog
4 Added: qemu-kvm-0.12.5.ebuild
5 Log:
6 bump for upstream release
7 (Portage version: 2.1.8.3/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.34 app-emulation/qemu-kvm/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.34&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.34&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?r1=1.33&r2=1.34
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v
19 retrieving revision 1.33
20 retrieving revision 1.34
21 diff -u -r1.33 -r1.34
22 --- ChangeLog 20 Jul 2010 23:39:35 -0000 1.33
23 +++ ChangeLog 27 Jul 2010 23:40:49 -0000 1.34
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-emulation/qemu-kvm
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.33 2010/07/20 23:39:35 cardoe Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.34 2010/07/27 23:40:49 cardoe Exp $
29 +
30 +*qemu-kvm-0.12.5 (27 Jul 2010)
31 +
32 + 27 Jul 2010; Doug Goldstein <cardoe@g.o> +qemu-kvm-0.12.5.ebuild:
33 + bump for upstream release
34
35 *qemu-kvm-0.12.4-r3 (20 Jul 2010)
36
37
38
39
40 1.1 app-emulation/qemu-kvm/qemu-kvm-0.12.5.ebuild
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.12.5.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.12.5.ebuild?rev=1.1&content-type=text/plain
44
45 Index: qemu-kvm-0.12.5.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.12.5.ebuild,v 1.1 2010/07/27 23:40:49 cardoe Exp $
50
51 #BACKPORTS=2
52
53 EAPI="2"
54
55 if [[ ${PV} = *9999* ]]; then
56 EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git"
57 GIT_ECLASS="git"
58 fi
59
60 inherit eutils flag-o-matic ${GIT_ECLASS} linux-info toolchain-funcs
61
62 if [[ ${PV} = *9999* ]]; then
63 SRC_URI=""
64 KEYWORDS=""
65 else
66 SRC_URI="mirror://sourceforge/kvm/${PN}/${P}.tar.gz
67 ${BACKPORTS:+mirror://gentoo/${P}-backports-${BACKPORTS}.tar.bz2}"
68 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
69 fi
70
71 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
72 HOMEPAGE="http://www.linux-kvm.org"
73
74 LICENSE="GPL-2"
75 SLOT="0"
76 # xen is disabled until the deps are fixed
77 IUSE="+aio alsa bluetooth curl esd gnutls fdt hardened kvm-trace ncurses \
78 pulseaudio qemu-ifup sasl sdl static vde"
79
80 COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64"
81 IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb"
82 IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus"
83
84 for target in ${IUSE_SOFTMMU_TARGETS}; do
85 IUSE="${IUSE} +qemu_softmmu_targets_${target}"
86 done
87
88 for target in ${IUSE_USER_TARGETS}; do
89 IUSE="${IUSE} +qemu_user_targets_${target}"
90 done
91
92 RESTRICT="test"
93
94 RDEPEND="
95 !app-emulation/kqemu
96 !app-emulation/qemu
97 !app-emulation/qemu-softmmu
98 !app-emulation/qemu-user
99 sys-apps/pciutils
100 >=sys-apps/util-linux-2.16.0
101 sys-libs/zlib
102 aio? ( dev-libs/libaio )
103 alsa? ( >=media-libs/alsa-lib-1.0.13 )
104 bluetooth? ( net-wireless/bluez )
105 curl? ( net-misc/curl )
106 esd? ( media-sound/esound )
107 fdt? ( sys-apps/dtc )
108 gnutls? ( net-libs/gnutls )
109 ncurses? ( sys-libs/ncurses )
110 pulseaudio? ( media-sound/pulseaudio )
111 qemu-ifup? ( sys-apps/iproute2 net-misc/bridge-utils )
112 sasl? ( dev-libs/cyrus-sasl )
113 sdl? ( >=media-libs/libsdl-1.2.11[X] )
114 vde? ( net-misc/vde )
115 "
116
117 DEPEND="${RDEPEND}
118 app-text/texi2html
119 >=sys-kernel/linux-headers-2.6.29
120 gnutls? ( dev-util/pkgconfig )"
121
122 kvm_kern_warn() {
123 eerror "Please enable KVM support in your kernel, found at:"
124 eerror
125 eerror " Virtualization"
126 eerror " Kernel-based Virtual Machine (KVM) support"
127 eerror
128 }
129
130 pkg_setup() {
131
132 local counter="0" check
133 use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
134 for check in ${IUSE_SOFTMMU_TARGETS} ; do
135 use "qemu_softmmu_targets_${check}" && counter="1"
136 done
137 [[ ${counter} == 0 ]] && die "You need to set at least 1 target in QEMU_SOFTMMU_TARGETS"
138
139 if kernel_is lt 2 6 25; then
140 eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
141 eerror "Either upgrade your kernel"
142 else
143 if ! linux_config_exists; then
144 eerror "Unable to check your kernel for KVM support"
145 kvm_kern_warn
146 elif ! linux_chkconfig_present KVM; then
147 kvm_kern_warn
148 fi
149 fi
150
151 enewgroup kvm
152 }
153
154 src_prepare() {
155 # prevent docs to get automatically installed
156 sed -i '/$(DESTDIR)$(docdir)/d' Makefile || die
157 # Alter target makefiles to accept CFLAGS set via flag-o
158 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
159 Makefile Makefile.target || die
160 # append CFLAGS while linking
161 sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak || die
162
163 # remove part to make udev happy
164 sed -e 's~NAME="%k", ~~' -i kvm/scripts/65-kvm.rules || die
165
166 epatch "${FILESDIR}"/qemu-0.11.0-mips64-user-fix.patch \
167 "${FILESDIR}"/${PN}-0.12.3-fix-crash-with-sdl.patch \
168 "${FILESDIR}"/${PN}-0.12.3-include-madvise-defines.patch
169
170 [[ -n ${BACKPORTS} ]] && \
171 EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" epatch
172 }
173
174 src_configure() {
175 local conf_opts audio_opts softmmu_targets user_targets
176
177 for target in ${IUSE_SOFTMMU_TARGETS} ; do
178 use "qemu_softmmu_targets_${target}" && \
179 softmmu_targets="${softmmu_targets} ${target}-softmmu"
180 done
181
182 for target in ${IUSE_USER_TARGETS} ; do
183 use "qemu_user_targets_${target}" && \
184 user_targets="${user_targets} ${target}-linux-user"
185 done
186
187 if [ ! -z "${softmmu_targets}" ]; then
188 einfo "Building the following softmmu targets: ${softmmu_targets}"
189 fi
190
191 if [ ! -z "${user_targets}" ]; then
192 einfo "Building the following user targets: ${user_targets}"
193 conf_opts="${conf_opts} --enable-linux-user"
194 else
195 conf_opts="${conf_opts} --disable-linux-user"
196 fi
197
198 # Fix QA issues. QEMU needs executable heaps and we need to mark it as such
199 conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap"
200
201 # Add support for static builds
202 use static && conf_opts="${conf_opts} --static"
203
204 #config options
205 conf_opts="${conf_opts} $(use_enable aio linux-aio)"
206 use bluetooth || conf_opts="${conf_opts} --disable-bluez"
207 conf_opts="${conf_opts} $(use_enable curl)"
208 use gnutls || conf_opts="${conf_opts} --disable-vnc-tls"
209 conf_opts="${conf_opts} $(use_enable fdt)"
210 use hardened && conf_opts="${conf_opts} --enable-user-pie"
211 use kvm-trace && conf_opts="${conf_opts} --with-kvm-trace"
212 use ncurses || conf_opts="${conf_opts} --disable-curses"
213 use sasl || conf_opts="${conf_opts} --disable-vnc-sasl"
214 use sdl || conf_opts="${conf_opts} --disable-sdl"
215 use vde || conf_opts="${conf_opts} --disable-vde"
216 # conf_opts="${conf_opts} $(use_enable xen)"
217 conf_opts="${conf_opts} --disable-xen"
218 conf_opts="${conf_opts} --disable-darwin-user --disable-bsd-user"
219
220 # audio options
221 audio_opts="oss"
222 use alsa && audio_opts="alsa ${audio_opts}"
223 use esd && audio_opts="esd ${audio_opts}"
224 use pulseaudio && audio_opts="pa ${audio_opts}"
225 use sdl && audio_opts="sdl ${audio_opts}"
226 ./configure --prefix=/usr \
227 --disable-strip \
228 --enable-kvm \
229 --enable-nptl \
230 --enable-uuid \
231 ${conf_opts} \
232 --audio-drv-list="${audio_opts}" \
233 --target-list="${softmmu_targets} ${user_targets}" \
234 --cc="$(tc-getCC)" \
235 --host-cc="$(tc-getBUILD_CC)" \
236 || die "configure failed"
237
238 # this is for qemu upstream's threaded support which is
239 # in development and broken
240 # the kvm project has its own support for threaded IO
241 # which is always on and works
242 # --enable-io-thread \
243 }
244
245 src_install() {
246 emake DESTDIR="${D}" install || die "make install failed"
247
248 insinto /etc/udev/rules.d/
249 doins kvm/scripts/65-kvm.rules || die
250
251 if use qemu-ifup; then
252 insinto /etc/qemu/
253 insopts -m0755
254 doins kvm/scripts/qemu-ifup || die
255 fi
256
257 dodoc Changelog MAINTAINERS TODO pci-ids.txt || die
258 newdoc pc-bios/README README.pc-bios || die
259 dohtml qemu-doc.html qemu-tech.html || die
260
261 if use qemu_softmmu_targets_x86_64 ; then
262 dobin "${FILESDIR}"/qemu-kvm
263 dosym /usr/bin/qemu-kvm /usr/bin/kvm
264 else
265 elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install"
266 elog "of /usr/bin/qemu-kvm and /usr/bin/kvm"
267 fi
268 }
269
270 pkg_postinst() {
271 elog "If you don't have kvm compiled into the kernel, make sure you have"
272 elog "the kernel module loaded before running kvm. The easiest way to"
273 elog "ensure that the kernel module is loaded is to load it on boot."
274 elog "For AMD CPUs the module is called 'kvm-amd'"
275 elog "For Intel CPUs the module is called 'kvm-intel'"
276 elog "Please review /etc/conf.d/modules for how to load these"
277 elog
278 elog "Make sure your user is in the 'kvm' group"
279 elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
280 elog
281 elog "You will need the Universal TUN/TAP driver compiled into your"
282 elog "kernel or loaded as a module to use the virtual network device"
283 elog "if using -net tap. You will also need support for 802.1d"
284 elog "Ethernet Bridging and a configured bridge if using the provided"
285 elog "kvm-ifup script from /etc/kvm."
286 echo
287 }