1 |
commit: 1e44141de68bea8a39d4a41effeb63e773c05b7d |
2 |
Author: Florian Schmaus <flow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 2 09:36:44 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 2 09:41:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e44141d |
7 |
|
8 |
app-emulation/xen: add 4.16.2 |
9 |
|
10 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
11 |
|
12 |
app-emulation/xen/Manifest | 1 + |
13 |
app-emulation/xen/xen-4.16.2.ebuild | 174 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 175 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
17 |
index 24cee08af95f..ed2824a295a7 100644 |
18 |
--- a/app-emulation/xen/Manifest |
19 |
+++ b/app-emulation/xen/Manifest |
20 |
@@ -1,5 +1,6 @@ |
21 |
DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3 |
22 |
DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a |
23 |
+DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783 |
24 |
DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e |
25 |
DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d |
26 |
DIST xen-upstream-patches-4.16.2-pre-patchset-1.tar.bz2 56760 BLAKE2B 4c8030347f9e1ad3c2c4f440645656452daa1f087c34b8a3baba3cae1e7623a910e5727395e8c6f4a8573f3a37e58a318c485fa2f878c8e2f3240fb75cee0c03 SHA512 5e279845052addfbf7681ad5ccab9e692e4a1d69b73e51e1782e498f98217de77bfc4f5158307ee90164393edb023165e032b9f9f7123c0c614ee2336c021259 |
27 |
|
28 |
diff --git a/app-emulation/xen/xen-4.16.2.ebuild b/app-emulation/xen/xen-4.16.2.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..1ba64bff20e1 |
31 |
--- /dev/null |
32 |
+++ b/app-emulation/xen/xen-4.16.2.ebuild |
33 |
@@ -0,0 +1,174 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{8..10} ) |
40 |
+ |
41 |
+inherit flag-o-matic mount-boot python-any-r1 toolchain-funcs |
42 |
+ |
43 |
+if [[ ${PV} == *9999 ]]; then |
44 |
+ inherit git-r3 |
45 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
46 |
+ SRC_URI="" |
47 |
+else |
48 |
+ KEYWORDS="~amd64 ~arm -x86" |
49 |
+ |
50 |
+ XEN_GENTOO_PATCHSET_NUM=2 |
51 |
+ XEN_GENTOO_PATCHSET_BASE=4.16.1 |
52 |
+ XEN_PRE_PATCHSET_NUM= |
53 |
+ XEN_PRE_VERSION_BASE= |
54 |
+ |
55 |
+ XEN_BASE_PV="${PV}" |
56 |
+ if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then |
57 |
+ XEN_BASE_PV="${XEN_PRE_VERSION_BASE}" |
58 |
+ fi |
59 |
+ |
60 |
+ SRC_URI="https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz" |
61 |
+ |
62 |
+ if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then |
63 |
+ XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}" |
64 |
+ XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}" |
65 |
+ SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2" |
66 |
+ XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}" |
67 |
+ fi |
68 |
+ if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then |
69 |
+ XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}" |
70 |
+ XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}" |
71 |
+ SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2" |
72 |
+ XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}" |
73 |
+ fi |
74 |
+fi |
75 |
+ |
76 |
+DESCRIPTION="The Xen virtual machine monitor" |
77 |
+HOMEPAGE="https://xenproject.org" |
78 |
+ |
79 |
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})" |
80 |
+ |
81 |
+LICENSE="GPL-2" |
82 |
+SLOT="0" |
83 |
+IUSE="+boot-symlinks debug efi flask" |
84 |
+REQUIRED_USE="arm? ( debug )" |
85 |
+ |
86 |
+DEPEND="${PYTHON_DEPS} |
87 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
88 |
+ !efi? ( >=sys-devel/binutils-2.22 ) |
89 |
+ flask? ( sys-apps/checkpolicy )" |
90 |
+RDEPEND="" |
91 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
92 |
+ |
93 |
+# no tests are available for the hypervisor |
94 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
95 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
96 |
+RESTRICT="test splitdebug strip" |
97 |
+ |
98 |
+# Approved by QA team in bug #144032 |
99 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
100 |
+ |
101 |
+pkg_setup() { |
102 |
+ python-any-r1_pkg_setup |
103 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
104 |
+ if use amd64; then |
105 |
+ export XEN_TARGET_ARCH="x86_64" |
106 |
+ elif use arm; then |
107 |
+ export XEN_TARGET_ARCH="arm32" |
108 |
+ elif use arm64; then |
109 |
+ export XEN_TARGET_ARCH="arm64" |
110 |
+ else |
111 |
+ die "Unsupported architecture!" |
112 |
+ fi |
113 |
+ fi |
114 |
+} |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then |
118 |
+ eapply "${XEN_UPSTREAM_PATCHES_DIR}" |
119 |
+ fi |
120 |
+ |
121 |
+ if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then |
122 |
+ eapply "${XEN_GENTOO_PATCHES_DIR}" |
123 |
+ fi |
124 |
+ |
125 |
+ # Symlinks do not work on fat32 volumes # 829765 |
126 |
+ if ! use boot-symlinks || use efi; then |
127 |
+ eapply "${XEN_GENTOO_PATCHES_DIR}"/no-boot-symlinks/${PN}-4.16-no-symlinks.patch |
128 |
+ fi |
129 |
+ |
130 |
+ # Workaround new gcc-11 options |
131 |
+ sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die |
132 |
+ |
133 |
+ # Drop .config |
134 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
135 |
+ |
136 |
+ if use efi; then |
137 |
+ export EFI_VENDOR="gentoo" |
138 |
+ export EFI_MOUNTPOINT="/boot" |
139 |
+ fi |
140 |
+ |
141 |
+ default |
142 |
+} |
143 |
+ |
144 |
+xen_make() { |
145 |
+ # Setting clang to either 'y' or 'n' tells Xen's build system |
146 |
+ # whether or not clang is used. |
147 |
+ local clang=n |
148 |
+ if tc-is-clang; then |
149 |
+ clang=y |
150 |
+ fi |
151 |
+ |
152 |
+ # Send raw LDFLAGS so that --as-needed works |
153 |
+ emake \ |
154 |
+ V=1 \ |
155 |
+ LDFLAGS="$(raw-ldflags)" \ |
156 |
+ HOSTCC="$(tc-getBUILD_CC)" \ |
157 |
+ HOSTCXX="$(tc-getBUILD_CXX)" \ |
158 |
+ CC="$(tc-getCC)" \ |
159 |
+ CXX="$(tc-getCXX)" \ |
160 |
+ LD="$(tc-getLD)" \ |
161 |
+ AR="$(tc-getAR)" \ |
162 |
+ OBJDUMP="$(tc-getOBJDUMP)" \ |
163 |
+ RANLIB="$(tc-getRANLIB)" \ |
164 |
+ clang="${clang}" \ |
165 |
+ "$@" |
166 |
+} |
167 |
+ |
168 |
+src_configure() { |
169 |
+ cd xen || die |
170 |
+ |
171 |
+ touch gentoo-config || die |
172 |
+ if use arm; then |
173 |
+ echo "CONFIG_EARLY_PRINTK=sun7i" >> gentoo-config || die |
174 |
+ fi |
175 |
+ if use debug; then |
176 |
+ cat <<-EOF >> gentoo-config || die |
177 |
+ CONFIG_DEBUG=y |
178 |
+ CONFIG_CRASH_DEBUG=y |
179 |
+EOF |
180 |
+ fi |
181 |
+ if use flask; then |
182 |
+ echo "CONFIG_XSM=y" >> gentoo-config || die |
183 |
+ fi |
184 |
+ |
185 |
+ # remove flags |
186 |
+ unset CFLAGS |
187 |
+ |
188 |
+ tc-ld-disable-gold # Bug 700374 |
189 |
+ |
190 |
+ xen_make KCONFIG_ALLCONFIG=gentoo-config alldefconfig |
191 |
+} |
192 |
+ |
193 |
+src_compile() { |
194 |
+ xen_make -C xen |
195 |
+} |
196 |
+ |
197 |
+src_install() { |
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 |
+ xen_make DESTDIR="${D}" -C xen 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 |
+} |