Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/xen-tools: metadata.xml ChangeLog xen-tools-4.0.0.ebuild
Date: Mon, 03 May 2010 19:46:34
Message-Id: 20100503194631.761742C388@corvid.gentoo.org
1 alexxy 10/05/03 19:46:31
2
3 Modified: metadata.xml ChangeLog
4 Added: xen-tools-4.0.0.ebuild
5 Log:
6 [app-emulation/xen-tools] Version bump per bug #313791
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.9 app-emulation/xen-tools/metadata.xml
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/metadata.xml?rev=1.9&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/metadata.xml?rev=1.9&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/metadata.xml?r1=1.8&r2=1.9
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/metadata.xml,v
19 retrieving revision 1.8
20 retrieving revision 1.9
21 diff -u -r1.8 -r1.9
22 --- metadata.xml 28 Feb 2009 10:20:01 -0000 1.8
23 +++ metadata.xml 3 May 2010 19:46:31 -0000 1.9
24 @@ -11,6 +11,7 @@
25 <flag name='acm'>Enable the ACM/sHype XSM module from IBM</flag>
26 <flag name='flask'>Enable the Flask XSM module from NSA</flag>
27 <flag name='api'>Build the C libxenapi bindings</flag>
28 + <flag name='ioemu'>Enable IOEMU support</flag>
29 <!-- <flag name='vtpm'>Enable TPM emulation</flag> -->
30 </use>
31 </pkgmetadata>
32
33
34
35 1.60 app-emulation/xen-tools/ChangeLog
36
37 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.60&view=markup
38 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.60&content-type=text/plain
39 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/ChangeLog?r1=1.59&r2=1.60
40
41 Index: ChangeLog
42 ===================================================================
43 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v
44 retrieving revision 1.59
45 retrieving revision 1.60
46 diff -u -r1.59 -r1.60
47 --- ChangeLog 7 Apr 2010 16:46:08 -0000 1.59
48 +++ ChangeLog 3 May 2010 19:46:31 -0000 1.60
49 @@ -1,6 +1,12 @@
50 # ChangeLog for app-emulation/xen-tools
51 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
52 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.59 2010/04/07 16:46:08 patrick Exp $
53 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.60 2010/05/03 19:46:31 alexxy Exp $
54 +
55 +*xen-tools-4.0.0 (12 Apr 2010)
56 +
57 + 12 Apr 2010; Alexey Shvetsov <alexxy@g.o> +xen-tools-4.0.0.ebuild,
58 + +files/xen-tools-4.0.0-as-needed.patch:
59 + Version bump per bug #313791
60
61 07 Apr 2010; Patrick Lauer <patrick@g.o>
62 files/xen-tools-3.4.0-network-bridge-broadcast.patch:
63
64
65
66 1.1 app-emulation/xen-tools/xen-tools-4.0.0.ebuild
67
68 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/xen-tools-4.0.0.ebuild?rev=1.1&view=markup
69 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/xen-tools-4.0.0.ebuild?rev=1.1&content-type=text/plain
70
71 Index: xen-tools-4.0.0.ebuild
72 ===================================================================
73 # Copyright 1999-2010 Gentoo Foundation
74 # Distributed under the terms of the GNU General Public License v2
75 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.0.0.ebuild,v 1.1 2010/05/03 19:46:31 alexxy Exp $
76
77 EAPI="3"
78
79 inherit flag-o-matic eutils multilib python
80
81 # TPMEMUFILE=tpm_emulator-0.4.tar.gz
82
83 DESCRIPTION="Xend daemon and tools"
84 HOMEPAGE="http://xen.org/"
85 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
86 S="${WORKDIR}/xen-${PV}"
87
88 LICENSE="GPL-2"
89 SLOT="0"
90 KEYWORDS="~amd64 ~x86"
91 IUSE="doc debug screen custom-cflags pygrub hvm api acm flask ioemu"
92
93 CDEPEND="dev-lang/python
94 sys-libs/zlib
95 hvm? ( media-libs/libsdl )
96 acm? ( dev-libs/libxml2 )
97 api? ( dev-libs/libxml2 net-misc/curl )"
98 # vtpm? ( dev-libs/gmp dev-libs/openssl )
99
100 DEPEND="${CDEPEND}
101 sys-devel/gcc
102 dev-lang/perl
103 app-misc/pax-utils
104 doc? (
105 app-doc/doxygen
106 dev-tex/latex2html
107 media-gfx/transfig
108 media-gfx/graphviz
109 )
110 hvm? (
111 x11-proto/xproto
112 sys-devel/dev86
113 )"
114
115 RDEPEND="${CDEPEND}
116 sys-apps/iproute2
117 net-misc/bridge-utils
118 dev-python/pyxml
119 screen? (
120 app-misc/screen
121 app-admin/logrotate
122 )
123 || ( sys-fs/udev sys-apps/hotplug )"
124
125 PYTHON_MODNAME="xen grub"
126
127 # hvmloader is used to bootstrap a fully virtualized kernel
128 # Approved by QA team in bug #144032
129 QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
130 QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
131 usr/share/xen/qemu/openbios-sparc64"
132
133 pkg_setup() {
134 export "CONFIG_LOMOUNT=y"
135
136 if use ioemu; then
137 export "CONFIG_IOEMU=y"
138 else
139 export "CONFIG_IOEMU=n"
140 fi
141
142 if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
143 eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
144 eerror "an amd64 multilib profile is required. Remove the hvm use flag"
145 eerror "to build xen-tools on your current profile."
146 die "USE=hvm is unsupported on this system."
147 fi
148
149 if [[ -z ${XEN_TARGET_ARCH} ]] ; then
150 if use x86 && use amd64; then
151 die "Confusion! Both x86 and amd64 are set in your use flags!"
152 elif use x86; then
153 export XEN_TARGET_ARCH="x86_32"
154 elif use amd64 ; then
155 export XEN_TARGET_ARCH="x86_64"
156 else
157 die "Unsupported architecture!"
158 fi
159 fi
160
161 if use doc && ! has_version "dev-tex/latex2html[png,gif]"; then
162 # die early instead of later
163 eerror "USE=doc requires latex2html with image support. Please add"
164 eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
165 die "latex2html missing both png and gif flags"
166 fi
167
168 if use pygrub && ! has_version "dev-lang/python[ncurses]"; then
169 eerror "USE=pygrub requires python to be built with ncurses support. Please add"
170 eerror "'ncurses' to your use flags and re-emerge python"
171 die "python is missing ncurses flags"
172 fi
173
174 if ! has_version "dev-lang/python[threads]"; then
175 eerror "Python is required to be built with threading support. Please add"
176 eerror "'threads' to your use flags and re-emerge python"
177 die "python is missing threads flags"
178 fi
179
180 # use vtpm && export "VTPM_TOOLS=y"
181 use api && export "LIBXENAPI_BINDINGS=y"
182 use acm && export "ACM_SECURITY=y"
183 use flask && export "FLASK_ENABLE=y"
184 }
185
186 src_prepare() {
187 # use vtpm && cp "${DISTDIR}"/${TPMEMUFILE} tools/vtpm
188
189 # if the user *really* wants to use their own custom-cflags, let them
190 if use custom-cflags; then
191 einfo "User wants their own CFLAGS - removing defaults"
192 # try and remove all the default custom-cflags
193 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
194 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
195 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
196 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
197 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
198 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
199 -i {} \;
200 fi
201
202 # Disable hvm support on systems that don't support x86_32 binaries.
203 if ! use hvm; then
204 chmod 644 tools/check/check_x11_devel
205 sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
206 sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
207 fi
208
209 if ! use pygrub; then
210 sed -i -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' "${S}"/tools/Makefile
211 fi
212 # Don't bother with ioemu, only needed for fully virtualised guests
213 if ! use ioemu; then
214 sed -i -e "/^CONFIG_IOEMU := y$/d" "${S}"/config/*.mk
215 sed -i -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" \
216 "${S}/Makefile"
217 fi
218 # Fix network broadcast on bridged networks
219 epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
220
221 # Do not strip binaries
222 epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
223
224 # fix variable declaration to avoid sandbox issue, #253134
225 epatch "${FILESDIR}/${PN}-3.3.1-sandbox-fix.patch"
226
227 # fix gcc 4.4 failure
228 #epatch "${FILESDIR}/${PN}-3.4.1-xc_core-memset.patch"
229 }
230
231 src_compile() {
232 export VARTEXFONTS="${T}/fonts"
233 local myopt
234 use debug && myopt="${myopt} debug=y"
235
236 use custom-cflags || unset CFLAGS
237 if test-flag-CC -fno-strict-overflow; then
238 append-flags -fno-strict-overflow
239 fi
240
241 unset LDFLAGS
242 emake -C tools ${myopt} || die "compile failed"
243
244 if use doc; then
245 sh ./docs/check_pkgs || die "package check failed"
246 emake docs || die "compiling docs failed"
247 emake dev-docs || die "make dev-docs failed"
248 fi
249
250 emake -C docs man-pages || die "make man-pages failed"
251 }
252
253 src_install() {
254 make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools \
255 || die "install failed"
256
257 # Remove RedHat-specific stuff
258 rm -rf "${D}"/etc/sysconfig
259
260 dodoc README docs/README.xen-bugtool docs/ChangeLog
261 if use doc; then
262 emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
263 || die "install docs failed"
264
265 dohtml -r docs/api/
266 docinto pdf
267 dodoc docs/api/tools/python/latex/refman.pdf
268
269 [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
270 fi
271 rm -rf "${D}"/usr/share/doc/xen/
272
273 doman docs/man?/*
274
275 newinitd "${FILESDIR}"/xend.initd xend \
276 || die "Couldn't install xen.initd"
277 newconfd "${FILESDIR}"/xendomains.confd xendomains \
278 || die "Couldn't install xendomains.confd"
279 newinitd "${FILESDIR}"/xendomains.initd xendomains \
280 || die "Couldn't install xendomains.initd"
281
282 if use screen; then
283 cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
284 cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/
285 keepdir /var/log/xen-consoles
286 fi
287
288 # xend expects these to exist
289 keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
290
291 # for xendomains
292 keepdir /etc/xen/auto
293 }
294
295 pkg_postinst() {
296 elog "Official Xen Guide and the unoffical wiki page:"
297 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
298 elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
299
300 if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
301 echo
302 ewarn "xend may not work when python is built with stack smashing protection (ssp)."
303 ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
304 ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
305 fi
306
307 if ! has_version "dev-lang/python[ncurses]"; then
308 echo
309 ewarn "NB: Your dev-lang/python is built without USE=ncurses."
310 ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
311 fi
312
313 if has_version "sys-apps/iproute2[minimal]"; then
314 echo
315 ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
316 ewarn "will not work until you rebuild iproute2 without USE=minimal."
317 fi
318
319 if ! use hvm; then
320 echo
321 elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
322 elog "support enable the hvm use flag."
323 elog "An x86 or amd64 multilib system is required to build HVM support."
324 echo
325 elog "The ioemu use flag has been removed and replaced with hvm."
326 fi
327
328 if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
329 echo
330 elog "xensv is broken upstream (Gentoo bug #142011)."
331 elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
332 fi
333
334 python_mod_optimize
335 }
336
337 pkg_postrm() {
338 python_mod_cleanup
339 }