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