Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/
Date: Tue, 05 Dec 2017 02:24:39
Message-Id: 1512440669.916054e0494b5a1b99daa9d3fbb9335977cb5a26.dlan@gentoo
1 commit: 916054e0494b5a1b99daa9d3fbb9335977cb5a26
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 23 07:32:06 2017 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 5 02:24:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=916054e0
7
8 app-emulation/xen: bump to 4.9.1
9
10 Closes: https://github.com/gentoo/gentoo/pull/6267
11
12 Package-Manager: Portage-2.3.16, Repoman-2.3.6
13 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
14
15 app-emulation/xen/Manifest | 9 +-
16 app-emulation/xen/xen-4.9.1.ebuild | 183 +++++++++++++++++++++++++++++++++++++
17 2 files changed, 188 insertions(+), 4 deletions(-)
18
19 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
20 index 6d8c7125bbe..950bb0ba21b 100644
21 --- a/app-emulation/xen/Manifest
22 +++ b/app-emulation/xen/Manifest
23 @@ -1,4 +1,5 @@
24 -DIST xen-4.8.2-upstream-patches-2.tar.xz 38852 SHA256 12c1f1fd2adba22b923d2ee944e6e66794701393966f9e9e2079961e202f6d64 SHA512 536823eabf03e92585a8c5cde90ce502672dd1ec080b28b39411d6a778b899436a57bfb633f11c94d48d2f963848b7771e469f5ea53e84b580976f631f69cc5d WHIRLPOOL 5baf92709da895eccbe8b154c1d1cdf4c2f0faf5166ef2e4bbf32ca6899d8b88aa67ccd765a15a2f9a6d5200d4a1eb832775891d41c00a950855e5d1d4358e35
25 -DIST xen-4.8.2.tar.gz 22522336 SHA256 cb1cc2f0985e3d8651215e5d24c1fcc3036994fa7cc495a5091a2c85ece2aff9 SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da WHIRLPOOL 8e54e79219f89640162673da471a02ee8a39bb884e2376a79a09226462903185b49a771fef51ceca54c4dd42a110ee1214db6dbf94235a156a17d6c597634c3d
26 -DIST xen-4.9.0-upstream-patches-0.tar.xz 58780 SHA256 f3539c0f620d168e4dcfc4c11f895bd6850c1c566d53a9d3366907662c2960e3 SHA512 98c601d791661a306e3dce5befb37b80de8a71cdd1759f3da00b199d48e3b9468efd1332e26ae044ad616b41a02771ad07a1c96972103b7e0aa39b93fb556999 WHIRLPOOL 711d3a5bcc9bd9afded35252b2efc0d4ba39ab9edb595328e4ebd808513c863e447e3554600328982a440fe936b7f68baf0b925f9d8ef8d17965439eed35d98b
27 -DIST xen-4.9.0.tar.gz 23361741 SHA256 cade643fe3310d4d6f97d0c215c6fa323bc1130d7e64d7e2043ffaa73a96f33b SHA512 97f8075c49ef9ec0adbe95106c0cff4f9379578fd568777697565476c3fd948335d72ddcacf8be65fd9db219c0a35dcdc007f355f7e5874dd950fd4c0a0f966f WHIRLPOOL 354527ea01f69c6ab632cffe8f50ca93721d9a89cbc4d84886d24b53fabdb7f62132b80e36189c30c0c9fae66b367eec7e00bb4df5f7af054ec27cec912ecf47
28 +DIST xen-4.8.2-upstream-patches-2.tar.xz 38852 BLAKE2B cbc7bad4703fabd05b703c66268df0670e2ae97b77007895dceaf6465b12a2f9fbe3773c7735b307427ad18c61711b20beb7f3ae6b1f1b8b5efda2a847fec0ec SHA512 536823eabf03e92585a8c5cde90ce502672dd1ec080b28b39411d6a778b899436a57bfb633f11c94d48d2f963848b7771e469f5ea53e84b580976f631f69cc5d
29 +DIST xen-4.8.2.tar.gz 22522336 BLAKE2B 2c9da971622b4e52fe78fa029107bb1c5f945a63605406493df607c410c6f2a8c2cdb38b1eb30c1bc1c8bc6e5620efad977c3ba55e04c579c01d51f0104afcce SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da
30 +DIST xen-4.9.0-upstream-patches-0.tar.xz 58780 BLAKE2B 6d12a5a5bb7d2be7ca6bb8636648ee219c9526dd34086c929d8cd32d096d2454d6cb499d459b436f228fa49f42ef3a1f5fbe9b5c84557e4054565a9edc0daad6 SHA512 98c601d791661a306e3dce5befb37b80de8a71cdd1759f3da00b199d48e3b9468efd1332e26ae044ad616b41a02771ad07a1c96972103b7e0aa39b93fb556999
31 +DIST xen-4.9.0.tar.gz 23361741 BLAKE2B 1cfebb791ca5e51eda9b86a5d98e0883fab1554f5ac805fc065916fbbd3695e6b0f11ca75935a8f973735cc8dd83e38fe4a670d8489010be865be49d8fc1a341 SHA512 97f8075c49ef9ec0adbe95106c0cff4f9379578fd568777697565476c3fd948335d72ddcacf8be65fd9db219c0a35dcdc007f355f7e5874dd950fd4c0a0f966f
32 +DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274
33
34 diff --git a/app-emulation/xen/xen-4.9.1.ebuild b/app-emulation/xen/xen-4.9.1.ebuild
35 new file mode 100644
36 index 00000000000..5edb0f51262
37 --- /dev/null
38 +++ b/app-emulation/xen/xen-4.9.1.ebuild
39 @@ -0,0 +1,183 @@
40 +# Copyright 1999-2017 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=6
44 +
45 +PYTHON_COMPAT=( python2_7 )
46 +
47 +inherit eutils flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
48 +
49 +MY_PV=${PV/_/-}
50 +MY_P=${PN}-${MY_PV}
51 +
52 +if [[ $PV == *9999 ]]; then
53 + inherit git-r3
54 + KEYWORDS=""
55 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
56 + SRC_URI=""
57 +else
58 + KEYWORDS="~amd64 ~arm -x86"
59 + UPSTREAM_VER=
60 + SECURITY_VER=
61 + GENTOO_VER=
62 +
63 + [[ -n ${UPSTREAM_VER} ]] && \
64 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
65 + [[ -n ${SECURITY_VER} ]] && \
66 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
67 + [[ -n ${GENTOO_VER} ]] && \
68 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
69 + SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
70 + ${UPSTREAM_PATCHSET_URI}
71 + ${SECURITY_PATCHSET_URI}
72 + ${GENTOO_PATCHSET_URI}"
73 +fi
74 +
75 +DESCRIPTION="The Xen virtual machine monitor"
76 +HOMEPAGE="https://www.xenproject.org"
77 +LICENSE="GPL-2"
78 +SLOT="0"
79 +IUSE="custom-cflags debug efi flask"
80 +
81 +DEPEND="${PYTHON_DEPS}
82 + efi? ( >=sys-devel/binutils-2.22[multitarget] )
83 + !efi? ( >=sys-devel/binutils-2.22 )"
84 +RDEPEND=""
85 +PDEPEND="~app-emulation/xen-tools-${PV}"
86 +
87 +# no tests are available for the hypervisor
88 +# prevent the silliness of /usr/lib/debug/usr/lib/debug files
89 +# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
90 +RESTRICT="test splitdebug strip"
91 +
92 +# Approved by QA team in bug #144032
93 +QA_WX_LOAD="boot/xen-syms-${PV}"
94 +
95 +REQUIRED_USE="arm? ( debug )"
96 +
97 +S="${WORKDIR}/${MY_P}"
98 +
99 +pkg_setup() {
100 + python-any-r1_pkg_setup
101 + if [[ -z ${XEN_TARGET_ARCH} ]]; then
102 + if use amd64; then
103 + export XEN_TARGET_ARCH="x86_64"
104 + elif use arm; then
105 + export XEN_TARGET_ARCH="arm32"
106 + elif use arm64; then
107 + export XEN_TARGET_ARCH="arm64"
108 + else
109 + die "Unsupported architecture!"
110 + fi
111 + fi
112 +
113 + if use flask ; then
114 + export "XSM_ENABLE=y"
115 + export "FLASK_ENABLE=y"
116 + fi
117 +}
118 +
119 +src_prepare() {
120 + # Upstream's patchset
121 + if [[ -n ${UPSTREAM_VER} ]]; then
122 + EPATCH_SUFFIX="patch" \
123 + EPATCH_FORCE="yes" \
124 + EPATCH_OPTS="-p1" \
125 + epatch "${WORKDIR}"/patches-upstream
126 + fi
127 +
128 + # Security patchset
129 + if [[ -n ${SECURITY_VER} ]]; then
130 + einfo "Try to apply Xen Security patch set"
131 + # apply main xen patches
132 + # Two parallel systems, both work side by side
133 + # Over time they may concdense into one. This will suffice for now
134 + EPATCH_SUFFIX="patch"
135 + EPATCH_FORCE="yes"
136 +
137 + source "${WORKDIR}"/patches-security/${PV}.conf
138 +
139 + local i
140 + for i in ${XEN_SECURITY_MAIN}; do
141 + epatch "${WORKDIR}"/patches-security/xen/$i
142 + done
143 + fi
144 +
145 + # Gentoo's patchset
146 + if [[ -n ${GENTOO_VER} ]]; then
147 + EPATCH_SUFFIX="patch" \
148 + EPATCH_FORCE="yes" \
149 + epatch "${WORKDIR}"/patches-gentoo
150 + fi
151 +
152 + epatch "${FILESDIR}"/${PN}-4.6-efi.patch
153 +
154 + # Drop .config
155 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
156 +
157 + if use efi; then
158 + export EFI_VENDOR="gentoo"
159 + export EFI_MOUNTPOINT="boot"
160 + fi
161 +
162 + # if the user *really* wants to use their own custom-cflags, let them
163 + if use custom-cflags; then
164 + einfo "User wants their own CFLAGS - removing defaults"
165 + # try and remove all the default custom-cflags
166 + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
167 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
168 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
169 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
170 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
171 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
172 + -i {} \; || die "failed to re-set custom-cflags"
173 + fi
174 +
175 + default
176 +}
177 +
178 +src_configure() {
179 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
180 +
181 + use debug && myopt="${myopt} debug=y"
182 +
183 + if use custom-cflags; then
184 + filter-flags -fPIE -fstack-protector
185 + replace-flags -O3 -O2
186 + else
187 + unset CFLAGS
188 + unset LDFLAGS
189 + unset ASFLAGS
190 + fi
191 +}
192 +
193 +src_compile() {
194 + # Send raw LDFLAGS so that --as-needed works
195 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
196 +}
197 +
198 +src_install() {
199 + local myopt
200 + use debug && myopt="${myopt} debug=y"
201 +
202 + # The 'make install' doesn't 'mkdir -p' the subdirs
203 + if use efi; then
204 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
205 + fi
206 +
207 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
208 +
209 + # make install likes to throw in some extra EFI bits if it built
210 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
211 +}
212 +
213 +pkg_postinst() {
214 + elog "Official Xen Guide:"
215 + elog " https://wiki.gentoo.org/wiki/Xen"
216 +
217 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
218 +
219 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
220 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
221 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
222 +}