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: xen-tools-4.1.2-r2.ebuild ChangeLog xen-tools-4.1.2-r1.ebuild xen-tools-9999.ebuild
Date: Mon, 28 Nov 2011 18:29:50
Message-Id: 20111128182920.061AC2004C@flycatcher.gentoo.org
1 alexxy 11/11/28 18:29:20
2
3 Modified: ChangeLog
4 Added: xen-tools-4.1.2-r2.ebuild
5 Removed: xen-tools-4.1.2-r1.ebuild xen-tools-9999.ebuild
6 Log:
7 Move -9999 to virtualization overlay and revbump xen-tools to EAPI4
8
9 (Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.109 app-emulation/xen-tools/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.109&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.109&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?r1=1.108&r2=1.109
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v
21 retrieving revision 1.108
22 retrieving revision 1.109
23 diff -u -r1.108 -r1.109
24 --- ChangeLog 11 Nov 2011 17:50:59 -0000 1.108
25 +++ ChangeLog 28 Nov 2011 18:29:19 -0000 1.109
26 @@ -1,6 +1,12 @@
27 # ChangeLog for app-emulation/xen-tools
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.108 2011/11/11 17:50:59 neurogeek Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.109 2011/11/28 18:29:19 alexxy Exp $
31 +
32 +*xen-tools-4.1.2-r2 (28 Nov 2011)
33 +
34 + 28 Nov 2011; Alexey Shvetsov <alexxy@g.o> +xen-tools-4.1.2-r2.ebuild,
35 + -xen-tools-4.1.2-r1.ebuild, -xen-tools-9999.ebuild, files/xendomains.initd-r2:
36 + Move -9999 to virtualization overlay and revbump xen-tools to EAPI4
37
38 *xen-tools-4.1.2-r1 (11 Nov 2011)
39
40
41
42
43 1.1 app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: xen-tools-4.1.2-r2.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild,v 1.1 2011/11/28 18:29:19 alexxy Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="2"
56 PYTHON_USE_WITH="xml threads"
57
58 if [[ $PV == *9999 ]]; then
59 KEYWORDS=""
60 REPO="xen-unstable.hg"
61 EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
62 S="${WORKDIR}/${REPO}"
63 live_eclass="mercurial"
64 else
65 KEYWORDS="~amd64 ~x86"
66 XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
67 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
68 $XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
69 S="${WORKDIR}/xen-${PV}"
70 fi
71
72 inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
73
74 DESCRIPTION="Xend daemon and tools"
75 HOMEPAGE="http://xen.org/"
76 DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
77
78 LICENSE="GPL-2"
79 SLOT="0"
80 IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
81
82 REQUIRED_USE="hvm? ( qemu )"
83
84 QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
85 /usr/share/xen/qemu/openbios-sparc64 \
86 /usr/share/xen/qemu/openbios-sparc32"
87 QA_WX_LOAD=${QA_PRESTRIPPED}
88
89 CDEPEND="<dev-libs/yajl-2
90 dev-python/lxml
91 dev-python/pypam
92 dev-python/pyxml
93 sys-libs/zlib
94 hvm? ( media-libs/libsdl
95 sys-power/iasl )
96 api? ( dev-libs/libxml2 net-misc/curl )"
97
98 DEPEND="${CDEPEND}
99 sys-devel/gcc
100 dev-lang/perl
101 app-misc/pax-utils
102 dev-ml/findlib
103 doc? (
104 app-doc/doxygen
105 dev-tex/latex2html[png,gif]
106 media-gfx/transfig
107 media-gfx/graphviz
108 dev-tex/xcolor
109 dev-texlive/texlive-latexextra
110 virtual/latex-base
111 dev-tex/latexmk
112 dev-texlive/texlive-latex
113 dev-texlive/texlive-pictures
114 dev-texlive/texlive-latexrecommended
115 )
116 hvm? (
117 x11-proto/xproto
118 sys-devel/dev86
119 ) pygrub? ( dev-lang/python[ncurses] )
120 "
121
122 RDEPEND="${CDEPEND}
123 sys-apps/iproute2
124 net-misc/bridge-utils
125 >=dev-lang/ocaml-3.12.0
126 screen? (
127 app-misc/screen
128 app-admin/logrotate
129 )
130 || ( sys-fs/udev sys-apps/hotplug )"
131
132 # hvmloader is used to bootstrap a fully virtualized kernel
133 # Approved by QA team in bug #144032
134 QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
135 QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
136 usr/share/xen/qemu/openbios-sparc64"
137 RESTRICT="test"
138
139 pkg_setup() {
140 python_set_active_version 2
141 python_pkg_setup
142 export "CONFIG_LOMOUNT=y"
143
144 if use qemu; then
145 export "CONFIG_IOEMU=y"
146 else
147 export "CONFIG_IOEMU=n"
148 fi
149
150 if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
151 eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
152 eerror "an amd64 multilib profile is required. Remove the hvm use flag"
153 eerror "to build xen-tools on your current profile."
154 die "USE=hvm is unsupported on this system."
155 fi
156
157 if [[ -z ${XEN_TARGET_ARCH} ]] ; then
158 if use x86 && use amd64; then
159 die "Confusion! Both x86 and amd64 are set in your use flags!"
160 elif use x86; then
161 export XEN_TARGET_ARCH="x86_32"
162 elif use amd64 ; then
163 export XEN_TARGET_ARCH="x86_64"
164 else
165 die "Unsupported architecture!"
166 fi
167 fi
168
169 use api && export "LIBXENAPI_BINDINGS=y"
170 use flask && export "FLASK_ENABLE=y"
171 }
172
173 src_prepare() {
174 cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
175 sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
176
177 # Drop .config
178 sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
179 # Xend
180 if ! use xend; then
181 sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
182 -i tools/misc/Makefile || die "Disabling xend failed" || die
183 sed -e 's:^XEND_INITD:#XEND_INITD:' \
184 -i tools/examples/Makefile || "Disabling xend failed" || die
185 fi
186 # if the user *really* wants to use their own custom-cflags, let them
187 if use custom-cflags; then
188 einfo "User wants their own CFLAGS - removing defaults"
189
190 # try and remove all the default custom-cflags
191 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
192 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
193 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
194 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
195 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
196 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
197 -i {} \; || die "failed to re-set custom-cflags"
198 fi
199
200 if ! use pygrub; then
201 sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
202 fi
203
204 # Disable hvm support on systems that don't support x86_32 binaries.
205 if ! use hvm; then
206 chmod 644 tools/check/check_x11_devel
207 sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
208 sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
209 fi
210
211 # Don't bother with qemu, only needed for fully virtualised guests
212 if ! use qemu; then
213 sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
214 sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
215 fi
216
217 # Fix build for gcc-4.6
218 sed -e "s:-Werror::g" -i tools/xenstat/xentop/Makefile || die
219
220 # Fix network broadcast on bridged networks
221 epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
222
223 # Do not strip binaries
224 epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
225
226 # Prevent the downloading of ipxe
227 sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
228 -e 's:^\tfi:#\tfi:' -i \
229 -e 's:^\tmv _$T $T:#\tmv _$T $T:' \
230 -i tools/firmware/etherboot/Makefile || die
231
232 # Fix bridge by idella4, bug #362575
233 epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
234
235 # Remove check_curl, new fix to Bug #386487
236 epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
237 sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
238 tools/check/check_curl || die
239
240 # Don't build ipxe with pie on hardened, Bug #360805
241 if gcc-specs-pie; then
242 epatch "${FILESDIR}/ipxe-nopie.patch"
243 fi
244
245 # Fix create.py for pyxml Bug 367735
246 epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
247 }
248
249 src_compile() {
250 export VARTEXFONTS="${T}/fonts"
251 local myopt
252 use debug && myopt="${myopt} debug=y"
253
254 use custom-cflags || unset CFLAGS
255 if test-flag-CC -fno-strict-overflow; then
256 append-flags -fno-strict-overflow
257 fi
258
259 unset LDFLAGS
260 emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
261
262 if use doc; then
263 sh ./docs/check_pkgs || die "package check failed"
264 emake docs
265 emake dev-docs
266 fi
267
268 emake -C docs man-pages
269 }
270
271 src_install() {
272 # Override auto-detection in the build system, bug #382573
273 export INITD_DIR=/etc/init.d
274 export CONFIG_LEAF_DIR=default
275
276 emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
277 python_convert_shebangs -r 2 "${ED}"
278
279 # Remove RedHat-specific stuff
280 rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
281
282 # uncomment lines in xl.conf
283 sed -e 's:^#autoballoon=1:autoballoon=1:' \
284 -e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
285 -e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
286 -i tools/examples/xl.conf || die
287
288 # dodoc README docs/README.xen-bugtool docs/ChangeLog
289 if use doc; then
290 emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
291
292 dohtml -r docs/api/
293 docinto pdf
294 dodoc ${DOCS[@]}
295 #docs/api/tools/python/latex/refman.pdf
296 [ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
297 fi
298 rm -rf "${ED}"/usr/share/doc/xen/
299 doman docs/man?/*
300
301 if use xend; then
302 newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
303 fi
304 newconfd "${FILESDIR}"/xendomains.confd xendomains
305 newconfd "${FILESDIR}"/xenstored.confd xenstored
306 newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
307 newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
308 newinitd "${FILESDIR}"/xenstored.initd xenstored \
309 "${FILESDIR}"/xenconsoled.initd xenconsoled
310
311 if use screen; then
312 cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
313 cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
314 keepdir /var/log/xen-consoles
315 fi
316
317 python_convert_shebangs -r 2 "${ED}"
318 # xend expects these to exist
319 keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
320
321 # for xendomains
322 keepdir /etc/xen/auto
323 }
324
325 pkg_postinst() {
326 elog "Official Xen Guide and the unoffical wiki page:"
327 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
328 elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
329
330 if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
331 echo
332 ewarn "xend may not work when python is built with stack smashing protection (ssp)."
333 ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
334 ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
335 fi
336
337 if ! has_version "dev-lang/python[ncurses]"; then
338 echo
339 ewarn "NB: Your dev-lang/python is built without USE=ncurses."
340 ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
341 fi
342
343 if has_version "sys-apps/iproute2[minimal]"; then
344 echo
345 ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
346 ewarn "will not work until you rebuild iproute2 without USE=minimal."
347 fi
348
349 if ! use hvm; then
350 echo
351 elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
352 elog "support enable the hvm use flag."
353 elog "An x86 or amd64 multilib system is required to build HVM support."
354 echo
355 elog "The qemu use flag has been removed and replaced with hvm."
356 fi
357
358 if use xend; then
359 echo
360 elog "xend capability has been enabled and installed"
361 fi
362
363 if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
364 echo
365 elog "xensv is broken upstream (Gentoo bug #142011)."
366 elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
367 fi
368 python_mod_optimize $(use pygrub && echo grub) xen
369 }
370
371 pkg_postrm() {
372 python_mod_cleanup $(use pygrub && echo grub) xen
373 }