Gentoo Archives: gentoo-commits

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