Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/
Date: Thu, 17 Dec 2015 13:59:21
Message-Id: 1450360738.73ce06fe905a06fa25f71fc49cb063d547b6a3f0.idella4@gentoo
1 commit: 73ce06fe905a06fa25f71fc49cb063d547b6a3f0
2 Author: Ian Delaney <idella4 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 17 13:40:04 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 17 13:58:58 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73ce06fe
7
8 app-emulation/xen: revbumps to vns. 4.5.2-r3, 4.6.0-r4
9
10 security patches added of xsa 164,165,166 re security Bug 567962
11
12 Gentoo bug: #567962
13
14 Package-Manager: portage-2.2.24
15
16 app-emulation/xen/Manifest | 2 +
17 app-emulation/xen/xen-4.5.2-r3.ebuild | 188 ++++++++++++++++++++++++++++++++++
18 app-emulation/xen/xen-4.6.0-r4.ebuild | 186 +++++++++++++++++++++++++++++++++
19 3 files changed, 376 insertions(+)
20
21 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
22 index f95769e..9e27b4f 100644
23 --- a/app-emulation/xen/Manifest
24 +++ b/app-emulation/xen/Manifest
25 @@ -6,6 +6,8 @@ DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c97
26 DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
27 DIST xen-security-patches-0.tar.xz 5944 SHA256 c0456793064185f0781668264a09a2412a25e2ff8c4ce0d332204e37b94d7e96 SHA512 de812e66563e608548b220aa00c8fd71973af748a00cea79959f46a5b6893a38248d2ea455026af43f47e3f5e566d08b5a6f3d18f22e940d75d2a2ca76cec3d3 WHIRLPOOL 3e18d32798bdfe584ee8d102963090b569ec3660fd5723d8c608091e5c7d935c1edced5e258d92bf51fe06975455a3ae33dfedd01702c6076aedf97ea61f2d1b
28 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
29 +DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
30 +DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
31 DIST xen-security-patches-3.tar.xz 17028 SHA256 fb6301beb9a5c2d1e5d4de8783d8670e382b1bef48ec61e73d2d9be6901d289f SHA512 787fee8f7822577c6de91c4cf4d56d0e73ce46bac5524537ff66a718b6d7eae9d362265515743e8577b2c75f2841baed9837f71467b3b7b91a3111220da5f236 WHIRLPOOL 5c136289e654776bf918fe125fbecba7dac0929b236f7ae8158026a6bd6be12bc786a5ec96cb4022c18a5e7ffde82155deb57eb9639600e4c42c9c209f4a2ed6
32 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
33 DIST xen-security-patches.tar.gz 2105 SHA256 19409f15fdbfbfe41b86627dd929a362563610999fc4b73ab2a9165df0ba8182 SHA512 2733e77b6a9ba25e704e0a15a32a20efe7c74873cabc5e6490f41e8d1b96d9efa83c0d16bbda6169d4bab3f5e9e9a8d7f3400f63e6b2d11cf0c63711a858cc34 WHIRLPOOL 21dda4417d938c45bf46c41f2e9aba524f484b6526fcf59a840ca30aa270148990ffc66536431b2a4b8db6f1a761b02f2266b5935e68e85935ec8dd5511dc892
34
35 diff --git a/app-emulation/xen/xen-4.5.2-r3.ebuild b/app-emulation/xen/xen-4.5.2-r3.ebuild
36 new file mode 100644
37 index 0000000..2bd75da
38 --- /dev/null
39 +++ b/app-emulation/xen/xen-4.5.2-r3.ebuild
40 @@ -0,0 +1,188 @@
41 +# Copyright 1999-2015 Gentoo Foundation
42 +# Distributed under the terms of the GNU General Public License v2
43 +# $Id$
44 +
45 +EAPI=5
46 +
47 +PYTHON_COMPAT=( python2_7 )
48 +
49 +inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
50 +
51 +MY_PV=${PV/_/-}
52 +MY_P=${PN}-${PV/_/-}
53 +
54 +if [[ $PV == *9999 ]]; then
55 + inherit git-r3
56 + KEYWORDS=""
57 + EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git"
58 + SRC_URI=""
59 +else
60 + KEYWORDS="~amd64 ~arm ~arm64 -x86"
61 + UPSTREAM_VER=
62 + SECURITY_VER=0
63 + # var set to reflect https://dev.gentoo.org/~idella4/
64 + SEC_VER=2
65 + GENTOO_VER=
66 +
67 + [[ -n ${UPSTREAM_VER} ]] && \
68 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
69 + [[ -n ${SECURITY_VER} ]] && \
70 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
71 + https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz"
72 + [[ -n ${GENTOO_VER} ]] && \
73 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
74 + SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
75 + ${UPSTREAM_PATCHSET_URI}
76 + ${SECURITY_PATCHSET_URI}
77 + ${GENTOO_PATCHSET_URI}"
78 +
79 +fi
80 +
81 +DESCRIPTION="The Xen virtual machine monitor"
82 +HOMEPAGE="http://xen.org/"
83 +LICENSE="GPL-2"
84 +SLOT="0"
85 +IUSE="custom-cflags debug efi flask xsm"
86 +
87 +DEPEND="${PYTHON_DEPS}
88 + efi? ( >=sys-devel/binutils-2.22[multitarget] )
89 + !efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
90 +RDEPEND=""
91 +PDEPEND="~app-emulation/xen-tools-${PV}"
92 +
93 +RESTRICT="test"
94 +
95 +# Approved by QA team in bug #144032
96 +QA_WX_LOAD="boot/xen-syms-${PV}"
97 +
98 +REQUIRED_USE="flask? ( xsm )
99 + arm? ( debug )"
100 +
101 +S="${WORKDIR}/${MY_P}"
102 +
103 +pkg_setup() {
104 + python-any-r1_pkg_setup
105 + if [[ -z ${XEN_TARGET_ARCH} ]]; then
106 + if use x86 && use amd64; then
107 + die "Confusion! Both x86 and amd64 are set in your use flags!"
108 + elif use x86; then
109 + export XEN_TARGET_ARCH="x86_32"
110 + elif use amd64; then
111 + export XEN_TARGET_ARCH="x86_64"
112 + elif use arm; then
113 + export XEN_TARGET_ARCH="arm32"
114 + elif use arm64; then
115 + export XEN_TARGET_ARCH="arm64"
116 + else
117 + die "Unsupported architecture!"
118 + fi
119 + fi
120 +
121 + if use flask ; then
122 + export "XSM_ENABLE=y"
123 + export "FLASK_ENABLE=y"
124 + elif use xsm ; then
125 + export "XSM_ENABLE=y"
126 + fi
127 +}
128 +
129 +src_prepare() {
130 + # Upstream's patchset
131 + if [[ -n ${UPSTREAM_VER} ]]; then
132 + EPATCH_SUFFIX="patch" \
133 + EPATCH_FORCE="yes" \
134 + EPATCH_OPTS="-p1" \
135 + epatch "${WORKDIR}"/patches-upstream
136 + fi
137 +
138 + if [[ -n ${SECURITY_VER} ]]; then
139 + einfo "Try to apply Xen Security patcheset"
140 + # apply main xen patches
141 + # Two parallel systems, both work side by side
142 + # Over time they may concdense into one. This will suffice for now
143 + EPATCH_SUFFIX="patch"
144 + EPATCH_FORCE="yes"
145 + for i in ${XEN_SECURITY_MAIN}; do
146 + epatch "${WORKDIR}"/patches-security/xen/$i
147 + done
148 +
149 + for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
150 + epatch $i
151 + done
152 + fi
153 +
154 + # Gentoo's patchset
155 + if [[ -n ${GENTOO_VER} ]]; then
156 + EPATCH_SUFFIX="patch" \
157 + EPATCH_FORCE="yes" \
158 + epatch "${WORKDIR}"/patches-gentoo
159 + fi
160 +
161 + # Drop .config
162 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
163 +
164 + if use efi; then
165 + epatch "${FILESDIR}"/${PN}-4.5-efi.patch
166 + export EFI_VENDOR="gentoo"
167 + export EFI_MOUNTPOINT="boot"
168 + fi
169 +
170 + # if the user *really* wants to use their own custom-cflags, let them
171 + if use custom-cflags; then
172 + einfo "User wants their own CFLAGS - removing defaults"
173 + # try and remove all the default custom-cflags
174 + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
175 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
176 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
177 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
178 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
179 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
180 + -i {} \; || die "failed to re-set custom-cflags"
181 + fi
182 +
183 + # remove -Werror for gcc-4.6's sake
184 + find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
185 + xargs sed -i 's/ *-Werror */ /'
186 + # not strictly necessary to fix this
187 + sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
188 +
189 + epatch_user
190 +}
191 +
192 +src_configure() {
193 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
194 +
195 + use debug && myopt="${myopt} debug=y"
196 +
197 + if use custom-cflags; then
198 + filter-flags -fPIE -fstack-protector
199 + replace-flags -O3 -O2
200 + else
201 + unset CFLAGS
202 + fi
203 +}
204 +
205 +src_compile() {
206 + # Send raw LDFLAGS so that --as-needed works
207 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
208 +}
209 +
210 +src_install() {
211 + local myopt
212 + use debug && myopt="${myopt} debug=y"
213 +
214 + # The 'make install' doesn't 'mkdir -p' the subdirs
215 + if use efi; then
216 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
217 + fi
218 +
219 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
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
230 diff --git a/app-emulation/xen/xen-4.6.0-r4.ebuild b/app-emulation/xen/xen-4.6.0-r4.ebuild
231 new file mode 100644
232 index 0000000..c1c7fa0
233 --- /dev/null
234 +++ b/app-emulation/xen/xen-4.6.0-r4.ebuild
235 @@ -0,0 +1,186 @@
236 +# Copyright 1999-2015 Gentoo Foundation
237 +# Distributed under the terms of the GNU General Public License v2
238 +# $Id$
239 +
240 +EAPI=5
241 +
242 +PYTHON_COMPAT=( python2_7 )
243 +
244 +inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
245 +
246 +MY_PV=${PV/_/-}
247 +MY_P=${PN}-${PV/_/-}
248 +
249 +if [[ $PV == *9999 ]]; then
250 + inherit git-r3
251 + KEYWORDS=""
252 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
253 + SRC_URI=""
254 +else
255 + KEYWORDS="~amd64 ~arm ~arm64 -x86"
256 + UPSTREAM_VER=0
257 + SECURITY_VER=0
258 + # var set to reflect https://dev.gentoo.org/~idella4/
259 + SEC_VER=3
260 + GENTOO_VER=
261 +
262 + [[ -n ${UPSTREAM_VER} ]] && \
263 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
264 + [[ -n ${SECURITY_VER} ]] && \
265 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
266 + https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz"
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 +RESTRICT="test"
288 +
289 +# Approved by QA team in bug #144032
290 +QA_WX_LOAD="boot/xen-syms-${PV}"
291 +
292 +REQUIRED_USE="arm? ( debug )"
293 +
294 +S="${WORKDIR}/${MY_P}"
295 +
296 +pkg_setup() {
297 + python-any-r1_pkg_setup
298 + if [[ -z ${XEN_TARGET_ARCH} ]]; then
299 + if use amd64; then
300 + export XEN_TARGET_ARCH="x86_64"
301 + elif use arm; then
302 + export XEN_TARGET_ARCH="arm32"
303 + elif use arm64; then
304 + export XEN_TARGET_ARCH="arm64"
305 + else
306 + die "Unsupported architecture!"
307 + fi
308 + fi
309 +
310 + if use flask ; then
311 + export "XSM_ENABLE=y"
312 + export "FLASK_ENABLE=y"
313 + fi
314 +}
315 +
316 +src_prepare() {
317 + # Upstream's patchset
318 + if [[ -n ${UPSTREAM_VER} ]]; then
319 + EPATCH_SUFFIX="patch" \
320 + EPATCH_FORCE="yes" \
321 + EPATCH_OPTS="-p1" \
322 + epatch "${WORKDIR}"/patches-upstream
323 + fi
324 +
325 + if [[ -n ${SECURITY_VER} ]]; then
326 + einfo "Try to apply Xen Security patcheset"
327 + # apply main xen patches
328 + # Two parallel systems, both work side by side
329 + # Over time they may concdense into one. This will suffice for now
330 + EPATCH_SUFFIX="patch"
331 + EPATCH_FORCE="yes"
332 + for i in ${XEN_SECURITY_MAIN}; do
333 + epatch "${WORKDIR}"/patches-security/xen/$i
334 + done
335 +
336 + for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
337 + epatch $i
338 + done
339 + fi
340 +
341 + # Gentoo's patchset
342 + if [[ -n ${GENTOO_VER} ]]; then
343 + EPATCH_SUFFIX="patch" \
344 + EPATCH_FORCE="yes" \
345 + epatch "${WORKDIR}"/patches-gentoo
346 + fi
347 +
348 + epatch "${FILESDIR}"/${PN}-4.6-efi.patch
349 +
350 + # Drop .config
351 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
352 +
353 + if use efi; then
354 + export EFI_VENDOR="gentoo"
355 + export EFI_MOUNTPOINT="boot"
356 + fi
357 +
358 + # if the user *really* wants to use their own custom-cflags, let them
359 + if use custom-cflags; then
360 + einfo "User wants their own CFLAGS - removing defaults"
361 + # try and remove all the default custom-cflags
362 + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
363 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
364 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
365 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
366 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
367 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
368 + -i {} \; || die "failed to re-set custom-cflags"
369 + fi
370 +
371 + # remove -Werror for gcc-4.6's sake
372 + find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
373 + xargs sed -i 's/ *-Werror */ /'
374 + # not strictly necessary to fix this
375 + sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
376 +
377 + epatch_user
378 +}
379 +
380 +src_configure() {
381 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
382 +
383 + use debug && myopt="${myopt} debug=y"
384 +
385 + if use custom-cflags; then
386 + filter-flags -fPIE -fstack-protector
387 + replace-flags -O3 -O2
388 + else
389 + unset CFLAGS
390 + unset LDFLAGS
391 + unset ASFLAGS
392 + fi
393 +}
394 +
395 +src_compile() {
396 + # Send raw LDFLAGS so that --as-needed works
397 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
398 +}
399 +
400 +src_install() {
401 + local myopt
402 + use debug && myopt="${myopt} debug=y"
403 +
404 + # The 'make install' doesn't 'mkdir -p' the subdirs
405 + if use efi; then
406 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
407 + fi
408 +
409 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
410 +
411 + # make install likes to throw in some extra EFI bits if it built
412 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
413 +}
414 +
415 +pkg_postinst() {
416 + elog "Official Xen Guide and the unoffical wiki page:"
417 + elog " https://wiki.gentoo.org/wiki/Xen"
418 + elog " http://en.gentoo-wiki.com/wiki/Xen/"
419 +
420 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
421 +}