Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/xen-tools: ChangeLog xen-tools-4.1.1-r1.ebuild xen-tools-4.1.0-r1.ebuild xen-tools-4.1.1.ebuild
Date: Wed, 31 Aug 2011 18:56:28
Message-Id: 20110831185614.112CD2004C@flycatcher.gentoo.org
1 alexxy 11/08/31 18:56:14
2
3 Modified: ChangeLog
4 Added: xen-tools-4.1.1-r1.ebuild
5 Removed: xen-tools-4.1.0-r1.ebuild xen-tools-4.1.1.ebuild
6 Log:
7 [app-emulation/xen-tools] Drop old versions
8
9 (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.80 app-emulation/xen-tools/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.80&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.80&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/ChangeLog?r1=1.79&r2=1.80
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v
21 retrieving revision 1.79
22 retrieving revision 1.80
23 diff -u -r1.79 -r1.80
24 --- ChangeLog 23 Aug 2011 10:07:03 -0000 1.79
25 +++ ChangeLog 31 Aug 2011 18:56:13 -0000 1.80
26 @@ -1,6 +1,12 @@
27 # ChangeLog for app-emulation/xen-tools
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.79 2011/08/23 10:07:03 lxnay Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.80 2011/08/31 18:56:13 alexxy Exp $
31 +
32 +*xen-tools-4.1.1-r1 (31 Aug 2011)
33 +
34 + 31 Aug 2011; Alexey Shvetsov <alexxy@g.o> -xen-tools-4.1.0-r1.ebuild,
35 + -xen-tools-4.1.1.ebuild, +xen-tools-4.1.1-r1.ebuild:
36 + Drop old version
37
38 23 Aug 2011; Fabio Erculiani <lxnay@g.o> xen-tools-4.1.1.ebuild:
39 fix src_install, remove rm -r
40
41
42
43 1.1 app-emulation/xen-tools/xen-tools-4.1.1-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.1-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.1-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: xen-tools-4.1.1-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2011 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.1.1-r1.ebuild,v 1.1 2011/08/31 18:56:13 alexxy Exp $
53
54 EAPI="3"
55
56 inherit flag-o-matic eutils multilib python
57
58 DESCRIPTION="Xend daemon and tools"
59 HOMEPAGE="http://xen.org/"
60 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
61 S="${WORKDIR}/xen-${PV}"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~x86"
66 IUSE="doc debug screen custom-cflags pygrub hvm api acm flask ioemu"
67
68 CDEPEND="dev-lang/python
69 dev-python/lxml
70 sys-libs/zlib
71 hvm? ( media-libs/libsdl
72 sys-power/iasl )
73 acm? ( dev-libs/libxml2 )
74 api? ( dev-libs/libxml2 net-misc/curl )"
75
76 DEPEND="${CDEPEND}
77 sys-devel/gcc
78 dev-lang/perl
79 app-misc/pax-utils
80 dev-ml/findlib
81 doc? (
82 app-doc/doxygen
83 dev-tex/latex2html
84 media-gfx/transfig
85 media-gfx/graphviz
86 )
87 hvm? (
88 x11-proto/xproto
89 sys-devel/dev86
90 )"
91
92 RDEPEND="${CDEPEND}
93 sys-apps/iproute2
94 net-misc/bridge-utils
95 dev-python/pyxml
96 screen? (
97 app-misc/screen
98 app-admin/logrotate
99 )
100 || ( sys-fs/udev sys-apps/hotplug )"
101
102 # hvmloader is used to bootstrap a fully virtualized kernel
103 # Approved by QA team in bug #144032
104 QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
105 QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
106 usr/share/xen/qemu/openbios-sparc64"
107
108 pkg_setup() {
109 export "CONFIG_LOMOUNT=y"
110
111 if use ioemu; then
112 export "CONFIG_IOEMU=y"
113 else
114 export "CONFIG_IOEMU=n"
115 fi
116
117 if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
118 eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
119 eerror "an amd64 multilib profile is required. Remove the hvm use flag"
120 eerror "to build xen-tools on your current profile."
121 die "USE=hvm is unsupported on this system."
122 fi
123
124 if [[ -z ${XEN_TARGET_ARCH} ]] ; then
125 if use x86 && use amd64; then
126 die "Confusion! Both x86 and amd64 are set in your use flags!"
127 elif use x86; then
128 export XEN_TARGET_ARCH="x86_32"
129 elif use amd64 ; then
130 export XEN_TARGET_ARCH="x86_64"
131 else
132 die "Unsupported architecture!"
133 fi
134 fi
135
136 if use doc && ! has_version "dev-tex/latex2html[png,gif]"; then
137 # die early instead of later
138 eerror "USE=doc requires latex2html with image support. Please add"
139 eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
140 die "latex2html missing both png and gif flags"
141 fi
142
143 if use pygrub && ! has_version "dev-lang/python[ncurses]"; then
144 eerror "USE=pygrub requires python to be built with ncurses support. Please add"
145 eerror "'ncurses' to your use flags and re-emerge python"
146 die "python is missing ncurses flags"
147 fi
148
149 if ! has_version "dev-lang/python[threads]"; then
150 eerror "Python is required to be built with threading support. Please add"
151 eerror "'threads' to your use flags and re-emerge python"
152 die "python is missing threads flags"
153 fi
154
155 use api && export "LIBXENAPI_BINDINGS=y"
156 use acm && export "ACM_SECURITY=y"
157 use flask && export "FLASK_ENABLE=y"
158 }
159
160 src_prepare() {
161 sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
162 # Drop .config
163 sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
164 # if the user *really* wants to use their own custom-cflags, let them
165 if use custom-cflags; then
166 einfo "User wants their own CFLAGS - removing defaults"
167 # try and remove all the default custom-cflags
168 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
169 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
170 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
171 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
172 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
173 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
174 -i {} \;
175 fi
176
177 # Disable hvm support on systems that don't support x86_32 binaries.
178 if ! use hvm; then
179 chmod 644 tools/check/check_x11_devel
180 sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk
181 sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile
182 fi
183
184 if ! use pygrub; then
185 sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile
186 fi
187 # Don't bother with ioemu, only needed for fully virtualised guests
188 if ! use ioemu; then
189 sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk
190 sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" \
191 -i Makefile
192 fi
193
194 # Fix build for gcc-4.6
195 sed -e "s:-Werror::g" -i tools/xenstat/xentop/Makefile
196 # Fix network broadcast on bridged networks
197 epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
198
199 # Do not strip binaries
200 epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
201 }
202
203 src_compile() {
204 export VARTEXFONTS="${T}/fonts"
205 local myopt
206 use debug && myopt="${myopt} debug=y"
207
208 use custom-cflags || unset CFLAGS
209 if test-flag-CC -fno-strict-overflow; then
210 append-flags -fno-strict-overflow
211 fi
212
213 unset LDFLAGS
214 emake -C tools ${myopt} || die "compile failed"
215
216 if use doc; then
217 sh ./docs/check_pkgs || die "package check failed"
218 emake docs || die "compiling docs failed"
219 emake dev-docs || die "make dev-docs failed"
220 fi
221
222 emake -C docs man-pages || die "make man-pages failed"
223 }
224
225 src_install() {
226 make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools \
227 || die "install failed"
228
229 # Remove RedHat-specific stuff
230 rm -r "${D}"/etc/default "${D}"/etc/init.d/xen* || die
231
232 dodoc README docs/README.xen-bugtool docs/ChangeLog
233 if use doc; then
234 emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
235 || die "install docs failed"
236
237 dohtml -r docs/api/
238 docinto pdf
239 dodoc docs/api/tools/python/latex/refman.pdf
240
241 [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
242 fi
243 rm -rf "${D}"/usr/share/doc/xen/
244
245 doman docs/man?/*
246
247 newinitd "${FILESDIR}"/xend.initd-r2 xend \
248 || die "Couldn't install xen.initd"
249 newconfd "${FILESDIR}"/xendomains.confd xendomains \
250 || die "Couldn't install xendomains.confd"
251 newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains \
252 || die "Couldn't install xendomains.initd"
253 newinitd "${FILESDIR}"/xenstored.initd xenstored \
254 || die "Couldn't install xenstored.initd"
255 newconfd "${FILESDIR}"/xenstored.confd xenstored \
256 || die "Couldn't install xenstored.confd"
257 newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled \
258 || die "Couldn't install xenconsoled.initd"
259 newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled \
260 || die "Couldn't install xenconsoled.confd"
261
262 if use screen; then
263 cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
264 cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/
265 keepdir /var/log/xen-consoles
266 fi
267
268 # xend expects these to exist
269 keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
270
271 # for xendomains
272 keepdir /etc/xen/auto
273 }
274
275 pkg_postinst() {
276 elog "Official Xen Guide and the unoffical wiki page:"
277 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
278 elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
279
280 if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
281 echo
282 ewarn "xend may not work when python is built with stack smashing protection (ssp)."
283 ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
284 ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
285 fi
286
287 if ! has_version "dev-lang/python[ncurses]"; then
288 echo
289 ewarn "NB: Your dev-lang/python is built without USE=ncurses."
290 ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
291 fi
292
293 if has_version "sys-apps/iproute2[minimal]"; then
294 echo
295 ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
296 ewarn "will not work until you rebuild iproute2 without USE=minimal."
297 fi
298
299 if ! use hvm; then
300 echo
301 elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
302 elog "support enable the hvm use flag."
303 elog "An x86 or amd64 multilib system is required to build HVM support."
304 echo
305 elog "The ioemu use flag has been removed and replaced with hvm."
306 fi
307
308 if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
309 echo
310 elog "xensv is broken upstream (Gentoo bug #142011)."
311 elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
312 fi
313
314 python_mod_optimize $(use pygrub && echo grub) xen
315 }
316
317 pkg_postrm() {
318 python_mod_cleanup $(use pygrub && echo grub) xen
319 }