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