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