1 |
commit: 3807633e47f5ccbbd72d25c38de329016067e3d3 |
2 |
Author: Florian Schmaus <flow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 4 10:52:04 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 5 16:20:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3807633e |
7 |
|
8 |
app-emulation/xen-tools: add 4.15.3 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/850802 |
11 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
12 |
|
13 |
app-emulation/xen-tools/Manifest | 1 + |
14 |
app-emulation/xen-tools/xen-tools-4.15.3.ebuild | 530 ++++++++++++++++++++++++ |
15 |
app-emulation/xen/Manifest | 1 + |
16 |
3 files changed, 532 insertions(+) |
17 |
|
18 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
19 |
index a6c87e26bb87..7fe60a3ccfdc 100644 |
20 |
--- a/app-emulation/xen-tools/Manifest |
21 |
+++ b/app-emulation/xen-tools/Manifest |
22 |
@@ -8,6 +8,7 @@ DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf |
23 |
DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146 |
24 |
DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2 |
25 |
DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54 |
26 |
+DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3 |
27 |
DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d |
28 |
DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87 |
29 |
DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a |
30 |
|
31 |
diff --git a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..0a779bde587e |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild |
36 |
@@ -0,0 +1,530 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+PYTHON_COMPAT=( python3_{8..10} ) |
43 |
+PYTHON_REQ_USE='ncurses,xml,threads(+)' |
44 |
+ |
45 |
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs |
46 |
+ |
47 |
+if [[ ${PV} == *9999 ]]; then |
48 |
+ inherit git-r3 |
49 |
+ REPO="xen.git" |
50 |
+ EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
51 |
+ S="${WORKDIR}/${REPO}" |
52 |
+else |
53 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
54 |
+ |
55 |
+ SEABIOS_VER="1.14.0" |
56 |
+ EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5" |
57 |
+ EDK2_OPENSSL_VERSION="1_1_1j" |
58 |
+ EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037" |
59 |
+ EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d" |
60 |
+ IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb" |
61 |
+ |
62 |
+ XEN_PRE_PATCHSET_NUM= |
63 |
+ XEN_GENTOO_PATCHSET_NUM=0 |
64 |
+ XEN_PRE_VERSION_BASE= |
65 |
+ |
66 |
+ XEN_BASE_PV="${PV}" |
67 |
+ if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then |
68 |
+ XEN_BASE_PV="${XEN_PRE_VERSION_BASE}" |
69 |
+ fi |
70 |
+ |
71 |
+ SRC_URI=" |
72 |
+ https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz |
73 |
+ https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz |
74 |
+ ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz ) |
75 |
+ ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz |
76 |
+ https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz |
77 |
+ https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz |
78 |
+ https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz |
79 |
+ ) |
80 |
+ " |
81 |
+ |
82 |
+ if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then |
83 |
+ XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}" |
84 |
+ XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}" |
85 |
+ SRC_URI+=" https://github.com/Flowdalic/xen-upstream-patches/archive/refs/tags/${XEN_UPSTREAM_PATCHES_TAG}.tar.gz -> ${XEN_UPSTREAM_PATCHES_NAME}.tar.gz" |
86 |
+ XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}" |
87 |
+ fi |
88 |
+ if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then |
89 |
+ XEN_GENTOO_PATCHES_TAG="4.16.1-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}" |
90 |
+ XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}" |
91 |
+ SRC_URI+=" https://github.com/Flowdalic/xen-gentoo-patches/archive/refs/tags/${XEN_GENTOO_PATCHES_TAG}.tar.gz -> ${XEN_GENTOO_PATCHES_NAME}.tar.gz" |
92 |
+ XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}" |
93 |
+ fi |
94 |
+fi |
95 |
+ |
96 |
+DESCRIPTION="Xen tools including QEMU and xl" |
97 |
+HOMEPAGE="https://xenproject.org" |
98 |
+DOCS=( README ) |
99 |
+ |
100 |
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})" |
101 |
+ |
102 |
+LICENSE="GPL-2" |
103 |
+SLOT="0/$(ver_cut 1-2)" |
104 |
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
105 |
+# >=dev-lang/ocaml-4 stable |
106 |
+# Masked in profiles/eapi-5-files instead |
107 |
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios" |
108 |
+ |
109 |
+REQUIRED_USE=" |
110 |
+ ${PYTHON_REQUIRED_USE} |
111 |
+ ipxe? ( rombios ) |
112 |
+ ovmf? ( hvm ) |
113 |
+ pygrub? ( python ) |
114 |
+ rombios? ( hvm ) |
115 |
+ system-ipxe? ( rombios ) |
116 |
+ ?? ( ipxe system-ipxe ) |
117 |
+ ?? ( qemu system-qemu )" |
118 |
+ |
119 |
+COMMON_DEPEND=" |
120 |
+ lzma? ( app-arch/xz-utils ) |
121 |
+ qemu? ( |
122 |
+ dev-libs/glib:2 |
123 |
+ sys-libs/pam |
124 |
+ ) |
125 |
+ app-arch/bzip2 |
126 |
+ dev-libs/libnl:3 |
127 |
+ dev-libs/lzo:2 |
128 |
+ dev-libs/yajl |
129 |
+ sys-apps/util-linux |
130 |
+ sys-fs/e2fsprogs |
131 |
+ sys-libs/ncurses |
132 |
+ sys-libs/zlib |
133 |
+ ${PYTHON_DEPS} |
134 |
+" |
135 |
+ |
136 |
+RDEPEND="${COMMON_DEPEND} |
137 |
+ sys-apps/iproute2[-minimal] |
138 |
+ net-misc/bridge-utils |
139 |
+ screen? ( |
140 |
+ app-misc/screen |
141 |
+ app-admin/logrotate |
142 |
+ ) |
143 |
+ selinux? ( sec-policy/selinux-xen )" |
144 |
+ |
145 |
+DEPEND="${COMMON_DEPEND} |
146 |
+ app-misc/pax-utils |
147 |
+ >=sys-kernel/linux-headers-4.11 |
148 |
+ x11-libs/pixman |
149 |
+ $(python_gen_cond_dep ' |
150 |
+ dev-python/lxml[${PYTHON_USEDEP}] |
151 |
+ ') |
152 |
+ x86? ( sys-devel/dev86 |
153 |
+ system-ipxe? ( sys-firmware/ipxe[qemu] ) |
154 |
+ sys-power/iasl ) |
155 |
+ api? ( dev-libs/libxml2 |
156 |
+ net-misc/curl ) |
157 |
+ |
158 |
+ ovmf? ( |
159 |
+ !arm? ( !arm64? ( dev-lang/nasm ) ) |
160 |
+ $(python_gen_impl_dep sqlite) |
161 |
+ ) |
162 |
+ !amd64? ( >=sys-apps/dtc-1.4.0 ) |
163 |
+ amd64? ( sys-power/iasl |
164 |
+ system-seabios? ( sys-firmware/seabios ) |
165 |
+ system-ipxe? ( sys-firmware/ipxe[qemu] ) |
166 |
+ rombios? ( sys-devel/bin86 sys-devel/dev86 ) ) |
167 |
+ arm64? ( sys-power/iasl |
168 |
+ rombios? ( sys-devel/bin86 sys-devel/dev86 ) ) |
169 |
+ doc? ( |
170 |
+ app-text/ghostscript-gpl |
171 |
+ app-text/pandoc |
172 |
+ $(python_gen_cond_dep ' |
173 |
+ dev-python/markdown[${PYTHON_USEDEP}] |
174 |
+ ') |
175 |
+ dev-texlive/texlive-latexextra |
176 |
+ media-gfx/transfig |
177 |
+ ) |
178 |
+ hvm? ( x11-base/xorg-proto ) |
179 |
+ qemu? ( |
180 |
+ app-arch/snappy:= |
181 |
+ dev-util/meson |
182 |
+ sdl? ( |
183 |
+ media-libs/libsdl[X] |
184 |
+ media-libs/libsdl2[X] |
185 |
+ ) |
186 |
+ ) |
187 |
+ system-qemu? ( app-emulation/qemu[xen] ) |
188 |
+ ocaml? ( dev-ml/findlib |
189 |
+ dev-lang/ocaml[ocamlopt] ) |
190 |
+ python? ( >=dev-lang/swig-4.0.0 )" |
191 |
+ |
192 |
+BDEPEND="dev-lang/perl |
193 |
+ sys-devel/bison |
194 |
+ sys-devel/gettext" |
195 |
+ |
196 |
+# hvmloader is used to bootstrap a fully virtualized kernel |
197 |
+# Approved by QA team in bug #144032 |
198 |
+QA_WX_LOAD=" |
199 |
+ usr/libexec/xen/boot/hvmloader |
200 |
+ usr/libexec/xen/boot/ovmf.bin |
201 |
+ usr/libexec/xen/boot/xen-shim |
202 |
+ usr/share/qemu-xen/qemu/hppa-firmware.img |
203 |
+ usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf |
204 |
+ usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf |
205 |
+ usr/share/qemu-xen/qemu/s390-ccw.img |
206 |
+ usr/share/qemu-xen/qemu/u-boot.e500 |
207 |
+" |
208 |
+ |
209 |
+QA_EXECSTACK=" |
210 |
+ usr/share/qemu-xen/qemu/hppa-firmware.img |
211 |
+" |
212 |
+ |
213 |
+QA_PREBUILT=" |
214 |
+ usr/libexec/xen/bin/elf2dmp |
215 |
+ usr/libexec/xen/bin/ivshmem-client |
216 |
+ usr/libexec/xen/bin/ivshmem-server |
217 |
+ usr/libexec/xen/bin/qemu-edid |
218 |
+ usr/libexec/xen/bin/qemu-img |
219 |
+ usr/libexec/xen/bin/qemu-io |
220 |
+ usr/libexec/xen/bin/qemu-keymap |
221 |
+ usr/libexec/xen/bin/qemu-nbd |
222 |
+ usr/libexec/xen/bin/qemu-pr-helper |
223 |
+ usr/libexec/xen/bin/qemu-storage-daemon |
224 |
+ usr/libexec/xen/bin/qemu-system-i386 |
225 |
+ usr/libexec/xen/bin/virtfs-proxy-helper |
226 |
+ usr/libexec/xen/boot/ovmf.bin |
227 |
+ usr/libexec/xen/boot/xen-shim |
228 |
+ usr/libexec/xen/libexec/qemu-pr-helper |
229 |
+ usr/libexec/xen/libexec/virtfs-proxy-helper |
230 |
+ usr/libexec/xen/libexec/virtiofsd |
231 |
+ usr/libexec/xen/libexec/xen-bridge-helper |
232 |
+ usr/share/qemu-xen/qemu/s390-ccw.img |
233 |
+ usr/share/qemu-xen/qemu/s390-netboot.img |
234 |
+ usr/share/qemu-xen/qemu/u-boot.e500 |
235 |
+" |
236 |
+ |
237 |
+RESTRICT="test" |
238 |
+ |
239 |
+pkg_setup() { |
240 |
+ python_setup |
241 |
+ export "CONFIG_LOMOUNT=y" |
242 |
+ |
243 |
+ #bug 522642, disable compile tools/tests |
244 |
+ export "CONFIG_TESTS=n" |
245 |
+ |
246 |
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
247 |
+ if use x86 && use amd64; then |
248 |
+ die "Confusion! Both x86 and amd64 are set in your use flags!" |
249 |
+ elif use x86; then |
250 |
+ export XEN_TARGET_ARCH="x86_32" |
251 |
+ elif use amd64 ; then |
252 |
+ export XEN_TARGET_ARCH="x86_64" |
253 |
+ elif use arm; then |
254 |
+ export XEN_TARGET_ARCH="arm32" |
255 |
+ elif use arm64; then |
256 |
+ export XEN_TARGET_ARCH="arm64" |
257 |
+ else |
258 |
+ die "Unsupported architecture!" |
259 |
+ fi |
260 |
+ fi |
261 |
+} |
262 |
+ |
263 |
+src_prepare() { |
264 |
+ # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
265 |
+ mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
266 |
+ pushd tools/firmware/ > /dev/null |
267 |
+ ln -s seabios-dir-remote seabios-dir || die |
268 |
+ popd > /dev/null |
269 |
+ |
270 |
+ if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then |
271 |
+ eapply "${XEN_UPSTREAM_PATCHES_DIR}" |
272 |
+ fi |
273 |
+ |
274 |
+ if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then |
275 |
+ rm "${XEN_GENTOO_PATCHES_DIR}"/xen-tools-4.16.0-qemu-bridge.patch || die |
276 |
+ sed -i 's/qemu-bridge-helper/xen-bridge-helper/' \ |
277 |
+ tools/qemu-xen/include/net/net.h \ |
278 |
+ tools/qemu-xen/meson.build \ |
279 |
+ tools/qemu-xen/qemu-bridge-helper.c \ |
280 |
+ tools/qemu-xen/qemu-options.hx |
281 |
+ |
282 |
+ eapply "${XEN_GENTOO_PATCHES_DIR}" |
283 |
+ fi |
284 |
+ |
285 |
+ if use ovmf; then |
286 |
+ mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die |
287 |
+ rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die |
288 |
+ rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die |
289 |
+ rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die |
290 |
+ rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die |
291 |
+ mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die |
292 |
+ mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die |
293 |
+ cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die |
294 |
+ cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die |
295 |
+ cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die |
296 |
+ |
297 |
+ # Bug #816987 |
298 |
+ pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null |
299 |
+ eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch" |
300 |
+ popd > /dev/null |
301 |
+ |
302 |
+ pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null |
303 |
+ eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch" |
304 |
+ popd > /dev/null |
305 |
+ fi |
306 |
+ |
307 |
+ # ipxe |
308 |
+ if use ipxe; then |
309 |
+ cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die |
310 |
+ |
311 |
+ # gcc 11 |
312 |
+ cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die |
313 |
+ echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || 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 |
+ # Drop .config, fixes to gcc-4.6 |
322 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
323 |
+ |
324 |
+ # drop flags |
325 |
+ unset CFLAGS |
326 |
+ unset LDFLAGS |
327 |
+ unset ASFLAGS |
328 |
+ unset CPPFLAGS |
329 |
+ |
330 |
+ if ! use pygrub; then |
331 |
+ sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
332 |
+ fi |
333 |
+ |
334 |
+ if ! use python; then |
335 |
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
336 |
+ fi |
337 |
+ |
338 |
+ if ! use hvm; then |
339 |
+ sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
340 |
+ # Bug 351648 |
341 |
+ elif ! use x86 && ! has x86 $(get_all_abis); then |
342 |
+ mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
343 |
+ touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
344 |
+ export CPATH="${WORKDIR}"/extra-headers |
345 |
+ fi |
346 |
+ |
347 |
+ if use qemu; then |
348 |
+ if use sdl; then |
349 |
+ sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
350 |
+ tools/Makefile || die |
351 |
+ else |
352 |
+ sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
353 |
+ tools/qemu-xen-traditional/xen-setup || die |
354 |
+ sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
355 |
+ tools/Makefile || die |
356 |
+ fi |
357 |
+ else |
358 |
+ # Don't bother with qemu, only needed for fully virtualised guests |
359 |
+ sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die |
360 |
+ fi |
361 |
+ |
362 |
+ # Reset bash completion dir; Bug 472438 |
363 |
+ sed -e "s;^BASH_COMPLETION_DIR :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \ |
364 |
+ -i config/Paths.mk.in || die |
365 |
+ |
366 |
+ # xencommons, Bug #492332, sed lighter weight than patching |
367 |
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
368 |
+ -i tools/hotplug/Linux/init.d/xencommons.in || die |
369 |
+ |
370 |
+ # fix bashishm |
371 |
+ sed -e '/Usage/s/\$//g' \ |
372 |
+ -i tools/hotplug/Linux/init.d/xendriverdomain.in || die |
373 |
+ |
374 |
+ # respect multilib, usr/lib/libcacard.so.0.0.0 |
375 |
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
376 |
+ -i tools/qemu-xen/configure || die |
377 |
+ |
378 |
+ #bug 518136, don't build 32bit exactuable for nomultilib profile |
379 |
+ if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
380 |
+ sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
381 |
+ fi |
382 |
+ |
383 |
+ # uncomment lines in xl.conf |
384 |
+ sed -e 's:^#autoballoon=:autoballoon=:' \ |
385 |
+ -e 's:^#lockfile=:lockfile=:' \ |
386 |
+ -e 's:^#vif.default.script=:vif.default.script=:' \ |
387 |
+ -i tools/examples/xl.conf || die |
388 |
+ |
389 |
+ # disable capstone (Bug #673474) |
390 |
+ sed -e "s:\$\$source/configure:\0 --disable-capstone:" \ |
391 |
+ -i tools/Makefile || die |
392 |
+ |
393 |
+ # disable glusterfs |
394 |
+ sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \ |
395 |
+ -i tools/Makefile || die |
396 |
+ |
397 |
+ # disable jpeg automagic |
398 |
+ sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \ |
399 |
+ -i tools/Makefile || die |
400 |
+ |
401 |
+ # disable png automagic |
402 |
+ sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \ |
403 |
+ -i tools/Makefile || die |
404 |
+ |
405 |
+ # disable docker (Bug #732970) |
406 |
+ sed -e "s:\$\$source/configure:\0 --disable-containers:" \ |
407 |
+ -i tools/Makefile || die |
408 |
+ |
409 |
+ # disable abi-dumper (Bug #791172) |
410 |
+ sed -e 's/$(ABI_DUMPER) /echo /g' \ |
411 |
+ -i tools/libs/libs.mk || die |
412 |
+ |
413 |
+ # Remove -Werror |
414 |
+ find . -type f \( -name Makefile -o -name "*.mk" \) \ |
415 |
+ -exec sed -i \ |
416 |
+ -e 's/-Werror //g' \ |
417 |
+ -e '/^CFLAGS *+= -Werror$/d' \ |
418 |
+ -e 's/, "-Werror"//' \ |
419 |
+ {} + || die |
420 |
+ |
421 |
+ default |
422 |
+} |
423 |
+ |
424 |
+src_configure() { |
425 |
+ local myconf=( |
426 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" |
427 |
+ --libexecdir="${EPREFIX}/usr/libexec" |
428 |
+ --localstatedir="${EPREFIX}/var" |
429 |
+ --disable-golang |
430 |
+ --disable-werror |
431 |
+ --disable-xen |
432 |
+ --enable-tools |
433 |
+ --enable-docs |
434 |
+ $(use_enable api xenapi) |
435 |
+ $(use_enable ipxe) |
436 |
+ $(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') |
437 |
+ $(use_enable ocaml ocamltools) |
438 |
+ $(use_enable ovmf) |
439 |
+ $(use_enable rombios) |
440 |
+ --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') |
441 |
+ ) |
442 |
+ |
443 |
+ use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin ) |
444 |
+ use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 ) |
445 |
+ use amd64 && myconf+=( $(use_enable qemu-traditional) ) |
446 |
+ tc-ld-disable-gold # Bug 669570 |
447 |
+ econf ${myconf[@]} |
448 |
+} |
449 |
+ |
450 |
+src_compile() { |
451 |
+ local myopt |
452 |
+ use debug && myopt="${myopt} debug=y" |
453 |
+ use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y" |
454 |
+ |
455 |
+ if test-flag-CC -fno-strict-overflow; then |
456 |
+ append-flags -fno-strict-overflow |
457 |
+ fi |
458 |
+ |
459 |
+ # bug #845099 |
460 |
+ if use ipxe; then |
461 |
+ local -x NO_WERROR=1 |
462 |
+ fi |
463 |
+ |
464 |
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt} |
465 |
+ |
466 |
+ if use doc; then |
467 |
+ emake -C docs build |
468 |
+ else |
469 |
+ emake -C docs man-pages |
470 |
+ fi |
471 |
+} |
472 |
+ |
473 |
+src_install() { |
474 |
+ # Override auto-detection in the build system, bug #382573 |
475 |
+ export INITD_DIR=/tmp/init.d |
476 |
+ export CONFIG_LEAF_DIR=../tmp/default |
477 |
+ |
478 |
+ # Let the build system compile installed Python modules. |
479 |
+ local PYTHONDONTWRITEBYTECODE |
480 |
+ export PYTHONDONTWRITEBYTECODE |
481 |
+ |
482 |
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
483 |
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools |
484 |
+ |
485 |
+ # Created at runtime |
486 |
+ rm -rv "${ED}/var/run" || die |
487 |
+ |
488 |
+ # Fix the remaining Python shebangs. |
489 |
+ python_fix_shebang "${D}" |
490 |
+ |
491 |
+ # Remove RedHat-specific stuff |
492 |
+ rm -rf "${D}"/tmp || die |
493 |
+ |
494 |
+ if use doc; then |
495 |
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
496 |
+ dodoc -r docs/{pdf,txt} |
497 |
+ else |
498 |
+ emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032 |
499 |
+ fi |
500 |
+ dodoc ${DOCS[@]} |
501 |
+ |
502 |
+ newconfd "${FILESDIR}"/xendomains.confd xendomains |
503 |
+ newconfd "${FILESDIR}"/xenstored.confd xenstored |
504 |
+ newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
505 |
+ newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
506 |
+ newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
507 |
+ newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
508 |
+ newinitd "${FILESDIR}"/xencommons.initd xencommons |
509 |
+ newconfd "${FILESDIR}"/xencommons.confd xencommons |
510 |
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
511 |
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
512 |
+ newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog |
513 |
+ |
514 |
+ if use screen; then |
515 |
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
516 |
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
517 |
+ keepdir /var/log/xen-consoles |
518 |
+ fi |
519 |
+ |
520 |
+ # For -static-libs wrt Bug 384355 |
521 |
+ if ! use static-libs; then |
522 |
+ rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a |
523 |
+ fi |
524 |
+ |
525 |
+ # for xendomains |
526 |
+ keepdir /etc/xen/auto |
527 |
+ |
528 |
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
529 |
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
530 |
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
531 |
+ |
532 |
+ keepdir /var/lib/xen/dump |
533 |
+ keepdir /var/lib/xen/xenpaging |
534 |
+ keepdir /var/lib/xenstored |
535 |
+ keepdir /var/log/xen |
536 |
+ |
537 |
+ if use python; then |
538 |
+ python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py" |
539 |
+ python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so" |
540 |
+ fi |
541 |
+ |
542 |
+ python_optimize |
543 |
+} |
544 |
+ |
545 |
+pkg_postinst() { |
546 |
+ elog "Official Xen Guide and the offical wiki page:" |
547 |
+ elog "https://wiki.gentoo.org/wiki/Xen" |
548 |
+ elog "https://wiki.xen.org/wiki/Main_Page" |
549 |
+ elog "" |
550 |
+ elog "Recommended to utilise the xencommons script to config system at boot" |
551 |
+ elog "Add by use of rc-update on completion of the install" |
552 |
+ |
553 |
+ if ! use hvm; then |
554 |
+ echo |
555 |
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
556 |
+ elog "support enable the hvm use flag." |
557 |
+ elog "An x86 or amd64 system is required to build HVM support." |
558 |
+ fi |
559 |
+ |
560 |
+ if use qemu; then |
561 |
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
562 |
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
563 |
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
564 |
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
565 |
+ fi |
566 |
+} |
567 |
|
568 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
569 |
index 0c9876da5844..71105a41171c 100644 |
570 |
--- a/app-emulation/xen/Manifest |
571 |
+++ b/app-emulation/xen/Manifest |
572 |
@@ -1,5 +1,6 @@ |
573 |
DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2 |
574 |
DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54 |
575 |
+DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3 |
576 |
DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d |
577 |
DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87 |
578 |
DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a |