1 |
commit: 2bfd1dc774e87e20ccd6f77a4847ec7126501e43 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 31 13:34:55 2017 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 31 13:42:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bfd1dc7 |
7 |
|
8 |
app-emulation/xen: security fix updates |
9 |
|
10 |
fix XSA-248, 249, 250, 251 |
11 |
|
12 |
Gentoo-Bug: 641566 |
13 |
|
14 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
15 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
16 |
|
17 |
app-emulation/xen-tools/Manifest | 3 + |
18 |
app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild | 454 ++++++++++++++++++++++ |
19 |
app-emulation/xen/Manifest | 1 + |
20 |
app-emulation/xen/xen-4.9.1-r1.ebuild | 171 ++++++++ |
21 |
4 files changed, 629 insertions(+) |
22 |
|
23 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
24 |
index 444a38987a7..227c9881981 100644 |
25 |
--- a/app-emulation/xen-tools/Manifest |
26 |
+++ b/app-emulation/xen-tools/Manifest |
27 |
@@ -1,9 +1,12 @@ |
28 |
DIST ovmf-20151110.tar.bz2 27518370 BLAKE2B c4ba51e59ca3f597d75639a792b1f307a70dc6127917306e6ce182a76646435bec8006f7db9ac5c580e0ad79465a2b2902cffa90139d367c89d16e28280a978b SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 |
29 |
+DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a |
30 |
DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c |
31 |
DIST xen-4.8.2-upstream-patches-2.tar.xz 38852 BLAKE2B cbc7bad4703fabd05b703c66268df0670e2ae97b77007895dceaf6465b12a2f9fbe3773c7735b307427ad18c61711b20beb7f3ae6b1f1b8b5efda2a847fec0ec SHA512 536823eabf03e92585a8c5cde90ce502672dd1ec080b28b39411d6a778b899436a57bfb633f11c94d48d2f963848b7771e469f5ea53e84b580976f631f69cc5d |
32 |
DIST xen-4.8.2.tar.gz 22522336 BLAKE2B 2c9da971622b4e52fe78fa029107bb1c5f945a63605406493df607c410c6f2a8c2cdb38b1eb30c1bc1c8bc6e5620efad977c3ba55e04c579c01d51f0104afcce SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da |
33 |
DIST xen-4.9.0-upstream-patches-0.tar.xz 58780 BLAKE2B 6d12a5a5bb7d2be7ca6bb8636648ee219c9526dd34086c929d8cd32d096d2454d6cb499d459b436f228fa49f42ef3a1f5fbe9b5c84557e4054565a9edc0daad6 SHA512 98c601d791661a306e3dce5befb37b80de8a71cdd1759f3da00b199d48e3b9468efd1332e26ae044ad616b41a02771ad07a1c96972103b7e0aa39b93fb556999 |
34 |
DIST xen-4.9.0.tar.gz 23361741 BLAKE2B 1cfebb791ca5e51eda9b86a5d98e0883fab1554f5ac805fc065916fbbd3695e6b0f11ca75935a8f973735cc8dd83e38fe4a670d8489010be865be49d8fc1a341 SHA512 97f8075c49ef9ec0adbe95106c0cff4f9379578fd568777697565476c3fd948335d72ddcacf8be65fd9db219c0a35dcdc007f355f7e5874dd950fd4c0a0f966f |
35 |
+DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed |
36 |
DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274 |
37 |
DIST xen-gentoo-patches-10.tar.xz 27876 BLAKE2B 8efece8548a046b47c04e5b9354ca8bdff55affd6c6bc67315ac7536778fbaa183d346e0ff83e365030df2433bddf845188a1c3fb8feaea2e93d5ba0dd1c779a SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece |
38 |
DIST xen-ovmf-patches-2.tar.xz 4344 BLAKE2B 1514c89dcba05c84281e9d46ec5c3e9e946ea777dcbe64d1d7689298e187aac2c9a5febf407d79bdb3ebe47563972ea66e0f5204590c5abc98df9cf24549b92d SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 |
39 |
+DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b |
40 |
|
41 |
diff --git a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild |
42 |
new file mode 100644 |
43 |
index 00000000000..4f9eb745833 |
44 |
--- /dev/null |
45 |
+++ b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild |
46 |
@@ -0,0 +1,454 @@ |
47 |
+# Copyright 1999-2017 Gentoo Foundation |
48 |
+# Distributed under the terms of the GNU General Public License v2 |
49 |
+ |
50 |
+EAPI=6 |
51 |
+ |
52 |
+PYTHON_COMPAT=( python2_7 ) |
53 |
+PYTHON_REQ_USE='ncurses,xml,threads' |
54 |
+ |
55 |
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
56 |
+ |
57 |
+MY_PV=${PV/_/-} |
58 |
+MAJOR_V="$(get_version_component_range 1-2)" |
59 |
+ |
60 |
+if [[ $PV == *9999 ]]; then |
61 |
+ inherit git-r3 |
62 |
+ KEYWORDS="" |
63 |
+ REPO="xen.git" |
64 |
+ EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
65 |
+ S="${WORKDIR}/${REPO}" |
66 |
+else |
67 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
68 |
+ UPSTREAM_VER=1 |
69 |
+ SECURITY_VER= |
70 |
+ # xen-tools's gentoo patches tarball |
71 |
+ GENTOO_VER=10 |
72 |
+ # xen-tools's gentoo patches version which apply to this specific ebuild |
73 |
+ GENTOO_GPV=0 |
74 |
+ # xen-tools ovmf's patches |
75 |
+ OVMF_VER=3 |
76 |
+ |
77 |
+ SEABIOS_VER=1.10.0 |
78 |
+ # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05 |
79 |
+ OVMF_PV=20170321 |
80 |
+ |
81 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
82 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
83 |
+ [[ -n ${SECURITY_VER} ]] && \ |
84 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz" |
85 |
+ [[ -n ${GENTOO_VER} ]] && \ |
86 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
87 |
+ [[ -n ${OVMF_VER} ]] && \ |
88 |
+ OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
89 |
+ |
90 |
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz |
91 |
+ http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
92 |
+ https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
93 |
+ ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz |
94 |
+ ${OVMF_PATCHSET_URI} ) |
95 |
+ ${UPSTREAM_PATCHSET_URI} |
96 |
+ ${SECURITY_PATCHSET_URI} |
97 |
+ ${GENTOO_PATCHSET_URI}" |
98 |
+ |
99 |
+ S="${WORKDIR}/xen-${MY_PV}" |
100 |
+fi |
101 |
+ |
102 |
+DESCRIPTION="Xen tools including QEMU and xl" |
103 |
+HOMEPAGE="https://www.xenproject.org" |
104 |
+DOCS=( README docs/README.xen-bugtool ) |
105 |
+ |
106 |
+LICENSE="GPL-2" |
107 |
+SLOT="0/${MAJOR_V}" |
108 |
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
109 |
+# >=dev-lang/ocaml-4 stable |
110 |
+# Masked in profiles/eapi-5-files instead |
111 |
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios" |
112 |
+ |
113 |
+REQUIRED_USE=" |
114 |
+ ${PYTHON_REQUIRED_USE} |
115 |
+ pygrub? ( python ) |
116 |
+ ovmf? ( hvm ) |
117 |
+ ^^ ( qemu system-qemu )" |
118 |
+ |
119 |
+COMMON_DEPEND=" |
120 |
+ sys-apps/pciutils |
121 |
+ dev-libs/lzo:2 |
122 |
+ dev-libs/glib:2 |
123 |
+ dev-libs/yajl |
124 |
+ dev-libs/libaio |
125 |
+ dev-libs/libgcrypt:0 |
126 |
+ sys-libs/zlib |
127 |
+ ${PYTHON_DEPS} |
128 |
+" |
129 |
+ |
130 |
+DEPEND="${COMMON_DEPEND} |
131 |
+ >=sys-kernel/linux-headers-4.11 |
132 |
+ dev-python/lxml[${PYTHON_USEDEP}] |
133 |
+ x86? ( sys-devel/dev86 |
134 |
+ sys-power/iasl ) |
135 |
+ pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
136 |
+ api? ( dev-libs/libxml2 |
137 |
+ net-misc/curl ) |
138 |
+ ovmf? ( |
139 |
+ !arm? ( !arm64? ( dev-lang/nasm ) ) |
140 |
+ $(python_gen_impl_dep sqlite) |
141 |
+ ) |
142 |
+ !amd64? ( >=sys-apps/dtc-1.4.0 ) |
143 |
+ amd64? ( sys-devel/bin86 |
144 |
+ system-seabios? ( sys-firmware/seabios ) |
145 |
+ sys-firmware/ipxe |
146 |
+ sys-devel/dev86 |
147 |
+ sys-power/iasl ) |
148 |
+ dev-lang/perl |
149 |
+ app-misc/pax-utils |
150 |
+ doc? ( |
151 |
+ app-text/ghostscript-gpl |
152 |
+ app-text/pandoc |
153 |
+ dev-python/markdown[${PYTHON_USEDEP}] |
154 |
+ dev-texlive/texlive-latexextra |
155 |
+ media-gfx/transfig |
156 |
+ ) |
157 |
+ hvm? ( x11-proto/xproto |
158 |
+ !net-libs/libiscsi ) |
159 |
+ qemu? ( |
160 |
+ app-arch/snappy:= |
161 |
+ x11-libs/pixman |
162 |
+ sdl? ( media-libs/libsdl[X] ) |
163 |
+ ) |
164 |
+ system-qemu? ( app-emulation/qemu[xen] ) |
165 |
+ ocaml? ( dev-ml/findlib |
166 |
+ >=dev-lang/ocaml-4 )" |
167 |
+ |
168 |
+RDEPEND="${COMMON_DEPEND} |
169 |
+ sys-apps/iproute2[-minimal] |
170 |
+ net-misc/bridge-utils |
171 |
+ screen? ( |
172 |
+ app-misc/screen |
173 |
+ app-admin/logrotate |
174 |
+ )" |
175 |
+ |
176 |
+# hvmloader is used to bootstrap a fully virtualized kernel |
177 |
+# Approved by QA team in bug #144032 |
178 |
+QA_WX_LOAD=" |
179 |
+ usr/libexec/xen/boot/hvmloader |
180 |
+ usr/share/qemu-xen/qemu/s390-ccw.img |
181 |
+ usr/share/qemu-xen/qemu/u-boot.e500 |
182 |
+" |
183 |
+ |
184 |
+QA_PREBUILT=" |
185 |
+ usr/libexec/xen/bin/ivshmem-client |
186 |
+ usr/libexec/xen/bin/ivshmem-server |
187 |
+ usr/libexec/xen/bin/qemu-img |
188 |
+ usr/libexec/xen/bin/qemu-io |
189 |
+ usr/libexec/xen/bin/qemu-nbd |
190 |
+ usr/libexec/xen/bin/qemu-system-i386 |
191 |
+ usr/libexec/xen/bin/virtfs-proxy-helper |
192 |
+ usr/libexec/xen/libexec/xen-bridge-helper |
193 |
+ usr/share/qemu-xen/qemu/s390-ccw.img |
194 |
+ usr/share/qemu-xen/qemu/u-boot.e500 |
195 |
+" |
196 |
+ |
197 |
+RESTRICT="test" |
198 |
+ |
199 |
+pkg_setup() { |
200 |
+ python_setup |
201 |
+ export "CONFIG_LOMOUNT=y" |
202 |
+ |
203 |
+ #bug 522642, disable compile tools/tests |
204 |
+ export "CONFIG_TESTS=n" |
205 |
+ |
206 |
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
207 |
+ if use x86 && use amd64; then |
208 |
+ die "Confusion! Both x86 and amd64 are set in your use flags!" |
209 |
+ elif use x86; then |
210 |
+ export XEN_TARGET_ARCH="x86_32" |
211 |
+ elif use amd64 ; then |
212 |
+ export XEN_TARGET_ARCH="x86_64" |
213 |
+ elif use arm; then |
214 |
+ export XEN_TARGET_ARCH="arm32" |
215 |
+ elif use arm64; then |
216 |
+ export XEN_TARGET_ARCH="arm64" |
217 |
+ else |
218 |
+ die "Unsupported architecture!" |
219 |
+ fi |
220 |
+ fi |
221 |
+} |
222 |
+ |
223 |
+src_prepare() { |
224 |
+ local i |
225 |
+ |
226 |
+ # Upstream's patchset |
227 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
228 |
+ einfo "Try to apply Xen Upstream patch set" |
229 |
+ eapply "${WORKDIR}"/patches-upstream |
230 |
+ fi |
231 |
+ |
232 |
+ # Security patchset |
233 |
+ if [[ -n ${SECURITY_VER} ]]; then |
234 |
+ einfo "Try to apply Xen Security patch set" |
235 |
+ # apply main xen patches |
236 |
+ # Two parallel systems, both work side by side |
237 |
+ # Over time they may concdense into one. This will suffice for now |
238 |
+ EPATCH_SUFFIX="patch" |
239 |
+ EPATCH_FORCE="yes" |
240 |
+ |
241 |
+ source "${WORKDIR}"/patches-security/${PV}.conf || die |
242 |
+ |
243 |
+ for i in ${XEN_SECURITY_MAIN}; do |
244 |
+ eapply "${WORKDIR}"/patches-security/xen/$i |
245 |
+ done |
246 |
+ |
247 |
+ # apply qemu-xen/upstream patches |
248 |
+ pushd "${S}"/tools/qemu-xen/ > /dev/null |
249 |
+ for i in ${XEN_SECURITY_QEMUU}; do |
250 |
+ eapply "${WORKDIR}"/patches-security/qemuu/$i |
251 |
+ done |
252 |
+ popd > /dev/null |
253 |
+ |
254 |
+ # apply qemu-traditional patches |
255 |
+ pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
256 |
+ for i in ${XEN_SECURITY_QEMUT}; do |
257 |
+ eapply "${WORKDIR}"/patches-security/qemut/$i |
258 |
+ done |
259 |
+ popd > /dev/null |
260 |
+ fi |
261 |
+ |
262 |
+ # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
263 |
+ mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
264 |
+ pushd tools/firmware/ > /dev/null |
265 |
+ ln -s seabios-dir-remote seabios-dir || die |
266 |
+ popd > /dev/null |
267 |
+ |
268 |
+ # Gentoo's patchset |
269 |
+ if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
270 |
+ einfo "Try to apply Gentoo specific patch set" |
271 |
+ source "${FILESDIR}"/gentoo-patches.conf || die |
272 |
+ _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
273 |
+ for i in ${!_gpv}; do |
274 |
+ eapply "${WORKDIR}"/patches-gentoo/$i |
275 |
+ done |
276 |
+ fi |
277 |
+ |
278 |
+ # Ovmf's patchset |
279 |
+ if use ovmf; then |
280 |
+ if [[ -n ${OVMF_VER} ]];then |
281 |
+ einfo "Try to apply Ovmf patch set" |
282 |
+ pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
283 |
+ eapply "${WORKDIR}"/patches-ovmf |
284 |
+ popd > /dev/null |
285 |
+ fi |
286 |
+ mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
287 |
+ fi |
288 |
+ |
289 |
+ mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
290 |
+ |
291 |
+ # Fix texi2html build error with new texi2html, qemu.doc.html |
292 |
+ sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
293 |
+ |
294 |
+ use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
295 |
+ sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
296 |
+ -i tools/firmware/Makefile || die |
297 |
+ |
298 |
+ # Drop .config, fixes to gcc-4.6 |
299 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
300 |
+ |
301 |
+ # if the user *really* wants to use their own custom-cflags, let them |
302 |
+ if use custom-cflags; then |
303 |
+ einfo "User wants their own CFLAGS - removing defaults" |
304 |
+ |
305 |
+ # try and remove all the default cflags |
306 |
+ find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
307 |
+ -exec sed \ |
308 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
309 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
310 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
311 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
312 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
313 |
+ -i {} + || die "failed to re-set custom-cflags" |
314 |
+ else |
315 |
+ unset CFLAGS |
316 |
+ unset LDFLAGS |
317 |
+ unset ASFLAGS |
318 |
+ unset CPPFLAGS |
319 |
+ fi |
320 |
+ |
321 |
+ if ! use pygrub; then |
322 |
+ sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
323 |
+ fi |
324 |
+ |
325 |
+ if ! use python; then |
326 |
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
327 |
+ fi |
328 |
+ |
329 |
+ if ! use hvm; then |
330 |
+ sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
331 |
+ # Bug 351648 |
332 |
+ elif ! use x86 && ! has x86 $(get_all_abis); then |
333 |
+ mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
334 |
+ touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
335 |
+ export CPATH="${WORKDIR}"/extra-headers |
336 |
+ fi |
337 |
+ |
338 |
+ if use qemu; then |
339 |
+ if use sdl; then |
340 |
+ sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
341 |
+ tools/Makefile || die |
342 |
+ else |
343 |
+ sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
344 |
+ tools/qemu-xen-traditional/xen-setup || die |
345 |
+ sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
346 |
+ tools/Makefile || die |
347 |
+ fi |
348 |
+ else |
349 |
+ # Don't bother with qemu, only needed for fully virtualised guests |
350 |
+ sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
351 |
+ fi |
352 |
+ |
353 |
+ # Reset bash completion dir; Bug 472438 |
354 |
+ sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
355 |
+ -i Config.mk || die |
356 |
+ sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
357 |
+ |
358 |
+ # xencommons, Bug #492332, sed lighter weight than patching |
359 |
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
360 |
+ -i tools/hotplug/Linux/init.d/xencommons.in || die |
361 |
+ |
362 |
+ # fix bashishm |
363 |
+ sed -e '/Usage/s/\$//g' \ |
364 |
+ -i tools/hotplug/Linux/init.d/xendriverdomain.in || die |
365 |
+ |
366 |
+ # respect multilib, usr/lib/libcacard.so.0.0.0 |
367 |
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
368 |
+ -i tools/qemu-xen/configure || die |
369 |
+ |
370 |
+ #bug 518136, don't build 32bit exactuable for nomultilib profile |
371 |
+ if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
372 |
+ sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
373 |
+ fi |
374 |
+ |
375 |
+ # uncomment lines in xl.conf |
376 |
+ sed -e 's:^#autoballoon=:autoballoon=:' \ |
377 |
+ -e 's:^#lockfile=:lockfile=:' \ |
378 |
+ -e 's:^#vif.default.script=:vif.default.script=:' \ |
379 |
+ -i tools/examples/xl.conf || die |
380 |
+ |
381 |
+ default |
382 |
+} |
383 |
+ |
384 |
+src_configure() { |
385 |
+ local myconf="--prefix=${PREFIX}/usr \ |
386 |
+ --libdir=${PREFIX}/usr/$(get_libdir) \ |
387 |
+ --libexecdir=${PREFIX}/usr/libexec \ |
388 |
+ --localstatedir=${EPREFIX}/var \ |
389 |
+ --disable-werror \ |
390 |
+ --disable-xen \ |
391 |
+ --enable-tools \ |
392 |
+ --enable-docs \ |
393 |
+ $(use_enable pam) \ |
394 |
+ $(use_enable api xenapi) \ |
395 |
+ $(use_enable ovmf) \ |
396 |
+ $(use_enable ocaml ocamltools) \ |
397 |
+ --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
398 |
+ " |
399 |
+ |
400 |
+ use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
401 |
+ use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64" |
402 |
+ use amd64 && myconf+=" $(use_enable qemu-traditional)" |
403 |
+ econf ${myconf} |
404 |
+} |
405 |
+ |
406 |
+src_compile() { |
407 |
+ local myopt |
408 |
+ use debug && myopt="${myopt} debug=y" |
409 |
+ |
410 |
+ if test-flag-CC -fno-strict-overflow; then |
411 |
+ append-flags -fno-strict-overflow |
412 |
+ fi |
413 |
+ |
414 |
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt} |
415 |
+ |
416 |
+ if use doc; then |
417 |
+ emake -C docs build |
418 |
+ else |
419 |
+ emake -C docs man-pages |
420 |
+ fi |
421 |
+} |
422 |
+ |
423 |
+src_install() { |
424 |
+ # Override auto-detection in the build system, bug #382573 |
425 |
+ export INITD_DIR=/tmp/init.d |
426 |
+ export CONFIG_LEAF_DIR=../tmp/default |
427 |
+ |
428 |
+ # Let the build system compile installed Python modules. |
429 |
+ local PYTHONDONTWRITEBYTECODE |
430 |
+ export PYTHONDONTWRITEBYTECODE |
431 |
+ |
432 |
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
433 |
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools |
434 |
+ |
435 |
+ # Created at runtime |
436 |
+ rm -rv "${ED%/}/var/run" || die |
437 |
+ |
438 |
+ # Fix the remaining Python shebangs. |
439 |
+ python_fix_shebang "${D}" |
440 |
+ |
441 |
+ # Remove RedHat-specific stuff |
442 |
+ rm -rf "${D}"tmp || die |
443 |
+ |
444 |
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
445 |
+ use doc && dodoc -r docs/{pdf,txt} |
446 |
+ dodoc ${DOCS[@]} |
447 |
+ |
448 |
+ newconfd "${FILESDIR}"/xendomains.confd xendomains |
449 |
+ newconfd "${FILESDIR}"/xenstored.confd xenstored |
450 |
+ newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
451 |
+ newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
452 |
+ newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored |
453 |
+ newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
454 |
+ newinitd "${FILESDIR}"/xencommons.initd xencommons |
455 |
+ newconfd "${FILESDIR}"/xencommons.confd xencommons |
456 |
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
457 |
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
458 |
+ newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog |
459 |
+ |
460 |
+ if use screen; then |
461 |
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
462 |
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
463 |
+ keepdir /var/log/xen-consoles |
464 |
+ fi |
465 |
+ |
466 |
+ # For -static-libs wrt Bug 384355 |
467 |
+ if ! use static-libs; then |
468 |
+ rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
469 |
+ fi |
470 |
+ |
471 |
+ # for xendomains |
472 |
+ keepdir /etc/xen/auto |
473 |
+ |
474 |
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
475 |
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
476 |
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
477 |
+} |
478 |
+ |
479 |
+pkg_postinst() { |
480 |
+ elog "Official Xen Guide and the offical wiki page:" |
481 |
+ elog "https://wiki.gentoo.org/wiki/Xen" |
482 |
+ elog "https://wiki.xen.org/wiki/Main_Page" |
483 |
+ elog "" |
484 |
+ elog "Recommended to utilise the xencommons script to config sytem At boot" |
485 |
+ elog "Add by use of rc-update on completion of the install" |
486 |
+ |
487 |
+ if ! use hvm; then |
488 |
+ echo |
489 |
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
490 |
+ elog "support enable the hvm use flag." |
491 |
+ elog "An x86 or amd64 system is required to build HVM support." |
492 |
+ fi |
493 |
+ |
494 |
+ if use qemu; then |
495 |
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
496 |
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
497 |
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
498 |
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
499 |
+ fi |
500 |
+} |
501 |
|
502 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
503 |
index ffbe53c1187..04bb8fc006c 100644 |
504 |
--- a/app-emulation/xen/Manifest |
505 |
+++ b/app-emulation/xen/Manifest |
506 |
@@ -4,4 +4,5 @@ DIST xen-4.8.2.tar.gz 22522336 BLAKE2B 2c9da971622b4e52fe78fa029107bb1c5f945a636 |
507 |
DIST xen-4.9.0-upstream-patches-0.tar.xz 58780 BLAKE2B 6d12a5a5bb7d2be7ca6bb8636648ee219c9526dd34086c929d8cd32d096d2454d6cb499d459b436f228fa49f42ef3a1f5fbe9b5c84557e4054565a9edc0daad6 SHA512 98c601d791661a306e3dce5befb37b80de8a71cdd1759f3da00b199d48e3b9468efd1332e26ae044ad616b41a02771ad07a1c96972103b7e0aa39b93fb556999 |
508 |
DIST xen-4.9.0.tar.gz 23361741 BLAKE2B 1cfebb791ca5e51eda9b86a5d98e0883fab1554f5ac805fc065916fbbd3695e6b0f11ca75935a8f973735cc8dd83e38fe4a670d8489010be865be49d8fc1a341 SHA512 97f8075c49ef9ec0adbe95106c0cff4f9379578fd568777697565476c3fd948335d72ddcacf8be65fd9db219c0a35dcdc007f355f7e5874dd950fd4c0a0f966f |
509 |
DIST xen-4.9.1-upstream-patches-0.tar.xz 6856 BLAKE2B 52a7e3b456d330444166c36ce68b008150831b7bb5b64b4a3dbebfbbe8cd024311f3d7aadd1313b194bd5ce7a20cd2ca5a424754e59589b986490eda97bf5d06 SHA512 9af8861443a708c60df52c21512099a55a6018238350ece962a715b07ade9141cab2d46540b5d5e8e20347980f786f7d28ec130f7e8e03c46ff4808d3b36a913 |
510 |
+DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed |
511 |
DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274 |
512 |
|
513 |
diff --git a/app-emulation/xen/xen-4.9.1-r1.ebuild b/app-emulation/xen/xen-4.9.1-r1.ebuild |
514 |
new file mode 100644 |
515 |
index 00000000000..6b7b46c13e6 |
516 |
--- /dev/null |
517 |
+++ b/app-emulation/xen/xen-4.9.1-r1.ebuild |
518 |
@@ -0,0 +1,171 @@ |
519 |
+# Copyright 1999-2017 Gentoo Foundation |
520 |
+# Distributed under the terms of the GNU General Public License v2 |
521 |
+ |
522 |
+EAPI=6 |
523 |
+ |
524 |
+PYTHON_COMPAT=( python2_7 ) |
525 |
+ |
526 |
+inherit eutils flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs |
527 |
+ |
528 |
+MY_PV=${PV/_/-} |
529 |
+MY_P=${PN}-${MY_PV} |
530 |
+ |
531 |
+if [[ $PV == *9999 ]]; then |
532 |
+ inherit git-r3 |
533 |
+ KEYWORDS="" |
534 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
535 |
+ SRC_URI="" |
536 |
+else |
537 |
+ KEYWORDS="~amd64 ~arm -x86" |
538 |
+ UPSTREAM_VER=1 |
539 |
+ SECURITY_VER= |
540 |
+ GENTOO_VER= |
541 |
+ |
542 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
543 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
544 |
+ [[ -n ${SECURITY_VER} ]] && \ |
545 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
546 |
+ [[ -n ${GENTOO_VER} ]] && \ |
547 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
548 |
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz |
549 |
+ ${UPSTREAM_PATCHSET_URI} |
550 |
+ ${SECURITY_PATCHSET_URI} |
551 |
+ ${GENTOO_PATCHSET_URI}" |
552 |
+fi |
553 |
+ |
554 |
+DESCRIPTION="The Xen virtual machine monitor" |
555 |
+HOMEPAGE="https://www.xenproject.org" |
556 |
+LICENSE="GPL-2" |
557 |
+SLOT="0" |
558 |
+IUSE="custom-cflags debug efi flask" |
559 |
+ |
560 |
+DEPEND="${PYTHON_DEPS} |
561 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
562 |
+ !efi? ( >=sys-devel/binutils-2.22 )" |
563 |
+RDEPEND="" |
564 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
565 |
+ |
566 |
+# no tests are available for the hypervisor |
567 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
568 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
569 |
+RESTRICT="test splitdebug strip" |
570 |
+ |
571 |
+# Approved by QA team in bug #144032 |
572 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
573 |
+ |
574 |
+REQUIRED_USE="arm? ( debug )" |
575 |
+ |
576 |
+S="${WORKDIR}/${MY_P}" |
577 |
+ |
578 |
+pkg_setup() { |
579 |
+ python-any-r1_pkg_setup |
580 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
581 |
+ if use amd64; then |
582 |
+ export XEN_TARGET_ARCH="x86_64" |
583 |
+ elif use arm; then |
584 |
+ export XEN_TARGET_ARCH="arm32" |
585 |
+ elif use arm64; then |
586 |
+ export XEN_TARGET_ARCH="arm64" |
587 |
+ else |
588 |
+ die "Unsupported architecture!" |
589 |
+ fi |
590 |
+ fi |
591 |
+ |
592 |
+ if use flask ; then |
593 |
+ export "XSM_ENABLE=y" |
594 |
+ export "FLASK_ENABLE=y" |
595 |
+ fi |
596 |
+} |
597 |
+ |
598 |
+src_prepare() { |
599 |
+ # Upstream's patchset |
600 |
+ [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream |
601 |
+ |
602 |
+ # Security patchset |
603 |
+ if [[ -n ${SECURITY_VER} ]]; then |
604 |
+ einfo "Try to apply Xen Security patch set" |
605 |
+ # apply main xen patches |
606 |
+ # Two parallel systems, both work side by side |
607 |
+ # Over time they may concdense into one. This will suffice for now |
608 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
609 |
+ |
610 |
+ local i |
611 |
+ for i in ${XEN_SECURITY_MAIN}; do |
612 |
+ eapply "${WORKDIR}"/patches-security/xen/$i |
613 |
+ done |
614 |
+ fi |
615 |
+ |
616 |
+ # Gentoo's patchset |
617 |
+ [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo |
618 |
+ |
619 |
+ eapply "${FILESDIR}"/${PN}-4.6-efi.patch |
620 |
+ |
621 |
+ # Drop .config |
622 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
623 |
+ |
624 |
+ if use efi; then |
625 |
+ export EFI_VENDOR="gentoo" |
626 |
+ export EFI_MOUNTPOINT="boot" |
627 |
+ fi |
628 |
+ |
629 |
+ # if the user *really* wants to use their own custom-cflags, let them |
630 |
+ if use custom-cflags; then |
631 |
+ einfo "User wants their own CFLAGS - removing defaults" |
632 |
+ # try and remove all the default custom-cflags |
633 |
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
634 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
635 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
636 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
637 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
638 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
639 |
+ -i {} \; || die "failed to re-set custom-cflags" |
640 |
+ fi |
641 |
+ |
642 |
+ default |
643 |
+} |
644 |
+ |
645 |
+src_configure() { |
646 |
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
647 |
+ |
648 |
+ use debug && myopt="${myopt} debug=y" |
649 |
+ |
650 |
+ if use custom-cflags; then |
651 |
+ filter-flags -fPIE -fstack-protector |
652 |
+ replace-flags -O3 -O2 |
653 |
+ else |
654 |
+ unset CFLAGS |
655 |
+ unset LDFLAGS |
656 |
+ unset ASFLAGS |
657 |
+ fi |
658 |
+} |
659 |
+ |
660 |
+src_compile() { |
661 |
+ # Send raw LDFLAGS so that --as-needed works |
662 |
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
663 |
+} |
664 |
+ |
665 |
+src_install() { |
666 |
+ local myopt |
667 |
+ use debug && myopt="${myopt} debug=y" |
668 |
+ |
669 |
+ # The 'make install' doesn't 'mkdir -p' the subdirs |
670 |
+ if use efi; then |
671 |
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
672 |
+ fi |
673 |
+ |
674 |
+ emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
675 |
+ |
676 |
+ # make install likes to throw in some extra EFI bits if it built |
677 |
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
678 |
+} |
679 |
+ |
680 |
+pkg_postinst() { |
681 |
+ elog "Official Xen Guide:" |
682 |
+ elog " https://wiki.gentoo.org/wiki/Xen" |
683 |
+ |
684 |
+ use efi && einfo "The efi executable is installed in boot/efi/gentoo" |
685 |
+ |
686 |
+ elog "You can optionally block the installation of /boot/xen-syms by an entry" |
687 |
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
688 |
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
689 |
+} |