Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/, app-emulation/xen/files/
Date: Sat, 18 Sep 2021 09:50:18
Message-Id: 1631958598.4f2c2f779b6943e83e77b248b567c1e1d840c137.juippis@gentoo
1 commit: 4f2c2f779b6943e83e77b248b567c1e1d840c137
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Sat Sep 11 11:01:18 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 18 09:49:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f2c2f77
7
8 app-emulation/xen: bump to 4.14.3/4.15.1
9
10 Bug: https://bugs.gentoo.org/812485
11 Bug: https://bugs.gentoo.org/810341
12 Closes: https://bugs.gentoo.org/800935
13 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
14 Closes: https://github.com/gentoo/gentoo/pull/22270
15 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
16
17 app-emulation/xen/Manifest | 2 +
18 app-emulation/xen/files/xen-4.15-flask.patch | 13 +++
19 app-emulation/xen/xen-4.14.3.ebuild | 167 +++++++++++++++++++++++++++
20 app-emulation/xen/xen-4.15.1.ebuild | 167 +++++++++++++++++++++++++++
21 4 files changed, 349 insertions(+)
22
23 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
24 index 679f5a2e056..5c2893094f3 100644
25 --- a/app-emulation/xen/Manifest
26 +++ b/app-emulation/xen/Manifest
27 @@ -1,4 +1,6 @@
28 DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
29 DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
30 +DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16
31 DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5
32 DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
33 +DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
34
35 diff --git a/app-emulation/xen/files/xen-4.15-flask.patch b/app-emulation/xen/files/xen-4.15-flask.patch
36 new file mode 100644
37 index 00000000000..7dcf91b30fc
38 --- /dev/null
39 +++ b/app-emulation/xen/files/xen-4.15-flask.patch
40 @@ -0,0 +1,13 @@
41 +diff --git a/xen/common/Kconfig b/xen/common/Kconfig
42 +index eb953d1..78f058c 100644
43 +--- a/xen/common/Kconfig
44 ++++ b/xen/common/Kconfig
45 +@@ -198,7 +198,7 @@ config XENOPROF
46 +
47 + config XSM
48 + bool "Xen Security Modules support"
49 +- default ARM
50 ++ default y
51 + ---help---
52 + Enables the security framework known as Xen Security Modules which
53 + allows administrators fine-grained control over a Xen domain and
54
55 diff --git a/app-emulation/xen/xen-4.14.3.ebuild b/app-emulation/xen/xen-4.14.3.ebuild
56 new file mode 100644
57 index 00000000000..5d3d91cd5e7
58 --- /dev/null
59 +++ b/app-emulation/xen/xen-4.14.3.ebuild
60 @@ -0,0 +1,167 @@
61 +# Copyright 1999-2021 Gentoo Authors
62 +# Distributed under the terms of the GNU General Public License v2
63 +
64 +EAPI=7
65 +
66 +PYTHON_COMPAT=( python3_{8..9} )
67 +
68 +inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
69 +
70 +MY_PV=${PV/_/-}
71 +MY_P=${PN}-${MY_PV}
72 +
73 +if [[ ${PV} == *9999 ]]; then
74 + inherit git-r3
75 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
76 + SRC_URI=""
77 +else
78 + KEYWORDS="~amd64 ~arm -x86"
79 + UPSTREAM_VER=
80 + SECURITY_VER=
81 + GENTOO_VER=
82 +
83 + [[ -n ${UPSTREAM_VER} ]] && \
84 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
85 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
86 + [[ -n ${SECURITY_VER} ]] && \
87 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
88 + [[ -n ${GENTOO_VER} ]] && \
89 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
90 + SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
91 + ${UPSTREAM_PATCHSET_URI}
92 + ${SECURITY_PATCHSET_URI}
93 + ${GENTOO_PATCHSET_URI}"
94 +fi
95 +
96 +DESCRIPTION="The Xen virtual machine monitor"
97 +HOMEPAGE="https://www.xenproject.org"
98 +LICENSE="GPL-2"
99 +SLOT="0"
100 +IUSE="debug efi flask"
101 +
102 +DEPEND="${PYTHON_DEPS}
103 + efi? ( >=sys-devel/binutils-2.22[multitarget] )
104 + !efi? ( >=sys-devel/binutils-2.22 )
105 + flask? ( sys-apps/checkpolicy )"
106 +RDEPEND=""
107 +PDEPEND="~app-emulation/xen-tools-${PV}"
108 +
109 +# no tests are available for the hypervisor
110 +# prevent the silliness of /usr/lib/debug/usr/lib/debug files
111 +# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
112 +RESTRICT="test splitdebug strip"
113 +
114 +# Approved by QA team in bug #144032
115 +QA_WX_LOAD="boot/xen-syms-${PV}"
116 +
117 +REQUIRED_USE="arm? ( debug )"
118 +
119 +S="${WORKDIR}/${MY_P}"
120 +
121 +pkg_setup() {
122 + python-any-r1_pkg_setup
123 + if [[ -z ${XEN_TARGET_ARCH} ]]; then
124 + if use amd64; then
125 + export XEN_TARGET_ARCH="x86_64"
126 + elif use arm; then
127 + export XEN_TARGET_ARCH="arm32"
128 + elif use arm64; then
129 + export XEN_TARGET_ARCH="arm64"
130 + else
131 + die "Unsupported architecture!"
132 + fi
133 + fi
134 +}
135 +
136 +src_prepare() {
137 + # Upstream's patchset
138 + [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
139 +
140 + # Security patchset
141 + if [[ -n ${SECURITY_VER} ]]; then
142 + einfo "Try to apply Xen Security patch set"
143 + # apply main xen patches
144 + # Two parallel systems, both work side by side
145 + # Over time they may concdense into one. This will suffice for now
146 + source "${WORKDIR}"/patches-security/${PV}.conf
147 +
148 + local i
149 + for i in ${XEN_SECURITY_MAIN}; do
150 + eapply "${WORKDIR}"/patches-security/xen/$i
151 + done
152 + fi
153 +
154 + # Gentoo's patchset
155 + [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
156 +
157 + # Symlinks do not work on fat32 volumes
158 + eapply "${FILESDIR}"/${PN}-4.14-efi.patch
159 +
160 + # Enable XSM-FLASK
161 + use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch
162 +
163 + # Workaround new gcc-11 options
164 + sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
165 +
166 + # Drop .config
167 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
168 +
169 + if use efi; then
170 + export EFI_VENDOR="gentoo"
171 + export EFI_MOUNTPOINT="/boot"
172 + fi
173 +
174 + default
175 +}
176 +
177 +src_configure() {
178 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
179 + use debug && myopt="${myopt} debug=y"
180 +
181 + # remove flags
182 + unset CFLAGS
183 + unset LDFLAGS
184 + unset ASFLAGS
185 +
186 + tc-ld-disable-gold # Bug 700374
187 +}
188 +
189 +src_compile() {
190 + # Send raw LDFLAGS so that --as-needed works
191 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
192 +}
193 +
194 +src_install() {
195 + local myopt
196 + use debug && myopt="${myopt} debug=y"
197 +
198 + # The 'make install' doesn't 'mkdir -p' the subdirs
199 + if use efi; then
200 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
201 + fi
202 +
203 + emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
204 +
205 + # make install likes to throw in some extra EFI bits if it built
206 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
207 +}
208 +
209 +pkg_postinst() {
210 + elog "Official Xen Guide:"
211 + elog " https://wiki.gentoo.org/wiki/Xen"
212 +
213 + use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
214 +
215 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
216 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
217 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
218 +
219 + ewarn
220 + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
221 + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
222 + ewarn "to work fine."
223 + ewarn
224 + ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
225 + ewarn
226 + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
227 +}
228
229 diff --git a/app-emulation/xen/xen-4.15.1.ebuild b/app-emulation/xen/xen-4.15.1.ebuild
230 new file mode 100644
231 index 00000000000..ddd07977693
232 --- /dev/null
233 +++ b/app-emulation/xen/xen-4.15.1.ebuild
234 @@ -0,0 +1,167 @@
235 +# Copyright 1999-2021 Gentoo Authors
236 +# Distributed under the terms of the GNU General Public License v2
237 +
238 +EAPI=7
239 +
240 +PYTHON_COMPAT=( python3_{8..9} )
241 +
242 +inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
243 +
244 +MY_PV=${PV/_/-}
245 +MY_P=${PN}-${MY_PV}
246 +
247 +if [[ ${PV} == *9999 ]]; then
248 + inherit git-r3
249 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
250 + SRC_URI=""
251 +else
252 + KEYWORDS="~amd64 ~arm -x86"
253 + UPSTREAM_VER=
254 + SECURITY_VER=
255 + GENTOO_VER=
256 +
257 + [[ -n ${UPSTREAM_VER} ]] && \
258 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
259 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
260 + [[ -n ${SECURITY_VER} ]] && \
261 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
262 + [[ -n ${GENTOO_VER} ]] && \
263 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
264 + SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
265 + ${UPSTREAM_PATCHSET_URI}
266 + ${SECURITY_PATCHSET_URI}
267 + ${GENTOO_PATCHSET_URI}"
268 +fi
269 +
270 +DESCRIPTION="The Xen virtual machine monitor"
271 +HOMEPAGE="https://www.xenproject.org"
272 +LICENSE="GPL-2"
273 +SLOT="0"
274 +IUSE="debug efi flask"
275 +
276 +DEPEND="${PYTHON_DEPS}
277 + efi? ( >=sys-devel/binutils-2.22[multitarget] )
278 + !efi? ( >=sys-devel/binutils-2.22 )
279 + flask? ( sys-apps/checkpolicy )"
280 +RDEPEND=""
281 +PDEPEND="~app-emulation/xen-tools-${PV}"
282 +
283 +# no tests are available for the hypervisor
284 +# prevent the silliness of /usr/lib/debug/usr/lib/debug files
285 +# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
286 +RESTRICT="test splitdebug strip"
287 +
288 +# Approved by QA team in bug #144032
289 +QA_WX_LOAD="boot/xen-syms-${PV}"
290 +
291 +REQUIRED_USE="arm? ( debug )"
292 +
293 +S="${WORKDIR}/${MY_P}"
294 +
295 +pkg_setup() {
296 + python-any-r1_pkg_setup
297 + if [[ -z ${XEN_TARGET_ARCH} ]]; then
298 + if use amd64; then
299 + export XEN_TARGET_ARCH="x86_64"
300 + elif use arm; then
301 + export XEN_TARGET_ARCH="arm32"
302 + elif use arm64; then
303 + export XEN_TARGET_ARCH="arm64"
304 + else
305 + die "Unsupported architecture!"
306 + fi
307 + fi
308 +}
309 +
310 +src_prepare() {
311 + # Upstream's patchset
312 + [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
313 +
314 + # Security patchset
315 + if [[ -n ${SECURITY_VER} ]]; then
316 + einfo "Try to apply Xen Security patch set"
317 + # apply main xen patches
318 + # Two parallel systems, both work side by side
319 + # Over time they may concdense into one. This will suffice for now
320 + source "${WORKDIR}"/patches-security/${PV}.conf
321 +
322 + local i
323 + for i in ${XEN_SECURITY_MAIN}; do
324 + eapply "${WORKDIR}"/patches-security/xen/$i
325 + done
326 + fi
327 +
328 + # Gentoo's patchset
329 + [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
330 +
331 + # Symlinks do not work on fat32 volumes
332 + eapply "${FILESDIR}"/${PN}-4.15-efi.patch
333 +
334 + # Enable XSM-FLASK
335 + use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch
336 +
337 + # Workaround new gcc-11 options
338 + sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
339 +
340 + # Drop .config
341 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
342 +
343 + if use efi; then
344 + export EFI_VENDOR="gentoo"
345 + export EFI_MOUNTPOINT="/boot"
346 + fi
347 +
348 + default
349 +}
350 +
351 +src_configure() {
352 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
353 + use debug && myopt="${myopt} debug=y"
354 +
355 + # remove flags
356 + unset CFLAGS
357 + unset LDFLAGS
358 + unset ASFLAGS
359 +
360 + tc-ld-disable-gold # Bug 700374
361 +}
362 +
363 +src_compile() {
364 + # Send raw LDFLAGS so that --as-needed works
365 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
366 +}
367 +
368 +src_install() {
369 + local myopt
370 + use debug && myopt="${myopt} debug=y"
371 +
372 + # The 'make install' doesn't 'mkdir -p' the subdirs
373 + if use efi; then
374 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
375 + fi
376 +
377 + emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
378 +
379 + # make install likes to throw in some extra EFI bits if it built
380 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
381 +}
382 +
383 +pkg_postinst() {
384 + elog "Official Xen Guide:"
385 + elog " https://wiki.gentoo.org/wiki/Xen"
386 +
387 + use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
388 +
389 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
390 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
391 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
392 +
393 + ewarn
394 + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
395 + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
396 + ewarn "to work fine."
397 + ewarn
398 + ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
399 + ewarn
400 + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
401 +}