1 |
commit: 3e6792d0d92b550d270e66db7e426b82d83e1be2 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 9 00:04:26 2017 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 9 00:09:19 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e6792d0 |
7 |
|
8 |
app-emulation/xen: version bump, 4.7.2 |
9 |
|
10 |
fix XSA-210 in version 4.8.0-r4 |
11 |
fix XSA-206,212 in version 4.7.2, 4.8.0-r4 |
12 |
|
13 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
14 |
|
15 |
app-emulation/xen/Manifest | 4 + |
16 |
app-emulation/xen/xen-4.7.2.ebuild | 192 ++++++++++++++++++++++++++++++++++ |
17 |
app-emulation/xen/xen-4.8.0-r4.ebuild | 192 ++++++++++++++++++++++++++++++++++ |
18 |
3 files changed, 388 insertions(+) |
19 |
|
20 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
21 |
index 65896802cbd..10ed5e6cfc3 100644 |
22 |
--- a/app-emulation/xen/Manifest |
23 |
+++ b/app-emulation/xen/Manifest |
24 |
@@ -1,5 +1,9 @@ |
25 |
DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844 |
26 |
DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec |
27 |
+DIST xen-4.7.2-upstream-patches-0.tar.xz 45944 SHA256 e7783bc9adc939167eaef91e96fda506d2d52815f709b31952229891357e6b67 SHA512 6d4e23fb5a63fd191f893e31194b6397a394956846f356ae0119c656a92e7e22296e728286a98109b64a5736241b2317969f54915e7b487b4d7a64aae534614c WHIRLPOOL e185ce40085559d00a302eae8814b4c013817a5e4c0a2a9c56a6b4983b38e7103e44d0407fa78ea79fdbe8eefde346b994812851d8b4bad0bf08cb5721507c37 |
28 |
+DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756 |
29 |
+DIST xen-4.8.0-upstream-patches-0.tar.xz 78984 SHA256 278603b1b739e94099184f7266c77806595bf53c7236267f32b9f8fad9ebe76e SHA512 1466e33705f54e3799412298917485bb8acb6847dbacb61cfb394415b6b3bc51aed9317928e948161e00c8134fcc0a4b07361df3dec76b1038aa41e3b1b63b3a WHIRLPOOL 4c3a1524db00be1c475fd84e2148143bc4f3be2987e7d785bee880603c72d6bdb417acf1f1935c2b53b369d8428eed736b92644f6ce62e05ad16479ecca18410 |
30 |
DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102 |
31 |
DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8 |
32 |
DIST xen-security-patches-24.tar.xz 8848 SHA256 1aa2be3a15771473d3b043ccd703f7893618473a77193feb1703bf552aa777fa SHA512 d9ccee8ad3ffe2e035de9e95bf7ef850f31cf368dd228e62acf867ff6a8948e8c2882e64f341ff3458349f8317185241a40178f30f804edfa51b2b7cf6c6cda0 WHIRLPOOL cd632b7bf95e929f5037be6a16a59d3fcde50e47cc034cc0d44c29bc16c42a9a01c720a4401804fa9df8fa908f4fc8e75f2fcbef3d56381b7dca81d45618e773 |
33 |
+DIST xen-security-patches-25.tar.xz 9208 SHA256 ceaa520d4d98ab7b6ce5b58c380499372cb513dda0c8236106cdf878385d4458 SHA512 18539c1f42bc95a06f7b06855614fafb4ed7c07a145d9ab90e02954ba405d21fc4c379908e3233ddfb85ccaa04515b261ac4bbf3987ce00e4479158f03edd917 WHIRLPOOL 4cff34c29a5c38e6a5bd0d4f4fe89d8daf944740934b05cd61f4b8a345ddb4d8a8b2de6db27a723154169e3f28d5b34a43eddd08c909cfa3d6d5aee26fcae693 |
34 |
|
35 |
diff --git a/app-emulation/xen/xen-4.7.2.ebuild b/app-emulation/xen/xen-4.7.2.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..9e7a01b6182 |
38 |
--- /dev/null |
39 |
+++ b/app-emulation/xen/xen-4.7.2.ebuild |
40 |
@@ -0,0 +1,192 @@ |
41 |
+# Copyright 1999-2017 Gentoo Foundation |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=5 |
45 |
+ |
46 |
+PYTHON_COMPAT=( python2_7 ) |
47 |
+ |
48 |
+inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs |
49 |
+ |
50 |
+MY_PV=${PV/_/-} |
51 |
+MY_P=${PN}-${PV/_/-} |
52 |
+ |
53 |
+if [[ $PV == *9999 ]]; then |
54 |
+ inherit git-r3 |
55 |
+ KEYWORDS="amd64" |
56 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
57 |
+ SRC_URI="" |
58 |
+else |
59 |
+ KEYWORDS="~amd64 ~arm -x86" |
60 |
+ UPSTREAM_VER=0 |
61 |
+ SECURITY_VER=25 |
62 |
+ GENTOO_VER= |
63 |
+ |
64 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
65 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
66 |
+ [[ -n ${SECURITY_VER} ]] && \ |
67 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
68 |
+ [[ -n ${GENTOO_VER} ]] && \ |
69 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
70 |
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz |
71 |
+ ${UPSTREAM_PATCHSET_URI} |
72 |
+ ${SECURITY_PATCHSET_URI} |
73 |
+ ${GENTOO_PATCHSET_URI}" |
74 |
+fi |
75 |
+ |
76 |
+DESCRIPTION="The Xen virtual machine monitor" |
77 |
+HOMEPAGE="http://xen.org/" |
78 |
+LICENSE="GPL-2" |
79 |
+SLOT="0" |
80 |
+IUSE="custom-cflags debug efi flask" |
81 |
+ |
82 |
+DEPEND="${PYTHON_DEPS} |
83 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
84 |
+ !efi? ( >=sys-devel/binutils-2.22 )" |
85 |
+RDEPEND="" |
86 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
87 |
+ |
88 |
+# no tests are available for the hypervisor |
89 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
90 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
91 |
+RESTRICT="test splitdebug strip" |
92 |
+ |
93 |
+# Approved by QA team in bug #144032 |
94 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
95 |
+ |
96 |
+REQUIRED_USE="arm? ( debug )" |
97 |
+ |
98 |
+S="${WORKDIR}/${MY_P}" |
99 |
+ |
100 |
+pkg_setup() { |
101 |
+ python-any-r1_pkg_setup |
102 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
103 |
+ if use amd64; then |
104 |
+ export XEN_TARGET_ARCH="x86_64" |
105 |
+ elif use arm; then |
106 |
+ export XEN_TARGET_ARCH="arm32" |
107 |
+ elif use arm64; then |
108 |
+ export XEN_TARGET_ARCH="arm64" |
109 |
+ else |
110 |
+ die "Unsupported architecture!" |
111 |
+ fi |
112 |
+ fi |
113 |
+ |
114 |
+ if use flask ; then |
115 |
+ export "XSM_ENABLE=y" |
116 |
+ export "FLASK_ENABLE=y" |
117 |
+ fi |
118 |
+} |
119 |
+ |
120 |
+src_prepare() { |
121 |
+ # Upstream's patchset |
122 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
123 |
+ EPATCH_SUFFIX="patch" \ |
124 |
+ EPATCH_FORCE="yes" \ |
125 |
+ EPATCH_OPTS="-p1" \ |
126 |
+ epatch "${WORKDIR}"/patches-upstream |
127 |
+ fi |
128 |
+ |
129 |
+ # Security patchset |
130 |
+ if [[ -n ${SECURITY_VER} ]]; then |
131 |
+ einfo "Try to apply Xen Security patch set" |
132 |
+ # apply main xen patches |
133 |
+ # Two parallel systems, both work side by side |
134 |
+ # Over time they may concdense into one. This will suffice for now |
135 |
+ EPATCH_SUFFIX="patch" |
136 |
+ EPATCH_FORCE="yes" |
137 |
+ |
138 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
139 |
+ |
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 |
+ # remove -Werror for gcc-4.6's sake |
176 |
+ find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ |
177 |
+ xargs sed -i 's/ *-Werror */ /' |
178 |
+ # not strictly necessary to fix this |
179 |
+ sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py" |
180 |
+ |
181 |
+ # Bug #575868 converted to a sed statement, typo of one char |
182 |
+ sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
183 |
+ |
184 |
+ epatch_user |
185 |
+} |
186 |
+ |
187 |
+src_configure() { |
188 |
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
189 |
+ |
190 |
+ use debug && myopt="${myopt} debug=y" |
191 |
+ |
192 |
+ if use custom-cflags; then |
193 |
+ filter-flags -fPIE -fstack-protector |
194 |
+ replace-flags -O3 -O2 |
195 |
+ else |
196 |
+ unset CFLAGS |
197 |
+ unset LDFLAGS |
198 |
+ unset ASFLAGS |
199 |
+ fi |
200 |
+} |
201 |
+ |
202 |
+src_compile() { |
203 |
+ # Send raw LDFLAGS so that --as-needed works |
204 |
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
205 |
+} |
206 |
+ |
207 |
+src_install() { |
208 |
+ local myopt |
209 |
+ use debug && myopt="${myopt} debug=y" |
210 |
+ |
211 |
+ # The 'make install' doesn't 'mkdir -p' the subdirs |
212 |
+ if use efi; then |
213 |
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
214 |
+ fi |
215 |
+ |
216 |
+ emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
217 |
+ |
218 |
+ # make install likes to throw in some extra EFI bits if it built |
219 |
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
220 |
+} |
221 |
+ |
222 |
+pkg_postinst() { |
223 |
+ elog "Official Xen Guide and the unoffical wiki page:" |
224 |
+ elog " https://wiki.gentoo.org/wiki/Xen" |
225 |
+ elog " http://en.gentoo-wiki.com/wiki/Xen/" |
226 |
+ |
227 |
+ use efi && einfo "The efi executable is installed in boot/efi/gentoo" |
228 |
+ |
229 |
+ elog "You can optionally block the installation of /boot/xen-syms by an entry" |
230 |
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
231 |
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
232 |
+} |
233 |
|
234 |
diff --git a/app-emulation/xen/xen-4.8.0-r4.ebuild b/app-emulation/xen/xen-4.8.0-r4.ebuild |
235 |
new file mode 100644 |
236 |
index 00000000000..5f4d4ef0057 |
237 |
--- /dev/null |
238 |
+++ b/app-emulation/xen/xen-4.8.0-r4.ebuild |
239 |
@@ -0,0 +1,192 @@ |
240 |
+# Copyright 1999-2017 Gentoo Foundation |
241 |
+# Distributed under the terms of the GNU General Public License v2 |
242 |
+ |
243 |
+EAPI=5 |
244 |
+ |
245 |
+PYTHON_COMPAT=( python2_7 ) |
246 |
+ |
247 |
+inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs |
248 |
+ |
249 |
+MY_PV=${PV/_/-} |
250 |
+MY_P=${PN}-${PV/_/-} |
251 |
+ |
252 |
+if [[ $PV == *9999 ]]; then |
253 |
+ inherit git-r3 |
254 |
+ KEYWORDS="" |
255 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
256 |
+ SRC_URI="" |
257 |
+else |
258 |
+ KEYWORDS="~amd64 ~arm -x86" |
259 |
+ UPSTREAM_VER=0 |
260 |
+ SECURITY_VER=25 |
261 |
+ GENTOO_VER= |
262 |
+ |
263 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
264 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
265 |
+ [[ -n ${SECURITY_VER} ]] && \ |
266 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
267 |
+ [[ -n ${GENTOO_VER} ]] && \ |
268 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
269 |
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz |
270 |
+ ${UPSTREAM_PATCHSET_URI} |
271 |
+ ${SECURITY_PATCHSET_URI} |
272 |
+ ${GENTOO_PATCHSET_URI}" |
273 |
+fi |
274 |
+ |
275 |
+DESCRIPTION="The Xen virtual machine monitor" |
276 |
+HOMEPAGE="http://xen.org/" |
277 |
+LICENSE="GPL-2" |
278 |
+SLOT="0" |
279 |
+IUSE="custom-cflags debug efi flask" |
280 |
+ |
281 |
+DEPEND="${PYTHON_DEPS} |
282 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
283 |
+ !efi? ( >=sys-devel/binutils-2.22 )" |
284 |
+RDEPEND="" |
285 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
286 |
+ |
287 |
+# no tests are available for the hypervisor |
288 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
289 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
290 |
+RESTRICT="test splitdebug strip" |
291 |
+ |
292 |
+# Approved by QA team in bug #144032 |
293 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
294 |
+ |
295 |
+REQUIRED_USE="arm? ( debug )" |
296 |
+ |
297 |
+S="${WORKDIR}/${MY_P}" |
298 |
+ |
299 |
+pkg_setup() { |
300 |
+ python-any-r1_pkg_setup |
301 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
302 |
+ if use amd64; then |
303 |
+ export XEN_TARGET_ARCH="x86_64" |
304 |
+ elif use arm; then |
305 |
+ export XEN_TARGET_ARCH="arm32" |
306 |
+ elif use arm64; then |
307 |
+ export XEN_TARGET_ARCH="arm64" |
308 |
+ else |
309 |
+ die "Unsupported architecture!" |
310 |
+ fi |
311 |
+ fi |
312 |
+ |
313 |
+ if use flask ; then |
314 |
+ export "XSM_ENABLE=y" |
315 |
+ export "FLASK_ENABLE=y" |
316 |
+ fi |
317 |
+} |
318 |
+ |
319 |
+src_prepare() { |
320 |
+ # Upstream's patchset |
321 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
322 |
+ EPATCH_SUFFIX="patch" \ |
323 |
+ EPATCH_FORCE="yes" \ |
324 |
+ EPATCH_OPTS="-p1" \ |
325 |
+ epatch "${WORKDIR}"/patches-upstream |
326 |
+ fi |
327 |
+ |
328 |
+ # Security patchset |
329 |
+ if [[ -n ${SECURITY_VER} ]]; then |
330 |
+ einfo "Try to apply Xen Security patch set" |
331 |
+ # apply main xen patches |
332 |
+ # Two parallel systems, both work side by side |
333 |
+ # Over time they may concdense into one. This will suffice for now |
334 |
+ EPATCH_SUFFIX="patch" |
335 |
+ EPATCH_FORCE="yes" |
336 |
+ |
337 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
338 |
+ |
339 |
+ for i in ${XEN_SECURITY_MAIN}; do |
340 |
+ epatch "${WORKDIR}"/patches-security/xen/$i |
341 |
+ done |
342 |
+ fi |
343 |
+ |
344 |
+ # Gentoo's patchset |
345 |
+ if [[ -n ${GENTOO_VER} ]]; then |
346 |
+ EPATCH_SUFFIX="patch" \ |
347 |
+ EPATCH_FORCE="yes" \ |
348 |
+ epatch "${WORKDIR}"/patches-gentoo |
349 |
+ fi |
350 |
+ |
351 |
+ epatch "${FILESDIR}"/${PN}-4.6-efi.patch |
352 |
+ |
353 |
+ # Drop .config |
354 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
355 |
+ |
356 |
+ if use efi; then |
357 |
+ export EFI_VENDOR="gentoo" |
358 |
+ export EFI_MOUNTPOINT="boot" |
359 |
+ fi |
360 |
+ |
361 |
+ # if the user *really* wants to use their own custom-cflags, let them |
362 |
+ if use custom-cflags; then |
363 |
+ einfo "User wants their own CFLAGS - removing defaults" |
364 |
+ # try and remove all the default custom-cflags |
365 |
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
366 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
367 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
368 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
369 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
370 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
371 |
+ -i {} \; || die "failed to re-set custom-cflags" |
372 |
+ fi |
373 |
+ |
374 |
+ # remove -Werror for gcc-4.6's sake |
375 |
+ find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ |
376 |
+ xargs sed -i 's/ *-Werror */ /' |
377 |
+ # not strictly necessary to fix this |
378 |
+ sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py" |
379 |
+ |
380 |
+ # Bug #575868 converted to a sed statement, typo of one char |
381 |
+ sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
382 |
+ |
383 |
+ epatch_user |
384 |
+} |
385 |
+ |
386 |
+src_configure() { |
387 |
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
388 |
+ |
389 |
+ use debug && myopt="${myopt} debug=y" |
390 |
+ |
391 |
+ if use custom-cflags; then |
392 |
+ filter-flags -fPIE -fstack-protector |
393 |
+ replace-flags -O3 -O2 |
394 |
+ else |
395 |
+ unset CFLAGS |
396 |
+ unset LDFLAGS |
397 |
+ unset ASFLAGS |
398 |
+ fi |
399 |
+} |
400 |
+ |
401 |
+src_compile() { |
402 |
+ # Send raw LDFLAGS so that --as-needed works |
403 |
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
404 |
+} |
405 |
+ |
406 |
+src_install() { |
407 |
+ local myopt |
408 |
+ use debug && myopt="${myopt} debug=y" |
409 |
+ |
410 |
+ # The 'make install' doesn't 'mkdir -p' the subdirs |
411 |
+ if use efi; then |
412 |
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
413 |
+ fi |
414 |
+ |
415 |
+ emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
416 |
+ |
417 |
+ # make install likes to throw in some extra EFI bits if it built |
418 |
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
419 |
+} |
420 |
+ |
421 |
+pkg_postinst() { |
422 |
+ elog "Official Xen Guide and the unoffical wiki page:" |
423 |
+ elog " https://wiki.gentoo.org/wiki/Xen" |
424 |
+ elog " http://en.gentoo-wiki.com/wiki/Xen/" |
425 |
+ |
426 |
+ use efi && einfo "The efi executable is installed in boot/efi/gentoo" |
427 |
+ |
428 |
+ elog "You can optionally block the installation of /boot/xen-syms by an entry" |
429 |
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
430 |
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
431 |
+} |