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: Wed, 21 Nov 2018 22:55:22
Message-Id: 1542870198.73ff6185788baae0aa83450ad0731b364dd1bf92.dlan@gentoo
1 commit: 73ff6185788baae0aa83450ad0731b364dd1bf92
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Wed Nov 21 05:28:29 2018 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 22 07:03:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73ff6185
7
8 app-emulation/xen: bump to 4.10.2-r2
9
10 Fixes for XSA-275,XSA-279,XSA-280
11
12 Closes: https://github.com/gentoo/gentoo/pull/10457
13
14 Package-Manager: Portage-2.3.52, Repoman-2.3.12
15 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
16 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
17
18 app-emulation/xen/Manifest | 1 +
19 app-emulation/xen/xen-4.10.2-r2.ebuild | 171 +++++++++++++++++++++++++++++++++
20 2 files changed, 172 insertions(+)
21
22 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
23 index 35d3a9ecca4..b45e8941bfd 100644
24 --- a/app-emulation/xen/Manifest
25 +++ b/app-emulation/xen/Manifest
26 @@ -1,6 +1,7 @@
27 DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524d89089e2e9b14a8399fb5bd2db5d12827035ab94cedbfd5d65134d8953e4062a50e0e8a9b320e9c34008db8fd364456f47fd9cd26 SHA512 49ee8497af3753f3d611bf12c65fb7a79abb018862f1af096e9dde3ddfe8780bb95fc3da338c8d5f16a5d6d233d606d4cf8025a3d0e2897bf2668a1d5b27b198
28 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
29 DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
30 +DIST xen-4.10.2-upstream-patches-2.tar.xz 37800 BLAKE2B ecf4c1a97a1d76eef925e79fd25a654695a954f81bf8a5884cd4b1007714c888d6d7e19839556c457cf49a2f20ee88d5689a0287ffd7b16487dac676b3386daf SHA512 e9212efd65827286b729b08eded4bd6deda4a9f0b72af26bf0d106a111dddd1b56e51154d3e2a2ee4b38fcf4e8a81f30ffe2a6b711b9261e50e5954447d30e60
31 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
32 DIST xen-4.11.0-upstream-patches-2.tar.xz 83788 BLAKE2B 3f612492827a1408a3ba058c64b8b9562f7415d19f15241257b7b6754aed472e37538bfed2a017c6664b276f43a1e9c5f87b60454b2eaa0613c84edeb035a28d SHA512 cddc270f2fddbf75f33b45496f5db4586b5463d65fa3604e9df48c116231f088551213c2a021f2b0ad329f7290b36bfdd577cda506c359311c65e897cdf50bd1
33 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
34
35 diff --git a/app-emulation/xen/xen-4.10.2-r2.ebuild b/app-emulation/xen/xen-4.10.2-r2.ebuild
36 new file mode 100644
37 index 00000000000..a0cb05ddbdb
38 --- /dev/null
39 +++ b/app-emulation/xen/xen-4.10.2-r2.ebuild
40 @@ -0,0 +1,171 @@
41 +# Copyright 1999-2018 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +
46 +PYTHON_COMPAT=( python2_7 )
47 +
48 +inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
49 +
50 +MY_PV=${PV/_/-}
51 +MY_P=${PN}-${MY_PV}
52 +
53 +if [[ $PV == *9999 ]]; then
54 + inherit git-r3
55 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
56 + SRC_URI=""
57 +else
58 + KEYWORDS="~amd64 ~arm -x86"
59 + UPSTREAM_VER=2
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 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${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="https://downloads.xenproject.org/release/xen/${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="https://www.xenproject.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 + [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
123 +
124 + # Security patchset
125 + if [[ -n ${SECURITY_VER} ]]; then
126 + einfo "Try to apply Xen Security patch set"
127 + # apply main xen patches
128 + # Two parallel systems, both work side by side
129 + # Over time they may concdense into one. This will suffice for now
130 + source "${WORKDIR}"/patches-security/${PV}.conf
131 +
132 + local i
133 + for i in ${XEN_SECURITY_MAIN}; do
134 + eapply "${WORKDIR}"/patches-security/xen/$i
135 + done
136 + fi
137 +
138 + # Gentoo's patchset
139 + [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
140 +
141 + eapply "${FILESDIR}"/${PN}-4.6-efi.patch
142 +
143 + # Drop .config
144 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
145 +
146 + if use efi; then
147 + export EFI_VENDOR="gentoo"
148 + export EFI_MOUNTPOINT="boot"
149 + fi
150 +
151 + # if the user *really* wants to use their own custom-cflags, let them
152 + if use custom-cflags; then
153 + einfo "User wants their own CFLAGS - removing defaults"
154 + # try and remove all the default custom-cflags
155 + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
156 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
157 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
158 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
159 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
160 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
161 + -i {} \; || die "failed to re-set custom-cflags"
162 + fi
163 +
164 + default
165 +}
166 +
167 +src_configure() {
168 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
169 +
170 + use debug && myopt="${myopt} debug=y"
171 +
172 + if use custom-cflags; then
173 + filter-flags -fPIE -fstack-protector
174 + replace-flags -O3 -O2
175 + else
176 + unset CFLAGS
177 + unset LDFLAGS
178 + unset ASFLAGS
179 + fi
180 +}
181 +
182 +src_compile() {
183 + # Send raw LDFLAGS so that --as-needed works
184 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
185 +}
186 +
187 +src_install() {
188 + local myopt
189 + use debug && myopt="${myopt} debug=y"
190 +
191 + # The 'make install' doesn't 'mkdir -p' the subdirs
192 + if use efi; then
193 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
194 + fi
195 +
196 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
197 +
198 + # make install likes to throw in some extra EFI bits if it built
199 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
200 +}
201 +
202 +pkg_postinst() {
203 + elog "Official Xen Guide:"
204 + elog " https://wiki.gentoo.org/wiki/Xen"
205 +
206 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
207 +
208 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
209 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
210 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
211 +}