Gentoo Archives: gentoo-commits

From: "Yixun Lan (dlan)" <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/xen-tools: xen-tools-4.4.0.ebuild ChangeLog
Date: Sun, 23 Mar 2014 02:37:29
Message-Id: 20140323023726.30E3020054@flycatcher.gentoo.org
1 dlan 14/03/23 02:37:26
2
3 Modified: ChangeLog
4 Added: xen-tools-4.4.0.ebuild
5 Log:
6 bump to 4.4.0
7
8 (Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)
9
10 Revision Changes Path
11 1.231 app-emulation/xen-tools/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.231&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.231&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?r1=1.230&r2=1.231
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v
20 retrieving revision 1.230
21 retrieving revision 1.231
22 diff -u -r1.230 -r1.231
23 --- ChangeLog 1 Mar 2014 23:06:15 -0000 1.230
24 +++ ChangeLog 23 Mar 2014 02:37:26 -0000 1.231
25 @@ -1,6 +1,13 @@
26 # ChangeLog for app-emulation/xen-tools
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.230 2014/03/01 23:06:15 mgorny Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.231 2014/03/23 02:37:26 dlan Exp $
30 +
31 +*xen-tools-4.4.0 (23 Mar 2014)
32 +
33 + 23 Mar 2014; Yixun Lan <dlan@g.o> +xen-tools-4.4.0.ebuild,
34 + +files/xen-tools-4.4-api-fix.patch, +files/xen-4.4-nostrip.patch,
35 + +files/xen-4.4-qemu-bridge.patch, files/xenstored.initd:
36 + bump to 4.4.0
37
38 01 Mar 2014; Michał Górny <mgorny@g.o> xen-tools-4.2.3-r1.ebuild,
39 xen-tools-4.2.4.ebuild, xen-tools-4.3.1-r5.ebuild, xen-tools-4.3.1-r6.ebuild,
40
41
42
43 1.1 app-emulation/xen-tools/xen-tools-4.4.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/xen-tools-4.4.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/xen-tools-4.4.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: xen-tools-4.4.0.ebuild
49 ===================================================================
50 # Copyright 1999-2014 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.4.0.ebuild,v 1.1 2014/03/23 02:37:26 dlan Exp $
53
54 EAPI=5
55
56 MY_PV=${PV/_/-}
57
58 PYTHON_COMPAT=( python2_7 )
59 PYTHON_REQ_USE='xml,threads'
60
61 if [[ $PV == *9999 ]]; then
62 KEYWORDS=""
63 REPO="xen-unstable.hg"
64 EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
65 S="${WORKDIR}/${REPO}"
66 live_eclass="mercurial"
67 else
68 KEYWORDS="~amd64 ~arm -x86"
69 UPSTREAM_VER=
70 GENTOO_VER=
71
72 [[ -n ${UPSTREAM_VER} ]] && \
73 UPSTRAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
74 [[ -n ${GENTOO_VER} ]] && \
75 GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
76
77 SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
78 ${UPSTRAM_PATCHSET_URI}
79 ${GENTOO_PATCHSET_URI}"
80 S="${WORKDIR}/xen-${MY_PV}"
81 fi
82
83 inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
84
85 DESCRIPTION="Xend daemon and tools"
86 HOMEPAGE="http://xen.org/"
87 DOCS=( README docs/README.xen-bugtool )
88
89 LICENSE="GPL-2"
90 SLOT="0"
91 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
92 # >=dev-lang/ocaml-4 stable
93 # Masked in profiles/eapi-5-files instead
94 IUSE="api custom-cflags debug doc flask hvm qemu ocaml +pam python pygrub screen static-libs"
95
96 REQUIRED_USE="hvm? ( qemu )
97 ${PYTHON_REQUIRED_USE}
98 pygrub? ( python )"
99
100 COMMON_DEPEND="
101 dev-libs/lzo:2
102 dev-libs/glib:2
103 dev-libs/yajl
104 dev-libs/libaio
105 dev-libs/libgcrypt
106 sys-libs/zlib
107 "
108
109 DEPEND="${COMMON_DEPEND}
110 dev-python/lxml[${PYTHON_USEDEP}]
111 pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
112 hvm? ( media-libs/libsdl )
113 ${PYTHON_DEPS}
114 api? ( dev-libs/libxml2
115 net-misc/curl )
116 pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
117 arm? ( >=sys-apps/dtc-1.4.0 )
118 !arm? ( sys-devel/bin86
119 sys-firmware/ipxe
120 sys-firmware/seabios
121 sys-devel/dev86
122 sys-power/iasl )
123 dev-lang/perl
124 app-misc/pax-utils
125 dev-python/markdown
126 doc? (
127 app-doc/doxygen
128 dev-tex/latex2html[png,gif]
129 media-gfx/graphviz
130 dev-tex/xcolor
131 media-gfx/transfig
132 dev-texlive/texlive-latexextra
133 virtual/latex-base
134 dev-tex/latexmk
135 dev-texlive/texlive-latex
136 dev-texlive/texlive-pictures
137 dev-texlive/texlive-latexrecommended
138 )
139 hvm? ( x11-proto/xproto
140 !net-libs/libiscsi )
141 qemu? ( x11-libs/pixman )
142 ocaml? ( dev-ml/findlib
143 >=dev-lang/ocaml-4 )"
144
145 RDEPEND="${COMMON_DEPEND}
146 sys-apps/iproute2
147 net-misc/bridge-utils
148 screen? (
149 app-misc/screen
150 app-admin/logrotate
151 )
152 virtual/udev"
153
154 # hvmloader is used to bootstrap a fully virtualized kernel
155 # Approved by QA team in bug #144032
156 QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
157
158 RESTRICT="test"
159
160 pkg_setup() {
161 python-single-r1_pkg_setup
162 export "CONFIG_LOMOUNT=y"
163
164 if has_version dev-libs/libgcrypt; then
165 export "CONFIG_GCRYPT=y"
166 fi
167
168 if use qemu; then
169 export "CONFIG_IOEMU=y"
170 else
171 export "CONFIG_IOEMU=n"
172 fi
173
174 if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
175 eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
176 eerror "an amd64 multilib profile is required. Remove the hvm use flag"
177 eerror "to build xen-tools on your current profile."
178 die "USE=hvm is unsupported on this system."
179 fi
180
181 if [[ -z ${XEN_TARGET_ARCH} ]] ; then
182 if use x86 && use amd64; then
183 die "Confusion! Both x86 and amd64 are set in your use flags!"
184 elif use x86; then
185 export XEN_TARGET_ARCH="x86_32"
186 elif use amd64 ; then
187 export XEN_TARGET_ARCH="x86_64"
188 elif use arm; then
189 export XEN_TARGET_ARCH="arm32"
190 else
191 die "Unsupported architecture!"
192 fi
193 fi
194 #bug 472438
195 export BASH_COMPLETION_DIR=/usr/share/bash-completion
196 }
197
198 src_prepare() {
199 # Upstream's patchset
200 if [[ -n ${UPSTREAM_VER} ]]; then
201 EPATCH_SUFFIX="patch" \
202 EPATCH_FORCE="yes" \
203 epatch "${WORKDIR}"/patches-upstream
204 fi
205
206 # Gentoo's patchset
207 if [[ -n ${GENTOO_VER} ]]; then
208 EPATCH_SUFFIX="patch" \
209 EPATCH_FORCE="yes" \
210 epatch "${WORKDIR}"/patches-gentoo
211 fi
212
213 # Fix texi2html build error with new texi2html, qemu.doc.html
214 epatch "${FILESDIR}"/${PN}-4-docfix.patch
215
216 # Fix network broadcast on bridged networks
217 epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
218
219 # Bug 496708
220 epatch "${FILESDIR}"/${PN}-4-unbundle-ipxe.patch
221
222 # Fix bridge by idella4, bug #362575
223 epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
224
225 # Prevent double stripping of files at install
226 epatch "${FILESDIR}"/${PN/-tools/}-4.4-nostrip.patch
227
228 # fix jobserver in Makefile
229 epatch "${FILESDIR}"/${PN/-tools/}-4.3-jserver.patch
230
231 # Set dom0-min-mem to kb; Bug #472982
232 epatch "${FILESDIR}"/${PN/-tools/}-4.2-configsxp.patch
233
234 # Bug 477676
235 epatch "${FILESDIR}"/${PN}-4.3-ar-cc.patch
236
237 # Bug 379537
238 epatch "${FILESDIR}"/fix-gold-ld.patch
239
240 # Prevent file collision with qemu package Bug 478064
241 epatch "${FILESDIR}"/xen-4.4-qemu-bridge.patch
242 mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
243
244 epatch "${FILESDIR}"/${PN}-4.4-api-fix.patch
245
246 use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
247 sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
248 -i tools/firmware/Makefile || die
249
250 # Drop .config, fixes to gcc-4.6
251 sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
252
253 # if the user *really* wants to use their own custom-cflags, let them
254 if use custom-cflags; then
255 einfo "User wants their own CFLAGS - removing defaults"
256
257 # try and remove all the default cflags
258 find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
259 -exec sed \
260 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
261 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
262 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
263 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
264 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
265 -i {} + || die "failed to re-set custom-cflags"
266 fi
267
268 if ! use pygrub; then
269 sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
270 fi
271
272 if ! use python; then
273 sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
274 fi
275
276 # Disable hvm support on systems that don't support x86_32 binaries.
277 if ! use hvm; then
278 sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
279 fi
280
281 # Don't bother with qemu, only needed for fully virtualised guests
282 if ! use qemu; then
283 sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
284 fi
285
286 # Bug 472438
287 sed -e 's:^BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(SHARE_DIR)/bash-completion:' \
288 -i Config.mk || die
289
290 # xencommons, Bug #492332, sed lighter weight than patching
291 sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
292 -i tools/hotplug/Linux/init.d/xencommons || die
293
294 # respect multilib, usr/lib/libcacard.so.0.0.0
295 sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
296 -i tools/qemu-xen/configure || die
297
298 # fix QA warning, create /var/run/, /var/lock dynamically
299 sed -i -e "/\$(INSTALL_DIR) \$(DESTDIR)\$(XEN_RUN_DIR)/d" \
300 tools/libxl/Makefile || die
301
302 sed -i -e "/\/var\/run\//d" \
303 tools/xenstore/Makefile \
304 tools/pygrub/Makefile || die
305
306 sed -i -e "/\/var\/lock\/subsys/d" \
307 tools/Makefile || die
308
309 epatch_user
310 }
311
312 src_configure() {
313 local myconf="--prefix=/usr \
314 --libdir=/usr/$(get_libdir) \
315 --disable-werror \
316 --with-system-seabios=/usr/share/seabios/bios.bin \
317 --disable-xen \
318 --enable-tools \
319 --enable-docs \
320 $(use_enable pam) \
321 $(use_enable api xenapi) \
322 $(use_enable ocaml ocamltools) \
323 "
324 econf ${myconf}
325 }
326
327 src_compile() {
328 export VARTEXFONTS="${T}/fonts"
329 local myopt
330 use debug && myopt="${myopt} debug=y"
331
332 use custom-cflags || unset CFLAGS
333 if test-flag-CC -fno-strict-overflow; then
334 append-flags -fno-strict-overflow
335 fi
336
337 unset LDFLAGS
338 unset CFLAGS
339 emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
340
341 use doc && emake -C docs txt html
342 emake -C docs man-pages
343 }
344
345 src_install() {
346 # Override auto-detection in the build system, bug #382573
347 export INITD_DIR=/tmp/init.d
348 export CONFIG_LEAF_DIR=../tmp/default
349
350 # Let the build system compile installed Python modules.
351 local PYTHONDONTWRITEBYTECODE
352 export PYTHONDONTWRITEBYTECODE
353
354 emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
355 XEN_PYTHON_NATIVE_INSTALL=y install-tools
356
357 # Fix the remaining Python shebangs.
358 python_fix_shebang "${D}"
359
360 # Remove RedHat-specific stuff
361 rm -rf "${D}"tmp || die
362
363 # uncomment lines in xl.conf
364 sed -e 's:^#autoballoon=1:autoballoon=1:' \
365 -e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
366 -e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
367 -i tools/examples/xl.conf || die
368
369 # Reset bash completion dir; Bug 472438
370 mv "${D}"bash-completion "${D}"usr/share/ || die
371
372 if use doc; then
373 emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
374
375 dohtml -r docs/
376 docinto pdf
377 dodoc ${DOCS[@]}
378 [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
379 fi
380
381 rm -rf "${D}"/usr/share/doc/xen/
382 doman docs/man?/*
383
384 newconfd "${FILESDIR}"/xendomains.confd xendomains
385 newconfd "${FILESDIR}"/xenstored.confd xenstored
386 newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
387 newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
388 newinitd "${FILESDIR}"/xenstored.initd xenstored
389 newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
390 newinitd "${FILESDIR}"/xencommons.initd xencommons
391 newconfd "${FILESDIR}"/xencommons.confd xencommons
392 newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
393 newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
394
395 if use screen; then
396 cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
397 cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
398 keepdir /var/log/xen-consoles
399 fi
400
401 # Move files built with use qemu, Bug #477884
402 if [[ "${ARCH}" == 'amd64' ]] && use qemu; then
403 mkdir -p "${D}"usr/$(get_libdir)/xen/bin || die
404 mv "${D}"usr/lib/xen/bin/* "${D}"usr/$(get_libdir)/xen/bin/ || die
405 fi
406
407 # For -static-libs wrt Bug 384355
408 if ! use static-libs; then
409 rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
410 fi
411
412 # xend expects these to exist
413 keepdir /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
414
415 # for xendomains
416 keepdir /etc/xen/auto
417
418 # Temp QA workaround
419 dodir "$(udev_get_udevdir)"
420 mv "${D}"/etc/udev/* "${D}/$(udev_get_udevdir)"
421 rm -rf "${D}"/etc/udev
422
423 # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
424 find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
425 -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
426 }
427
428 pkg_postinst() {
429 elog "Official Xen Guide and the offical wiki page:"
430 elog "https://wiki.gentoo.org/wiki/Xen"
431 elog "http://wiki.xen.org/wiki/Main_Page"
432 elog ""
433 elog "Recommended to utilise the xencommons script to config sytem At boot"
434 elog "Add by use of rc-update on completion of the install"
435
436 if [[ "$(scanelf -s __guard -q "${PYTHON}")" ]] ; then
437 echo
438 ewarn "xend may not work when python is built with stack smashing protection (ssp)."
439 ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
440 ewarn "This problem may be resolved as of Xen 3.0.4, if not post in the bug."
441 fi
442
443 # TODO: we need to have the current Python slot here.
444 if ! has_version "dev-lang/python[ncurses]"; then
445 echo
446 ewarn "NB: Your dev-lang/python is built without USE=ncurses."
447 ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
448 fi
449
450 if has_version "sys-apps/iproute2[minimal]"; then
451 echo
452 ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
453 ewarn "will not work until you rebuild iproute2 without USE=minimal."
454 fi
455
456 if ! use hvm; then
457 echo
458 elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
459 elog "support enable the hvm use flag."
460 elog "An x86 or amd64 multilib system is required to build HVM support."
461 fi
462
463 if use xend; then
464 elog"";elog "xend capability has been enabled and installed"
465 fi
466
467 if use qemu; then
468 elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
469 elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
470 elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
471 elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
472 fi
473
474 if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
475 echo
476 elog "xensv is broken upstream (Gentoo bug #142011)."
477 elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
478 fi
479 }