Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/
Date: Mon, 01 Feb 2021 19:24:07
Message-Id: 1612207439.551f42e1c06ce2d5238dde6cff139131b3e07688.whissi@gentoo
1 commit: 551f42e1c06ce2d5238dde6cff139131b3e07688
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Jan 19 16:58:52 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 1 19:23:59 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=551f42e1
7
8 app-emulation/xen: bump to 4.14.1
9
10 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-emulation/xen/Manifest | 1 +
14 app-emulation/xen/xen-4.14.1.ebuild | 165 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 166 insertions(+)
16
17 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
18 index 03ed8781964..0706230d176 100644
19 --- a/app-emulation/xen/Manifest
20 +++ b/app-emulation/xen/Manifest
21 @@ -3,3 +3,4 @@ DIST xen-4.13.2-upstream-patches-2.tar.xz 58992 BLAKE2B 535d67ae6a30e23feb975172
22 DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
23 DIST xen-4.14.0-upstream-patches-6.tar.xz 119116 BLAKE2B e3a0f807182d32754c6ae2000324237117cfa66c4a43c27b583b6aef69a3889949779751b71a87b2538f679fb481e8a723433950c689f28a8c2e96278c1b0ddb SHA512 03b1fdc08e74756001fbb0de4e21297456f63615e6f63b8f360f8270ef85b0d50c3872be41cc26529ed0d91d82ffda2af53882b7c5233113f223a4ec813a0d5b
24 DIST xen-4.14.0.tar.gz 39950576 BLAKE2B db4c3e79cfdfb10260d0d14d9d28e8c8bd9bf23f42aee743acf8f560bf4cdb96a425c0df887c70f9755f62680be24bfbe0149e52a4cb843ae83090cd9d6afc71 SHA512 ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0
25 +DIST xen-4.14.1.tar.gz 39970115 BLAKE2B 21e5838b2b4d78420dcaaae2b8fc98ac876230217e6a3764aa643920150b8cef96025663e6a2fc423ab15f7f470b62547e91ce1be0337fc78f00c148c7ff40ab SHA512 c75cbec82793435f5a7026626ffdb2e9a2166b42d2be4b2f1194240e0312458124f0ebd53eeb02ce7330c22afe402a28a96b32f8af66e41e9416fe94535724c9
26
27 diff --git a/app-emulation/xen/xen-4.14.1.ebuild b/app-emulation/xen/xen-4.14.1.ebuild
28 new file mode 100644
29 index 00000000000..eab5d1a6975
30 --- /dev/null
31 +++ b/app-emulation/xen/xen-4.14.1.ebuild
32 @@ -0,0 +1,165 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{6..9} )
39 +
40 +inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
41 +
42 +MY_PV=${PV/_/-}
43 +MY_P=${PN}-${MY_PV}
44 +
45 +if [[ $PV == *9999 ]]; then
46 + inherit git-r3
47 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
48 + SRC_URI=""
49 +else
50 + KEYWORDS="~amd64 ~arm -x86"
51 + UPSTREAM_VER=
52 + SECURITY_VER=
53 + GENTOO_VER=
54 +
55 + [[ -n ${UPSTREAM_VER} ]] && \
56 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
57 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
58 + [[ -n ${SECURITY_VER} ]] && \
59 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
60 + [[ -n ${GENTOO_VER} ]] && \
61 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
62 + SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
63 + ${UPSTREAM_PATCHSET_URI}
64 + ${SECURITY_PATCHSET_URI}
65 + ${GENTOO_PATCHSET_URI}"
66 +fi
67 +
68 +DESCRIPTION="The Xen virtual machine monitor"
69 +HOMEPAGE="https://www.xenproject.org"
70 +LICENSE="GPL-2"
71 +SLOT="0"
72 +IUSE="debug efi flask"
73 +
74 +DEPEND="${PYTHON_DEPS}
75 + efi? ( >=sys-devel/binutils-2.22[multitarget] )
76 + !efi? ( >=sys-devel/binutils-2.22 )"
77 +RDEPEND=""
78 +PDEPEND="~app-emulation/xen-tools-${PV}"
79 +
80 +# no tests are available for the hypervisor
81 +# prevent the silliness of /usr/lib/debug/usr/lib/debug files
82 +# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
83 +RESTRICT="test splitdebug strip"
84 +
85 +# Approved by QA team in bug #144032
86 +QA_WX_LOAD="boot/xen-syms-${PV}"
87 +
88 +REQUIRED_USE="arm? ( debug )"
89 +
90 +S="${WORKDIR}/${MY_P}"
91 +
92 +pkg_setup() {
93 + python-any-r1_pkg_setup
94 + if [[ -z ${XEN_TARGET_ARCH} ]]; then
95 + if use amd64; then
96 + export XEN_TARGET_ARCH="x86_64"
97 + elif use arm; then
98 + export XEN_TARGET_ARCH="arm32"
99 + elif use arm64; then
100 + export XEN_TARGET_ARCH="arm64"
101 + else
102 + die "Unsupported architecture!"
103 + fi
104 + fi
105 +
106 + if use flask ; then
107 + export "XSM_ENABLE=y"
108 + export "FLASK_ENABLE=y"
109 + fi
110 +}
111 +
112 +src_prepare() {
113 + # Upstream's patchset
114 + [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
115 +
116 + # Security patchset
117 + if [[ -n ${SECURITY_VER} ]]; then
118 + einfo "Try to apply Xen Security patch set"
119 + # apply main xen patches
120 + # Two parallel systems, both work side by side
121 + # Over time they may concdense into one. This will suffice for now
122 + source "${WORKDIR}"/patches-security/${PV}.conf
123 +
124 + local i
125 + for i in ${XEN_SECURITY_MAIN}; do
126 + eapply "${WORKDIR}"/patches-security/xen/$i
127 + done
128 + fi
129 +
130 + # Gentoo's patchset
131 + [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
132 +
133 + eapply "${FILESDIR}"/${PN}-4.14-efi.patch
134 +
135 + # Drop .config
136 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
137 +
138 + if use efi; then
139 + export EFI_VENDOR="gentoo"
140 + export EFI_MOUNTPOINT="/boot"
141 + fi
142 +
143 + default
144 +}
145 +
146 +src_configure() {
147 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
148 +
149 + use debug && myopt="${myopt} debug=y"
150 +
151 + # remove flags
152 + unset CFLAGS
153 + unset LDFLAGS
154 + unset ASFLAGS
155 +
156 + tc-ld-disable-gold # Bug 700374
157 +}
158 +
159 +src_compile() {
160 + # Send raw LDFLAGS so that --as-needed works
161 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
162 +}
163 +
164 +src_install() {
165 + local myopt
166 + use debug && myopt="${myopt} debug=y"
167 +
168 + # The 'make install' doesn't 'mkdir -p' the subdirs
169 + if use efi; then
170 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
171 + fi
172 +
173 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
174 +
175 + # make install likes to throw in some extra EFI bits if it built
176 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
177 +}
178 +
179 +pkg_postinst() {
180 + elog "Official Xen Guide:"
181 + elog " https://wiki.gentoo.org/wiki/Xen"
182 +
183 + use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
184 +
185 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
186 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
187 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
188 +
189 + ewarn
190 + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
191 + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
192 + ewarn "to work fine."
193 + ewarn
194 + ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
195 + ewarn
196 + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
197 +}