1 |
commit: 49c23a067c993113e0a0e5d513b3a706cc7b34e7 |
2 |
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Oct 12 06:48:41 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 20 09:59:26 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49c23a06 |
7 |
|
8 |
app-emulation/xen: drop vulnerable |
9 |
|
10 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
app-emulation/xen/Manifest | 4 - |
14 |
app-emulation/xen/xen-4.14.2-r1.ebuild | 169 --------------------------------- |
15 |
app-emulation/xen/xen-4.15.0-r1.ebuild | 169 --------------------------------- |
16 |
app-emulation/xen/xen-4.15.1.ebuild | 167 -------------------------------- |
17 |
4 files changed, 509 deletions(-) |
18 |
|
19 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
20 |
index aeaa096063b..715314e8899 100644 |
21 |
--- a/app-emulation/xen/Manifest |
22 |
+++ b/app-emulation/xen/Manifest |
23 |
@@ -1,8 +1,4 @@ |
24 |
-DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78 |
25 |
-DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39 |
26 |
DIST xen-4.14.3-upstream-patches-0.tar.xz 3532 BLAKE2B b3e1530a9e14bb1481296f3a878cceb81f1979b1cfb9105d4d1b03681a3449c40cabd1807109acfb3742fd8085c28094c29889d22dab5a99c9bf22443d1e848e SHA512 d6b39830bff83da745279041d144d56c3b153beae09e96fa878397f388575d106509816d710e94fa79dd60a874087921eba98e1316877f6ef4591a12f05846ee |
27 |
DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16 |
28 |
-DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5 |
29 |
-DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7 |
30 |
DIST xen-4.15.1-upstream-patches-0.tar.xz 3532 BLAKE2B 797f6c4ce44b43c9b43ee27718dc6d0b234588df2148961f8b078b3362b23bec6c2326eb0584255b0f3128c2f8b673ac6b9590596119c5fec82e7b03a1305b2c SHA512 c7d1a21042a3003eb9d968b3eb00aabbbc5c145b8b05fdd9e520cde34d1643d7f4f8f7039f30843a65439b1d40584c751e31ead620b88332d50b10f14fe81c0d |
31 |
DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9 |
32 |
|
33 |
diff --git a/app-emulation/xen/xen-4.14.2-r1.ebuild b/app-emulation/xen/xen-4.14.2-r1.ebuild |
34 |
deleted file mode 100644 |
35 |
index 180a6f76adb..00000000000 |
36 |
--- a/app-emulation/xen/xen-4.14.2-r1.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,169 +0,0 @@ |
39 |
-# Copyright 1999-2021 Gentoo Authors |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI=7 |
43 |
- |
44 |
-PYTHON_COMPAT=( python3_{7..9} ) |
45 |
- |
46 |
-inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs |
47 |
- |
48 |
-MY_PV=${PV/_/-} |
49 |
-MY_P=${PN}-${MY_PV} |
50 |
- |
51 |
-if [[ ${PV} == *9999 ]]; then |
52 |
- inherit git-r3 |
53 |
- EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
54 |
- SRC_URI="" |
55 |
-else |
56 |
- KEYWORDS="amd64 ~arm -x86" |
57 |
- UPSTREAM_VER=0 |
58 |
- SECURITY_VER= |
59 |
- GENTOO_VER= |
60 |
- |
61 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
62 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz |
63 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
64 |
- [[ -n ${SECURITY_VER} ]] && \ |
65 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
66 |
- [[ -n ${GENTOO_VER} ]] && \ |
67 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
68 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz |
69 |
- ${UPSTREAM_PATCHSET_URI} |
70 |
- ${SECURITY_PATCHSET_URI} |
71 |
- ${GENTOO_PATCHSET_URI}" |
72 |
-fi |
73 |
- |
74 |
-DESCRIPTION="The Xen virtual machine monitor" |
75 |
-HOMEPAGE="https://www.xenproject.org" |
76 |
-LICENSE="GPL-2" |
77 |
-SLOT="0" |
78 |
-IUSE="debug efi flask" |
79 |
- |
80 |
-DEPEND="${PYTHON_DEPS} |
81 |
- efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
82 |
- !efi? ( >=sys-devel/binutils-2.22 )" |
83 |
-RDEPEND="" |
84 |
-PDEPEND="~app-emulation/xen-tools-${PV}" |
85 |
- |
86 |
-# no tests are available for the hypervisor |
87 |
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
88 |
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
89 |
-RESTRICT="test splitdebug strip" |
90 |
- |
91 |
-# Approved by QA team in bug #144032 |
92 |
-QA_WX_LOAD="boot/xen-syms-${PV}" |
93 |
- |
94 |
-REQUIRED_USE="arm? ( debug )" |
95 |
- |
96 |
-S="${WORKDIR}/${MY_P}" |
97 |
- |
98 |
-pkg_setup() { |
99 |
- python-any-r1_pkg_setup |
100 |
- if [[ -z ${XEN_TARGET_ARCH} ]]; then |
101 |
- if use amd64; then |
102 |
- export XEN_TARGET_ARCH="x86_64" |
103 |
- elif use arm; then |
104 |
- export XEN_TARGET_ARCH="arm32" |
105 |
- elif use arm64; then |
106 |
- export XEN_TARGET_ARCH="arm64" |
107 |
- else |
108 |
- die "Unsupported architecture!" |
109 |
- fi |
110 |
- fi |
111 |
- |
112 |
- if use flask ; then |
113 |
- export "XSM_ENABLE=y" |
114 |
- export "FLASK_ENABLE=y" |
115 |
- fi |
116 |
-} |
117 |
- |
118 |
-src_prepare() { |
119 |
- # Upstream's patchset |
120 |
- [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream |
121 |
- |
122 |
- # Security patchset |
123 |
- if [[ -n ${SECURITY_VER} ]]; then |
124 |
- einfo "Try to apply Xen Security patch set" |
125 |
- # apply main xen patches |
126 |
- # Two parallel systems, both work side by side |
127 |
- # Over time they may concdense into one. This will suffice for now |
128 |
- source "${WORKDIR}"/patches-security/${PV}.conf |
129 |
- |
130 |
- local i |
131 |
- for i in ${XEN_SECURITY_MAIN}; do |
132 |
- eapply "${WORKDIR}"/patches-security/xen/$i |
133 |
- done |
134 |
- fi |
135 |
- |
136 |
- # Gentoo's patchset |
137 |
- [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo |
138 |
- |
139 |
- # Symlinks do not work on fat32 volumes |
140 |
- eapply "${FILESDIR}"/${PN}-4.14-efi.patch |
141 |
- |
142 |
- # Workaround new gcc-11 options |
143 |
- sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die |
144 |
- |
145 |
- # Drop .config |
146 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
147 |
- |
148 |
- if use efi; then |
149 |
- export EFI_VENDOR="gentoo" |
150 |
- export EFI_MOUNTPOINT="/boot" |
151 |
- fi |
152 |
- |
153 |
- default |
154 |
-} |
155 |
- |
156 |
-src_configure() { |
157 |
- use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
158 |
- |
159 |
- use debug && myopt="${myopt} debug=y" |
160 |
- |
161 |
- # remove flags |
162 |
- unset CFLAGS |
163 |
- unset LDFLAGS |
164 |
- unset ASFLAGS |
165 |
- |
166 |
- tc-ld-disable-gold # Bug 700374 |
167 |
-} |
168 |
- |
169 |
-src_compile() { |
170 |
- # Send raw LDFLAGS so that --as-needed works |
171 |
- emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
172 |
-} |
173 |
- |
174 |
-src_install() { |
175 |
- local myopt |
176 |
- use debug && myopt="${myopt} debug=y" |
177 |
- |
178 |
- # The 'make install' doesn't 'mkdir -p' the subdirs |
179 |
- if use efi; then |
180 |
- mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
181 |
- fi |
182 |
- |
183 |
- emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install |
184 |
- |
185 |
- # make install likes to throw in some extra EFI bits if it built |
186 |
- use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
187 |
-} |
188 |
- |
189 |
-pkg_postinst() { |
190 |
- elog "Official Xen Guide:" |
191 |
- elog " https://wiki.gentoo.org/wiki/Xen" |
192 |
- |
193 |
- use efi && einfo "The efi executable is installed in /boot/efi/gentoo" |
194 |
- |
195 |
- elog "You can optionally block the installation of /boot/xen-syms by an entry" |
196 |
- elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
197 |
- elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
198 |
- |
199 |
- ewarn |
200 |
- ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" |
201 |
- ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" |
202 |
- ewarn "to work fine." |
203 |
- ewarn |
204 |
- ewarn "Add sched=credit to xen command line options to use the legacy scheduler." |
205 |
- ewarn |
206 |
- ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" |
207 |
-} |
208 |
|
209 |
diff --git a/app-emulation/xen/xen-4.15.0-r1.ebuild b/app-emulation/xen/xen-4.15.0-r1.ebuild |
210 |
deleted file mode 100644 |
211 |
index 7b6e9f60c2a..00000000000 |
212 |
--- a/app-emulation/xen/xen-4.15.0-r1.ebuild |
213 |
+++ /dev/null |
214 |
@@ -1,169 +0,0 @@ |
215 |
-# Copyright 1999-2021 Gentoo Authors |
216 |
-# Distributed under the terms of the GNU General Public License v2 |
217 |
- |
218 |
-EAPI=7 |
219 |
- |
220 |
-PYTHON_COMPAT=( python3_{7..9} ) |
221 |
- |
222 |
-inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs |
223 |
- |
224 |
-MY_PV=${PV/_/-} |
225 |
-MY_P=${PN}-${MY_PV} |
226 |
- |
227 |
-if [[ ${PV} == *9999 ]]; then |
228 |
- inherit git-r3 |
229 |
- EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
230 |
- SRC_URI="" |
231 |
-else |
232 |
- KEYWORDS="~amd64 ~arm -x86" |
233 |
- UPSTREAM_VER=1 |
234 |
- SECURITY_VER= |
235 |
- GENTOO_VER= |
236 |
- |
237 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
238 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz |
239 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
240 |
- [[ -n ${SECURITY_VER} ]] && \ |
241 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
242 |
- [[ -n ${GENTOO_VER} ]] && \ |
243 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
244 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz |
245 |
- ${UPSTREAM_PATCHSET_URI} |
246 |
- ${SECURITY_PATCHSET_URI} |
247 |
- ${GENTOO_PATCHSET_URI}" |
248 |
-fi |
249 |
- |
250 |
-DESCRIPTION="The Xen virtual machine monitor" |
251 |
-HOMEPAGE="https://www.xenproject.org" |
252 |
-LICENSE="GPL-2" |
253 |
-SLOT="0" |
254 |
-IUSE="debug efi flask" |
255 |
- |
256 |
-DEPEND="${PYTHON_DEPS} |
257 |
- efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
258 |
- !efi? ( >=sys-devel/binutils-2.22 )" |
259 |
-RDEPEND="" |
260 |
-PDEPEND="~app-emulation/xen-tools-${PV}" |
261 |
- |
262 |
-# no tests are available for the hypervisor |
263 |
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
264 |
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
265 |
-RESTRICT="test splitdebug strip" |
266 |
- |
267 |
-# Approved by QA team in bug #144032 |
268 |
-QA_WX_LOAD="boot/xen-syms-${PV}" |
269 |
- |
270 |
-REQUIRED_USE="arm? ( debug )" |
271 |
- |
272 |
-S="${WORKDIR}/${MY_P}" |
273 |
- |
274 |
-pkg_setup() { |
275 |
- python-any-r1_pkg_setup |
276 |
- if [[ -z ${XEN_TARGET_ARCH} ]]; then |
277 |
- if use amd64; then |
278 |
- export XEN_TARGET_ARCH="x86_64" |
279 |
- elif use arm; then |
280 |
- export XEN_TARGET_ARCH="arm32" |
281 |
- elif use arm64; then |
282 |
- export XEN_TARGET_ARCH="arm64" |
283 |
- else |
284 |
- die "Unsupported architecture!" |
285 |
- fi |
286 |
- fi |
287 |
- |
288 |
- if use flask ; then |
289 |
- export "XSM_ENABLE=y" |
290 |
- export "FLASK_ENABLE=y" |
291 |
- fi |
292 |
-} |
293 |
- |
294 |
-src_prepare() { |
295 |
- # Upstream's patchset |
296 |
- [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream |
297 |
- |
298 |
- # Security patchset |
299 |
- if [[ -n ${SECURITY_VER} ]]; then |
300 |
- einfo "Try to apply Xen Security patch set" |
301 |
- # apply main xen patches |
302 |
- # Two parallel systems, both work side by side |
303 |
- # Over time they may concdense into one. This will suffice for now |
304 |
- source "${WORKDIR}"/patches-security/${PV}.conf |
305 |
- |
306 |
- local i |
307 |
- for i in ${XEN_SECURITY_MAIN}; do |
308 |
- eapply "${WORKDIR}"/patches-security/xen/$i |
309 |
- done |
310 |
- fi |
311 |
- |
312 |
- # Gentoo's patchset |
313 |
- [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo |
314 |
- |
315 |
- # Symlinks do not work on fat32 volumes |
316 |
- eapply "${FILESDIR}"/${PN}-4.15-efi.patch |
317 |
- |
318 |
- # Workaround new gcc-11 options |
319 |
- sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die |
320 |
- |
321 |
- # Drop .config |
322 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
323 |
- |
324 |
- if use efi; then |
325 |
- export EFI_VENDOR="gentoo" |
326 |
- export EFI_MOUNTPOINT="/boot" |
327 |
- fi |
328 |
- |
329 |
- default |
330 |
-} |
331 |
- |
332 |
-src_configure() { |
333 |
- use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
334 |
- |
335 |
- use debug && myopt="${myopt} debug=y" |
336 |
- |
337 |
- # remove flags |
338 |
- unset CFLAGS |
339 |
- unset LDFLAGS |
340 |
- unset ASFLAGS |
341 |
- |
342 |
- tc-ld-disable-gold # Bug 700374 |
343 |
-} |
344 |
- |
345 |
-src_compile() { |
346 |
- # Send raw LDFLAGS so that --as-needed works |
347 |
- emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
348 |
-} |
349 |
- |
350 |
-src_install() { |
351 |
- local myopt |
352 |
- use debug && myopt="${myopt} debug=y" |
353 |
- |
354 |
- # The 'make install' doesn't 'mkdir -p' the subdirs |
355 |
- if use efi; then |
356 |
- mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
357 |
- fi |
358 |
- |
359 |
- emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install |
360 |
- |
361 |
- # make install likes to throw in some extra EFI bits if it built |
362 |
- use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
363 |
-} |
364 |
- |
365 |
-pkg_postinst() { |
366 |
- elog "Official Xen Guide:" |
367 |
- elog " https://wiki.gentoo.org/wiki/Xen" |
368 |
- |
369 |
- use efi && einfo "The efi executable is installed in /boot/efi/gentoo" |
370 |
- |
371 |
- elog "You can optionally block the installation of /boot/xen-syms by an entry" |
372 |
- elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
373 |
- elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
374 |
- |
375 |
- ewarn |
376 |
- ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" |
377 |
- ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" |
378 |
- ewarn "to work fine." |
379 |
- ewarn |
380 |
- ewarn "Add sched=credit to xen command line options to use the legacy scheduler." |
381 |
- ewarn |
382 |
- ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" |
383 |
-} |
384 |
|
385 |
diff --git a/app-emulation/xen/xen-4.15.1.ebuild b/app-emulation/xen/xen-4.15.1.ebuild |
386 |
deleted file mode 100644 |
387 |
index ddd07977693..00000000000 |
388 |
--- a/app-emulation/xen/xen-4.15.1.ebuild |
389 |
+++ /dev/null |
390 |
@@ -1,167 +0,0 @@ |
391 |
-# Copyright 1999-2021 Gentoo Authors |
392 |
-# Distributed under the terms of the GNU General Public License v2 |
393 |
- |
394 |
-EAPI=7 |
395 |
- |
396 |
-PYTHON_COMPAT=( python3_{8..9} ) |
397 |
- |
398 |
-inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs |
399 |
- |
400 |
-MY_PV=${PV/_/-} |
401 |
-MY_P=${PN}-${MY_PV} |
402 |
- |
403 |
-if [[ ${PV} == *9999 ]]; then |
404 |
- inherit git-r3 |
405 |
- EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
406 |
- SRC_URI="" |
407 |
-else |
408 |
- KEYWORDS="~amd64 ~arm -x86" |
409 |
- UPSTREAM_VER= |
410 |
- SECURITY_VER= |
411 |
- GENTOO_VER= |
412 |
- |
413 |
- [[ -n ${UPSTREAM_VER} ]] && \ |
414 |
- UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz |
415 |
- https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
416 |
- [[ -n ${SECURITY_VER} ]] && \ |
417 |
- SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
418 |
- [[ -n ${GENTOO_VER} ]] && \ |
419 |
- GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
420 |
- SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz |
421 |
- ${UPSTREAM_PATCHSET_URI} |
422 |
- ${SECURITY_PATCHSET_URI} |
423 |
- ${GENTOO_PATCHSET_URI}" |
424 |
-fi |
425 |
- |
426 |
-DESCRIPTION="The Xen virtual machine monitor" |
427 |
-HOMEPAGE="https://www.xenproject.org" |
428 |
-LICENSE="GPL-2" |
429 |
-SLOT="0" |
430 |
-IUSE="debug efi flask" |
431 |
- |
432 |
-DEPEND="${PYTHON_DEPS} |
433 |
- efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
434 |
- !efi? ( >=sys-devel/binutils-2.22 ) |
435 |
- flask? ( sys-apps/checkpolicy )" |
436 |
-RDEPEND="" |
437 |
-PDEPEND="~app-emulation/xen-tools-${PV}" |
438 |
- |
439 |
-# no tests are available for the hypervisor |
440 |
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
441 |
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
442 |
-RESTRICT="test splitdebug strip" |
443 |
- |
444 |
-# Approved by QA team in bug #144032 |
445 |
-QA_WX_LOAD="boot/xen-syms-${PV}" |
446 |
- |
447 |
-REQUIRED_USE="arm? ( debug )" |
448 |
- |
449 |
-S="${WORKDIR}/${MY_P}" |
450 |
- |
451 |
-pkg_setup() { |
452 |
- python-any-r1_pkg_setup |
453 |
- if [[ -z ${XEN_TARGET_ARCH} ]]; then |
454 |
- if use amd64; then |
455 |
- export XEN_TARGET_ARCH="x86_64" |
456 |
- elif use arm; then |
457 |
- export XEN_TARGET_ARCH="arm32" |
458 |
- elif use arm64; then |
459 |
- export XEN_TARGET_ARCH="arm64" |
460 |
- else |
461 |
- die "Unsupported architecture!" |
462 |
- fi |
463 |
- fi |
464 |
-} |
465 |
- |
466 |
-src_prepare() { |
467 |
- # Upstream's patchset |
468 |
- [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream |
469 |
- |
470 |
- # Security patchset |
471 |
- if [[ -n ${SECURITY_VER} ]]; then |
472 |
- einfo "Try to apply Xen Security patch set" |
473 |
- # apply main xen patches |
474 |
- # Two parallel systems, both work side by side |
475 |
- # Over time they may concdense into one. This will suffice for now |
476 |
- source "${WORKDIR}"/patches-security/${PV}.conf |
477 |
- |
478 |
- local i |
479 |
- for i in ${XEN_SECURITY_MAIN}; do |
480 |
- eapply "${WORKDIR}"/patches-security/xen/$i |
481 |
- done |
482 |
- fi |
483 |
- |
484 |
- # Gentoo's patchset |
485 |
- [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo |
486 |
- |
487 |
- # Symlinks do not work on fat32 volumes |
488 |
- eapply "${FILESDIR}"/${PN}-4.15-efi.patch |
489 |
- |
490 |
- # Enable XSM-FLASK |
491 |
- use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch |
492 |
- |
493 |
- # Workaround new gcc-11 options |
494 |
- sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die |
495 |
- |
496 |
- # Drop .config |
497 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
498 |
- |
499 |
- if use efi; then |
500 |
- export EFI_VENDOR="gentoo" |
501 |
- export EFI_MOUNTPOINT="/boot" |
502 |
- fi |
503 |
- |
504 |
- default |
505 |
-} |
506 |
- |
507 |
-src_configure() { |
508 |
- use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
509 |
- use debug && myopt="${myopt} debug=y" |
510 |
- |
511 |
- # remove flags |
512 |
- unset CFLAGS |
513 |
- unset LDFLAGS |
514 |
- unset ASFLAGS |
515 |
- |
516 |
- tc-ld-disable-gold # Bug 700374 |
517 |
-} |
518 |
- |
519 |
-src_compile() { |
520 |
- # Send raw LDFLAGS so that --as-needed works |
521 |
- emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
522 |
-} |
523 |
- |
524 |
-src_install() { |
525 |
- local myopt |
526 |
- use debug && myopt="${myopt} debug=y" |
527 |
- |
528 |
- # The 'make install' doesn't 'mkdir -p' the subdirs |
529 |
- if use efi; then |
530 |
- mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
531 |
- fi |
532 |
- |
533 |
- emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install |
534 |
- |
535 |
- # make install likes to throw in some extra EFI bits if it built |
536 |
- use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
537 |
-} |
538 |
- |
539 |
-pkg_postinst() { |
540 |
- elog "Official Xen Guide:" |
541 |
- elog " https://wiki.gentoo.org/wiki/Xen" |
542 |
- |
543 |
- use efi && einfo "The efi executable is installed in /boot/efi/gentoo" |
544 |
- |
545 |
- elog "You can optionally block the installation of /boot/xen-syms by an entry" |
546 |
- elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
547 |
- elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
548 |
- |
549 |
- ewarn |
550 |
- ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" |
551 |
- ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" |
552 |
- ewarn "to work fine." |
553 |
- ewarn |
554 |
- ewarn "Add sched=credit to xen command line options to use the legacy scheduler." |
555 |
- ewarn |
556 |
- ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" |
557 |
-} |