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