Gentoo Archives: gentoo-commits

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