Gentoo Archives: gentoo-commits

From: "Wolfram Schlich (wschlich)" <wschlich@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/xen-tools: ChangeLog xen-tools-3.4.1-r1.ebuild
Date: Tue, 01 Sep 2009 04:47:49
Message-Id: E1MiQ6O-0003Gf-VF@stork.gentoo.org
1 wschlich 09/09/01 09:56:36
2
3 Modified: ChangeLog
4 Added: xen-tools-3.4.1-r1.ebuild
5 Log:
6 fix bugs 248771, 248797, 248917
7 (Portage version: 2.2_rc33/cvs/Linux i686)
8
9 Revision Changes Path
10 1.52 app-emulation/xen-tools/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.52&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/ChangeLog?rev=1.52&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/ChangeLog?r1=1.51&r2=1.52
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v
19 retrieving revision 1.51
20 retrieving revision 1.52
21 diff -u -r1.51 -r1.52
22 --- ChangeLog 19 Aug 2009 15:06:58 -0000 1.51
23 +++ ChangeLog 1 Sep 2009 09:56:36 -0000 1.52
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.51 2009/08/19 15:06:58 patrick Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.52 2009/09/01 09:56:36 wschlich Exp $
29 +
30 +*xen-tools-3.4.1-r1 (01 Sep 2009)
31 +
32 + 01 Sep 2009; Wolfram Schlich <wschlich@g.o> +files/xend.initd-r1,
33 + +files/xendomains.initd-r1, +xen-tools-3.4.1-r1.ebuild:
34 + fix bugs 248771, 248797, 248917
35
36 19 Aug 2009; Patrick Lauer <patrick@g.o> xen-tools-3.4.1.ebuild:
37 Changing python dep (use=ssl) for #279917
38
39
40
41 1.1 app-emulation/xen-tools/xen-tools-3.4.1-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/xen-tools-3.4.1-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/xen-tools/xen-tools-3.4.1-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: xen-tools-3.4.1-r1.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.1-r1.ebuild,v 1.1 2009/09/01 09:56:36 wschlich 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[ssl]
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 # fix gcc 4.4 failure
176 epatch "${FILESDIR}/${P}-xc_core-memset.patch"
177 }
178
179 src_compile() {
180 export VARTEXFONTS="${T}/fonts"
181 local myopt
182 use debug && myopt="${myopt} debug=y"
183
184 use custom-cflags || unset CFLAGS
185 if test-flag-CC -fno-strict-overflow; then
186 append-flags -fno-strict-overflow
187 fi
188
189 emake -C tools ${myopt} || die "compile failed"
190
191 if use doc; then
192 sh ./docs/check_pkgs || die "package check failed"
193 emake docs || die "compiling docs failed"
194 emake dev-docs || die "make dev-docs failed"
195 fi
196
197 emake -C docs man-pages || die "make man-pages failed"
198 }
199
200 src_install() {
201 make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools \
202 || die "install failed"
203
204 # Remove RedHat-specific stuff
205 rm -rf "${D}"/etc/sysconfig
206
207 dodoc README docs/README.xen-bugtool docs/ChangeLog
208 if use doc; then
209 emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
210 || die "install docs failed"
211
212 dohtml -r docs/api/
213 docinto pdf
214 dodoc docs/api/tools/python/latex/refman.pdf
215
216 [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
217 fi
218 rm -rf "${D}"/usr/share/doc/xen/
219
220 doman docs/man?/*
221
222 newinitd "${FILESDIR}"/xend.initd-r1 xend \
223 || die "Couldn't install xen.initd"
224 newconfd "${FILESDIR}"/xendomains.confd xendomains \
225 || die "Couldn't install xendomains.confd"
226 newinitd "${FILESDIR}"/xendomains.initd-r1 xendomains \
227 || die "Couldn't install xendomains.initd"
228
229 if use screen; then
230 cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
231 cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/
232 keepdir /var/log/xen-consoles
233 fi
234
235 # xend expects these to exist
236 keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
237
238 # for xendomains
239 keepdir /etc/xen/auto
240 }
241
242 pkg_postinst() {
243 elog "Official Xen Guide and the unoffical wiki page:"
244 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
245 elog " http://en.gentoo-wiki.com/wiki/Xen/"
246
247 if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
248 echo
249 ewarn "xend may not work when python is built with stack smashing protection (ssp)."
250 ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
251 ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
252 fi
253
254 if ! built_with_use dev-lang/python ncurses; then
255 echo
256 ewarn "NB: Your dev-lang/python is built without USE=ncurses."
257 ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
258 fi
259
260 if built_with_use sys-apps/iproute2 minimal; then
261 echo
262 ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
263 ewarn "will not work until you rebuild iproute2 without USE=minimal."
264 fi
265
266 if ! use hvm; then
267 echo
268 elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
269 elog "support enable the hvm use flag."
270 elog "An x86 or amd64 multilib system is required to build HVM support."
271 echo
272 elog "The ioemu use flag has been removed and replaced with hvm."
273 fi
274
275 if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
276 echo
277 elog "xensv is broken upstream (Gentoo bug #142011)."
278 elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
279 fi
280
281 python_mod_optimize
282 }
283
284 pkg_postrm() {
285 python_mod_cleanup
286 }