1 |
commit: 1a5cd9426e3c9905668a834f73165af7598c8a38 |
2 |
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Nov 4 08:51:48 2019 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 4 11:50:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a5cd942 |
7 |
|
8 |
app-emulation/xen-tools: drop vulnerable |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/13543 |
11 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
12 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
13 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
14 |
|
15 |
app-emulation/xen-tools/Manifest | 1 - |
16 |
app-emulation/xen-tools/xen-tools-4.11.2.ebuild | 474 ------------------------ |
17 |
2 files changed, 475 deletions(-) |
18 |
|
19 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
20 |
index 2c657925f7f..d5becb4f196 100644 |
21 |
--- a/app-emulation/xen-tools/Manifest |
22 |
+++ b/app-emulation/xen-tools/Manifest |
23 |
@@ -3,7 +3,6 @@ DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b9 |
24 |
DIST ipxe-git-d2063b7693e0e35db97b2264aa987eb6341ae779.tar.gz 3792227 BLAKE2B 720ac29ab3187d7abaec33823dda967caab7eea9631123a7619d2f83d3ad6c7bb47db01665a4c54548fe367866606936d36690a06ecf42323b9bd0ef00e41569 SHA512 2b4ae8e65cd678dbb376f24001294eb54aead8d66456e06fc270dec178d90b282c1eb19731234d8b458054e49c5b8b8c4a89345c63ed0a4dafaf205e642b00b7 |
25 |
DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27 |
26 |
DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273 |
27 |
-DIST xen-4.11.2-upstream-patches-0.tar.xz 11532 BLAKE2B e36509d6256ac4018f20711baba77619a7c3a684d81e25a94cffba9c9f53ec9e0efdcefcd6a7ffa26b49fd3d4e0dfc2126f1ea620f0bd35ea83188b4587e5b38 SHA512 4a97d1e56cb3e5152372f0c0b99f8838194b2e03ed1255e87611d8bb28af9c9199fe123d3542f5ba9b3f652c29a519b5e4255b8925c0c8dfbd588f83ed8806d9 |
28 |
DIST xen-4.11.2-upstream-patches-1.tar.xz 77556 BLAKE2B f95af370f8a99a27bfc762e661364da6f1ef1b08dd5a6b81a5421d32bcad820097a694c5656e174cec7ed53ff140f80d63f57ac31867edf12e68ef4d87ea8b44 SHA512 f41f2ff20648eed76918c865958d42b99d2743188514c63e27797c80e9169f7f5843ac48195e38d269d02edcb9889f042b992b85773ca61c267282e41ea8dae6 |
29 |
DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e |
30 |
DIST xen-4.12.1-upstream-patches-1.tar.xz 62920 BLAKE2B a7f070e4b48c04fa26b75ccbd46aa1172df306060ae180f29f5ea61a5f0b4c2e854a5d1127ed42c05b21977a0e43b36b7e137c1758496b242f48626c5a00e22b SHA512 d7094b86f297a4b1da7007d73752ca8478a26c675ec5d93ade4599935cd51ebd80220a4ea7223d878e0d2c2209336577d196017c463abe9e47ff20914ffa5021 |
31 |
|
32 |
diff --git a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2.ebuild |
33 |
deleted file mode 100644 |
34 |
index b1beaa8102e..00000000000 |
35 |
--- a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild |
36 |
+++ /dev/null |
37 |
@@ -1,474 +0,0 @@ |
38 |
-# Copyright 1999-2019 Gentoo Authors |
39 |
-# Distributed under the terms of the GNU General Public License v2 |
40 |
- |
41 |
-EAPI=7 |
42 |
- |
43 |
-PYTHON_COMPAT=( python2_7 ) |
44 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
45 |
- |
46 |
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs |
47 |
- |
48 |
-MY_PV=${PV/_/-} |
49 |
- |
50 |
-if [[ $PV == *9999 ]]; then |
51 |
- inherit git-r3 |
52 |
- REPO="xen.git" |
53 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
54 |
- S="${WORKDIR}/${REPO}" |
55 |
-else |
56 |
- KEYWORDS="amd64 ~arm ~arm64 x86" |
57 |
- UPSTREAM_VER=0 |
58 |
- SECURITY_VER= |
59 |
- # xen-tools's gentoo patches tarball |
60 |
- GENTOO_VER=19 |
61 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
62 |
- GENTOO_GPV=0 |
63 |
- # xen-tools ovmf's patches |
64 |
- OVMF_VER= |
65 |
- |
66 |
- SEABIOS_VER=1.11.1 |
67 |
- EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56 |
68 |
- |
69 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
70 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz |
71 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
72 |
- [[ -n ${SECURITY_VER} ]] && \ |
73 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
74 |
- [[ -n ${GENTOO_VER} ]] && \ |
75 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz |
76 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz" |
77 |
- [[ -n ${OVMF_VER} ]] && \ |
78 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
79 |
- |
80 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
81 |
- https://git.seabios.org/cgit/seabios.git/snapshot/seabios-rel-${SEABIOS_VER}.tar.gz |
82 |
- ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz |
83 |
- ${OVMF_PATCHSET_URI} ) |
84 |
- ${UPSTREAM_PATCHSET_URI} |
85 |
- ${SECURITY_PATCHSET_URI} |
86 |
- ${GENTOO_PATCHSET_URI}" |
87 |
- |
88 |
- S="${WORKDIR}/xen-${MY_PV}" |
89 |
-fi |
90 |
- |
91 |
-DESCRIPTION="Xen tools including QEMU and xl" |
92 |
-HOMEPAGE="https://www.xenproject.org" |
93 |
-DOCS=( README docs/README.xen-bugtool ) |
94 |
- |
95 |
-LICENSE="GPL-2" |
96 |
-SLOT="0/$(ver_cut 1-2)" |
97 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
98 |
-# >=dev-lang/ocaml-4 stable |
99 |
-# Masked in profiles/eapi-5-files instead |
100 |
-IUSE="api custom-cflags debug doc flask +hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios" |
101 |
- |
102 |
-REQUIRED_USE=" |
103 |
- ${PYTHON_REQUIRED_USE} |
104 |
- ovmf? ( hvm ) |
105 |
- pygrub? ( python ) |
106 |
- ?? ( qemu system-qemu )" |
107 |
- |
108 |
-COMMON_DEPEND=" |
109 |
- sys-apps/pciutils |
110 |
- dev-libs/lzo:2 |
111 |
- dev-libs/glib:2 |
112 |
- dev-libs/yajl |
113 |
- dev-libs/libaio |
114 |
- dev-libs/libgcrypt:0 |
115 |
- sys-libs/zlib |
116 |
- ${PYTHON_DEPS} |
117 |
-" |
118 |
- |
119 |
-DEPEND="${COMMON_DEPEND} |
120 |
- >=sys-kernel/linux-headers-4.11 |
121 |
- dev-python/lxml[${PYTHON_USEDEP}] |
122 |
- x86? ( sys-devel/dev86 |
123 |
- sys-firmware/ipxe[qemu] |
124 |
- sys-power/iasl ) |
125 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
126 |
- api? ( dev-libs/libxml2 |
127 |
- net-misc/curl ) |
128 |
- ovmf? ( |
129 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
130 |
- $(python_gen_impl_dep sqlite) |
131 |
- ) |
132 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
133 |
- amd64? ( sys-devel/bin86 |
134 |
- sys-devel/dev86 |
135 |
- sys-firmware/ipxe[qemu] |
136 |
- sys-power/iasl |
137 |
- system-seabios? ( sys-firmware/seabios ) ) |
138 |
- dev-lang/perl |
139 |
- app-misc/pax-utils |
140 |
- doc? ( |
141 |
- app-text/ghostscript-gpl |
142 |
- app-text/pandoc |
143 |
- dev-python/markdown[${PYTHON_USEDEP}] |
144 |
- dev-texlive/texlive-latexextra |
145 |
- media-gfx/transfig |
146 |
- ) |
147 |
- hvm? ( x11-base/xorg-proto ) |
148 |
- qemu? ( |
149 |
- app-arch/snappy:= |
150 |
- x11-libs/pixman |
151 |
- sdl? ( media-libs/libsdl[X] ) |
152 |
- ) |
153 |
- system-qemu? ( app-emulation/qemu[xen] ) |
154 |
- ocaml? ( dev-ml/findlib |
155 |
- >=dev-lang/ocaml-4 )" |
156 |
- |
157 |
-RDEPEND="${COMMON_DEPEND} |
158 |
- sys-apps/iproute2[-minimal] |
159 |
- net-misc/bridge-utils |
160 |
- screen? ( |
161 |
- app-misc/screen |
162 |
- app-admin/logrotate |
163 |
- )" |
164 |
- |
165 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
166 |
-# Approved by QA team in bug #144032 |
167 |
-QA_WX_LOAD=" |
168 |
- usr/libexec/xen/boot/hvmloader |
169 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
170 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
171 |
-" |
172 |
- |
173 |
-QA_PREBUILT=" |
174 |
- usr/libexec/xen/bin/ivshmem-client |
175 |
- usr/libexec/xen/bin/ivshmem-server |
176 |
- usr/libexec/xen/bin/qemu-img |
177 |
- usr/libexec/xen/bin/qemu-io |
178 |
- usr/libexec/xen/bin/qemu-keymap |
179 |
- usr/libexec/xen/bin/qemu-nbd |
180 |
- usr/libexec/xen/bin/qemu-pr-helper |
181 |
- usr/libexec/xen/bin/qemu-system-i386 |
182 |
- usr/libexec/xen/bin/virtfs-proxy-helper |
183 |
- usr/libexec/xen/libexec/xen-bridge-helper |
184 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
185 |
- usr/share/qemu-xen/qemu/s390-netboot.img |
186 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
187 |
-" |
188 |
- |
189 |
-RESTRICT="test" |
190 |
- |
191 |
-pkg_setup() { |
192 |
- python_setup |
193 |
- export "CONFIG_LOMOUNT=y" |
194 |
- |
195 |
- #bug 522642, disable compile tools/tests |
196 |
- export "CONFIG_TESTS=n" |
197 |
- |
198 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
199 |
- if use x86 && use amd64; then |
200 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
201 |
- elif use x86; then |
202 |
- export XEN_TARGET_ARCH="x86_32" |
203 |
- elif use amd64 ; then |
204 |
- export XEN_TARGET_ARCH="x86_64" |
205 |
- elif use arm; then |
206 |
- export XEN_TARGET_ARCH="arm32" |
207 |
- elif use arm64; then |
208 |
- export XEN_TARGET_ARCH="arm64" |
209 |
- else |
210 |
- die "Unsupported architecture!" |
211 |
- fi |
212 |
- fi |
213 |
-} |
214 |
- |
215 |
-src_prepare() { |
216 |
- local i |
217 |
- |
218 |
- # Upstream's patchset |
219 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
220 |
- einfo "Try to apply Xen Upstream patch set" |
221 |
- eapply "${WORKDIR}"/patches-upstream |
222 |
- fi |
223 |
- |
224 |
- # Security patchset |
225 |
- if [[ -n ${SECURITY_VER} ]]; then |
226 |
- einfo "Try to apply Xen Security patch set" |
227 |
- # apply main xen patches |
228 |
- # Two parallel systems, both work side by side |
229 |
- # Over time they may concdense into one. This will suffice for now |
230 |
- EPATCH_SUFFIX="patch" |
231 |
- EPATCH_FORCE="yes" |
232 |
- |
233 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
234 |
- |
235 |
- for i in ${XEN_SECURITY_MAIN}; do |
236 |
- eapply "${WORKDIR}"/patches-security/xen/$i |
237 |
- done |
238 |
- |
239 |
- # apply qemu-xen/upstream patches |
240 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
241 |
- for i in ${XEN_SECURITY_QEMUU}; do |
242 |
- eapply "${WORKDIR}"/patches-security/qemuu/$i |
243 |
- done |
244 |
- popd > /dev/null |
245 |
- |
246 |
- # apply qemu-traditional patches |
247 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
248 |
- for i in ${XEN_SECURITY_QEMUT}; do |
249 |
- eapply "${WORKDIR}"/patches-security/qemut/$i |
250 |
- done |
251 |
- popd > /dev/null |
252 |
- fi |
253 |
- |
254 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
255 |
- mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
256 |
- pushd tools/firmware/ > /dev/null |
257 |
- ln -s seabios-dir-remote seabios-dir || die |
258 |
- popd > /dev/null |
259 |
- |
260 |
- # Gentoo's patchset |
261 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
262 |
- einfo "Try to apply Gentoo specific patch set" |
263 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
264 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
265 |
- for i in ${!_gpv}; do |
266 |
- eapply "${WORKDIR}"/patches-gentoo/$i |
267 |
- done |
268 |
- fi |
269 |
- |
270 |
- # Ovmf's patchset |
271 |
- if use ovmf; then |
272 |
- if [[ -n ${OVMF_VER} ]];then |
273 |
- einfo "Try to apply Ovmf patch set" |
274 |
- pushd "${WORKDIR}"/edk2-*/ > /dev/null |
275 |
- eapply "${WORKDIR}"/patches-ovmf |
276 |
- popd > /dev/null |
277 |
- fi |
278 |
- mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die |
279 |
- cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die |
280 |
- fi |
281 |
- |
282 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
283 |
- |
284 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
285 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
286 |
- |
287 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
288 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
289 |
- -i tools/firmware/Makefile || die |
290 |
- |
291 |
- # Drop .config, fixes to gcc-4.6 |
292 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
293 |
- |
294 |
- # if the user *really* wants to use their own custom-cflags, let them |
295 |
- if use custom-cflags; then |
296 |
- einfo "User wants their own CFLAGS - removing defaults" |
297 |
- |
298 |
- # try and remove all the default cflags |
299 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
300 |
- -exec sed \ |
301 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
302 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
303 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
304 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
305 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
306 |
- -i {} + || die "failed to re-set custom-cflags" |
307 |
- else |
308 |
- unset CFLAGS |
309 |
- unset LDFLAGS |
310 |
- unset ASFLAGS |
311 |
- unset CPPFLAGS |
312 |
- fi |
313 |
- |
314 |
- if ! use pygrub; then |
315 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
316 |
- fi |
317 |
- |
318 |
- if ! use python; then |
319 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
320 |
- fi |
321 |
- |
322 |
- if ! use hvm; then |
323 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
324 |
- # Bug 351648 |
325 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
326 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
327 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
328 |
- export CPATH="${WORKDIR}"/extra-headers |
329 |
- fi |
330 |
- |
331 |
- if use qemu; then |
332 |
- if use sdl; then |
333 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
334 |
- tools/Makefile || die |
335 |
- else |
336 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
337 |
- tools/qemu-xen-traditional/xen-setup || die |
338 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
339 |
- tools/Makefile || die |
340 |
- fi |
341 |
- else |
342 |
- # Don't bother with qemu, only needed for fully virtualised guests |
343 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
344 |
- fi |
345 |
- |
346 |
- # Reset bash completion dir; Bug 472438 |
347 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
348 |
- -i Config.mk || die |
349 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
350 |
- |
351 |
- # xencommons, Bug #492332, sed lighter weight than patching |
352 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
353 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
354 |
- |
355 |
- # fix bashishm |
356 |
- sed -e '/Usage/s/\$//g' \ |
357 |
- -i tools/hotplug/Linux/init.d/xendriverdomain.in || die |
358 |
- |
359 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
360 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
361 |
- -i tools/qemu-xen/configure || die |
362 |
- |
363 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
364 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
365 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
366 |
- fi |
367 |
- |
368 |
- # uncomment lines in xl.conf |
369 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
370 |
- -e 's:^#lockfile=:lockfile=:' \ |
371 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
372 |
- -i tools/examples/xl.conf || die |
373 |
- |
374 |
- # disable capstone (Bug #673474) |
375 |
- sed -e "s:\$\$source/configure:\0 --disable-capstone:" \ |
376 |
- -i tools/Makefile || die |
377 |
- |
378 |
- # disable glusterfs |
379 |
- sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \ |
380 |
- -i tools/Makefile || die |
381 |
- |
382 |
- default |
383 |
-} |
384 |
- |
385 |
-src_configure() { |
386 |
- local myconf="--prefix=${PREFIX}/usr \ |
387 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
388 |
- --libexecdir=${PREFIX}/usr/libexec \ |
389 |
- --localstatedir=${EPREFIX}/var \ |
390 |
- --disable-werror \ |
391 |
- --disable-xen \ |
392 |
- --enable-tools \ |
393 |
- --enable-docs \ |
394 |
- $(use_enable api xenapi) \ |
395 |
- $(use_enable pam) \ |
396 |
- $(use_enable ocaml ocamltools) \ |
397 |
- $(use_enable ovmf) \ |
398 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
399 |
- " |
400 |
- |
401 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
402 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
403 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
404 |
- tc-ld-disable-gold # Bug 669570 |
405 |
- econf ${myconf} |
406 |
-} |
407 |
- |
408 |
-src_compile() { |
409 |
- local myopt |
410 |
- use debug && myopt="${myopt} debug=y" |
411 |
- |
412 |
- if test-flag-CC -fno-strict-overflow; then |
413 |
- append-flags -fno-strict-overflow |
414 |
- fi |
415 |
- |
416 |
- emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt} |
417 |
- |
418 |
- if use doc; then |
419 |
- emake -C docs build |
420 |
- else |
421 |
- emake -C docs man-pages |
422 |
- fi |
423 |
-} |
424 |
- |
425 |
-src_install() { |
426 |
- # Override auto-detection in the build system, bug #382573 |
427 |
- export INITD_DIR=/tmp/init.d |
428 |
- export CONFIG_LEAF_DIR=../tmp/default |
429 |
- |
430 |
- # Let the build system compile installed Python modules. |
431 |
- local PYTHONDONTWRITEBYTECODE |
432 |
- export PYTHONDONTWRITEBYTECODE |
433 |
- |
434 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
435 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
436 |
- |
437 |
- # Created at runtime |
438 |
- rm -rv "${ED}/var/run" || die |
439 |
- |
440 |
- # Fix the remaining Python shebangs. |
441 |
- python_fix_shebang "${D}" |
442 |
- |
443 |
- # Remove RedHat-specific stuff |
444 |
- rm -rf "${D}/tmp" || die |
445 |
- |
446 |
- if use doc; then |
447 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
448 |
- dodoc -r docs/{pdf,txt} |
449 |
- else |
450 |
- emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032 |
451 |
- fi |
452 |
- dodoc ${DOCS[@]} |
453 |
- |
454 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
455 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
456 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
457 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
458 |
- newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
459 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
460 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
461 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
462 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
463 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
464 |
- newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog |
465 |
- |
466 |
- if use screen; then |
467 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
468 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
469 |
- keepdir /var/log/xen-consoles |
470 |
- fi |
471 |
- |
472 |
- # For -static-libs wrt Bug 384355 |
473 |
- if ! use static-libs; then |
474 |
- rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a |
475 |
- fi |
476 |
- |
477 |
- # for xendomains |
478 |
- keepdir /etc/xen/auto |
479 |
- |
480 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
481 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
482 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
483 |
- |
484 |
- keepdir /var/lib/xen/dump |
485 |
- keepdir /var/lib/xen/xenpaging |
486 |
- keepdir /var/lib/xenstored |
487 |
- keepdir /var/log/xen |
488 |
-} |
489 |
- |
490 |
-pkg_postinst() { |
491 |
- elog "Official Xen Guide and the offical wiki page:" |
492 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
493 |
- elog "https://wiki.xen.org/wiki/Main_Page" |
494 |
- elog "" |
495 |
- elog "Recommended to utilise the xencommons script to config system at boot" |
496 |
- elog "Add by use of rc-update on completion of the install" |
497 |
- |
498 |
- if ! use hvm; then |
499 |
- echo |
500 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
501 |
- elog "support enable the hvm use flag." |
502 |
- elog "An x86 or amd64 system is required to build HVM support." |
503 |
- fi |
504 |
- |
505 |
- if use qemu; then |
506 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
507 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
508 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
509 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
510 |
- fi |
511 |
-} |