Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
Date: Mon, 30 Nov 2015 16:01:48
Message-Id: 1448899290.67f629f0a52e81af499dc1cb5ed4a9dc79af791e.idella4@gentoo
1 commit: 67f629f0a52e81af499dc1cb5ed4a9dc79af791e
2 Author: Ian Delaney <idella4 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 30 16:00:33 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 30 16:01:30 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67f629f0
7
8 app-emulation/xen-tools: revbumps vns. 4.5.2-r1, 4.6.0-r3
9
10 security patches (2) added from XSA-162, initally set as embargoed
11 security patches, publicly released today wrt the gentoo bug
12
13 Gentoo bug: #566838
14
15 Package-Manager: portage-2.2.24
16
17 app-emulation/xen-tools/Manifest | 1 +
18 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 466 +++++++++++++++++++++
19 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 476 ++++++++++++++++++++++
20 3 files changed, 943 insertions(+)
21
22 diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
23 index ae27247..a14e4c1 100644
24 --- a/app-emulation/xen-tools/Manifest
25 +++ b/app-emulation/xen-tools/Manifest
26 @@ -12,5 +12,6 @@ DIST xen-gentoo-patches-1.tar.xz 23044 SHA256 dcff35bbc4b6946473c9b55ad595a5fea8
27 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
28 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
29 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
30 +DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
31 DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
32 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
33
34 diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
35 new file mode 100644
36 index 0000000..a5e4b14
37 --- /dev/null
38 +++ b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
39 @@ -0,0 +1,466 @@
40 +# Copyright 1999-2015 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +# $Id$
43 +
44 +EAPI=5
45 +
46 +MY_PV=${PV/_/-}
47 +
48 +PYTHON_COMPAT=( python2_7 )
49 +PYTHON_REQ_USE='xml,threads'
50 +
51 +if [[ $PV == *9999 ]]; then
52 + KEYWORDS=""
53 + REPO="xen-unstable.hg"
54 + EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
55 + S="${WORKDIR}/${REPO}"
56 + live_eclass="mercurial"
57 +else
58 + KEYWORDS="~amd64 ~arm ~arm64 -x86"
59 + UPSTREAM_VER=
60 + SECURITY_VER=7
61 + # xen-tools's gentoo patches tarball
62 + GENTOO_VER=4
63 + # xen-tools's gentoo patches version which apply to this specific ebuild
64 + GENTOO_GPV=0
65 + # xen-tools ovmf's patches
66 + OVMF_VER=1
67 +
68 + SEABIOS_VER=1.7.5
69 + OVMF_PV=20150629
70 +
71 + [[ -n ${UPSTREAM_VER} ]] && \
72 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
73 + [[ -n ${SECURITY_VER} ]] && \
74 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
75 + [[ -n ${GENTOO_VER} ]] && \
76 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
77 + [[ -n ${OVMF_VER} ]] && \
78 + OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
79 +
80 + SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
81 + http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
82 + https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
83 + ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
84 + ${OVMF_PATCHSET_URI} )
85 + ${UPSTREAM_PATCHSET_URI}
86 + ${SECURITY_PATCHSET_URI}
87 + ${GENTOO_PATCHSET_URI}
88 + https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
89 +
90 + S="${WORKDIR}/xen-${MY_PV}"
91 +fi
92 +
93 +inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
94 +
95 +DESCRIPTION="Xend daemon and tools"
96 +HOMEPAGE="http://xen.org/"
97 +DOCS=( README docs/README.xen-bugtool )
98 +
99 +LICENSE="GPL-2"
100 +SLOT="0"
101 +# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
102 +# >=dev-lang/ocaml-4 stable
103 +# Masked in profiles/eapi-5-files instead
104 +IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
105 +
106 +REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
107 + ${PYTHON_REQUIRED_USE}
108 + pygrub? ( python )
109 + ovmf? ( hvm )
110 + qemu? ( !system-qemu )"
111 +
112 +COMMON_DEPEND="
113 + dev-libs/lzo:2
114 + dev-libs/glib:2
115 + dev-libs/yajl
116 + dev-libs/libaio
117 + dev-libs/libgcrypt:0
118 + sys-libs/zlib
119 +"
120 +
121 +DEPEND="${COMMON_DEPEND}
122 + dev-python/lxml[${PYTHON_USEDEP}]
123 + pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
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 + ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
130 + !amd64? ( >=sys-apps/dtc-1.4.0 )
131 + amd64? ( sys-devel/bin86
132 + system-seabios? ( sys-firmware/seabios )
133 + sys-firmware/ipxe
134 + sys-devel/dev86
135 + sys-power/iasl )
136 + dev-lang/perl
137 + app-misc/pax-utils
138 + dev-python/markdown[${PYTHON_USEDEP}]
139 + doc? (
140 + app-doc/doxygen
141 + dev-tex/latex2html[png,gif]
142 + media-gfx/graphviz
143 + dev-tex/xcolor
144 + media-gfx/transfig
145 + dev-texlive/texlive-latexextra
146 + virtual/latex-base
147 + dev-tex/latexmk
148 + dev-texlive/texlive-latex
149 + dev-texlive/texlive-pictures
150 + dev-texlive/texlive-latexrecommended
151 + )
152 + hvm? ( x11-proto/xproto
153 + !net-libs/libiscsi )
154 + qemu? ( x11-libs/pixman )
155 + system-qemu? ( app-emulation/qemu[xen] )
156 + ocaml? ( dev-ml/findlib
157 + >=dev-lang/ocaml-4 )"
158 +
159 +RDEPEND="${COMMON_DEPEND}
160 + sys-apps/iproute2
161 + net-misc/bridge-utils
162 + screen? (
163 + app-misc/screen
164 + app-admin/logrotate
165 + )
166 + virtual/udev"
167 +
168 +# hvmloader is used to bootstrap a fully virtualized kernel
169 +# Approved by QA team in bug #144032
170 +QA_WX_LOAD="usr/lib/xen/boot/hvmloader
171 + usr/share/qemu-xen/qemu/s390-ccw.img"
172 +
173 +RESTRICT="test"
174 +
175 +pkg_setup() {
176 + python-single-r1_pkg_setup
177 + export "CONFIG_LOMOUNT=y"
178 +
179 + #bug 522642, disable compile tools/tests
180 + export "CONFIG_TESTS=n"
181 +
182 + if has_version dev-libs/libgcrypt:0; then
183 + export "CONFIG_GCRYPT=y"
184 + fi
185 +
186 + if [[ -z ${XEN_TARGET_ARCH} ]] ; then
187 + if use x86 && use amd64; then
188 + die "Confusion! Both x86 and amd64 are set in your use flags!"
189 + elif use x86; then
190 + export XEN_TARGET_ARCH="x86_32"
191 + elif use amd64 ; then
192 + export XEN_TARGET_ARCH="x86_64"
193 + elif use arm; then
194 + export XEN_TARGET_ARCH="arm32"
195 + elif use arm64; then
196 + export XEN_TARGET_ARCH="arm64"
197 + else
198 + die "Unsupported architecture!"
199 + fi
200 + fi
201 +}
202 +
203 +src_prepare() {
204 + # Upstream's patchset
205 + if [[ -n ${UPSTREAM_VER} ]]; then
206 + einfo "Try to apply Xen Upstream patcheset"
207 + EPATCH_SUFFIX="patch" \
208 + EPATCH_FORCE="yes" \
209 + EPATCH_OPTS="-p1" \
210 + epatch "${WORKDIR}"/patches-upstream
211 + fi
212 +
213 + # Security patchset
214 + if [[ -n ${SECURITY_VER} ]]; then
215 + einfo "Try to apply Xen Security patcheset"
216 + source "${WORKDIR}"/patches-security/${PV}.conf
217 + # apply main xen patches
218 + for i in ${XEN_SECURITY_MAIN}; do
219 + EPATCH_SUFFIX="patch" \
220 + EPATCH_FORCE="yes" \
221 + epatch "${WORKDIR}"/patches-security/xen/$i
222 + done
223 +
224 + # apply qemu-traditional patches
225 + mv "${WORKDIR}"/xsa162-qemut.patch \
226 + "${WORKDIR}"/patches-security/qemut/ || die
227 + XEN_SECURITY_QEMUT="xsa162-qemut.patch"
228 + pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
229 + for i in ${XEN_SECURITY_QEMUT}; do
230 + EPATCH_SUFFIX="patch" \
231 + EPATCH_FORCE="yes" \
232 + epatch "${WORKDIR}"/patches-security/qemut/$i
233 + done
234 + popd > /dev/null
235 +
236 + # apply qemu-xen/upstream patches
237 + mv "${WORKDIR}"/xsa162-qemuu.patch \
238 + "${WORKDIR}"/patches-security/qemuu/ || die
239 + XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
240 + pushd "${S}"/tools/qemu-xen/ > /dev/null
241 + for i in ${XEN_SECURITY_QEMUU}; do
242 + EPATCH_SUFFIX="patch" \
243 + EPATCH_FORCE="yes" \
244 + epatch "${WORKDIR}"/patches-security/qemuu/$i
245 + done
246 + popd > /dev/null
247 + fi
248 +
249 + # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
250 + mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
251 + pushd tools/firmware/ > /dev/null
252 + ln -s seabios-dir-remote seabios-dir || die
253 + popd > /dev/null
254 +
255 + # Gentoo's patchset
256 + if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
257 + einfo "Try to apply Gentoo specific patch set"
258 + source "${FILESDIR}"/gentoo-patches.conf
259 + _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
260 + for i in ${!_gpv}; do
261 + EPATCH_SUFFIX="patch" \
262 + EPATCH_FORCE="yes" \
263 + epatch "${WORKDIR}"/patches-gentoo/$i
264 + done
265 + fi
266 +
267 + # Ovmf's patchset
268 + if [[ -n ${OVMF_VER} ]] && use ovmf; then
269 + einfo "Try to apply Ovmf patch set"
270 + pushd "${WORKDIR}"/ovmf-*/ > /dev/null
271 + EPATCH_SUFFIX="patch" \
272 + EPATCH_FORCE="yes" \
273 + EPATCH_OPTS="-p1" \
274 + epatch "${WORKDIR}"/patches-ovmf
275 + popd > /dev/null
276 + mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
277 + fi
278 +
279 + mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
280 +
281 + # Fix texi2html build error with new texi2html, qemu.doc.html
282 + sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
283 +
284 + use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
285 + sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
286 + -i tools/firmware/Makefile || die
287 +
288 + # Drop .config, fixes to gcc-4.6
289 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
290 +
291 + # if the user *really* wants to use their own custom-cflags, let them
292 + if use custom-cflags; then
293 + einfo "User wants their own CFLAGS - removing defaults"
294 +
295 + # try and remove all the default cflags
296 + find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
297 + -exec sed \
298 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
299 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
300 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
301 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
302 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
303 + -i {} + || die "failed to re-set custom-cflags"
304 + fi
305 +
306 + if ! use pygrub; then
307 + sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
308 + fi
309 +
310 + if ! use python; then
311 + sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
312 + fi
313 +
314 + if ! use hvm; then
315 + sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
316 + # Bug 351648
317 + elif ! use x86 && ! has x86 $(get_all_abis); then
318 + mkdir -p "${WORKDIR}"/extra-headers/gnu || die
319 + touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
320 + export CPATH="${WORKDIR}"/extra-headers
321 + fi
322 +
323 + # Don't bother with qemu, only needed for fully virtualised guests
324 + if ! use qemu; then
325 + sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
326 + fi
327 +
328 + # Reset bash completion dir; Bug 472438
329 + sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
330 + -i Config.mk || die
331 + sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
332 +
333 + # xencommons, Bug #492332, sed lighter weight than patching
334 + sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
335 + -i tools/hotplug/Linux/init.d/xencommons.in || die
336 +
337 + # respect multilib, usr/lib/libcacard.so.0.0.0
338 + sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
339 + -i tools/qemu-xen/configure || die
340 +
341 + #bug 518136, don't build 32bit exactuable for nomultilib profile
342 + if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
343 + sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
344 + fi
345 +
346 + # use /var instead of /var/lib, consistat with previous ebuild
347 + sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
348 + m4/paths.m4 configure tools/configure || die
349 + # use /run instead of /var/run
350 + sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
351 + m4/paths.m4 configure tools/configure || die
352 +
353 + # uncomment lines in xl.conf
354 + sed -e 's:^#autoballoon=:autoballoon=:' \
355 + -e 's:^#lockfile=:lockfile=:' \
356 + -e 's:^#vif.default.script=:vif.default.script=:' \
357 + -i tools/examples/xl.conf || die
358 +
359 + epatch_user
360 +}
361 +
362 +src_configure() {
363 + local myconf="--prefix=${PREFIX}/usr \
364 + --libdir=${PREFIX}/usr/$(get_libdir) \
365 + --libexecdir=${PREFIX}/usr/libexec \
366 + --disable-werror \
367 + --disable-xen \
368 + --enable-tools \
369 + --enable-docs \
370 + $(use_with system-qemu) \
371 + $(use_enable pam) \
372 + $(use_enable api xenapi) \
373 + $(use_enable ovmf) \
374 + $(use_enable ocaml ocamltools) \
375 + "
376 + use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
377 + use qemu || myconf+=" --with-system-qemu"
378 + use amd64 && myconf+=" --enable-qemu-traditional"
379 + econf ${myconf}
380 +}
381 +
382 +src_compile() {
383 + export VARTEXFONTS="${T}/fonts"
384 + local myopt
385 + use debug && myopt="${myopt} debug=y"
386 +
387 + use custom-cflags || unset CFLAGS
388 + if test-flag-CC -fno-strict-overflow; then
389 + append-flags -fno-strict-overflow
390 + fi
391 +
392 + unset LDFLAGS
393 + unset CFLAGS
394 + emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
395 +
396 + use doc && emake -C docs txt html
397 + emake -C docs man-pages
398 +}
399 +
400 +src_install() {
401 + # Override auto-detection in the build system, bug #382573
402 + export INITD_DIR=/tmp/init.d
403 + export CONFIG_LEAF_DIR=../tmp/default
404 +
405 + # Let the build system compile installed Python modules.
406 + local PYTHONDONTWRITEBYTECODE
407 + export PYTHONDONTWRITEBYTECODE
408 +
409 + emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
410 + XEN_PYTHON_NATIVE_INSTALL=y install-tools
411 +
412 + # Fix the remaining Python shebangs.
413 + python_fix_shebang "${D}"
414 +
415 + # Remove RedHat-specific stuff
416 + rm -rf "${D}"tmp || die
417 +
418 + if use doc; then
419 + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
420 +
421 + dohtml -r docs/
422 + docinto pdf
423 + dodoc ${DOCS[@]}
424 + [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
425 + fi
426 +
427 + rm -rf "${D}"/usr/share/doc/xen/
428 + doman docs/man?/*
429 +
430 + newconfd "${FILESDIR}"/xendomains.confd xendomains
431 + newconfd "${FILESDIR}"/xenstored.confd xenstored
432 + newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
433 + newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
434 + newinitd "${FILESDIR}"/xenstored.initd xenstored
435 + newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
436 + newinitd "${FILESDIR}"/xencommons.initd xencommons
437 + newconfd "${FILESDIR}"/xencommons.confd xencommons
438 + newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
439 + newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
440 +
441 + if use screen; then
442 + cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
443 + cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
444 + keepdir /var/log/xen-consoles
445 + fi
446 +
447 + # For -static-libs wrt Bug 384355
448 + if ! use static-libs; then
449 + rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
450 + fi
451 +
452 + # for xendomains
453 + keepdir /etc/xen/auto
454 +
455 + # Temp QA workaround
456 + dodir "$(get_udevdir)"
457 + mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
458 + rm -rf "${D}"/etc/udev
459 +
460 + # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
461 + find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
462 + -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
463 +}
464 +
465 +pkg_postinst() {
466 + elog "Official Xen Guide and the offical wiki page:"
467 + elog "https://wiki.gentoo.org/wiki/Xen"
468 + elog "http://wiki.xen.org/wiki/Main_Page"
469 + elog ""
470 + elog "Recommended to utilise the xencommons script to config sytem At boot"
471 + elog "Add by use of rc-update on completion of the install"
472 +
473 + # TODO: we need to have the current Python slot here.
474 + if ! has_version "dev-lang/python[ncurses]"; then
475 + echo
476 + ewarn "NB: Your dev-lang/python is built without USE=ncurses."
477 + ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
478 + fi
479 +
480 + if has_version "sys-apps/iproute2[minimal]"; then
481 + echo
482 + ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
483 + ewarn "will not work until you rebuild iproute2 without USE=minimal."
484 + fi
485 +
486 + if ! use hvm; then
487 + echo
488 + elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
489 + elog "support enable the hvm use flag."
490 + elog "An x86 or amd64 system is required to build HVM support."
491 + fi
492 +
493 + if use qemu; then
494 + elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
495 + elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
496 + elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
497 + elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
498 + fi
499 +
500 + if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
501 + echo
502 + elog "xensv is broken upstream (Gentoo bug #142011)."
503 + elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
504 + fi
505 +}
506
507 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
508 new file mode 100644
509 index 0000000..156be8a
510 --- /dev/null
511 +++ b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
512 @@ -0,0 +1,476 @@
513 +# Copyright 1999-2015 Gentoo Foundation
514 +# Distributed under the terms of the GNU General Public License v2
515 +# $Id$
516 +
517 +EAPI=5
518 +
519 +MY_PV=${PV/_/-}
520 +
521 +PYTHON_COMPAT=( python2_7 )
522 +PYTHON_REQ_USE='xml,threads'
523 +
524 +if [[ $PV == *9999 ]]; then
525 + KEYWORDS=""
526 + REPO="xen-unstable.hg"
527 + EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
528 + S="${WORKDIR}/${REPO}"
529 + live_eclass="mercurial"
530 +else
531 + KEYWORDS="~amd64 ~arm ~arm64 -x86"
532 + UPSTREAM_VER=0
533 + SECURITY_VER=7
534 + # xen-tools's gentoo patches tarball
535 + GENTOO_VER=4
536 + # xen-tools's gentoo patches version which apply to this specific ebuild
537 + GENTOO_GPV=0
538 + # xen-tools ovmf's patches
539 + OVMF_VER=1
540 +
541 + SEABIOS_VER=1.8.2
542 + OVMF_PV=20150629
543 +
544 + [[ -n ${UPSTREAM_VER} ]] && \
545 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
546 + [[ -n ${SECURITY_VER} ]] && \
547 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
548 + [[ -n ${GENTOO_VER} ]] && \
549 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
550 + [[ -n ${OVMF_VER} ]] && \
551 + OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
552 +
553 + SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
554 + http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
555 + https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
556 + ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
557 + ${OVMF_PATCHSET_URI} )
558 + ${UPSTREAM_PATCHSET_URI}
559 + ${SECURITY_PATCHSET_URI}
560 + ${GENTOO_PATCHSET_URI}"
561 + S="${WORKDIR}/xen-${MY_PV}"
562 +fi
563 +
564 +inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
565 +
566 +DESCRIPTION="Xend daemon and tools"
567 +HOMEPAGE="http://xen.org/"
568 +DOCS=( README docs/README.xen-bugtool )
569 +
570 +LICENSE="GPL-2"
571 +SLOT="0"
572 +# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
573 +# >=dev-lang/ocaml-4 stable
574 +# Masked in profiles/eapi-5-files instead
575 +IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
576 +
577 +REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
578 + ${PYTHON_REQUIRED_USE}
579 + pygrub? ( python )
580 + ovmf? ( hvm )
581 + qemu? ( !system-qemu )"
582 +
583 +COMMON_DEPEND="
584 + dev-libs/lzo:2
585 + dev-libs/glib:2
586 + dev-libs/yajl
587 + dev-libs/libaio
588 + dev-libs/libgcrypt:0
589 + sys-libs/zlib
590 +"
591 +
592 +DEPEND="${COMMON_DEPEND}
593 + dev-python/lxml[${PYTHON_USEDEP}]
594 + pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
595 + ${PYTHON_DEPS}
596 + api? ( dev-libs/libxml2
597 + net-misc/curl )
598 + pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
599 + ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
600 + !amd64? ( >=sys-apps/dtc-1.4.0 )
601 + amd64? ( sys-devel/bin86
602 + system-seabios? ( sys-firmware/seabios )
603 + sys-firmware/ipxe
604 + sys-devel/dev86
605 + sys-power/iasl )
606 + dev-lang/perl
607 + app-misc/pax-utils
608 + dev-python/markdown[${PYTHON_USEDEP}]
609 + doc? (
610 + app-doc/doxygen
611 + dev-tex/latex2html[png,gif]
612 + media-gfx/graphviz
613 + dev-tex/xcolor
614 + media-gfx/transfig
615 + dev-texlive/texlive-latexextra
616 + virtual/latex-base
617 + dev-tex/latexmk
618 + dev-texlive/texlive-latex
619 + dev-texlive/texlive-pictures
620 + dev-texlive/texlive-latexrecommended
621 + )
622 + hvm? ( x11-proto/xproto
623 + !net-libs/libiscsi )
624 + qemu? (
625 + x11-libs/pixman
626 + sdl? ( media-libs/libsdl[X] )
627 + )
628 + system-qemu? ( app-emulation/qemu[xen] )
629 + ocaml? ( dev-ml/findlib
630 + >=dev-lang/ocaml-4 )"
631 +
632 +RDEPEND="${COMMON_DEPEND}
633 + sys-apps/iproute2
634 + net-misc/bridge-utils
635 + screen? (
636 + app-misc/screen
637 + app-admin/logrotate
638 + )
639 + virtual/udev"
640 +
641 +# hvmloader is used to bootstrap a fully virtualized kernel
642 +# Approved by QA team in bug #144032
643 +QA_WX_LOAD="usr/lib/xen/boot/hvmloader
644 + usr/share/qemu-xen/qemu/s390-ccw.img"
645 +
646 +RESTRICT="test"
647 +
648 +pkg_setup() {
649 + python-single-r1_pkg_setup
650 + export "CONFIG_LOMOUNT=y"
651 +
652 + #bug 522642, disable compile tools/tests
653 + export "CONFIG_TESTS=n"
654 +
655 + if has_version dev-libs/libgcrypt:0; then
656 + export "CONFIG_GCRYPT=y"
657 + fi
658 +
659 + if [[ -z ${XEN_TARGET_ARCH} ]] ; then
660 + if use x86 && use amd64; then
661 + die "Confusion! Both x86 and amd64 are set in your use flags!"
662 + elif use x86; then
663 + export XEN_TARGET_ARCH="x86_32"
664 + elif use amd64 ; then
665 + export XEN_TARGET_ARCH="x86_64"
666 + elif use arm; then
667 + export XEN_TARGET_ARCH="arm32"
668 + elif use arm64; then
669 + export XEN_TARGET_ARCH="arm64"
670 + else
671 + die "Unsupported architecture!"
672 + fi
673 + fi
674 +}
675 +
676 +src_prepare() {
677 + # Upstream's patchset
678 + if [[ -n ${UPSTREAM_VER} ]]; then
679 + einfo "Try to apply Xen Upstream patcheset"
680 + EPATCH_SUFFIX="patch" \
681 + EPATCH_FORCE="yes" \
682 + EPATCH_OPTS="-p1" \
683 + epatch "${WORKDIR}"/patches-upstream
684 + fi
685 +
686 + # Security patchset
687 + if [[ -n ${SECURITY_VER} ]]; then
688 + einfo "Try to apply Xen Security patcheset"
689 + source "${WORKDIR}"/patches-security/${PV}.conf
690 + # apply main xen patches
691 + for i in ${XEN_SECURITY_MAIN}; do
692 + EPATCH_SUFFIX="patch" \
693 + EPATCH_FORCE="yes" \
694 + epatch "${WORKDIR}"/patches-security/xen/$i
695 + done
696 +
697 + # apply qemu-traditional patches
698 + mv "${WORKDIR}"/xsa162-qemut.patch \
699 + "${WORKDIR}"/patches-security/qemut/ || die
700 + XEN_SECURITY_QEMUT="xsa162-qemut.patch"
701 + pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
702 + for i in ${XEN_SECURITY_QEMUT}; do
703 + EPATCH_SUFFIX="patch" \
704 + EPATCH_FORCE="yes" \
705 + epatch "${WORKDIR}"/patches-security/qemut/$i
706 + done
707 + popd > /dev/null
708 +
709 + # apply qemu-xen/upstream patches
710 + mv "${WORKDIR}"/xsa162-qemuu.patch \
711 + "${WORKDIR}"/patches-security/qemuu/ || die
712 + XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
713 + pushd "${S}"/tools/qemu-xen/ > /dev/null
714 + for i in ${XEN_SECURITY_QEMUU}; do
715 + EPATCH_SUFFIX="patch" \
716 + EPATCH_FORCE="yes" \
717 + epatch "${WORKDIR}"/patches-security/qemuu/$i
718 + done
719 + popd > /dev/null
720 + fi
721 +
722 + # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
723 + mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
724 + pushd tools/firmware/ > /dev/null
725 + ln -s seabios-dir-remote seabios-dir || die
726 + popd > /dev/null
727 +
728 + # Gentoo's patchset
729 + if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
730 + einfo "Try to apply Gentoo specific patcheset"
731 + source "${FILESDIR}"/gentoo-patches.conf
732 + _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
733 + for i in ${!_gpv}; do
734 + EPATCH_SUFFIX="patch" \
735 + EPATCH_FORCE="yes" \
736 + epatch "${WORKDIR}"/patches-gentoo/$i
737 + done
738 + fi
739 +
740 + # Ovmf's patchset
741 + if [[ -n ${OVMF_VER} ]] && use ovmf; then
742 + einfo "Try to apply Ovmf patcheset"
743 + pushd "${WORKDIR}"/ovmf-*/ > /dev/null
744 + EPATCH_SUFFIX="patch" \
745 + EPATCH_FORCE="yes" \
746 + EPATCH_OPTS="-p1" \
747 + epatch "${WORKDIR}"/patches-ovmf
748 + popd > /dev/null
749 + mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
750 + fi
751 +
752 + mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
753 +
754 + # Fix texi2html build error with new texi2html, qemu.doc.html
755 + sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
756 +
757 + use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
758 + sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
759 + -i tools/firmware/Makefile || die
760 +
761 + # Drop .config, fixes to gcc-4.6
762 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
763 +
764 + # if the user *really* wants to use their own custom-cflags, let them
765 + if use custom-cflags; then
766 + einfo "User wants their own CFLAGS - removing defaults"
767 +
768 + # try and remove all the default cflags
769 + find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
770 + -exec sed \
771 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
772 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
773 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
774 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
775 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
776 + -i {} + || die "failed to re-set custom-cflags"
777 + fi
778 +
779 + if ! use pygrub; then
780 + sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
781 + fi
782 +
783 + if ! use python; then
784 + sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
785 + fi
786 +
787 + if ! use hvm; then
788 + sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
789 + # Bug 351648
790 + elif ! use x86 && ! has x86 $(get_all_abis); then
791 + mkdir -p "${WORKDIR}"/extra-headers/gnu || die
792 + touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
793 + export CPATH="${WORKDIR}"/extra-headers
794 + fi
795 +
796 + if use qemu; then
797 + if use sdl; then
798 + sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
799 + tools/Makefile || die
800 + else
801 + sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
802 + tools/qemu-xen-traditional/xen-setup || die
803 + sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
804 + tools/Makefile || die
805 + fi
806 + else
807 + # Don't bother with qemu, only needed for fully virtualised guests
808 + sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
809 + fi
810 +
811 + # Reset bash completion dir; Bug 472438
812 + sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
813 + -i Config.mk || die
814 + sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
815 +
816 + # xencommons, Bug #492332, sed lighter weight than patching
817 + sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
818 + -i tools/hotplug/Linux/init.d/xencommons.in || die
819 +
820 + # respect multilib, usr/lib/libcacard.so.0.0.0
821 + sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
822 + -i tools/qemu-xen/configure || die
823 +
824 + #bug 518136, don't build 32bit exactuable for nomultilib profile
825 + if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
826 + sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
827 + fi
828 +
829 + # use /var instead of /var/lib, consistat with previous ebuild
830 + sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
831 + m4/paths.m4 configure tools/configure || die
832 + # use /run instead of /var/run
833 + sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
834 + m4/paths.m4 configure tools/configure || die
835 +
836 + # uncomment lines in xl.conf
837 + sed -e 's:^#autoballoon=:autoballoon=:' \
838 + -e 's:^#lockfile=:lockfile=:' \
839 + -e 's:^#vif.default.script=:vif.default.script=:' \
840 + -i tools/examples/xl.conf || die
841 +
842 + epatch_user
843 +}
844 +
845 +src_configure() {
846 + local myconf="--prefix=${PREFIX}/usr \
847 + --libdir=${PREFIX}/usr/$(get_libdir) \
848 + --libexecdir=${PREFIX}/usr/libexec \
849 + --disable-werror \
850 + --disable-xen \
851 + --enable-tools \
852 + --enable-docs \
853 + $(use_with system-qemu) \
854 + $(use_enable pam) \
855 + $(use_enable api xenapi) \
856 + $(use_enable ovmf) \
857 + $(use_enable ocaml ocamltools) \
858 + "
859 + use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
860 + use qemu || myconf+=" --with-system-qemu"
861 + use amd64 && myconf+=" --enable-qemu-traditional"
862 + econf ${myconf}
863 +}
864 +
865 +src_compile() {
866 + export VARTEXFONTS="${T}/fonts"
867 + local myopt
868 + use debug && myopt="${myopt} debug=y"
869 +
870 + use custom-cflags || unset CFLAGS
871 + if test-flag-CC -fno-strict-overflow; then
872 + append-flags -fno-strict-overflow
873 + fi
874 +
875 + unset LDFLAGS
876 + unset CFLAGS
877 + emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
878 +
879 + use doc && emake -C docs txt html
880 + emake -C docs man-pages
881 +}
882 +
883 +src_install() {
884 + # Override auto-detection in the build system, bug #382573
885 + export INITD_DIR=/tmp/init.d
886 + export CONFIG_LEAF_DIR=../tmp/default
887 +
888 + # Let the build system compile installed Python modules.
889 + local PYTHONDONTWRITEBYTECODE
890 + export PYTHONDONTWRITEBYTECODE
891 +
892 + emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
893 + XEN_PYTHON_NATIVE_INSTALL=y install-tools
894 +
895 + # Fix the remaining Python shebangs.
896 + python_fix_shebang "${D}"
897 +
898 + # Remove RedHat-specific stuff
899 + rm -rf "${D}"tmp || die
900 +
901 + if use doc; then
902 + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
903 +
904 + dohtml -r docs/
905 + docinto pdf
906 + dodoc ${DOCS[@]}
907 + [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
908 + fi
909 +
910 + rm -rf "${D}"/usr/share/doc/xen/
911 + doman docs/man?/*
912 +
913 + newconfd "${FILESDIR}"/xendomains.confd xendomains
914 + newconfd "${FILESDIR}"/xenstored.confd xenstored
915 + newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
916 + newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
917 + newinitd "${FILESDIR}"/xenstored.initd xenstored
918 + newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
919 + newinitd "${FILESDIR}"/xencommons.initd xencommons
920 + newconfd "${FILESDIR}"/xencommons.confd xencommons
921 + newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
922 + newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
923 +
924 + if use screen; then
925 + cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
926 + cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
927 + keepdir /var/log/xen-consoles
928 + fi
929 +
930 + # For -static-libs wrt Bug 384355
931 + if ! use static-libs; then
932 + rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
933 + fi
934 +
935 + # for xendomains
936 + keepdir /etc/xen/auto
937 +
938 + # Temp QA workaround
939 + dodir "$(get_udevdir)"
940 + mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
941 + rm -rf "${D}"/etc/udev
942 +
943 + # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
944 + find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
945 + -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
946 +}
947 +
948 +pkg_postinst() {
949 + elog "Official Xen Guide and the offical wiki page:"
950 + elog "https://wiki.gentoo.org/wiki/Xen"
951 + elog "http://wiki.xen.org/wiki/Main_Page"
952 + elog ""
953 + elog "Recommended to utilise the xencommons script to config sytem At boot"
954 + elog "Add by use of rc-update on completion of the install"
955 +
956 + # TODO: we need to have the current Python slot here.
957 + if ! has_version "dev-lang/python[ncurses]"; then
958 + echo
959 + ewarn "NB: Your dev-lang/python is built without USE=ncurses."
960 + ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
961 + fi
962 +
963 + if has_version "sys-apps/iproute2[minimal]"; then
964 + echo
965 + ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
966 + ewarn "will not work until you rebuild iproute2 without USE=minimal."
967 + fi
968 +
969 + if ! use hvm; then
970 + echo
971 + elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
972 + elog "support enable the hvm use flag."
973 + elog "An x86 or amd64 system is required to build HVM support."
974 + fi
975 +
976 + if use qemu; then
977 + elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
978 + elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
979 + elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
980 + elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
981 + fi
982 +
983 + if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
984 + echo
985 + elog "xensv is broken upstream (Gentoo bug #142011)."
986 + elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
987 + fi
988 +}