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