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: Thu, 18 Feb 2016 03:18:00
Message-Id: 1455764782.223a79a902da106e37f1147f4ccc6588866389dd.dlan@gentoo
1 commit: 223a79a902da106e37f1147f4ccc6588866389dd
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 18 02:56:36 2016 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 18 03:06:22 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223a79a9
7
8 app-emulation/xen: bump to 4.6.1
9
10 Package-Manager: portage-2.2.27
11
12 app-emulation/xen/Manifest | 1 +
13 app-emulation/xen/xen-4.6.1.ebuild | 197 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 198 insertions(+)
15
16 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
17 index 09a51fb..14b1aeb 100644
18 --- a/app-emulation/xen/Manifest
19 +++ b/app-emulation/xen/Manifest
20 @@ -1,6 +1,7 @@
21 DIST xen-4.5.2.tar.gz 18416220 SHA256 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8 SHA512 e0ce01a5356c254bfde48fae0b0e005c42c1615a7ccf4c1ba7dcf90784777b53995e9a9ae4575e3f19ef341014b34cb8c06e39d68be359f7fd69830501a144dd WHIRLPOOL b50ce28e58d8419915f7f85de7ab23128719fa07c54f28165c4ba864ffe57230230fa7cb61dd2ed7608b8bc178a072124aedc30c61a45fb8b745fc616715219b
22 DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
23 DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
24 +DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5
25 DIST xen-security-patches-0.tar.xz 5944 SHA256 c0456793064185f0781668264a09a2412a25e2ff8c4ce0d332204e37b94d7e96 SHA512 de812e66563e608548b220aa00c8fd71973af748a00cea79959f46a5b6893a38248d2ea455026af43f47e3f5e566d08b5a6f3d18f22e940d75d2a2ca76cec3d3 WHIRLPOOL 3e18d32798bdfe584ee8d102963090b569ec3660fd5723d8c608091e5c7d935c1edced5e258d92bf51fe06975455a3ae33dfedd01702c6076aedf97ea61f2d1b
26 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
27 DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
28
29 diff --git a/app-emulation/xen/xen-4.6.1.ebuild b/app-emulation/xen/xen-4.6.1.ebuild
30 new file mode 100644
31 index 0000000..3a1959d
32 --- /dev/null
33 +++ b/app-emulation/xen/xen-4.6.1.ebuild
34 @@ -0,0 +1,197 @@
35 +# Copyright 1999-2016 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +# $Id$
38 +
39 +EAPI=5
40 +
41 +PYTHON_COMPAT=( python2_7 )
42 +
43 +inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
44 +
45 +MY_PV=${PV/_/-}
46 +MY_P=${PN}-${PV/_/-}
47 +
48 +if [[ $PV == *9999 ]]; then
49 + inherit git-r3
50 + KEYWORDS=""
51 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
52 + SRC_URI=""
53 +else
54 + KEYWORDS="~amd64 ~arm ~arm64 -x86"
55 + UPSTREAM_VER=
56 + SECURITY_VER=
57 + # var set to reflect https://dev.gentoo.org/~idella4/
58 + # first instance of UPS_VER (usptream ver)
59 + UPS_VER=
60 + SEC_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 + https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
66 + [[ -n ${SECURITY_VER} ]] && \
67 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
68 + https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SEC_VER}.tar.gz"
69 + [[ -n ${GENTOO_VER} ]] && \
70 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
71 + SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
72 + ${UPSTREAM_PATCHSET_URI}
73 + ${SECURITY_PATCHSET_URI}
74 + ${GENTOO_PATCHSET_URI}"
75 +fi
76 +
77 +DESCRIPTION="The Xen virtual machine monitor"
78 +HOMEPAGE="http://xen.org/"
79 +LICENSE="GPL-2"
80 +SLOT="0"
81 +IUSE="custom-cflags debug efi flask"
82 +
83 +DEPEND="${PYTHON_DEPS}
84 + efi? ( >=sys-devel/binutils-2.22[multitarget] )
85 + !efi? ( >=sys-devel/binutils-2.22 )"
86 +RDEPEND=""
87 +PDEPEND="~app-emulation/xen-tools-${PV}"
88 +
89 +# no tests are available for the hypervisor
90 +# prevent the silliness of /usr/lib/debug/usr/lib/debug files
91 +# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
92 +RESTRICT="test splitdebug strip"
93 +
94 +# Approved by QA team in bug #144032
95 +QA_WX_LOAD="boot/xen-syms-${PV}"
96 +
97 +REQUIRED_USE="arm? ( debug )"
98 +
99 +S="${WORKDIR}/${MY_P}"
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 + if use flask ; then
116 + export "XSM_ENABLE=y"
117 + export "FLASK_ENABLE=y"
118 + fi
119 +}
120 +
121 +src_prepare() {
122 + # Upstream's patchset
123 + if [[ -n ${UPSTREAM_VER} ]]; then
124 + EPATCH_SUFFIX="patch" \
125 + EPATCH_FORCE="yes" \
126 + EPATCH_OPTS="-p1" \
127 + epatch "${WORKDIR}"/patches-upstream \
128 + "${WORKDIR}"/libexec.patch
129 + fi
130 +
131 + if [[ -n ${SECURITY_VER} ]]; then
132 + einfo "Try to apply Xen Security patcheset"
133 + # apply main xen patches
134 + # Two parallel systems, both work side by side
135 + # Over time they may concdense into one. This will suffice for now
136 + EPATCH_SUFFIX="patch"
137 + EPATCH_FORCE="yes"
138 + for i in ${XEN_SECURITY_MAIN}; do
139 + epatch "${WORKDIR}"/patches-security/xen/$i
140 + done
141 +
142 + for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
143 + epatch $i
144 + done
145 + fi
146 +
147 + # Gentoo's patchset
148 + if [[ -n ${GENTOO_VER} ]]; then
149 + EPATCH_SUFFIX="patch" \
150 + EPATCH_FORCE="yes" \
151 + epatch "${WORKDIR}"/patches-gentoo
152 + fi
153 +
154 + epatch "${FILESDIR}"/${PN}-4.6-efi.patch
155 +
156 + # Drop .config
157 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
158 +
159 + if use efi; then
160 + export EFI_VENDOR="gentoo"
161 + export EFI_MOUNTPOINT="boot"
162 + fi
163 +
164 + # if the user *really* wants to use their own custom-cflags, let them
165 + if use custom-cflags; then
166 + einfo "User wants their own CFLAGS - removing defaults"
167 + # try and remove all the default custom-cflags
168 + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
169 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
170 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
171 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
172 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
173 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
174 + -i {} \; || die "failed to re-set custom-cflags"
175 + fi
176 +
177 + # remove -Werror for gcc-4.6's sake
178 + find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
179 + xargs sed -i 's/ *-Werror */ /'
180 + # not strictly necessary to fix this
181 + sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
182 +
183 + epatch_user
184 +}
185 +
186 +src_configure() {
187 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
188 +
189 + use debug && myopt="${myopt} debug=y"
190 +
191 + if use custom-cflags; then
192 + filter-flags -fPIE -fstack-protector
193 + replace-flags -O3 -O2
194 + else
195 + unset CFLAGS
196 + unset LDFLAGS
197 + unset ASFLAGS
198 + fi
199 +}
200 +
201 +src_compile() {
202 + # Send raw LDFLAGS so that --as-needed works
203 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
204 +}
205 +
206 +src_install() {
207 + local myopt
208 + use debug && myopt="${myopt} debug=y"
209 +
210 + # The 'make install' doesn't 'mkdir -p' the subdirs
211 + if use efi; then
212 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
213 + fi
214 +
215 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
216 +
217 + # make install likes to throw in some extra EFI bits if it built
218 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
219 +}
220 +
221 +pkg_postinst() {
222 + elog "Official Xen Guide and the unoffical wiki page:"
223 + elog " https://wiki.gentoo.org/wiki/Xen"
224 + elog " http://en.gentoo-wiki.com/wiki/Xen/"
225 +
226 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
227 +
228 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
229 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
230 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
231 +}