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