1 |
commit: 80f73bc9be5ac75ecd3d4187a0b0402f7ea991cc |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 21 05:33:20 2017 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 22 01:45:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80f73bc9 |
7 |
|
8 |
app-emulation/xen-tools: drop old vulnerable versions |
9 |
|
10 |
Package-Manager: Portage-2.3.10, Repoman-2.3.3 |
11 |
|
12 |
app-emulation/xen-tools/Manifest | 8 - |
13 |
app-emulation/xen-tools/files/gentoo-patches.conf | 18 - |
14 |
app-emulation/xen-tools/xen-tools-4.7.2.ebuild | 459 --------------------- |
15 |
app-emulation/xen-tools/xen-tools-4.7.3.ebuild | 458 --------------------- |
16 |
app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild | 468 ---------------------- |
17 |
app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild | 467 --------------------- |
18 |
app-emulation/xen-tools/xen-tools-4.8.2.ebuild | 449 --------------------- |
19 |
7 files changed, 2327 deletions(-) |
20 |
|
21 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
22 |
index df0b1eb60af..b550584363e 100644 |
23 |
--- a/app-emulation/xen-tools/Manifest |
24 |
+++ b/app-emulation/xen-tools/Manifest |
25 |
@@ -1,14 +1,6 @@ |
26 |
DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5 |
27 |
DIST seabios-1.10.0.tar.gz 588213 SHA256 8976fc4c1ebcda66ac96689762247dfc99115a5f7acb3a7d4e18d18ff5de12a9 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c WHIRLPOOL 77718eac01a59f94c3fa81195925ae09c19e11f80f107b3387e910408d88d3ffc93eaca3b73d6a52b67514538c0e020b0f4078db8277a5ee6361fd0d3ada8598 |
28 |
-DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a |
29 |
-DIST xen-4.7.2-upstream-patches-0.tar.xz 45944 SHA256 e7783bc9adc939167eaef91e96fda506d2d52815f709b31952229891357e6b67 SHA512 6d4e23fb5a63fd191f893e31194b6397a394956846f356ae0119c656a92e7e22296e728286a98109b64a5736241b2317969f54915e7b487b4d7a64aae534614c WHIRLPOOL e185ce40085559d00a302eae8814b4c013817a5e4c0a2a9c56a6b4983b38e7103e44d0407fa78ea79fdbe8eefde346b994812851d8b4bad0bf08cb5721507c37 |
30 |
-DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756 |
31 |
-DIST xen-4.7.3.tar.gz 20722625 SHA256 5b5385b476e59e4cf31ecc6dd605df38814b83432b8e8d917f18c8edfdfb708f SHA512 df596bef7f0f0e7f35246fb025913721dae5aa91da27f1b47a49256e9faa8f7dcb80e8c4679345c19614093c02059b6ced54fc51e6900a372b0e76b4ad827126 WHIRLPOOL 9e88db149e216651711cd56830fba33d587de60d57d53fd3ab3db231319f74e4e88222bf1b2bb9b20fea68739bccd4b26304c73a0ae25aad6dbbac64681e3a62 |
32 |
-DIST xen-4.8.2-upstream-patches-0.tar.xz 7540 SHA256 d4bd4ce76097c49ebbad67a64814b9b41af0528b390ade15814cf0fb144e5e77 SHA512 34118ac114773cfc01a464de2a93b14905d3fb5edd62ae093f6cb40758f89c7fdc8449d0b7e9bfbaaee812b6f32b0c21860adeebb609376a22ce231e405b0837 WHIRLPOOL 0ff8c2fe3c349e6dc85e98644a813dd590c42bc78c6bbf98cdf77ed516e73fe5ca72a44935eae77f6ff9dcba8fef5d24c181d24b63b15bc470e7ed59098d5808 |
33 |
-DIST xen-4.8.2-upstream-patches-1.tar.xz 29608 SHA256 7b1833eede01b7c8ae607614afd35c66ff009518cca972e2653d5828fb632aa6 SHA512 3ea002c37a0e2189f1846548a4aa607c42041cf093ec9a57509692dabe5c0b718151d183f5714443403d5cf8d4ab010a8f3893207bebf81cb85793282c30b457 WHIRLPOOL 0659a56e419918cb091ff0d87bf69a03464d2a0a0b4c6bad87521e83c40b48e210582d5fab2d9686b22b4ba839041be6e8aa39ab306a86ce18461d99c36be439 |
34 |
DIST xen-4.8.2-upstream-patches-2.tar.xz 38852 SHA256 12c1f1fd2adba22b923d2ee944e6e66794701393966f9e9e2079961e202f6d64 SHA512 536823eabf03e92585a8c5cde90ce502672dd1ec080b28b39411d6a778b899436a57bfb633f11c94d48d2f963848b7771e469f5ea53e84b580976f631f69cc5d WHIRLPOOL 5baf92709da895eccbe8b154c1d1cdf4c2f0faf5166ef2e4bbf32ca6899d8b88aa67ccd765a15a2f9a6d5200d4a1eb832775891d41c00a950855e5d1d4358e35 |
35 |
DIST xen-4.8.2.tar.gz 22522336 SHA256 cb1cc2f0985e3d8651215e5d24c1fcc3036994fa7cc495a5091a2c85ece2aff9 SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da WHIRLPOOL 8e54e79219f89640162673da471a02ee8a39bb884e2376a79a09226462903185b49a771fef51ceca54c4dd42a110ee1214db6dbf94235a156a17d6c597634c3d |
36 |
DIST xen-gentoo-patches-10.tar.xz 27876 SHA256 aa91759d25611afa2e851e190c8445b18e4262037fc06da886f2fa4a4c500b94 SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece WHIRLPOOL e02cc3c6ffd701b2f04df111ab33b18f7fa09e292b94a34af4d806509a564b896a7b677ab64654523ee992f363d59bf6bd4c2cbeaea7330f368cf657bfa2d538 |
37 |
-DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3 |
38 |
DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633 |
39 |
-DIST xen-security-patches-25.tar.xz 9208 SHA256 ceaa520d4d98ab7b6ce5b58c380499372cb513dda0c8236106cdf878385d4458 SHA512 18539c1f42bc95a06f7b06855614fafb4ed7c07a145d9ab90e02954ba405d21fc4c379908e3233ddfb85ccaa04515b261ac4bbf3987ce00e4479158f03edd917 WHIRLPOOL 4cff34c29a5c38e6a5bd0d4f4fe89d8daf944740934b05cd61f4b8a345ddb4d8a8b2de6db27a723154169e3f28d5b34a43eddd08c909cfa3d6d5aee26fcae693 |
40 |
|
41 |
diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf |
42 |
index 318cdc33ce8..194798af0aa 100644 |
43 |
--- a/app-emulation/xen-tools/files/gentoo-patches.conf |
44 |
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf |
45 |
@@ -101,24 +101,6 @@ _gx041=" 0002-tools-libxc-Tolerate-zero-length-records-in-migratio.patch" |
46 |
#Fix missing makedev(), major(), minor() |
47 |
_gx042=" xen-tools-4.8.2-makedev.patch" |
48 |
|
49 |
-# xen-tools-4.7.2 patches set |
50 |
-_gpv_xen_tools_472_0=" |
51 |
-${_gx008} ${_gx021} |
52 |
-${_gx022} ${_gx017} ${_gx031} |
53 |
-${_gx027} ${_gx032} |
54 |
-${_gx028} ${_gx029} ${_gx036} |
55 |
-${_gx037} ${_gx040} ${_gx041} |
56 |
-" |
57 |
- |
58 |
-# xen-tools-4.7.3 patches set |
59 |
-_gpv_xen_tools_473_0=" |
60 |
-${_gx008} ${_gx021} |
61 |
-${_gx022} ${_gx017} ${_gx031} |
62 |
-${_gx027} ${_gx032} |
63 |
-${_gx028} ${_gx029} ${_gx036} |
64 |
-${_gx037} ${_gx040} |
65 |
-" |
66 |
- |
67 |
# xen-tools-4.8.2 patches set |
68 |
_gpv_xen_tools_482_0=" |
69 |
${_gx008} |
70 |
|
71 |
diff --git a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild |
72 |
deleted file mode 100644 |
73 |
index c4fa110e069..00000000000 |
74 |
--- a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild |
75 |
+++ /dev/null |
76 |
@@ -1,459 +0,0 @@ |
77 |
-# Copyright 1999-2017 Gentoo Foundation |
78 |
-# Distributed under the terms of the GNU General Public License v2 |
79 |
- |
80 |
-EAPI=5 |
81 |
- |
82 |
-PYTHON_COMPAT=( python2_7 ) |
83 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
84 |
- |
85 |
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
86 |
- |
87 |
-MY_PV=${PV/_/-} |
88 |
-MAJOR_V="$(get_version_component_range 1-2)" |
89 |
- |
90 |
-if [[ $PV == *9999 ]]; then |
91 |
- inherit git-r3 |
92 |
- KEYWORDS="amd64 x86" |
93 |
- REPO="xen.git" |
94 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
95 |
- S="${WORKDIR}/${REPO}" |
96 |
-else |
97 |
- KEYWORDS="amd64 ~arm ~arm64 x86" |
98 |
- UPSTREAM_VER=0 |
99 |
- SECURITY_VER=25 |
100 |
- # xen-tools's gentoo patches tarball |
101 |
- GENTOO_VER=9 |
102 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
103 |
- GENTOO_GPV=0 |
104 |
- # xen-tools ovmf's patches |
105 |
- OVMF_VER=2 |
106 |
- |
107 |
- SEABIOS_VER=1.8.2 |
108 |
- # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d |
109 |
- OVMF_PV=20151110 |
110 |
- |
111 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
112 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
113 |
- [[ -n ${SECURITY_VER} ]] && \ |
114 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
115 |
- [[ -n ${GENTOO_VER} ]] && \ |
116 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
117 |
- [[ -n ${OVMF_VER} ]] && \ |
118 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
119 |
- |
120 |
- SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz |
121 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
122 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
123 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2 |
124 |
- ${OVMF_PATCHSET_URI} ) |
125 |
- ${UPSTREAM_PATCHSET_URI} |
126 |
- ${SECURITY_PATCHSET_URI} |
127 |
- ${GENTOO_PATCHSET_URI}" |
128 |
- |
129 |
- S="${WORKDIR}/xen-${MY_PV}" |
130 |
-fi |
131 |
- |
132 |
-DESCRIPTION="Xen tools including QEMU and xl" |
133 |
-HOMEPAGE="http://xen.org/" |
134 |
-DOCS=( README docs/README.xen-bugtool ) |
135 |
- |
136 |
-LICENSE="GPL-2" |
137 |
-SLOT="0/${MAJOR_V}" |
138 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
139 |
-# >=dev-lang/ocaml-4 stable |
140 |
-# Masked in profiles/eapi-5-files instead |
141 |
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios" |
142 |
- |
143 |
-REQUIRED_USE=" |
144 |
- ${PYTHON_REQUIRED_USE} |
145 |
- pygrub? ( python ) |
146 |
- ovmf? ( hvm ) |
147 |
- ^^ ( qemu system-qemu )" |
148 |
- |
149 |
-COMMON_DEPEND=" |
150 |
- dev-libs/lzo:2 |
151 |
- dev-libs/glib:2 |
152 |
- dev-libs/yajl |
153 |
- dev-libs/libaio |
154 |
- dev-libs/libgcrypt:0 |
155 |
- sys-libs/zlib |
156 |
- ${PYTHON_DEPS} |
157 |
-" |
158 |
- |
159 |
-DEPEND="${COMMON_DEPEND} |
160 |
- dev-python/lxml[${PYTHON_USEDEP}] |
161 |
- x86? ( sys-devel/dev86 |
162 |
- sys-power/iasl ) |
163 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
164 |
- api? ( dev-libs/libxml2 |
165 |
- net-misc/curl ) |
166 |
- ovmf? ( |
167 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
168 |
- $(python_gen_impl_dep sqlite) |
169 |
- ) |
170 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
171 |
- amd64? ( sys-devel/bin86 |
172 |
- system-seabios? ( sys-firmware/seabios ) |
173 |
- sys-firmware/ipxe |
174 |
- sys-devel/dev86 |
175 |
- sys-power/iasl ) |
176 |
- dev-lang/perl |
177 |
- app-misc/pax-utils |
178 |
- doc? ( |
179 |
- app-doc/doxygen |
180 |
- dev-python/markdown[${PYTHON_USEDEP}] |
181 |
- dev-tex/latex2html[png,gif] |
182 |
- media-gfx/graphviz |
183 |
- dev-tex/xcolor |
184 |
- media-gfx/transfig |
185 |
- dev-texlive/texlive-latexextra |
186 |
- virtual/latex-base |
187 |
- dev-tex/latexmk |
188 |
- dev-texlive/texlive-latex |
189 |
- dev-texlive/texlive-pictures |
190 |
- dev-texlive/texlive-latexrecommended |
191 |
- ) |
192 |
- hvm? ( x11-proto/xproto |
193 |
- !net-libs/libiscsi ) |
194 |
- qemu? ( |
195 |
- x11-libs/pixman |
196 |
- sdl? ( media-libs/libsdl[X] ) |
197 |
- ) |
198 |
- system-qemu? ( app-emulation/qemu[xen] ) |
199 |
- ocaml? ( dev-ml/findlib |
200 |
- >=dev-lang/ocaml-4 )" |
201 |
- |
202 |
-RDEPEND="${COMMON_DEPEND} |
203 |
- sys-apps/iproute2[-minimal] |
204 |
- net-misc/bridge-utils |
205 |
- screen? ( |
206 |
- app-misc/screen |
207 |
- app-admin/logrotate |
208 |
- )" |
209 |
- |
210 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
211 |
-# Approved by QA team in bug #144032 |
212 |
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader |
213 |
- usr/share/qemu-xen/qemu/s390-ccw.img" |
214 |
- |
215 |
-RESTRICT="test" |
216 |
- |
217 |
-pkg_setup() { |
218 |
- python_setup |
219 |
- export "CONFIG_LOMOUNT=y" |
220 |
- |
221 |
- #bug 522642, disable compile tools/tests |
222 |
- export "CONFIG_TESTS=n" |
223 |
- |
224 |
- if has_version dev-libs/libgcrypt:0; then |
225 |
- export "CONFIG_GCRYPT=y" |
226 |
- fi |
227 |
- |
228 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
229 |
- if use x86 && use amd64; then |
230 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
231 |
- elif use x86; then |
232 |
- export XEN_TARGET_ARCH="x86_32" |
233 |
- elif use amd64 ; then |
234 |
- export XEN_TARGET_ARCH="x86_64" |
235 |
- elif use arm; then |
236 |
- export XEN_TARGET_ARCH="arm32" |
237 |
- elif use arm64; then |
238 |
- export XEN_TARGET_ARCH="arm64" |
239 |
- else |
240 |
- die "Unsupported architecture!" |
241 |
- fi |
242 |
- fi |
243 |
-} |
244 |
- |
245 |
-src_prepare() { |
246 |
- # Upstream's patchset |
247 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
248 |
- einfo "Try to apply Xen Upstream patch set" |
249 |
- EPATCH_SUFFIX="patch" \ |
250 |
- EPATCH_FORCE="yes" \ |
251 |
- EPATCH_OPTS="-p1" \ |
252 |
- epatch "${WORKDIR}"/patches-upstream |
253 |
- fi |
254 |
- |
255 |
- # Security patchset |
256 |
- if [[ -n ${SECURITY_VER} ]]; then |
257 |
- einfo "Try to apply Xen Security patch set" |
258 |
- # apply main xen patches |
259 |
- # Two parallel systems, both work side by side |
260 |
- # Over time they may concdense into one. This will suffice for now |
261 |
- EPATCH_SUFFIX="patch" |
262 |
- EPATCH_FORCE="yes" |
263 |
- |
264 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
265 |
- |
266 |
- for i in ${XEN_SECURITY_MAIN}; do |
267 |
- epatch "${WORKDIR}"/patches-security/xen/$i |
268 |
- done |
269 |
- |
270 |
- # apply qemu-xen/upstream patches |
271 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
272 |
- for i in ${XEN_SECURITY_QEMUU}; do |
273 |
- epatch "${WORKDIR}"/patches-security/qemuu/$i |
274 |
- done |
275 |
- popd > /dev/null |
276 |
- |
277 |
- # apply qemu-traditional patches |
278 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
279 |
- for i in ${XEN_SECURITY_QEMUT}; do |
280 |
- epatch "${WORKDIR}"/patches-security/qemut/$i |
281 |
- done |
282 |
- popd > /dev/null |
283 |
- fi |
284 |
- |
285 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
286 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
287 |
- pushd tools/firmware/ > /dev/null |
288 |
- ln -s seabios-dir-remote seabios-dir || die |
289 |
- popd > /dev/null |
290 |
- |
291 |
- # Gentoo's patchset |
292 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
293 |
- einfo "Try to apply Gentoo specific patch set" |
294 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
295 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
296 |
- for i in ${!_gpv}; do |
297 |
- EPATCH_SUFFIX="patch" \ |
298 |
- EPATCH_FORCE="yes" \ |
299 |
- epatch "${WORKDIR}"/patches-gentoo/$i |
300 |
- done |
301 |
- fi |
302 |
- |
303 |
- # Ovmf's patchset |
304 |
- if use ovmf; then |
305 |
- if [[ -n ${OVMF_VER} ]];then |
306 |
- einfo "Try to apply Ovmf patch set" |
307 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
308 |
- EPATCH_SUFFIX="patch" \ |
309 |
- EPATCH_FORCE="yes" \ |
310 |
- EPATCH_OPTS="-p1" \ |
311 |
- epatch "${WORKDIR}"/patches-ovmf |
312 |
- popd > /dev/null |
313 |
- fi |
314 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
315 |
- fi |
316 |
- |
317 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
318 |
- |
319 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
320 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
321 |
- |
322 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
323 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
324 |
- -i tools/firmware/Makefile || die |
325 |
- |
326 |
- # Drop .config, fixes to gcc-4.6 |
327 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
328 |
- |
329 |
- # if the user *really* wants to use their own custom-cflags, let them |
330 |
- if use custom-cflags; then |
331 |
- einfo "User wants their own CFLAGS - removing defaults" |
332 |
- |
333 |
- # try and remove all the default cflags |
334 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
335 |
- -exec sed \ |
336 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
337 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
338 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
339 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
340 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
341 |
- -i {} + || die "failed to re-set custom-cflags" |
342 |
- else |
343 |
- unset CFLAGS |
344 |
- unset LDFLAGS |
345 |
- unset ASFLAGS |
346 |
- unset CPPFLAGS |
347 |
- fi |
348 |
- |
349 |
- if ! use pygrub; then |
350 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
351 |
- fi |
352 |
- |
353 |
- if ! use python; then |
354 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
355 |
- fi |
356 |
- |
357 |
- if ! use hvm; then |
358 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
359 |
- # Bug 351648 |
360 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
361 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
362 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
363 |
- export CPATH="${WORKDIR}"/extra-headers |
364 |
- fi |
365 |
- |
366 |
- if use qemu; then |
367 |
- if use sdl; then |
368 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
369 |
- tools/Makefile || die |
370 |
- else |
371 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
372 |
- tools/qemu-xen-traditional/xen-setup || die |
373 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
374 |
- tools/Makefile || die |
375 |
- fi |
376 |
- else |
377 |
- # Don't bother with qemu, only needed for fully virtualised guests |
378 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
379 |
- fi |
380 |
- |
381 |
- # Reset bash completion dir; Bug 472438 |
382 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
383 |
- -i Config.mk || die |
384 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
385 |
- |
386 |
- # xencommons, Bug #492332, sed lighter weight than patching |
387 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
388 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
389 |
- |
390 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
391 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
392 |
- -i tools/qemu-xen/configure || die |
393 |
- |
394 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
395 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
396 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
397 |
- fi |
398 |
- |
399 |
- # use /var instead of /var/lib, consistat with previous ebuild |
400 |
- sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \ |
401 |
- m4/paths.m4 configure tools/configure || die |
402 |
- # use /run instead of /var/run |
403 |
- sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \ |
404 |
- m4/paths.m4 configure tools/configure || die |
405 |
- |
406 |
- # uncomment lines in xl.conf |
407 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
408 |
- -e 's:^#lockfile=:lockfile=:' \ |
409 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
410 |
- -i tools/examples/xl.conf || die |
411 |
- |
412 |
- # Bug #575868 converted to a sed statement, typo of one char |
413 |
- sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
414 |
- |
415 |
- epatch_user |
416 |
-} |
417 |
- |
418 |
-src_configure() { |
419 |
- local myconf="--prefix=${PREFIX}/usr \ |
420 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
421 |
- --libexecdir=${PREFIX}/usr/libexec \ |
422 |
- --disable-werror \ |
423 |
- --disable-xen \ |
424 |
- --enable-tools \ |
425 |
- --enable-docs \ |
426 |
- $(use_enable pam) \ |
427 |
- $(use_enable api xenapi) \ |
428 |
- $(use_enable ovmf) \ |
429 |
- $(use_enable ocaml ocamltools) \ |
430 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
431 |
- " |
432 |
- |
433 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
434 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
435 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
436 |
- econf ${myconf} |
437 |
-} |
438 |
- |
439 |
-src_compile() { |
440 |
- export VARTEXFONTS="${T}/fonts" |
441 |
- local myopt |
442 |
- use debug && myopt="${myopt} debug=y" |
443 |
- |
444 |
- if test-flag-CC -fno-strict-overflow; then |
445 |
- append-flags -fno-strict-overflow |
446 |
- fi |
447 |
- |
448 |
- emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
449 |
- |
450 |
- use doc && emake -C docs txt html |
451 |
- emake -C docs man-pages |
452 |
-} |
453 |
- |
454 |
-src_install() { |
455 |
- # Override auto-detection in the build system, bug #382573 |
456 |
- export INITD_DIR=/tmp/init.d |
457 |
- export CONFIG_LEAF_DIR=../tmp/default |
458 |
- |
459 |
- # Let the build system compile installed Python modules. |
460 |
- local PYTHONDONTWRITEBYTECODE |
461 |
- export PYTHONDONTWRITEBYTECODE |
462 |
- |
463 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
464 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
465 |
- |
466 |
- # Fix the remaining Python shebangs. |
467 |
- python_fix_shebang "${D}" |
468 |
- |
469 |
- # Remove RedHat-specific stuff |
470 |
- rm -rf "${D}"tmp || die |
471 |
- |
472 |
- if use doc; then |
473 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
474 |
- |
475 |
- dohtml -r docs/ |
476 |
- docinto pdf |
477 |
- dodoc ${DOCS[@]} |
478 |
- [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html |
479 |
- fi |
480 |
- |
481 |
- rm -rf "${D}"/usr/share/doc/xen/ |
482 |
- doman docs/man?/* |
483 |
- |
484 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
485 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
486 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
487 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
488 |
- newinitd "${FILESDIR}"/xenstored.initd xenstored |
489 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
490 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
491 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
492 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
493 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
494 |
- |
495 |
- if use screen; then |
496 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
497 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
498 |
- keepdir /var/log/xen-consoles |
499 |
- fi |
500 |
- |
501 |
- # For -static-libs wrt Bug 384355 |
502 |
- if ! use static-libs; then |
503 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
504 |
- fi |
505 |
- |
506 |
- # for xendomains |
507 |
- keepdir /etc/xen/auto |
508 |
- |
509 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
510 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
511 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
512 |
-} |
513 |
- |
514 |
-pkg_postinst() { |
515 |
- elog "Official Xen Guide and the offical wiki page:" |
516 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
517 |
- elog "http://wiki.xen.org/wiki/Main_Page" |
518 |
- elog "" |
519 |
- elog "Recommended to utilise the xencommons script to config sytem At boot" |
520 |
- elog "Add by use of rc-update on completion of the install" |
521 |
- |
522 |
- if ! use hvm; then |
523 |
- echo |
524 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
525 |
- elog "support enable the hvm use flag." |
526 |
- elog "An x86 or amd64 system is required to build HVM support." |
527 |
- fi |
528 |
- |
529 |
- if use qemu; then |
530 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
531 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
532 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
533 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
534 |
- fi |
535 |
-} |
536 |
|
537 |
diff --git a/app-emulation/xen-tools/xen-tools-4.7.3.ebuild b/app-emulation/xen-tools/xen-tools-4.7.3.ebuild |
538 |
deleted file mode 100644 |
539 |
index c96a3c7750f..00000000000 |
540 |
--- a/app-emulation/xen-tools/xen-tools-4.7.3.ebuild |
541 |
+++ /dev/null |
542 |
@@ -1,458 +0,0 @@ |
543 |
-# Copyright 1999-2017 Gentoo Foundation |
544 |
-# Distributed under the terms of the GNU General Public License v2 |
545 |
- |
546 |
-EAPI=5 |
547 |
- |
548 |
-PYTHON_COMPAT=( python2_7 ) |
549 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
550 |
- |
551 |
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
552 |
- |
553 |
-MY_PV=${PV/_/-} |
554 |
-MAJOR_V="$(get_version_component_range 1-2)" |
555 |
- |
556 |
-if [[ $PV == *9999 ]]; then |
557 |
- inherit git-r3 |
558 |
- REPO="xen.git" |
559 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
560 |
- S="${WORKDIR}/${REPO}" |
561 |
-else |
562 |
- KEYWORDS="amd64 ~arm ~arm64 x86" |
563 |
- UPSTREAM_VER= |
564 |
- SECURITY_VER= |
565 |
- # xen-tools's gentoo patches tarball |
566 |
- GENTOO_VER=9 |
567 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
568 |
- GENTOO_GPV=0 |
569 |
- # xen-tools ovmf's patches |
570 |
- OVMF_VER=2 |
571 |
- |
572 |
- SEABIOS_VER=1.8.2 |
573 |
- # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d |
574 |
- OVMF_PV=20151110 |
575 |
- |
576 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
577 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
578 |
- [[ -n ${SECURITY_VER} ]] && \ |
579 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
580 |
- [[ -n ${GENTOO_VER} ]] && \ |
581 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
582 |
- [[ -n ${OVMF_VER} ]] && \ |
583 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
584 |
- |
585 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
586 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
587 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
588 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2 |
589 |
- ${OVMF_PATCHSET_URI} ) |
590 |
- ${UPSTREAM_PATCHSET_URI} |
591 |
- ${SECURITY_PATCHSET_URI} |
592 |
- ${GENTOO_PATCHSET_URI}" |
593 |
- |
594 |
- S="${WORKDIR}/xen-${MY_PV}" |
595 |
-fi |
596 |
- |
597 |
-DESCRIPTION="Xen tools including QEMU and xl" |
598 |
-HOMEPAGE="http://xen.org/" |
599 |
-DOCS=( README docs/README.xen-bugtool ) |
600 |
- |
601 |
-LICENSE="GPL-2" |
602 |
-SLOT="0/${MAJOR_V}" |
603 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
604 |
-# >=dev-lang/ocaml-4 stable |
605 |
-# Masked in profiles/eapi-5-files instead |
606 |
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios" |
607 |
- |
608 |
-REQUIRED_USE=" |
609 |
- ${PYTHON_REQUIRED_USE} |
610 |
- pygrub? ( python ) |
611 |
- ovmf? ( hvm ) |
612 |
- ^^ ( qemu system-qemu )" |
613 |
- |
614 |
-COMMON_DEPEND=" |
615 |
- dev-libs/lzo:2 |
616 |
- dev-libs/glib:2 |
617 |
- dev-libs/yajl |
618 |
- dev-libs/libaio |
619 |
- dev-libs/libgcrypt:0 |
620 |
- sys-libs/zlib |
621 |
- ${PYTHON_DEPS} |
622 |
-" |
623 |
- |
624 |
-DEPEND="${COMMON_DEPEND} |
625 |
- dev-python/lxml[${PYTHON_USEDEP}] |
626 |
- x86? ( sys-devel/dev86 |
627 |
- sys-power/iasl ) |
628 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
629 |
- api? ( dev-libs/libxml2 |
630 |
- net-misc/curl ) |
631 |
- ovmf? ( |
632 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
633 |
- $(python_gen_impl_dep sqlite) |
634 |
- ) |
635 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
636 |
- amd64? ( sys-devel/bin86 |
637 |
- system-seabios? ( sys-firmware/seabios ) |
638 |
- sys-firmware/ipxe |
639 |
- sys-devel/dev86 |
640 |
- sys-power/iasl ) |
641 |
- dev-lang/perl |
642 |
- app-misc/pax-utils |
643 |
- doc? ( |
644 |
- app-doc/doxygen |
645 |
- dev-python/markdown[${PYTHON_USEDEP}] |
646 |
- dev-tex/latex2html[png,gif] |
647 |
- media-gfx/graphviz |
648 |
- dev-tex/xcolor |
649 |
- media-gfx/transfig |
650 |
- dev-texlive/texlive-latexextra |
651 |
- virtual/latex-base |
652 |
- dev-tex/latexmk |
653 |
- dev-texlive/texlive-latex |
654 |
- dev-texlive/texlive-pictures |
655 |
- dev-texlive/texlive-latexrecommended |
656 |
- ) |
657 |
- hvm? ( x11-proto/xproto |
658 |
- !net-libs/libiscsi ) |
659 |
- qemu? ( |
660 |
- x11-libs/pixman |
661 |
- sdl? ( media-libs/libsdl[X] ) |
662 |
- ) |
663 |
- system-qemu? ( app-emulation/qemu[xen] ) |
664 |
- ocaml? ( dev-ml/findlib |
665 |
- >=dev-lang/ocaml-4 )" |
666 |
- |
667 |
-RDEPEND="${COMMON_DEPEND} |
668 |
- sys-apps/iproute2[-minimal] |
669 |
- net-misc/bridge-utils |
670 |
- screen? ( |
671 |
- app-misc/screen |
672 |
- app-admin/logrotate |
673 |
- )" |
674 |
- |
675 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
676 |
-# Approved by QA team in bug #144032 |
677 |
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader |
678 |
- usr/share/qemu-xen/qemu/s390-ccw.img" |
679 |
- |
680 |
-RESTRICT="test" |
681 |
- |
682 |
-pkg_setup() { |
683 |
- python_setup |
684 |
- export "CONFIG_LOMOUNT=y" |
685 |
- |
686 |
- #bug 522642, disable compile tools/tests |
687 |
- export "CONFIG_TESTS=n" |
688 |
- |
689 |
- if has_version dev-libs/libgcrypt:0; then |
690 |
- export "CONFIG_GCRYPT=y" |
691 |
- fi |
692 |
- |
693 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
694 |
- if use x86 && use amd64; then |
695 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
696 |
- elif use x86; then |
697 |
- export XEN_TARGET_ARCH="x86_32" |
698 |
- elif use amd64 ; then |
699 |
- export XEN_TARGET_ARCH="x86_64" |
700 |
- elif use arm; then |
701 |
- export XEN_TARGET_ARCH="arm32" |
702 |
- elif use arm64; then |
703 |
- export XEN_TARGET_ARCH="arm64" |
704 |
- else |
705 |
- die "Unsupported architecture!" |
706 |
- fi |
707 |
- fi |
708 |
-} |
709 |
- |
710 |
-src_prepare() { |
711 |
- # Upstream's patchset |
712 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
713 |
- einfo "Try to apply Xen Upstream patch set" |
714 |
- EPATCH_SUFFIX="patch" \ |
715 |
- EPATCH_FORCE="yes" \ |
716 |
- EPATCH_OPTS="-p1" \ |
717 |
- epatch "${WORKDIR}"/patches-upstream |
718 |
- fi |
719 |
- |
720 |
- # Security patchset |
721 |
- if [[ -n ${SECURITY_VER} ]]; then |
722 |
- einfo "Try to apply Xen Security patch set" |
723 |
- # apply main xen patches |
724 |
- # Two parallel systems, both work side by side |
725 |
- # Over time they may concdense into one. This will suffice for now |
726 |
- EPATCH_SUFFIX="patch" |
727 |
- EPATCH_FORCE="yes" |
728 |
- |
729 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
730 |
- |
731 |
- for i in ${XEN_SECURITY_MAIN}; do |
732 |
- epatch "${WORKDIR}"/patches-security/xen/$i |
733 |
- done |
734 |
- |
735 |
- # apply qemu-xen/upstream patches |
736 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
737 |
- for i in ${XEN_SECURITY_QEMUU}; do |
738 |
- epatch "${WORKDIR}"/patches-security/qemuu/$i |
739 |
- done |
740 |
- popd > /dev/null |
741 |
- |
742 |
- # apply qemu-traditional patches |
743 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
744 |
- for i in ${XEN_SECURITY_QEMUT}; do |
745 |
- epatch "${WORKDIR}"/patches-security/qemut/$i |
746 |
- done |
747 |
- popd > /dev/null |
748 |
- fi |
749 |
- |
750 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
751 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
752 |
- pushd tools/firmware/ > /dev/null |
753 |
- ln -s seabios-dir-remote seabios-dir || die |
754 |
- popd > /dev/null |
755 |
- |
756 |
- # Gentoo's patchset |
757 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
758 |
- einfo "Try to apply Gentoo specific patch set" |
759 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
760 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
761 |
- for i in ${!_gpv}; do |
762 |
- EPATCH_SUFFIX="patch" \ |
763 |
- EPATCH_FORCE="yes" \ |
764 |
- epatch "${WORKDIR}"/patches-gentoo/$i |
765 |
- done |
766 |
- fi |
767 |
- |
768 |
- # Ovmf's patchset |
769 |
- if use ovmf; then |
770 |
- if [[ -n ${OVMF_VER} ]];then |
771 |
- einfo "Try to apply Ovmf patch set" |
772 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
773 |
- EPATCH_SUFFIX="patch" \ |
774 |
- EPATCH_FORCE="yes" \ |
775 |
- EPATCH_OPTS="-p1" \ |
776 |
- epatch "${WORKDIR}"/patches-ovmf |
777 |
- popd > /dev/null |
778 |
- fi |
779 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
780 |
- fi |
781 |
- |
782 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
783 |
- |
784 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
785 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
786 |
- |
787 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
788 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
789 |
- -i tools/firmware/Makefile || die |
790 |
- |
791 |
- # Drop .config, fixes to gcc-4.6 |
792 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
793 |
- |
794 |
- # if the user *really* wants to use their own custom-cflags, let them |
795 |
- if use custom-cflags; then |
796 |
- einfo "User wants their own CFLAGS - removing defaults" |
797 |
- |
798 |
- # try and remove all the default cflags |
799 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
800 |
- -exec sed \ |
801 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
802 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
803 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
804 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
805 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
806 |
- -i {} + || die "failed to re-set custom-cflags" |
807 |
- else |
808 |
- unset CFLAGS |
809 |
- unset LDFLAGS |
810 |
- unset ASFLAGS |
811 |
- unset CPPFLAGS |
812 |
- fi |
813 |
- |
814 |
- if ! use pygrub; then |
815 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
816 |
- fi |
817 |
- |
818 |
- if ! use python; then |
819 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
820 |
- fi |
821 |
- |
822 |
- if ! use hvm; then |
823 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
824 |
- # Bug 351648 |
825 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
826 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
827 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
828 |
- export CPATH="${WORKDIR}"/extra-headers |
829 |
- fi |
830 |
- |
831 |
- if use qemu; then |
832 |
- if use sdl; then |
833 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
834 |
- tools/Makefile || die |
835 |
- else |
836 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
837 |
- tools/qemu-xen-traditional/xen-setup || die |
838 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
839 |
- tools/Makefile || die |
840 |
- fi |
841 |
- else |
842 |
- # Don't bother with qemu, only needed for fully virtualised guests |
843 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
844 |
- fi |
845 |
- |
846 |
- # Reset bash completion dir; Bug 472438 |
847 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
848 |
- -i Config.mk || die |
849 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
850 |
- |
851 |
- # xencommons, Bug #492332, sed lighter weight than patching |
852 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
853 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
854 |
- |
855 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
856 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
857 |
- -i tools/qemu-xen/configure || die |
858 |
- |
859 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
860 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
861 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
862 |
- fi |
863 |
- |
864 |
- # use /var instead of /var/lib, consistat with previous ebuild |
865 |
- sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \ |
866 |
- m4/paths.m4 configure tools/configure || die |
867 |
- # use /run instead of /var/run |
868 |
- sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \ |
869 |
- m4/paths.m4 configure tools/configure || die |
870 |
- |
871 |
- # uncomment lines in xl.conf |
872 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
873 |
- -e 's:^#lockfile=:lockfile=:' \ |
874 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
875 |
- -i tools/examples/xl.conf || die |
876 |
- |
877 |
- # Bug #575868 converted to a sed statement, typo of one char |
878 |
- sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
879 |
- |
880 |
- epatch_user |
881 |
-} |
882 |
- |
883 |
-src_configure() { |
884 |
- local myconf="--prefix=${PREFIX}/usr \ |
885 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
886 |
- --libexecdir=${PREFIX}/usr/libexec \ |
887 |
- --disable-werror \ |
888 |
- --disable-xen \ |
889 |
- --enable-tools \ |
890 |
- --enable-docs \ |
891 |
- $(use_enable pam) \ |
892 |
- $(use_enable api xenapi) \ |
893 |
- $(use_enable ovmf) \ |
894 |
- $(use_enable ocaml ocamltools) \ |
895 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
896 |
- " |
897 |
- |
898 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
899 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
900 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
901 |
- econf ${myconf} |
902 |
-} |
903 |
- |
904 |
-src_compile() { |
905 |
- export VARTEXFONTS="${T}/fonts" |
906 |
- local myopt |
907 |
- use debug && myopt="${myopt} debug=y" |
908 |
- |
909 |
- if test-flag-CC -fno-strict-overflow; then |
910 |
- append-flags -fno-strict-overflow |
911 |
- fi |
912 |
- |
913 |
- emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
914 |
- |
915 |
- use doc && emake -C docs txt html |
916 |
- emake -C docs man-pages |
917 |
-} |
918 |
- |
919 |
-src_install() { |
920 |
- # Override auto-detection in the build system, bug #382573 |
921 |
- export INITD_DIR=/tmp/init.d |
922 |
- export CONFIG_LEAF_DIR=../tmp/default |
923 |
- |
924 |
- # Let the build system compile installed Python modules. |
925 |
- local PYTHONDONTWRITEBYTECODE |
926 |
- export PYTHONDONTWRITEBYTECODE |
927 |
- |
928 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
929 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
930 |
- |
931 |
- # Fix the remaining Python shebangs. |
932 |
- python_fix_shebang "${D}" |
933 |
- |
934 |
- # Remove RedHat-specific stuff |
935 |
- rm -rf "${D}"tmp || die |
936 |
- |
937 |
- if use doc; then |
938 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
939 |
- |
940 |
- dohtml -r docs/ |
941 |
- docinto pdf |
942 |
- dodoc ${DOCS[@]} |
943 |
- [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html |
944 |
- fi |
945 |
- |
946 |
- rm -rf "${D}"/usr/share/doc/xen/ |
947 |
- doman docs/man?/* |
948 |
- |
949 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
950 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
951 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
952 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
953 |
- newinitd "${FILESDIR}"/xenstored.initd xenstored |
954 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
955 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
956 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
957 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
958 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
959 |
- |
960 |
- if use screen; then |
961 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
962 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
963 |
- keepdir /var/log/xen-consoles |
964 |
- fi |
965 |
- |
966 |
- # For -static-libs wrt Bug 384355 |
967 |
- if ! use static-libs; then |
968 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
969 |
- fi |
970 |
- |
971 |
- # for xendomains |
972 |
- keepdir /etc/xen/auto |
973 |
- |
974 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
975 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
976 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
977 |
-} |
978 |
- |
979 |
-pkg_postinst() { |
980 |
- elog "Official Xen Guide and the offical wiki page:" |
981 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
982 |
- elog "http://wiki.xen.org/wiki/Main_Page" |
983 |
- elog "" |
984 |
- elog "Recommended to utilise the xencommons script to config sytem At boot" |
985 |
- elog "Add by use of rc-update on completion of the install" |
986 |
- |
987 |
- if ! use hvm; then |
988 |
- echo |
989 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
990 |
- elog "support enable the hvm use flag." |
991 |
- elog "An x86 or amd64 system is required to build HVM support." |
992 |
- fi |
993 |
- |
994 |
- if use qemu; then |
995 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
996 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
997 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
998 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
999 |
- fi |
1000 |
-} |
1001 |
|
1002 |
diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild |
1003 |
deleted file mode 100644 |
1004 |
index 9bd159abe83..00000000000 |
1005 |
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild |
1006 |
+++ /dev/null |
1007 |
@@ -1,468 +0,0 @@ |
1008 |
-# Copyright 1999-2017 Gentoo Foundation |
1009 |
-# Distributed under the terms of the GNU General Public License v2 |
1010 |
- |
1011 |
-EAPI=6 |
1012 |
- |
1013 |
-PYTHON_COMPAT=( python2_7 ) |
1014 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
1015 |
- |
1016 |
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
1017 |
- |
1018 |
-MY_PV=${PV/_/-} |
1019 |
-MAJOR_V="$(get_version_component_range 1-2)" |
1020 |
- |
1021 |
-if [[ $PV == *9999 ]]; then |
1022 |
- inherit git-r3 |
1023 |
- KEYWORDS="amd64 x86" |
1024 |
- REPO="xen.git" |
1025 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
1026 |
- S="${WORKDIR}/${REPO}" |
1027 |
-else |
1028 |
- KEYWORDS="amd64 ~arm ~arm64 x86" |
1029 |
- UPSTREAM_VER=1 |
1030 |
- SECURITY_VER= |
1031 |
- # xen-tools's gentoo patches tarball |
1032 |
- GENTOO_VER=10 |
1033 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
1034 |
- GENTOO_GPV=0 |
1035 |
- # xen-tools ovmf's patches |
1036 |
- OVMF_VER=2 |
1037 |
- |
1038 |
- SEABIOS_VER=1.10.0 |
1039 |
- # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d |
1040 |
- OVMF_PV=20151110 |
1041 |
- |
1042 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
1043 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
1044 |
- [[ -n ${SECURITY_VER} ]] && \ |
1045 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
1046 |
- [[ -n ${GENTOO_VER} ]] && \ |
1047 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
1048 |
- [[ -n ${OVMF_VER} ]] && \ |
1049 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
1050 |
- |
1051 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
1052 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
1053 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
1054 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2 |
1055 |
- ${OVMF_PATCHSET_URI} ) |
1056 |
- ${UPSTREAM_PATCHSET_URI} |
1057 |
- ${SECURITY_PATCHSET_URI} |
1058 |
- ${GENTOO_PATCHSET_URI}" |
1059 |
- |
1060 |
- S="${WORKDIR}/xen-${MY_PV}" |
1061 |
-fi |
1062 |
- |
1063 |
-DESCRIPTION="Xen tools including QEMU and xl" |
1064 |
-HOMEPAGE="https://www.xenproject.org" |
1065 |
-DOCS=( README docs/README.xen-bugtool ) |
1066 |
- |
1067 |
-LICENSE="GPL-2" |
1068 |
-SLOT="0/${MAJOR_V}" |
1069 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
1070 |
-# >=dev-lang/ocaml-4 stable |
1071 |
-# Masked in profiles/eapi-5-files instead |
1072 |
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios" |
1073 |
- |
1074 |
-REQUIRED_USE=" |
1075 |
- ${PYTHON_REQUIRED_USE} |
1076 |
- pygrub? ( python ) |
1077 |
- ovmf? ( hvm ) |
1078 |
- ^^ ( qemu system-qemu )" |
1079 |
- |
1080 |
-COMMON_DEPEND=" |
1081 |
- dev-libs/lzo:2 |
1082 |
- dev-libs/glib:2 |
1083 |
- dev-libs/yajl |
1084 |
- dev-libs/libaio |
1085 |
- dev-libs/libgcrypt:0 |
1086 |
- sys-libs/zlib |
1087 |
- ${PYTHON_DEPS} |
1088 |
-" |
1089 |
- |
1090 |
-DEPEND="${COMMON_DEPEND} |
1091 |
- dev-python/lxml[${PYTHON_USEDEP}] |
1092 |
- x86? ( sys-devel/dev86 |
1093 |
- sys-power/iasl ) |
1094 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
1095 |
- api? ( dev-libs/libxml2 |
1096 |
- net-misc/curl ) |
1097 |
- ovmf? ( |
1098 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
1099 |
- $(python_gen_impl_dep sqlite) |
1100 |
- ) |
1101 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
1102 |
- amd64? ( sys-devel/bin86 |
1103 |
- system-seabios? ( sys-firmware/seabios ) |
1104 |
- sys-firmware/ipxe |
1105 |
- sys-devel/dev86 |
1106 |
- sys-power/iasl ) |
1107 |
- dev-lang/perl |
1108 |
- app-misc/pax-utils |
1109 |
- doc? ( |
1110 |
- app-doc/doxygen |
1111 |
- dev-python/markdown[${PYTHON_USEDEP}] |
1112 |
- dev-tex/latex2html[png,gif] |
1113 |
- media-gfx/graphviz |
1114 |
- dev-tex/xcolor |
1115 |
- media-gfx/transfig |
1116 |
- dev-texlive/texlive-latexextra |
1117 |
- virtual/latex-base |
1118 |
- dev-tex/latexmk |
1119 |
- dev-texlive/texlive-latex |
1120 |
- dev-texlive/texlive-pictures |
1121 |
- dev-texlive/texlive-latexrecommended |
1122 |
- ) |
1123 |
- hvm? ( x11-proto/xproto |
1124 |
- !net-libs/libiscsi ) |
1125 |
- qemu? ( |
1126 |
- app-arch/snappy:= |
1127 |
- x11-libs/pixman |
1128 |
- sdl? ( media-libs/libsdl[X] ) |
1129 |
- ) |
1130 |
- system-qemu? ( app-emulation/qemu[xen] ) |
1131 |
- ocaml? ( dev-ml/findlib |
1132 |
- >=dev-lang/ocaml-4 )" |
1133 |
- |
1134 |
-RDEPEND="${COMMON_DEPEND} |
1135 |
- sys-apps/iproute2[-minimal] |
1136 |
- net-misc/bridge-utils |
1137 |
- screen? ( |
1138 |
- app-misc/screen |
1139 |
- app-admin/logrotate |
1140 |
- )" |
1141 |
- |
1142 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
1143 |
-# Approved by QA team in bug #144032 |
1144 |
-QA_WX_LOAD=" |
1145 |
- usr/libexec/xen/boot/hvmloader |
1146 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
1147 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
1148 |
-" |
1149 |
- |
1150 |
-QA_PREBUILT=" |
1151 |
- usr/libexec/xen/bin/ivshmem-client |
1152 |
- usr/libexec/xen/bin/ivshmem-server |
1153 |
- usr/libexec/xen/bin/qemu-img |
1154 |
- usr/libexec/xen/bin/qemu-io |
1155 |
- usr/libexec/xen/bin/qemu-nbd |
1156 |
- usr/libexec/xen/bin/qemu-system-i386 |
1157 |
- usr/libexec/xen/bin/virtfs-proxy-helper |
1158 |
- usr/libexec/xen/libexec/xen-bridge-helper |
1159 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
1160 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
1161 |
-" |
1162 |
- |
1163 |
-RESTRICT="test" |
1164 |
- |
1165 |
-pkg_setup() { |
1166 |
- python_setup |
1167 |
- export "CONFIG_LOMOUNT=y" |
1168 |
- |
1169 |
- #bug 522642, disable compile tools/tests |
1170 |
- export "CONFIG_TESTS=n" |
1171 |
- |
1172 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
1173 |
- if use x86 && use amd64; then |
1174 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
1175 |
- elif use x86; then |
1176 |
- export XEN_TARGET_ARCH="x86_32" |
1177 |
- elif use amd64 ; then |
1178 |
- export XEN_TARGET_ARCH="x86_64" |
1179 |
- elif use arm; then |
1180 |
- export XEN_TARGET_ARCH="arm32" |
1181 |
- elif use arm64; then |
1182 |
- export XEN_TARGET_ARCH="arm64" |
1183 |
- else |
1184 |
- die "Unsupported architecture!" |
1185 |
- fi |
1186 |
- fi |
1187 |
-} |
1188 |
- |
1189 |
-src_prepare() { |
1190 |
- local i |
1191 |
- |
1192 |
- # Upstream's patchset |
1193 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
1194 |
- einfo "Try to apply Xen Upstream patch set" |
1195 |
- EPATCH_SUFFIX="patch" \ |
1196 |
- EPATCH_FORCE="yes" \ |
1197 |
- EPATCH_OPTS="-p1" \ |
1198 |
- epatch "${WORKDIR}"/patches-upstream |
1199 |
- fi |
1200 |
- |
1201 |
- # Security patchset |
1202 |
- if [[ -n ${SECURITY_VER} ]]; then |
1203 |
- einfo "Try to apply Xen Security patch set" |
1204 |
- # apply main xen patches |
1205 |
- # Two parallel systems, both work side by side |
1206 |
- # Over time they may concdense into one. This will suffice for now |
1207 |
- EPATCH_SUFFIX="patch" |
1208 |
- EPATCH_FORCE="yes" |
1209 |
- |
1210 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
1211 |
- |
1212 |
- for i in ${XEN_SECURITY_MAIN}; do |
1213 |
- epatch "${WORKDIR}"/patches-security/xen/$i |
1214 |
- done |
1215 |
- |
1216 |
- # apply qemu-xen/upstream patches |
1217 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
1218 |
- for i in ${XEN_SECURITY_QEMUU}; do |
1219 |
- epatch "${WORKDIR}"/patches-security/qemuu/$i |
1220 |
- done |
1221 |
- popd > /dev/null |
1222 |
- |
1223 |
- # apply qemu-traditional patches |
1224 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
1225 |
- for i in ${XEN_SECURITY_QEMUT}; do |
1226 |
- epatch "${WORKDIR}"/patches-security/qemut/$i |
1227 |
- done |
1228 |
- popd > /dev/null |
1229 |
- fi |
1230 |
- |
1231 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
1232 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
1233 |
- pushd tools/firmware/ > /dev/null |
1234 |
- ln -s seabios-dir-remote seabios-dir || die |
1235 |
- popd > /dev/null |
1236 |
- |
1237 |
- # Gentoo's patchset |
1238 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
1239 |
- einfo "Try to apply Gentoo specific patch set" |
1240 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
1241 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
1242 |
- for i in ${!_gpv}; do |
1243 |
- EPATCH_SUFFIX="patch" \ |
1244 |
- EPATCH_FORCE="yes" \ |
1245 |
- epatch "${WORKDIR}"/patches-gentoo/$i |
1246 |
- done |
1247 |
- fi |
1248 |
- |
1249 |
- # Ovmf's patchset |
1250 |
- if use ovmf; then |
1251 |
- if [[ -n ${OVMF_VER} ]];then |
1252 |
- einfo "Try to apply Ovmf patch set" |
1253 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
1254 |
- EPATCH_SUFFIX="patch" \ |
1255 |
- EPATCH_FORCE="yes" \ |
1256 |
- EPATCH_OPTS="-p1" \ |
1257 |
- epatch "${WORKDIR}"/patches-ovmf |
1258 |
- popd > /dev/null |
1259 |
- fi |
1260 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
1261 |
- fi |
1262 |
- |
1263 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
1264 |
- |
1265 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
1266 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
1267 |
- |
1268 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
1269 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
1270 |
- -i tools/firmware/Makefile || die |
1271 |
- |
1272 |
- # Drop .config, fixes to gcc-4.6 |
1273 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
1274 |
- |
1275 |
- # if the user *really* wants to use their own custom-cflags, let them |
1276 |
- if use custom-cflags; then |
1277 |
- einfo "User wants their own CFLAGS - removing defaults" |
1278 |
- |
1279 |
- # try and remove all the default cflags |
1280 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
1281 |
- -exec sed \ |
1282 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
1283 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
1284 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
1285 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
1286 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
1287 |
- -i {} + || die "failed to re-set custom-cflags" |
1288 |
- else |
1289 |
- unset CFLAGS |
1290 |
- unset LDFLAGS |
1291 |
- unset ASFLAGS |
1292 |
- unset CPPFLAGS |
1293 |
- fi |
1294 |
- |
1295 |
- if ! use pygrub; then |
1296 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
1297 |
- fi |
1298 |
- |
1299 |
- if ! use python; then |
1300 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
1301 |
- fi |
1302 |
- |
1303 |
- if ! use hvm; then |
1304 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
1305 |
- # Bug 351648 |
1306 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
1307 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
1308 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
1309 |
- export CPATH="${WORKDIR}"/extra-headers |
1310 |
- fi |
1311 |
- |
1312 |
- if use qemu; then |
1313 |
- if use sdl; then |
1314 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
1315 |
- tools/Makefile || die |
1316 |
- else |
1317 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
1318 |
- tools/qemu-xen-traditional/xen-setup || die |
1319 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
1320 |
- tools/Makefile || die |
1321 |
- fi |
1322 |
- else |
1323 |
- # Don't bother with qemu, only needed for fully virtualised guests |
1324 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
1325 |
- fi |
1326 |
- |
1327 |
- # Reset bash completion dir; Bug 472438 |
1328 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
1329 |
- -i Config.mk || die |
1330 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
1331 |
- |
1332 |
- # xencommons, Bug #492332, sed lighter weight than patching |
1333 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
1334 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
1335 |
- |
1336 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
1337 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
1338 |
- -i tools/qemu-xen/configure || die |
1339 |
- |
1340 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
1341 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
1342 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
1343 |
- fi |
1344 |
- |
1345 |
- # uncomment lines in xl.conf |
1346 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
1347 |
- -e 's:^#lockfile=:lockfile=:' \ |
1348 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
1349 |
- -i tools/examples/xl.conf || die |
1350 |
- |
1351 |
- default |
1352 |
-} |
1353 |
- |
1354 |
-src_configure() { |
1355 |
- local myconf="--prefix=${PREFIX}/usr \ |
1356 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
1357 |
- --libexecdir=${PREFIX}/usr/libexec \ |
1358 |
- --localstatedir=${EPREFIX}/var \ |
1359 |
- --disable-werror \ |
1360 |
- --disable-xen \ |
1361 |
- --enable-tools \ |
1362 |
- --enable-docs \ |
1363 |
- $(use_enable pam) \ |
1364 |
- $(use_enable api xenapi) \ |
1365 |
- $(use_enable ovmf) \ |
1366 |
- $(use_enable ocaml ocamltools) \ |
1367 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
1368 |
- " |
1369 |
- |
1370 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
1371 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
1372 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
1373 |
- econf ${myconf} |
1374 |
-} |
1375 |
- |
1376 |
-src_compile() { |
1377 |
- export VARTEXFONTS="${T}/fonts" |
1378 |
- local myopt |
1379 |
- use debug && myopt="${myopt} debug=y" |
1380 |
- |
1381 |
- if test-flag-CC -fno-strict-overflow; then |
1382 |
- append-flags -fno-strict-overflow |
1383 |
- fi |
1384 |
- |
1385 |
- emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
1386 |
- |
1387 |
- use doc && emake -C docs txt html |
1388 |
- emake -C docs man-pages |
1389 |
-} |
1390 |
- |
1391 |
-src_install() { |
1392 |
- # Override auto-detection in the build system, bug #382573 |
1393 |
- export INITD_DIR=/tmp/init.d |
1394 |
- export CONFIG_LEAF_DIR=../tmp/default |
1395 |
- |
1396 |
- # Let the build system compile installed Python modules. |
1397 |
- local PYTHONDONTWRITEBYTECODE |
1398 |
- export PYTHONDONTWRITEBYTECODE |
1399 |
- |
1400 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
1401 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
1402 |
- |
1403 |
- # Created at runtime |
1404 |
- rm -rv "${ED%/}/var/run" || die |
1405 |
- |
1406 |
- # Fix the remaining Python shebangs. |
1407 |
- python_fix_shebang "${D}" |
1408 |
- |
1409 |
- # Remove RedHat-specific stuff |
1410 |
- rm -rf "${D}"tmp || die |
1411 |
- |
1412 |
- if use doc; then |
1413 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
1414 |
- |
1415 |
- dohtml -r docs/ |
1416 |
- docinto pdf |
1417 |
- dodoc ${DOCS[@]} |
1418 |
- [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html |
1419 |
- fi |
1420 |
- |
1421 |
- rm -rf "${D}"/usr/share/doc/xen/ |
1422 |
- doman docs/man?/* |
1423 |
- |
1424 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
1425 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
1426 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
1427 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
1428 |
- newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
1429 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
1430 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
1431 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
1432 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
1433 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
1434 |
- |
1435 |
- if use screen; then |
1436 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
1437 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
1438 |
- keepdir /var/log/xen-consoles |
1439 |
- fi |
1440 |
- |
1441 |
- # For -static-libs wrt Bug 384355 |
1442 |
- if ! use static-libs; then |
1443 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
1444 |
- fi |
1445 |
- |
1446 |
- # for xendomains |
1447 |
- keepdir /etc/xen/auto |
1448 |
- |
1449 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
1450 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
1451 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
1452 |
-} |
1453 |
- |
1454 |
-pkg_postinst() { |
1455 |
- elog "Official Xen Guide and the offical wiki page:" |
1456 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
1457 |
- elog "https://wiki.xen.org/wiki/Main_Page" |
1458 |
- elog "" |
1459 |
- elog "Recommended to utilise the xencommons script to config sytem At boot" |
1460 |
- elog "Add by use of rc-update on completion of the install" |
1461 |
- |
1462 |
- if ! use hvm; then |
1463 |
- echo |
1464 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
1465 |
- elog "support enable the hvm use flag." |
1466 |
- elog "An x86 or amd64 system is required to build HVM support." |
1467 |
- fi |
1468 |
- |
1469 |
- if use qemu; then |
1470 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
1471 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
1472 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
1473 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
1474 |
- fi |
1475 |
-} |
1476 |
|
1477 |
diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild |
1478 |
deleted file mode 100644 |
1479 |
index d7c419329aa..00000000000 |
1480 |
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild |
1481 |
+++ /dev/null |
1482 |
@@ -1,467 +0,0 @@ |
1483 |
-# Copyright 1999-2017 Gentoo Foundation |
1484 |
-# Distributed under the terms of the GNU General Public License v2 |
1485 |
- |
1486 |
-EAPI=6 |
1487 |
- |
1488 |
-PYTHON_COMPAT=( python2_7 ) |
1489 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
1490 |
- |
1491 |
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
1492 |
- |
1493 |
-MY_PV=${PV/_/-} |
1494 |
-MAJOR_V="$(get_version_component_range 1-2)" |
1495 |
- |
1496 |
-if [[ $PV == *9999 ]]; then |
1497 |
- inherit git-r3 |
1498 |
- KEYWORDS="" |
1499 |
- REPO="xen.git" |
1500 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
1501 |
- S="${WORKDIR}/${REPO}" |
1502 |
-else |
1503 |
- KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
1504 |
- UPSTREAM_VER=1 |
1505 |
- SECURITY_VER= |
1506 |
- # xen-tools's gentoo patches tarball |
1507 |
- GENTOO_VER=10 |
1508 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
1509 |
- GENTOO_GPV=0 |
1510 |
- # xen-tools ovmf's patches |
1511 |
- OVMF_VER=2 |
1512 |
- |
1513 |
- SEABIOS_VER=1.10.0 |
1514 |
- # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d |
1515 |
- OVMF_PV=20151110 |
1516 |
- |
1517 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
1518 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
1519 |
- [[ -n ${SECURITY_VER} ]] && \ |
1520 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
1521 |
- [[ -n ${GENTOO_VER} ]] && \ |
1522 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
1523 |
- [[ -n ${OVMF_VER} ]] && \ |
1524 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
1525 |
- |
1526 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
1527 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
1528 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
1529 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2 |
1530 |
- ${OVMF_PATCHSET_URI} ) |
1531 |
- ${UPSTREAM_PATCHSET_URI} |
1532 |
- ${SECURITY_PATCHSET_URI} |
1533 |
- ${GENTOO_PATCHSET_URI}" |
1534 |
- |
1535 |
- S="${WORKDIR}/xen-${MY_PV}" |
1536 |
-fi |
1537 |
- |
1538 |
-DESCRIPTION="Xen tools including QEMU and xl" |
1539 |
-HOMEPAGE="https://www.xenproject.org" |
1540 |
-DOCS=( README docs/README.xen-bugtool ) |
1541 |
- |
1542 |
-LICENSE="GPL-2" |
1543 |
-SLOT="0/${MAJOR_V}" |
1544 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
1545 |
-# >=dev-lang/ocaml-4 stable |
1546 |
-# Masked in profiles/eapi-5-files instead |
1547 |
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios" |
1548 |
- |
1549 |
-REQUIRED_USE=" |
1550 |
- ${PYTHON_REQUIRED_USE} |
1551 |
- pygrub? ( python ) |
1552 |
- ovmf? ( hvm ) |
1553 |
- ^^ ( qemu system-qemu )" |
1554 |
- |
1555 |
-COMMON_DEPEND=" |
1556 |
- sys-apps/pciutils |
1557 |
- dev-libs/lzo:2 |
1558 |
- dev-libs/glib:2 |
1559 |
- dev-libs/yajl |
1560 |
- dev-libs/libaio |
1561 |
- dev-libs/libgcrypt:0 |
1562 |
- sys-libs/zlib |
1563 |
- ${PYTHON_DEPS} |
1564 |
-" |
1565 |
- |
1566 |
-DEPEND="${COMMON_DEPEND} |
1567 |
- dev-python/lxml[${PYTHON_USEDEP}] |
1568 |
- x86? ( sys-devel/dev86 |
1569 |
- sys-power/iasl ) |
1570 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
1571 |
- api? ( dev-libs/libxml2 |
1572 |
- net-misc/curl ) |
1573 |
- ovmf? ( |
1574 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
1575 |
- $(python_gen_impl_dep sqlite) |
1576 |
- ) |
1577 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
1578 |
- amd64? ( sys-devel/bin86 |
1579 |
- system-seabios? ( sys-firmware/seabios ) |
1580 |
- sys-firmware/ipxe |
1581 |
- sys-devel/dev86 |
1582 |
- sys-power/iasl ) |
1583 |
- dev-lang/perl |
1584 |
- app-misc/pax-utils |
1585 |
- doc? ( |
1586 |
- app-text/ghostscript-gpl |
1587 |
- app-text/pandoc |
1588 |
- dev-python/markdown[${PYTHON_USEDEP}] |
1589 |
- dev-texlive/texlive-latexextra |
1590 |
- media-gfx/transfig |
1591 |
- ) |
1592 |
- hvm? ( x11-proto/xproto |
1593 |
- !net-libs/libiscsi ) |
1594 |
- qemu? ( |
1595 |
- app-arch/snappy:= |
1596 |
- x11-libs/pixman |
1597 |
- sdl? ( media-libs/libsdl[X] ) |
1598 |
- ) |
1599 |
- system-qemu? ( app-emulation/qemu[xen] ) |
1600 |
- ocaml? ( dev-ml/findlib |
1601 |
- >=dev-lang/ocaml-4 )" |
1602 |
- |
1603 |
-RDEPEND="${COMMON_DEPEND} |
1604 |
- sys-apps/iproute2[-minimal] |
1605 |
- net-misc/bridge-utils |
1606 |
- screen? ( |
1607 |
- app-misc/screen |
1608 |
- app-admin/logrotate |
1609 |
- )" |
1610 |
- |
1611 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
1612 |
-# Approved by QA team in bug #144032 |
1613 |
-QA_WX_LOAD=" |
1614 |
- usr/libexec/xen/boot/hvmloader |
1615 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
1616 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
1617 |
-" |
1618 |
- |
1619 |
-QA_PREBUILT=" |
1620 |
- usr/libexec/xen/bin/ivshmem-client |
1621 |
- usr/libexec/xen/bin/ivshmem-server |
1622 |
- usr/libexec/xen/bin/qemu-img |
1623 |
- usr/libexec/xen/bin/qemu-io |
1624 |
- usr/libexec/xen/bin/qemu-nbd |
1625 |
- usr/libexec/xen/bin/qemu-system-i386 |
1626 |
- usr/libexec/xen/bin/virtfs-proxy-helper |
1627 |
- usr/libexec/xen/libexec/xen-bridge-helper |
1628 |
- usr/share/qemu-xen/qemu/s390-ccw.img |
1629 |
- usr/share/qemu-xen/qemu/u-boot.e500 |
1630 |
-" |
1631 |
- |
1632 |
-RESTRICT="test" |
1633 |
- |
1634 |
-pkg_setup() { |
1635 |
- python_setup |
1636 |
- export "CONFIG_LOMOUNT=y" |
1637 |
- |
1638 |
- #bug 522642, disable compile tools/tests |
1639 |
- export "CONFIG_TESTS=n" |
1640 |
- |
1641 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
1642 |
- if use x86 && use amd64; then |
1643 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
1644 |
- elif use x86; then |
1645 |
- export XEN_TARGET_ARCH="x86_32" |
1646 |
- elif use amd64 ; then |
1647 |
- export XEN_TARGET_ARCH="x86_64" |
1648 |
- elif use arm; then |
1649 |
- export XEN_TARGET_ARCH="arm32" |
1650 |
- elif use arm64; then |
1651 |
- export XEN_TARGET_ARCH="arm64" |
1652 |
- else |
1653 |
- die "Unsupported architecture!" |
1654 |
- fi |
1655 |
- fi |
1656 |
-} |
1657 |
- |
1658 |
-src_prepare() { |
1659 |
- local i |
1660 |
- |
1661 |
- # Upstream's patchset |
1662 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
1663 |
- einfo "Try to apply Xen Upstream patch set" |
1664 |
- EPATCH_SUFFIX="patch" \ |
1665 |
- EPATCH_FORCE="yes" \ |
1666 |
- EPATCH_OPTS="-p1" \ |
1667 |
- epatch "${WORKDIR}"/patches-upstream |
1668 |
- fi |
1669 |
- |
1670 |
- # Security patchset |
1671 |
- if [[ -n ${SECURITY_VER} ]]; then |
1672 |
- einfo "Try to apply Xen Security patch set" |
1673 |
- # apply main xen patches |
1674 |
- # Two parallel systems, both work side by side |
1675 |
- # Over time they may concdense into one. This will suffice for now |
1676 |
- EPATCH_SUFFIX="patch" |
1677 |
- EPATCH_FORCE="yes" |
1678 |
- |
1679 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
1680 |
- |
1681 |
- for i in ${XEN_SECURITY_MAIN}; do |
1682 |
- epatch "${WORKDIR}"/patches-security/xen/$i |
1683 |
- done |
1684 |
- |
1685 |
- # apply qemu-xen/upstream patches |
1686 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
1687 |
- for i in ${XEN_SECURITY_QEMUU}; do |
1688 |
- epatch "${WORKDIR}"/patches-security/qemuu/$i |
1689 |
- done |
1690 |
- popd > /dev/null |
1691 |
- |
1692 |
- # apply qemu-traditional patches |
1693 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
1694 |
- for i in ${XEN_SECURITY_QEMUT}; do |
1695 |
- epatch "${WORKDIR}"/patches-security/qemut/$i |
1696 |
- done |
1697 |
- popd > /dev/null |
1698 |
- fi |
1699 |
- |
1700 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
1701 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
1702 |
- pushd tools/firmware/ > /dev/null |
1703 |
- ln -s seabios-dir-remote seabios-dir || die |
1704 |
- popd > /dev/null |
1705 |
- |
1706 |
- # Gentoo's patchset |
1707 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
1708 |
- einfo "Try to apply Gentoo specific patch set" |
1709 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
1710 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
1711 |
- for i in ${!_gpv}; do |
1712 |
- EPATCH_SUFFIX="patch" \ |
1713 |
- EPATCH_FORCE="yes" \ |
1714 |
- epatch "${WORKDIR}"/patches-gentoo/$i |
1715 |
- done |
1716 |
- fi |
1717 |
- |
1718 |
- # Ovmf's patchset |
1719 |
- if use ovmf; then |
1720 |
- if [[ -n ${OVMF_VER} ]];then |
1721 |
- einfo "Try to apply Ovmf patch set" |
1722 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
1723 |
- EPATCH_SUFFIX="patch" \ |
1724 |
- EPATCH_FORCE="yes" \ |
1725 |
- EPATCH_OPTS="-p1" \ |
1726 |
- epatch "${WORKDIR}"/patches-ovmf |
1727 |
- popd > /dev/null |
1728 |
- fi |
1729 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
1730 |
- fi |
1731 |
- |
1732 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
1733 |
- |
1734 |
- # Fix building with gcc 7, Bug #634338 |
1735 |
- # https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=f49fa658b53580cf2ad354d2bf1796766cc11222 |
1736 |
- sed -e 's/name\[60\]/name\[100\]/g' \ |
1737 |
- -i tools/misc/xenlockprof.c || die |
1738 |
- |
1739 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
1740 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
1741 |
- |
1742 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
1743 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
1744 |
- -i tools/firmware/Makefile || die |
1745 |
- |
1746 |
- # Drop .config, fixes to gcc-4.6 |
1747 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
1748 |
- |
1749 |
- # if the user *really* wants to use their own custom-cflags, let them |
1750 |
- if use custom-cflags; then |
1751 |
- einfo "User wants their own CFLAGS - removing defaults" |
1752 |
- |
1753 |
- # try and remove all the default cflags |
1754 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
1755 |
- -exec sed \ |
1756 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
1757 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
1758 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
1759 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
1760 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
1761 |
- -i {} + || die "failed to re-set custom-cflags" |
1762 |
- else |
1763 |
- unset CFLAGS |
1764 |
- unset LDFLAGS |
1765 |
- unset ASFLAGS |
1766 |
- unset CPPFLAGS |
1767 |
- fi |
1768 |
- |
1769 |
- if ! use pygrub; then |
1770 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
1771 |
- fi |
1772 |
- |
1773 |
- if ! use python; then |
1774 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
1775 |
- fi |
1776 |
- |
1777 |
- if ! use hvm; then |
1778 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
1779 |
- # Bug 351648 |
1780 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
1781 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
1782 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
1783 |
- export CPATH="${WORKDIR}"/extra-headers |
1784 |
- fi |
1785 |
- |
1786 |
- if use qemu; then |
1787 |
- if use sdl; then |
1788 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
1789 |
- tools/Makefile || die |
1790 |
- else |
1791 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
1792 |
- tools/qemu-xen-traditional/xen-setup || die |
1793 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
1794 |
- tools/Makefile || die |
1795 |
- fi |
1796 |
- else |
1797 |
- # Don't bother with qemu, only needed for fully virtualised guests |
1798 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
1799 |
- fi |
1800 |
- |
1801 |
- # Reset bash completion dir; Bug 472438 |
1802 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
1803 |
- -i Config.mk || die |
1804 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
1805 |
- |
1806 |
- # xencommons, Bug #492332, sed lighter weight than patching |
1807 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
1808 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
1809 |
- |
1810 |
- # fix bashishm |
1811 |
- sed -e '/Usage/s/\$//g' \ |
1812 |
- -i tools/hotplug/Linux/init.d/xendriverdomain.in || die |
1813 |
- |
1814 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
1815 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
1816 |
- -i tools/qemu-xen/configure || die |
1817 |
- |
1818 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
1819 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
1820 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
1821 |
- fi |
1822 |
- |
1823 |
- # uncomment lines in xl.conf |
1824 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
1825 |
- -e 's:^#lockfile=:lockfile=:' \ |
1826 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
1827 |
- -i tools/examples/xl.conf || die |
1828 |
- |
1829 |
- default |
1830 |
-} |
1831 |
- |
1832 |
-src_configure() { |
1833 |
- local myconf="--prefix=${PREFIX}/usr \ |
1834 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
1835 |
- --libexecdir=${PREFIX}/usr/libexec \ |
1836 |
- --localstatedir=${EPREFIX}/var \ |
1837 |
- --disable-werror \ |
1838 |
- --disable-xen \ |
1839 |
- --enable-tools \ |
1840 |
- --enable-docs \ |
1841 |
- $(use_enable pam) \ |
1842 |
- $(use_enable api xenapi) \ |
1843 |
- $(use_enable ovmf) \ |
1844 |
- $(use_enable ocaml ocamltools) \ |
1845 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
1846 |
- " |
1847 |
- |
1848 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
1849 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
1850 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
1851 |
- econf ${myconf} |
1852 |
-} |
1853 |
- |
1854 |
-src_compile() { |
1855 |
- export VARTEXFONTS="${T}/fonts" |
1856 |
- local myopt |
1857 |
- use debug && myopt="${myopt} debug=y" |
1858 |
- |
1859 |
- if test-flag-CC -fno-strict-overflow; then |
1860 |
- append-flags -fno-strict-overflow |
1861 |
- fi |
1862 |
- |
1863 |
- emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
1864 |
- |
1865 |
- if use doc; then |
1866 |
- emake -C docs build |
1867 |
- else |
1868 |
- emake -C docs man-pages |
1869 |
- fi |
1870 |
-} |
1871 |
- |
1872 |
-src_install() { |
1873 |
- # Override auto-detection in the build system, bug #382573 |
1874 |
- export INITD_DIR=/tmp/init.d |
1875 |
- export CONFIG_LEAF_DIR=../tmp/default |
1876 |
- |
1877 |
- # Let the build system compile installed Python modules. |
1878 |
- local PYTHONDONTWRITEBYTECODE |
1879 |
- export PYTHONDONTWRITEBYTECODE |
1880 |
- |
1881 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
1882 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
1883 |
- |
1884 |
- # Created at runtime |
1885 |
- rm -rv "${ED%/}/var/run" || die |
1886 |
- |
1887 |
- # Fix the remaining Python shebangs. |
1888 |
- python_fix_shebang "${D}" |
1889 |
- |
1890 |
- # Remove RedHat-specific stuff |
1891 |
- rm -rf "${D}"tmp || die |
1892 |
- |
1893 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
1894 |
- use doc && dodoc -r docs/{pdf,txt} |
1895 |
- dodoc ${DOCS[@]} |
1896 |
- |
1897 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
1898 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
1899 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
1900 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
1901 |
- newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
1902 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
1903 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
1904 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
1905 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
1906 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
1907 |
- newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog |
1908 |
- |
1909 |
- if use screen; then |
1910 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
1911 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
1912 |
- keepdir /var/log/xen-consoles |
1913 |
- fi |
1914 |
- |
1915 |
- # For -static-libs wrt Bug 384355 |
1916 |
- if ! use static-libs; then |
1917 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
1918 |
- fi |
1919 |
- |
1920 |
- # for xendomains |
1921 |
- keepdir /etc/xen/auto |
1922 |
- |
1923 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
1924 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
1925 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
1926 |
-} |
1927 |
- |
1928 |
-pkg_postinst() { |
1929 |
- elog "Official Xen Guide and the offical wiki page:" |
1930 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
1931 |
- elog "https://wiki.xen.org/wiki/Main_Page" |
1932 |
- elog "" |
1933 |
- elog "Recommended to utilise the xencommons script to config sytem At boot" |
1934 |
- elog "Add by use of rc-update on completion of the install" |
1935 |
- |
1936 |
- if ! use hvm; then |
1937 |
- echo |
1938 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
1939 |
- elog "support enable the hvm use flag." |
1940 |
- elog "An x86 or amd64 system is required to build HVM support." |
1941 |
- fi |
1942 |
- |
1943 |
- if use qemu; then |
1944 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
1945 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
1946 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
1947 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
1948 |
- fi |
1949 |
-} |
1950 |
|
1951 |
diff --git a/app-emulation/xen-tools/xen-tools-4.8.2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2.ebuild |
1952 |
deleted file mode 100644 |
1953 |
index 828ed753d89..00000000000 |
1954 |
--- a/app-emulation/xen-tools/xen-tools-4.8.2.ebuild |
1955 |
+++ /dev/null |
1956 |
@@ -1,449 +0,0 @@ |
1957 |
-# Copyright 1999-2017 Gentoo Foundation |
1958 |
-# Distributed under the terms of the GNU General Public License v2 |
1959 |
- |
1960 |
-EAPI=5 |
1961 |
- |
1962 |
-PYTHON_COMPAT=( python2_7 ) |
1963 |
-PYTHON_REQ_USE='ncurses,xml,threads' |
1964 |
- |
1965 |
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
1966 |
- |
1967 |
-MY_PV=${PV/_/-} |
1968 |
-MAJOR_V="$(get_version_component_range 1-2)" |
1969 |
- |
1970 |
-if [[ $PV == *9999 ]]; then |
1971 |
- inherit git-r3 |
1972 |
- KEYWORDS="" |
1973 |
- REPO="xen.git" |
1974 |
- EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
1975 |
- S="${WORKDIR}/${REPO}" |
1976 |
-else |
1977 |
- KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
1978 |
- UPSTREAM_VER=0 |
1979 |
- SECURITY_VER= |
1980 |
- # xen-tools's gentoo patches tarball |
1981 |
- GENTOO_VER=10 |
1982 |
- # xen-tools's gentoo patches version which apply to this specific ebuild |
1983 |
- GENTOO_GPV=0 |
1984 |
- # xen-tools ovmf's patches |
1985 |
- OVMF_VER=2 |
1986 |
- |
1987 |
- SEABIOS_VER=1.10.0 |
1988 |
- # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d |
1989 |
- OVMF_PV=20151110 |
1990 |
- |
1991 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
1992 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
1993 |
- [[ -n ${SECURITY_VER} ]] && \ |
1994 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
1995 |
- [[ -n ${GENTOO_VER} ]] && \ |
1996 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
1997 |
- [[ -n ${OVMF_VER} ]] && \ |
1998 |
- OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
1999 |
- |
2000 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
2001 |
- http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
2002 |
- https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
2003 |
- ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2 |
2004 |
- ${OVMF_PATCHSET_URI} ) |
2005 |
- ${UPSTREAM_PATCHSET_URI} |
2006 |
- ${SECURITY_PATCHSET_URI} |
2007 |
- ${GENTOO_PATCHSET_URI}" |
2008 |
- |
2009 |
- S="${WORKDIR}/xen-${MY_PV}" |
2010 |
-fi |
2011 |
- |
2012 |
-DESCRIPTION="Xen tools including QEMU and xl" |
2013 |
-HOMEPAGE="http://xen.org/" |
2014 |
-DOCS=( README docs/README.xen-bugtool ) |
2015 |
- |
2016 |
-LICENSE="GPL-2" |
2017 |
-SLOT="0/${MAJOR_V}" |
2018 |
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
2019 |
-# >=dev-lang/ocaml-4 stable |
2020 |
-# Masked in profiles/eapi-5-files instead |
2021 |
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios" |
2022 |
- |
2023 |
-REQUIRED_USE=" |
2024 |
- ${PYTHON_REQUIRED_USE} |
2025 |
- pygrub? ( python ) |
2026 |
- ovmf? ( hvm ) |
2027 |
- ^^ ( qemu system-qemu )" |
2028 |
- |
2029 |
-COMMON_DEPEND=" |
2030 |
- dev-libs/lzo:2 |
2031 |
- dev-libs/glib:2 |
2032 |
- dev-libs/yajl |
2033 |
- dev-libs/libaio |
2034 |
- dev-libs/libgcrypt:0 |
2035 |
- sys-libs/zlib |
2036 |
- ${PYTHON_DEPS} |
2037 |
-" |
2038 |
- |
2039 |
-DEPEND="${COMMON_DEPEND} |
2040 |
- dev-python/lxml[${PYTHON_USEDEP}] |
2041 |
- x86? ( sys-devel/dev86 |
2042 |
- sys-power/iasl ) |
2043 |
- pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
2044 |
- api? ( dev-libs/libxml2 |
2045 |
- net-misc/curl ) |
2046 |
- ovmf? ( |
2047 |
- !arm? ( !arm64? ( dev-lang/nasm ) ) |
2048 |
- $(python_gen_impl_dep sqlite) |
2049 |
- ) |
2050 |
- !amd64? ( >=sys-apps/dtc-1.4.0 ) |
2051 |
- amd64? ( sys-devel/bin86 |
2052 |
- system-seabios? ( sys-firmware/seabios ) |
2053 |
- sys-firmware/ipxe |
2054 |
- sys-devel/dev86 |
2055 |
- sys-power/iasl ) |
2056 |
- dev-lang/perl |
2057 |
- app-misc/pax-utils |
2058 |
- doc? ( |
2059 |
- app-doc/doxygen |
2060 |
- dev-python/markdown[${PYTHON_USEDEP}] |
2061 |
- dev-tex/latex2html[png,gif] |
2062 |
- media-gfx/graphviz |
2063 |
- dev-tex/xcolor |
2064 |
- media-gfx/transfig |
2065 |
- dev-texlive/texlive-latexextra |
2066 |
- virtual/latex-base |
2067 |
- dev-tex/latexmk |
2068 |
- dev-texlive/texlive-latex |
2069 |
- dev-texlive/texlive-pictures |
2070 |
- dev-texlive/texlive-latexrecommended |
2071 |
- ) |
2072 |
- hvm? ( x11-proto/xproto |
2073 |
- !net-libs/libiscsi ) |
2074 |
- qemu? ( |
2075 |
- x11-libs/pixman |
2076 |
- sdl? ( media-libs/libsdl[X] ) |
2077 |
- ) |
2078 |
- system-qemu? ( app-emulation/qemu[xen] ) |
2079 |
- ocaml? ( dev-ml/findlib |
2080 |
- >=dev-lang/ocaml-4 )" |
2081 |
- |
2082 |
-RDEPEND="${COMMON_DEPEND} |
2083 |
- sys-apps/iproute2[-minimal] |
2084 |
- net-misc/bridge-utils |
2085 |
- screen? ( |
2086 |
- app-misc/screen |
2087 |
- app-admin/logrotate |
2088 |
- )" |
2089 |
- |
2090 |
-# hvmloader is used to bootstrap a fully virtualized kernel |
2091 |
-# Approved by QA team in bug #144032 |
2092 |
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader |
2093 |
- usr/share/qemu-xen/qemu/s390-ccw.img" |
2094 |
- |
2095 |
-RESTRICT="test" |
2096 |
- |
2097 |
-pkg_setup() { |
2098 |
- python_setup |
2099 |
- export "CONFIG_LOMOUNT=y" |
2100 |
- |
2101 |
- #bug 522642, disable compile tools/tests |
2102 |
- export "CONFIG_TESTS=n" |
2103 |
- |
2104 |
- if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
2105 |
- if use x86 && use amd64; then |
2106 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
2107 |
- elif use x86; then |
2108 |
- export XEN_TARGET_ARCH="x86_32" |
2109 |
- elif use amd64 ; then |
2110 |
- export XEN_TARGET_ARCH="x86_64" |
2111 |
- elif use arm; then |
2112 |
- export XEN_TARGET_ARCH="arm32" |
2113 |
- elif use arm64; then |
2114 |
- export XEN_TARGET_ARCH="arm64" |
2115 |
- else |
2116 |
- die "Unsupported architecture!" |
2117 |
- fi |
2118 |
- fi |
2119 |
-} |
2120 |
- |
2121 |
-src_prepare() { |
2122 |
- # Upstream's patchset |
2123 |
- if [[ -n ${UPSTREAM_VER} ]]; then |
2124 |
- einfo "Try to apply Xen Upstream patch set" |
2125 |
- EPATCH_SUFFIX="patch" \ |
2126 |
- EPATCH_FORCE="yes" \ |
2127 |
- EPATCH_OPTS="-p1" \ |
2128 |
- epatch "${WORKDIR}"/patches-upstream |
2129 |
- fi |
2130 |
- |
2131 |
- # Security patchset |
2132 |
- if [[ -n ${SECURITY_VER} ]]; then |
2133 |
- einfo "Try to apply Xen Security patch set" |
2134 |
- # apply main xen patches |
2135 |
- # Two parallel systems, both work side by side |
2136 |
- # Over time they may concdense into one. This will suffice for now |
2137 |
- EPATCH_SUFFIX="patch" |
2138 |
- EPATCH_FORCE="yes" |
2139 |
- |
2140 |
- source "${WORKDIR}"/patches-security/${PV}.conf || die |
2141 |
- |
2142 |
- for i in ${XEN_SECURITY_MAIN}; do |
2143 |
- epatch "${WORKDIR}"/patches-security/xen/$i |
2144 |
- done |
2145 |
- |
2146 |
- # apply qemu-xen/upstream patches |
2147 |
- pushd "${S}"/tools/qemu-xen/ > /dev/null |
2148 |
- for i in ${XEN_SECURITY_QEMUU}; do |
2149 |
- epatch "${WORKDIR}"/patches-security/qemuu/$i |
2150 |
- done |
2151 |
- popd > /dev/null |
2152 |
- |
2153 |
- # apply qemu-traditional patches |
2154 |
- pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
2155 |
- for i in ${XEN_SECURITY_QEMUT}; do |
2156 |
- epatch "${WORKDIR}"/patches-security/qemut/$i |
2157 |
- done |
2158 |
- popd > /dev/null |
2159 |
- fi |
2160 |
- |
2161 |
- # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
2162 |
- mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
2163 |
- pushd tools/firmware/ > /dev/null |
2164 |
- ln -s seabios-dir-remote seabios-dir || die |
2165 |
- popd > /dev/null |
2166 |
- |
2167 |
- # Gentoo's patchset |
2168 |
- if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
2169 |
- einfo "Try to apply Gentoo specific patch set" |
2170 |
- source "${FILESDIR}"/gentoo-patches.conf || die |
2171 |
- _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
2172 |
- for i in ${!_gpv}; do |
2173 |
- EPATCH_SUFFIX="patch" \ |
2174 |
- EPATCH_FORCE="yes" \ |
2175 |
- epatch "${WORKDIR}"/patches-gentoo/$i |
2176 |
- done |
2177 |
- fi |
2178 |
- |
2179 |
- # Ovmf's patchset |
2180 |
- if use ovmf; then |
2181 |
- if [[ -n ${OVMF_VER} ]];then |
2182 |
- einfo "Try to apply Ovmf patch set" |
2183 |
- pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
2184 |
- EPATCH_SUFFIX="patch" \ |
2185 |
- EPATCH_FORCE="yes" \ |
2186 |
- EPATCH_OPTS="-p1" \ |
2187 |
- epatch "${WORKDIR}"/patches-ovmf |
2188 |
- popd > /dev/null |
2189 |
- fi |
2190 |
- mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
2191 |
- fi |
2192 |
- |
2193 |
- mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
2194 |
- |
2195 |
- # Fix texi2html build error with new texi2html, qemu.doc.html |
2196 |
- sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
2197 |
- |
2198 |
- use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
2199 |
- sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
2200 |
- -i tools/firmware/Makefile || die |
2201 |
- |
2202 |
- # Drop .config, fixes to gcc-4.6 |
2203 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
2204 |
- |
2205 |
- # if the user *really* wants to use their own custom-cflags, let them |
2206 |
- if use custom-cflags; then |
2207 |
- einfo "User wants their own CFLAGS - removing defaults" |
2208 |
- |
2209 |
- # try and remove all the default cflags |
2210 |
- find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
2211 |
- -exec sed \ |
2212 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
2213 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
2214 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
2215 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
2216 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
2217 |
- -i {} + || die "failed to re-set custom-cflags" |
2218 |
- else |
2219 |
- unset CFLAGS |
2220 |
- unset LDFLAGS |
2221 |
- unset ASFLAGS |
2222 |
- unset CPPFLAGS |
2223 |
- fi |
2224 |
- |
2225 |
- if ! use pygrub; then |
2226 |
- sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
2227 |
- fi |
2228 |
- |
2229 |
- if ! use python; then |
2230 |
- sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
2231 |
- fi |
2232 |
- |
2233 |
- if ! use hvm; then |
2234 |
- sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
2235 |
- # Bug 351648 |
2236 |
- elif ! use x86 && ! has x86 $(get_all_abis); then |
2237 |
- mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
2238 |
- touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
2239 |
- export CPATH="${WORKDIR}"/extra-headers |
2240 |
- fi |
2241 |
- |
2242 |
- if use qemu; then |
2243 |
- if use sdl; then |
2244 |
- sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
2245 |
- tools/Makefile || die |
2246 |
- else |
2247 |
- sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
2248 |
- tools/qemu-xen-traditional/xen-setup || die |
2249 |
- sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
2250 |
- tools/Makefile || die |
2251 |
- fi |
2252 |
- else |
2253 |
- # Don't bother with qemu, only needed for fully virtualised guests |
2254 |
- sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
2255 |
- fi |
2256 |
- |
2257 |
- # Reset bash completion dir; Bug 472438 |
2258 |
- sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
2259 |
- -i Config.mk || die |
2260 |
- sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
2261 |
- |
2262 |
- # xencommons, Bug #492332, sed lighter weight than patching |
2263 |
- sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
2264 |
- -i tools/hotplug/Linux/init.d/xencommons.in || die |
2265 |
- |
2266 |
- # respect multilib, usr/lib/libcacard.so.0.0.0 |
2267 |
- sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
2268 |
- -i tools/qemu-xen/configure || die |
2269 |
- |
2270 |
- #bug 518136, don't build 32bit exactuable for nomultilib profile |
2271 |
- if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
2272 |
- sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
2273 |
- fi |
2274 |
- |
2275 |
- # uncomment lines in xl.conf |
2276 |
- sed -e 's:^#autoballoon=:autoballoon=:' \ |
2277 |
- -e 's:^#lockfile=:lockfile=:' \ |
2278 |
- -e 's:^#vif.default.script=:vif.default.script=:' \ |
2279 |
- -i tools/examples/xl.conf || die |
2280 |
- |
2281 |
- # Bug #575868 converted to a sed statement, typo of one char |
2282 |
- sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
2283 |
- |
2284 |
- epatch_user |
2285 |
-} |
2286 |
- |
2287 |
-src_configure() { |
2288 |
- local myconf="--prefix=${PREFIX}/usr \ |
2289 |
- --libdir=${PREFIX}/usr/$(get_libdir) \ |
2290 |
- --libexecdir=${PREFIX}/usr/libexec \ |
2291 |
- --localstatedir=${EPREFIX}/var \ |
2292 |
- --disable-werror \ |
2293 |
- --disable-xen \ |
2294 |
- --enable-tools \ |
2295 |
- --enable-docs \ |
2296 |
- $(use_enable pam) \ |
2297 |
- $(use_enable api xenapi) \ |
2298 |
- $(use_enable ovmf) \ |
2299 |
- $(use_enable ocaml ocamltools) \ |
2300 |
- --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
2301 |
- " |
2302 |
- |
2303 |
- use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
2304 |
- use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
2305 |
- use amd64 && myconf+=" $(use_enable qemu-traditional)" |
2306 |
- econf ${myconf} |
2307 |
-} |
2308 |
- |
2309 |
-src_compile() { |
2310 |
- export VARTEXFONTS="${T}/fonts" |
2311 |
- local myopt |
2312 |
- use debug && myopt="${myopt} debug=y" |
2313 |
- |
2314 |
- if test-flag-CC -fno-strict-overflow; then |
2315 |
- append-flags -fno-strict-overflow |
2316 |
- fi |
2317 |
- |
2318 |
- emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
2319 |
- |
2320 |
- use doc && emake -C docs txt html |
2321 |
- emake -C docs man-pages |
2322 |
-} |
2323 |
- |
2324 |
-src_install() { |
2325 |
- # Override auto-detection in the build system, bug #382573 |
2326 |
- export INITD_DIR=/tmp/init.d |
2327 |
- export CONFIG_LEAF_DIR=../tmp/default |
2328 |
- |
2329 |
- # Let the build system compile installed Python modules. |
2330 |
- local PYTHONDONTWRITEBYTECODE |
2331 |
- export PYTHONDONTWRITEBYTECODE |
2332 |
- |
2333 |
- emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
2334 |
- XEN_PYTHON_NATIVE_INSTALL=y install-tools |
2335 |
- |
2336 |
- # Fix the remaining Python shebangs. |
2337 |
- python_fix_shebang "${D}" |
2338 |
- |
2339 |
- # Remove RedHat-specific stuff |
2340 |
- rm -rf "${D}"tmp || die |
2341 |
- |
2342 |
- if use doc; then |
2343 |
- emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
2344 |
- |
2345 |
- dohtml -r docs/ |
2346 |
- docinto pdf |
2347 |
- dodoc ${DOCS[@]} |
2348 |
- [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html |
2349 |
- fi |
2350 |
- |
2351 |
- rm -rf "${D}"/usr/share/doc/xen/ |
2352 |
- doman docs/man?/* |
2353 |
- |
2354 |
- newconfd "${FILESDIR}"/xendomains.confd xendomains |
2355 |
- newconfd "${FILESDIR}"/xenstored.confd xenstored |
2356 |
- newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
2357 |
- newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
2358 |
- newinitd "${FILESDIR}"/xenstored.initd xenstored |
2359 |
- newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
2360 |
- newinitd "${FILESDIR}"/xencommons.initd xencommons |
2361 |
- newconfd "${FILESDIR}"/xencommons.confd xencommons |
2362 |
- newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
2363 |
- newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
2364 |
- |
2365 |
- if use screen; then |
2366 |
- cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
2367 |
- cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
2368 |
- keepdir /var/log/xen-consoles |
2369 |
- fi |
2370 |
- |
2371 |
- # For -static-libs wrt Bug 384355 |
2372 |
- if ! use static-libs; then |
2373 |
- rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
2374 |
- fi |
2375 |
- |
2376 |
- # for xendomains |
2377 |
- keepdir /etc/xen/auto |
2378 |
- |
2379 |
- # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
2380 |
- find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
2381 |
- -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
2382 |
-} |
2383 |
- |
2384 |
-pkg_postinst() { |
2385 |
- elog "Official Xen Guide and the offical wiki page:" |
2386 |
- elog "https://wiki.gentoo.org/wiki/Xen" |
2387 |
- elog "http://wiki.xen.org/wiki/Main_Page" |
2388 |
- elog "" |
2389 |
- elog "Recommended to utilise the xencommons script to config sytem At boot" |
2390 |
- elog "Add by use of rc-update on completion of the install" |
2391 |
- |
2392 |
- if ! use hvm; then |
2393 |
- echo |
2394 |
- elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
2395 |
- elog "support enable the hvm use flag." |
2396 |
- elog "An x86 or amd64 system is required to build HVM support." |
2397 |
- fi |
2398 |
- |
2399 |
- if use qemu; then |
2400 |
- elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
2401 |
- elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
2402 |
- elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
2403 |
- elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
2404 |
- fi |
2405 |
-} |