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