1 |
commit: 0320a73d9fc3430c02420fcbf71fa9153c0b8169 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 28 05:41:18 2019 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 28 05:41:20 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0320a73d |
7 |
|
8 |
app-emulation/xen-tools: drop old vulnerables |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
12 |
|
13 |
app-emulation/xen-tools/Manifest | 3 - |
14 |
app-emulation/xen-tools/files/gentoo-patches.conf | 10 - |
15 |
app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild | 456 -------------------- |
16 |
app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild | 464 --------------------- |
17 |
4 files changed, 933 deletions(-) |
18 |
|
19 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
20 |
index 9233cee6df2..7b9fd93efb0 100644 |
21 |
--- a/app-emulation/xen-tools/Manifest |
22 |
+++ b/app-emulation/xen-tools/Manifest |
23 |
@@ -1,13 +1,10 @@ |
24 |
DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a |
25 |
DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c |
26 |
DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27 |
27 |
-DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33 |
28 |
-DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163 |
29 |
DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634 |
30 |
DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412 |
31 |
DIST xen-4.11.1-upstream-patches-0.tar.xz 45416 BLAKE2B 3990dbf338c2aebe1cd601d7caccc6919352cc1f937677d447c3d2626143710bdfda7f1977e2ad7112abff9cad6bb660bc1b0993ca74b2eff51da6d4f4365813 SHA512 ecbc13e607581a6f9b4e318145afaa92ce641bda6fb12585408f61bcf24fa9b245004ad22150e109db5d38fcea38e6bdaf6bb2d6eaaf8e5d5fa8816b5a19e456 |
32 |
DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649 |
33 |
DIST xen-4.12.0-rc5.tar.gz 26514850 BLAKE2B 41985dc33175bee8bddc4da0ec3b4da9f8cf3ebe580406011db47a27a8740566c1ace6e906d3385f73fee9b6cd572b0f3292381ac72a696fc15d020eb982ad02 SHA512 3d7fb254503c412a3c37782f7c75d093a1d43553dc110338d8dc00df0c6be4c8825cebf7f0519731e49263cef38d07ef48c18f073926d7eaf30abe64b13c52cb |
34 |
-DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d |
35 |
DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56 |
36 |
DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b |
37 |
|
38 |
diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf |
39 |
index 234abc9b2ad..6a6654a4a33 100644 |
40 |
--- a/app-emulation/xen-tools/files/gentoo-patches.conf |
41 |
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf |
42 |
@@ -41,16 +41,6 @@ _gx053=" xen-tools-4.12.0-gcc8.patch" |
43 |
# Fix pdf document generation, bug #650396 |
44 |
_gx049=" xen-tools-4.10.1-pdfdoc.patch" |
45 |
|
46 |
-# xen-tools-4.10.2 patches set |
47 |
-_gpv_xen_tools_4102_0=" |
48 |
-${_gx038} ${_gx017} ${_gx043} |
49 |
-${_gx027} |
50 |
-${_gx028} ${_gx029} |
51 |
-${_gx037} ${_gx042} |
52 |
-${_gx045} ${_gx046} ${_gx047} |
53 |
-${_gx049} |
54 |
-" |
55 |
- |
56 |
# xen-tools-4.10.3 patches set |
57 |
_gpv_xen_tools_4103_0=" |
58 |
${_gx038} ${_gx017} ${_gx043} |
59 |
|
60 |
diff --git a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild |
61 |
deleted file mode 100644 |
62 |
index 6c5b027ed61..00000000000 |
63 |
--- a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild |
64 |
+++ /dev/null |
65 |
@@ -1,456 +0,0 @@ |
66 |
-# Copyright 1999-2018 Gentoo Authors |
67 |
-# Distributed under the terms of the GNU General Public License v2 |
68 |
- |
69 |
-EAPI=7 |
70 |
- |
71 |
-PYTHON_COMPAT=( python2_7 ) |
72 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
73 |
- |
74 |
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs |
75 |
- |
76 |
-MY_PV=${PV/_/-} |
77 |
- |
78 |
-if [[ $PV == *9999 ]]; then |
79 |
- inherit git-r3 |
80 |
- REPO="xen.git" |
81 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
82 |
- S="${WORKDIR}/${REPO}" |
83 |
-else |
84 |
- KEYWORDS="amd64 ~arm ~arm64 x86" |
85 |
- UPSTREAM_VER=1 |
86 |
- SECURITY_VER= |
87 |
- # xen-tools's gentoo patches tarball |
88 |
- GENTOO_VER=14 |
89 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
90 |
- GENTOO_GPV=0 |
91 |
- # xen-tools ovmf's patches |
92 |
- OVMF_VER=3 |
93 |
- |
94 |
- SEABIOS_VER=1.10.0 |
95 |
- # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05 |
96 |
- OVMF_PV=20170321 |
97 |
- |
98 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
99 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz |
100 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
101 |
- [[ -n ${SECURITY_VER} ]] && \ |
102 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
103 |
- [[ -n ${GENTOO_VER} ]] && \ |
104 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz |
105 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz" |
106 |
- [[ -n ${OVMF_VER} ]] && \ |
107 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
108 |
- |
109 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
110 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
111 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
112 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz |
113 |
- ${OVMF_PATCHSET_URI} ) |
114 |
- ${UPSTREAM_PATCHSET_URI} |
115 |
- ${SECURITY_PATCHSET_URI} |
116 |
- ${GENTOO_PATCHSET_URI}" |
117 |
- |
118 |
- S="${WORKDIR}/xen-${MY_PV}" |
119 |
-fi |
120 |
- |
121 |
-DESCRIPTION="Xen tools including QEMU and xl" |
122 |
-HOMEPAGE="https://www.xenproject.org" |
123 |
-DOCS=( README docs/README.xen-bugtool ) |
124 |
- |
125 |
-LICENSE="GPL-2" |
126 |
-SLOT="0/$(ver_cut 1-2)" |
127 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
128 |
-# >=dev-lang/ocaml-4 stable |
129 |
-# Masked in profiles/eapi-5-files instead |
130 |
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios" |
131 |
- |
132 |
-REQUIRED_USE=" |
133 |
- ${PYTHON_REQUIRED_USE} |
134 |
- pygrub? ( python ) |
135 |
- ovmf? ( hvm ) |
136 |
- ^^ ( qemu system-qemu )" |
137 |
- |
138 |
-COMMON_DEPEND=" |
139 |
- sys-apps/pciutils |
140 |
- dev-libs/lzo:2 |
141 |
- dev-libs/glib:2 |
142 |
- dev-libs/yajl |
143 |
- dev-libs/libaio |
144 |
- dev-libs/libgcrypt:0 |
145 |
- sys-libs/zlib |
146 |
- ${PYTHON_DEPS} |
147 |
-" |
148 |
- |
149 |
-DEPEND="${COMMON_DEPEND} |
150 |
- >=sys-kernel/linux-headers-4.11 |
151 |
- dev-python/lxml[${PYTHON_USEDEP}] |
152 |
- x86? ( sys-devel/dev86 |
153 |
- sys-power/iasl ) |
154 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
155 |
- api? ( dev-libs/libxml2 |
156 |
- net-misc/curl ) |
157 |
- ovmf? ( |
158 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
159 |
- $(python_gen_impl_dep sqlite) |
160 |
- ) |
161 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
162 |
- amd64? ( sys-devel/bin86 |
163 |
- system-seabios? ( sys-firmware/seabios ) |
164 |
- sys-firmware/ipxe |
165 |
- sys-devel/dev86 |
166 |
- sys-power/iasl ) |
167 |
- dev-lang/perl |
168 |
- app-misc/pax-utils |
169 |
- doc? ( |
170 |
- app-text/ghostscript-gpl |
171 |
- app-text/pandoc |
172 |
- dev-python/markdown[${PYTHON_USEDEP}] |
173 |
- dev-texlive/texlive-latexextra |
174 |
- media-gfx/transfig |
175 |
- ) |
176 |
- hvm? ( x11-base/xorg-proto |
177 |
- !net-libs/libiscsi ) |
178 |
- qemu? ( |
179 |
- app-arch/snappy:= |
180 |
- x11-libs/pixman |
181 |
- sdl? ( media-libs/libsdl[X] ) |
182 |
- ) |
183 |
- system-qemu? ( app-emulation/qemu[xen] ) |
184 |
- ocaml? ( dev-ml/findlib |
185 |
- >=dev-lang/ocaml-4 )" |
186 |
- |
187 |
-RDEPEND="${COMMON_DEPEND} |
188 |
- sys-apps/iproute2[-minimal] |
189 |
- net-misc/bridge-utils |
190 |
- screen? ( |
191 |
- app-misc/screen |
192 |
- app-admin/logrotate |
193 |
- )" |
194 |
- |
195 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
196 |
-# Approved by QA team in bug #144032 |
197 |
-QA_WX_LOAD=" |
198 |
- usr/libexec/xen/boot/hvmloader |
199 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
200 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
201 |
-" |
202 |
- |
203 |
-QA_PREBUILT=" |
204 |
- usr/libexec/xen/bin/ivshmem-client |
205 |
- usr/libexec/xen/bin/ivshmem-server |
206 |
- usr/libexec/xen/bin/qemu-img |
207 |
- usr/libexec/xen/bin/qemu-io |
208 |
- usr/libexec/xen/bin/qemu-nbd |
209 |
- usr/libexec/xen/bin/qemu-system-i386 |
210 |
- usr/libexec/xen/bin/virtfs-proxy-helper |
211 |
- usr/libexec/xen/libexec/xen-bridge-helper |
212 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
213 |
- usr/share/qemu-xen/qemu/s390-netboot.img |
214 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
215 |
-" |
216 |
- |
217 |
-RESTRICT="test" |
218 |
- |
219 |
-pkg_setup() { |
220 |
- python_setup |
221 |
- export "CONFIG_LOMOUNT=y" |
222 |
- |
223 |
- #bug 522642, disable compile tools/tests |
224 |
- export "CONFIG_TESTS=n" |
225 |
- |
226 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
227 |
- if use x86 && use amd64; then |
228 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
229 |
- elif use x86; then |
230 |
- export XEN_TARGET_ARCH="x86_32" |
231 |
- elif use amd64 ; then |
232 |
- export XEN_TARGET_ARCH="x86_64" |
233 |
- elif use arm; then |
234 |
- export XEN_TARGET_ARCH="arm32" |
235 |
- elif use arm64; then |
236 |
- export XEN_TARGET_ARCH="arm64" |
237 |
- else |
238 |
- die "Unsupported architecture!" |
239 |
- fi |
240 |
- fi |
241 |
-} |
242 |
- |
243 |
-src_prepare() { |
244 |
- local i |
245 |
- |
246 |
- # Upstream's patchset |
247 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
248 |
- einfo "Try to apply Xen Upstream patch set" |
249 |
- eapply "${WORKDIR}"/patches-upstream |
250 |
- fi |
251 |
- |
252 |
- # Security patchset |
253 |
- if [[ -n ${SECURITY_VER} ]]; then |
254 |
- einfo "Try to apply Xen Security patch set" |
255 |
- # apply main xen patches |
256 |
- # Two parallel systems, both work side by side |
257 |
- # Over time they may concdense into one. This will suffice for now |
258 |
- EPATCH_SUFFIX="patch" |
259 |
- EPATCH_FORCE="yes" |
260 |
- |
261 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
262 |
- |
263 |
- for i in ${XEN_SECURITY_MAIN}; do |
264 |
- eapply "${WORKDIR}"/patches-security/xen/$i |
265 |
- done |
266 |
- |
267 |
- # apply qemu-xen/upstream patches |
268 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
269 |
- for i in ${XEN_SECURITY_QEMUU}; do |
270 |
- eapply "${WORKDIR}"/patches-security/qemuu/$i |
271 |
- done |
272 |
- popd > /dev/null |
273 |
- |
274 |
- # apply qemu-traditional patches |
275 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
276 |
- for i in ${XEN_SECURITY_QEMUT}; do |
277 |
- eapply "${WORKDIR}"/patches-security/qemut/$i |
278 |
- done |
279 |
- popd > /dev/null |
280 |
- fi |
281 |
- |
282 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
283 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
284 |
- pushd tools/firmware/ > /dev/null |
285 |
- ln -s seabios-dir-remote seabios-dir || die |
286 |
- popd > /dev/null |
287 |
- |
288 |
- # Gentoo's patchset |
289 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
290 |
- einfo "Try to apply Gentoo specific patch set" |
291 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
292 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
293 |
- for i in ${!_gpv}; do |
294 |
- eapply "${WORKDIR}"/patches-gentoo/$i |
295 |
- done |
296 |
- fi |
297 |
- |
298 |
- # Ovmf's patchset |
299 |
- if use ovmf; then |
300 |
- if [[ -n ${OVMF_VER} ]];then |
301 |
- einfo "Try to apply Ovmf patch set" |
302 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
303 |
- eapply "${WORKDIR}"/patches-ovmf |
304 |
- popd > /dev/null |
305 |
- fi |
306 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
307 |
- fi |
308 |
- |
309 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
310 |
- |
311 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
312 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
313 |
- |
314 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
315 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
316 |
- -i tools/firmware/Makefile || die |
317 |
- |
318 |
- # Drop .config, fixes to gcc-4.6 |
319 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
320 |
- |
321 |
- # if the user *really* wants to use their own custom-cflags, let them |
322 |
- if use custom-cflags; then |
323 |
- einfo "User wants their own CFLAGS - removing defaults" |
324 |
- |
325 |
- # try and remove all the default cflags |
326 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
327 |
- -exec sed \ |
328 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
329 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
330 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
331 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
332 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
333 |
- -i {} + || die "failed to re-set custom-cflags" |
334 |
- else |
335 |
- unset CFLAGS |
336 |
- unset LDFLAGS |
337 |
- unset ASFLAGS |
338 |
- unset CPPFLAGS |
339 |
- fi |
340 |
- |
341 |
- if ! use pygrub; then |
342 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
343 |
- fi |
344 |
- |
345 |
- if ! use python; then |
346 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
347 |
- fi |
348 |
- |
349 |
- if ! use hvm; then |
350 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
351 |
- # Bug 351648 |
352 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
353 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
354 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
355 |
- export CPATH="${WORKDIR}"/extra-headers |
356 |
- fi |
357 |
- |
358 |
- if use qemu; then |
359 |
- if use sdl; then |
360 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
361 |
- tools/Makefile || die |
362 |
- else |
363 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
364 |
- tools/qemu-xen-traditional/xen-setup || die |
365 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
366 |
- tools/Makefile || die |
367 |
- fi |
368 |
- else |
369 |
- # Don't bother with qemu, only needed for fully virtualised guests |
370 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
371 |
- fi |
372 |
- |
373 |
- # Reset bash completion dir; Bug 472438 |
374 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
375 |
- -i Config.mk || die |
376 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
377 |
- |
378 |
- # xencommons, Bug #492332, sed lighter weight than patching |
379 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
380 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
381 |
- |
382 |
- # fix bashishm |
383 |
- sed -e '/Usage/s/\$//g' \ |
384 |
- -i tools/hotplug/Linux/init.d/xendriverdomain.in || die |
385 |
- |
386 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
387 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
388 |
- -i tools/qemu-xen/configure || die |
389 |
- |
390 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
391 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
392 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
393 |
- fi |
394 |
- |
395 |
- # uncomment lines in xl.conf |
396 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
397 |
- -e 's:^#lockfile=:lockfile=:' \ |
398 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
399 |
- -i tools/examples/xl.conf || die |
400 |
- |
401 |
- default |
402 |
-} |
403 |
- |
404 |
-src_configure() { |
405 |
- local myconf="--prefix=${PREFIX}/usr \ |
406 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
407 |
- --libexecdir=${PREFIX}/usr/libexec \ |
408 |
- --localstatedir=${EPREFIX}/var \ |
409 |
- --disable-werror \ |
410 |
- --disable-xen \ |
411 |
- --enable-tools \ |
412 |
- --enable-docs \ |
413 |
- $(use_enable pam) \ |
414 |
- $(use_enable api xenapi) \ |
415 |
- $(use_enable ovmf) \ |
416 |
- $(use_enable ocaml ocamltools) \ |
417 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
418 |
- " |
419 |
- |
420 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
421 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
422 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
423 |
- tc-ld-disable-gold # Bug 669570 |
424 |
- econf ${myconf} |
425 |
-} |
426 |
- |
427 |
-src_compile() { |
428 |
- local myopt |
429 |
- use debug && myopt="${myopt} debug=y" |
430 |
- |
431 |
- if test-flag-CC -fno-strict-overflow; then |
432 |
- append-flags -fno-strict-overflow |
433 |
- fi |
434 |
- |
435 |
- emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt} |
436 |
- |
437 |
- if use doc; then |
438 |
- emake -C docs build |
439 |
- else |
440 |
- emake -C docs man-pages |
441 |
- fi |
442 |
-} |
443 |
- |
444 |
-src_install() { |
445 |
- # Override auto-detection in the build system, bug #382573 |
446 |
- export INITD_DIR=/tmp/init.d |
447 |
- export CONFIG_LEAF_DIR=../tmp/default |
448 |
- |
449 |
- # Let the build system compile installed Python modules. |
450 |
- local PYTHONDONTWRITEBYTECODE |
451 |
- export PYTHONDONTWRITEBYTECODE |
452 |
- |
453 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
454 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
455 |
- |
456 |
- # Created at runtime |
457 |
- rm -rv "${ED%/}/var/run" || die |
458 |
- |
459 |
- # Fix the remaining Python shebangs. |
460 |
- python_fix_shebang "${D}" |
461 |
- |
462 |
- # Remove RedHat-specific stuff |
463 |
- rm -rf "${D}"tmp || die |
464 |
- |
465 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
466 |
- use doc && dodoc -r docs/{pdf,txt} |
467 |
- dodoc ${DOCS[@]} |
468 |
- |
469 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
470 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
471 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
472 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
473 |
- newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
474 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
475 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
476 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
477 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
478 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
479 |
- newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog |
480 |
- |
481 |
- if use screen; then |
482 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
483 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
484 |
- keepdir /var/log/xen-consoles |
485 |
- fi |
486 |
- |
487 |
- # For -static-libs wrt Bug 384355 |
488 |
- if ! use static-libs; then |
489 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
490 |
- fi |
491 |
- |
492 |
- # for xendomains |
493 |
- keepdir /etc/xen/auto |
494 |
- |
495 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
496 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
497 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
498 |
-} |
499 |
- |
500 |
-pkg_postinst() { |
501 |
- elog "Official Xen Guide and the offical wiki page:" |
502 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
503 |
- elog "https://wiki.xen.org/wiki/Main_Page" |
504 |
- elog "" |
505 |
- elog "Recommended to utilise the xencommons script to config sytem At boot" |
506 |
- elog "Add by use of rc-update on completion of the install" |
507 |
- |
508 |
- if ! use hvm; then |
509 |
- echo |
510 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
511 |
- elog "support enable the hvm use flag." |
512 |
- elog "An x86 or amd64 system is required to build HVM support." |
513 |
- fi |
514 |
- |
515 |
- if use qemu; then |
516 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
517 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
518 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
519 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
520 |
- fi |
521 |
-} |
522 |
|
523 |
diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild |
524 |
deleted file mode 100644 |
525 |
index 2f949b56d4c..00000000000 |
526 |
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild |
527 |
+++ /dev/null |
528 |
@@ -1,464 +0,0 @@ |
529 |
-# Copyright 1999-2019 Gentoo Authors |
530 |
-# Distributed under the terms of the GNU General Public License v2 |
531 |
- |
532 |
-EAPI=7 |
533 |
- |
534 |
-PYTHON_COMPAT=( python2_7 ) |
535 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
536 |
- |
537 |
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs |
538 |
- |
539 |
-MY_PV=${PV/_/-} |
540 |
- |
541 |
-if [[ $PV == *9999 ]]; then |
542 |
- inherit git-r3 |
543 |
- REPO="xen.git" |
544 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
545 |
- S="${WORKDIR}/${REPO}" |
546 |
-else |
547 |
- KEYWORDS="amd64 ~arm ~arm64 ~x86" |
548 |
- UPSTREAM_VER=1 |
549 |
- SECURITY_VER= |
550 |
- # xen-tools's gentoo patches tarball |
551 |
- GENTOO_VER=14 |
552 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
553 |
- GENTOO_GPV=0 |
554 |
- # xen-tools ovmf's patches |
555 |
- OVMF_VER=3 |
556 |
- |
557 |
- SEABIOS_VER=1.10.0 |
558 |
- # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05 |
559 |
- OVMF_PV=20170321 |
560 |
- |
561 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
562 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz |
563 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
564 |
- [[ -n ${SECURITY_VER} ]] && \ |
565 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
566 |
- [[ -n ${GENTOO_VER} ]] && \ |
567 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz |
568 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz" |
569 |
- [[ -n ${OVMF_VER} ]] && \ |
570 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
571 |
- |
572 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
573 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
574 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
575 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz |
576 |
- ${OVMF_PATCHSET_URI} ) |
577 |
- ${UPSTREAM_PATCHSET_URI} |
578 |
- ${SECURITY_PATCHSET_URI} |
579 |
- ${GENTOO_PATCHSET_URI}" |
580 |
- |
581 |
- S="${WORKDIR}/xen-${MY_PV}" |
582 |
-fi |
583 |
- |
584 |
-DESCRIPTION="Xen tools including QEMU and xl" |
585 |
-HOMEPAGE="https://www.xenproject.org" |
586 |
-DOCS=( README docs/README.xen-bugtool ) |
587 |
- |
588 |
-LICENSE="GPL-2" |
589 |
-SLOT="0/$(ver_cut 1-2)" |
590 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
591 |
-# >=dev-lang/ocaml-4 stable |
592 |
-# Masked in profiles/eapi-5-files instead |
593 |
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios" |
594 |
- |
595 |
-REQUIRED_USE=" |
596 |
- ${PYTHON_REQUIRED_USE} |
597 |
- pygrub? ( python ) |
598 |
- ovmf? ( hvm ) |
599 |
- ^^ ( qemu system-qemu )" |
600 |
- |
601 |
-COMMON_DEPEND=" |
602 |
- sys-apps/pciutils |
603 |
- dev-libs/lzo:2 |
604 |
- dev-libs/glib:2 |
605 |
- dev-libs/yajl |
606 |
- dev-libs/libaio |
607 |
- dev-libs/libgcrypt:0 |
608 |
- sys-libs/zlib |
609 |
- ${PYTHON_DEPS} |
610 |
-" |
611 |
- |
612 |
-DEPEND="${COMMON_DEPEND} |
613 |
- >=sys-kernel/linux-headers-4.11 |
614 |
- dev-python/lxml[${PYTHON_USEDEP}] |
615 |
- x86? ( sys-devel/dev86 |
616 |
- sys-power/iasl ) |
617 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
618 |
- api? ( dev-libs/libxml2 |
619 |
- net-misc/curl ) |
620 |
- ovmf? ( |
621 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
622 |
- $(python_gen_impl_dep sqlite) |
623 |
- ) |
624 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
625 |
- amd64? ( sys-devel/bin86 |
626 |
- system-seabios? ( sys-firmware/seabios ) |
627 |
- sys-firmware/ipxe |
628 |
- sys-devel/dev86 |
629 |
- sys-power/iasl ) |
630 |
- dev-lang/perl |
631 |
- app-misc/pax-utils |
632 |
- doc? ( |
633 |
- app-text/ghostscript-gpl |
634 |
- app-text/pandoc |
635 |
- dev-python/markdown[${PYTHON_USEDEP}] |
636 |
- dev-texlive/texlive-latexextra |
637 |
- media-gfx/transfig |
638 |
- ) |
639 |
- hvm? ( x11-base/xorg-proto ) |
640 |
- qemu? ( |
641 |
- app-arch/snappy:= |
642 |
- x11-libs/pixman |
643 |
- sdl? ( media-libs/libsdl[X] ) |
644 |
- ) |
645 |
- system-qemu? ( app-emulation/qemu[xen] ) |
646 |
- ocaml? ( dev-ml/findlib |
647 |
- >=dev-lang/ocaml-4 )" |
648 |
- |
649 |
-RDEPEND="${COMMON_DEPEND} |
650 |
- sys-apps/iproute2[-minimal] |
651 |
- net-misc/bridge-utils |
652 |
- screen? ( |
653 |
- app-misc/screen |
654 |
- app-admin/logrotate |
655 |
- )" |
656 |
- |
657 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
658 |
-# Approved by QA team in bug #144032 |
659 |
-QA_WX_LOAD=" |
660 |
- usr/libexec/xen/boot/hvmloader |
661 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
662 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
663 |
-" |
664 |
- |
665 |
-QA_PREBUILT=" |
666 |
- usr/libexec/xen/bin/ivshmem-client |
667 |
- usr/libexec/xen/bin/ivshmem-server |
668 |
- usr/libexec/xen/bin/qemu-img |
669 |
- usr/libexec/xen/bin/qemu-io |
670 |
- usr/libexec/xen/bin/qemu-nbd |
671 |
- usr/libexec/xen/bin/qemu-system-i386 |
672 |
- usr/libexec/xen/bin/virtfs-proxy-helper |
673 |
- usr/libexec/xen/libexec/xen-bridge-helper |
674 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
675 |
- usr/share/qemu-xen/qemu/s390-netboot.img |
676 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
677 |
-" |
678 |
- |
679 |
-RESTRICT="test" |
680 |
- |
681 |
-pkg_setup() { |
682 |
- python_setup |
683 |
- export "CONFIG_LOMOUNT=y" |
684 |
- |
685 |
- #bug 522642, disable compile tools/tests |
686 |
- export "CONFIG_TESTS=n" |
687 |
- |
688 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
689 |
- if use x86 && use amd64; then |
690 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
691 |
- elif use x86; then |
692 |
- export XEN_TARGET_ARCH="x86_32" |
693 |
- elif use amd64 ; then |
694 |
- export XEN_TARGET_ARCH="x86_64" |
695 |
- elif use arm; then |
696 |
- export XEN_TARGET_ARCH="arm32" |
697 |
- elif use arm64; then |
698 |
- export XEN_TARGET_ARCH="arm64" |
699 |
- else |
700 |
- die "Unsupported architecture!" |
701 |
- fi |
702 |
- fi |
703 |
-} |
704 |
- |
705 |
-src_prepare() { |
706 |
- local i |
707 |
- |
708 |
- # Upstream's patchset |
709 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
710 |
- einfo "Try to apply Xen Upstream patch set" |
711 |
- eapply "${WORKDIR}"/patches-upstream |
712 |
- fi |
713 |
- |
714 |
- # Security patchset |
715 |
- if [[ -n ${SECURITY_VER} ]]; then |
716 |
- einfo "Try to apply Xen Security patch set" |
717 |
- # apply main xen patches |
718 |
- # Two parallel systems, both work side by side |
719 |
- # Over time they may concdense into one. This will suffice for now |
720 |
- EPATCH_SUFFIX="patch" |
721 |
- EPATCH_FORCE="yes" |
722 |
- |
723 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
724 |
- |
725 |
- for i in ${XEN_SECURITY_MAIN}; do |
726 |
- eapply "${WORKDIR}"/patches-security/xen/$i |
727 |
- done |
728 |
- |
729 |
- # apply qemu-xen/upstream patches |
730 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
731 |
- for i in ${XEN_SECURITY_QEMUU}; do |
732 |
- eapply "${WORKDIR}"/patches-security/qemuu/$i |
733 |
- done |
734 |
- popd > /dev/null |
735 |
- |
736 |
- # apply qemu-traditional patches |
737 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
738 |
- for i in ${XEN_SECURITY_QEMUT}; do |
739 |
- eapply "${WORKDIR}"/patches-security/qemut/$i |
740 |
- done |
741 |
- popd > /dev/null |
742 |
- fi |
743 |
- |
744 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
745 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
746 |
- pushd tools/firmware/ > /dev/null |
747 |
- ln -s seabios-dir-remote seabios-dir || die |
748 |
- popd > /dev/null |
749 |
- |
750 |
- # Gentoo's patchset |
751 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
752 |
- einfo "Try to apply Gentoo specific patch set" |
753 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
754 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
755 |
- for i in ${!_gpv}; do |
756 |
- eapply "${WORKDIR}"/patches-gentoo/$i |
757 |
- done |
758 |
- fi |
759 |
- |
760 |
- # Ovmf's patchset |
761 |
- if use ovmf; then |
762 |
- if [[ -n ${OVMF_VER} ]];then |
763 |
- einfo "Try to apply Ovmf patch set" |
764 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
765 |
- eapply "${WORKDIR}"/patches-ovmf |
766 |
- popd > /dev/null |
767 |
- fi |
768 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
769 |
- fi |
770 |
- |
771 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
772 |
- |
773 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
774 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
775 |
- |
776 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
777 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
778 |
- -i tools/firmware/Makefile || die |
779 |
- |
780 |
- # Drop .config, fixes to gcc-4.6 |
781 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
782 |
- |
783 |
- # if the user *really* wants to use their own custom-cflags, let them |
784 |
- if use custom-cflags; then |
785 |
- einfo "User wants their own CFLAGS - removing defaults" |
786 |
- |
787 |
- # try and remove all the default cflags |
788 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
789 |
- -exec sed \ |
790 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
791 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
792 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
793 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
794 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
795 |
- -i {} + || die "failed to re-set custom-cflags" |
796 |
- else |
797 |
- unset CFLAGS |
798 |
- unset LDFLAGS |
799 |
- unset ASFLAGS |
800 |
- unset CPPFLAGS |
801 |
- fi |
802 |
- |
803 |
- if ! use pygrub; then |
804 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
805 |
- fi |
806 |
- |
807 |
- if ! use python; then |
808 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
809 |
- fi |
810 |
- |
811 |
- if ! use hvm; then |
812 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
813 |
- # Bug 351648 |
814 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
815 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
816 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
817 |
- export CPATH="${WORKDIR}"/extra-headers |
818 |
- fi |
819 |
- |
820 |
- if use qemu; then |
821 |
- if use sdl; then |
822 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
823 |
- tools/Makefile || die |
824 |
- else |
825 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
826 |
- tools/qemu-xen-traditional/xen-setup || die |
827 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
828 |
- tools/Makefile || die |
829 |
- fi |
830 |
- else |
831 |
- # Don't bother with qemu, only needed for fully virtualised guests |
832 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
833 |
- fi |
834 |
- |
835 |
- # Reset bash completion dir; Bug 472438 |
836 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
837 |
- -i Config.mk || die |
838 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
839 |
- |
840 |
- # xencommons, Bug #492332, sed lighter weight than patching |
841 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
842 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
843 |
- |
844 |
- # fix bashishm |
845 |
- sed -e '/Usage/s/\$//g' \ |
846 |
- -i tools/hotplug/Linux/init.d/xendriverdomain.in || die |
847 |
- |
848 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
849 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
850 |
- -i tools/qemu-xen/configure || die |
851 |
- |
852 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
853 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
854 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
855 |
- fi |
856 |
- |
857 |
- # uncomment lines in xl.conf |
858 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
859 |
- -e 's:^#lockfile=:lockfile=:' \ |
860 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
861 |
- -i tools/examples/xl.conf || die |
862 |
- |
863 |
- default |
864 |
-} |
865 |
- |
866 |
-src_configure() { |
867 |
- local myconf="--prefix=${PREFIX}/usr \ |
868 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
869 |
- --libexecdir=${PREFIX}/usr/libexec \ |
870 |
- --localstatedir=${EPREFIX}/var \ |
871 |
- --disable-werror \ |
872 |
- --disable-xen \ |
873 |
- --enable-tools \ |
874 |
- --enable-docs \ |
875 |
- $(use_enable pam) \ |
876 |
- $(use_enable api xenapi) \ |
877 |
- $(use_enable ovmf) \ |
878 |
- $(use_enable ocaml ocamltools) \ |
879 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
880 |
- " |
881 |
- |
882 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
883 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
884 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
885 |
- tc-ld-disable-gold # Bug 669570 |
886 |
- econf ${myconf} |
887 |
-} |
888 |
- |
889 |
-src_compile() { |
890 |
- local myopt |
891 |
- use debug && myopt="${myopt} debug=y" |
892 |
- |
893 |
- if test-flag-CC -fno-strict-overflow; then |
894 |
- append-flags -fno-strict-overflow |
895 |
- fi |
896 |
- |
897 |
- emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt} |
898 |
- |
899 |
- if use doc; then |
900 |
- emake -C docs build |
901 |
- else |
902 |
- emake -C docs man-pages |
903 |
- fi |
904 |
-} |
905 |
- |
906 |
-src_install() { |
907 |
- # Override auto-detection in the build system, bug #382573 |
908 |
- export INITD_DIR=/tmp/init.d |
909 |
- export CONFIG_LEAF_DIR=../tmp/default |
910 |
- |
911 |
- # Let the build system compile installed Python modules. |
912 |
- local PYTHONDONTWRITEBYTECODE |
913 |
- export PYTHONDONTWRITEBYTECODE |
914 |
- |
915 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
916 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
917 |
- |
918 |
- # Created at runtime |
919 |
- rm -rv "${ED%/}/var/run" || die |
920 |
- |
921 |
- # Fix the remaining Python shebangs. |
922 |
- python_fix_shebang "${D}" |
923 |
- |
924 |
- # Remove RedHat-specific stuff |
925 |
- rm -rf "${D}"tmp || die |
926 |
- |
927 |
- if use doc; then |
928 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
929 |
- dodoc -r docs/{pdf,txt} |
930 |
- else |
931 |
- emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032 |
932 |
- fi |
933 |
- dodoc ${DOCS[@]} |
934 |
- |
935 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
936 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
937 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
938 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
939 |
- newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
940 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
941 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
942 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
943 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
944 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
945 |
- newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog |
946 |
- |
947 |
- if use screen; then |
948 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
949 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
950 |
- keepdir /var/log/xen-consoles |
951 |
- fi |
952 |
- |
953 |
- # For -static-libs wrt Bug 384355 |
954 |
- if ! use static-libs; then |
955 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
956 |
- fi |
957 |
- |
958 |
- # for xendomains |
959 |
- keepdir /etc/xen/auto |
960 |
- |
961 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
962 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
963 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
964 |
- |
965 |
- keepdir /var/lib/xen/dump |
966 |
- keepdir /var/lib/xen/xenpaging |
967 |
- keepdir /var/lib/xenstored |
968 |
- keepdir /var/log/xen |
969 |
-} |
970 |
- |
971 |
-pkg_postinst() { |
972 |
- elog "Official Xen Guide and the offical wiki page:" |
973 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
974 |
- elog "https://wiki.xen.org/wiki/Main_Page" |
975 |
- elog "" |
976 |
- elog "Recommended to utilise the xencommons script to config system at boot" |
977 |
- elog "Add by use of rc-update on completion of the install" |
978 |
- |
979 |
- if ! use hvm; then |
980 |
- echo |
981 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
982 |
- elog "support enable the hvm use flag." |
983 |
- elog "An x86 or amd64 system is required to build HVM support." |
984 |
- fi |
985 |
- |
986 |
- if use qemu; then |
987 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
988 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
989 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
990 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
991 |
- fi |
992 |
-} |