1 |
commit: bc9bced5a747fa983ddee042bd3fed76838e2130 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 30 04:38:03 2017 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 30 05:34:18 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc9bced5 |
7 |
|
8 |
app-emulation/xen: version bump, 4.8.2 |
9 |
|
10 |
this bump also fix security issue |
11 |
XSA-231,232,233,234 |
12 |
|
13 |
Package-Manager: Portage-2.3.10, Repoman-2.3.3 |
14 |
|
15 |
app-emulation/xen/Manifest | 2 + |
16 |
app-emulation/xen/xen-4.8.2.ebuild | 192 +++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 194 insertions(+) |
18 |
|
19 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
20 |
index 2c523feac29..ef3bfb5280e 100644 |
21 |
--- a/app-emulation/xen/Manifest |
22 |
+++ b/app-emulation/xen/Manifest |
23 |
@@ -4,5 +4,7 @@ DIST xen-4.7.3.tar.gz 20722625 SHA256 5b5385b476e59e4cf31ecc6dd605df38814b83432b |
24 |
DIST xen-4.8.1-upstream-patches-0.tar.xz 57132 SHA256 6a6d466e74b28e50cc8ffcf56f6e3853dff73a5d936374404a2aab9dadb54566 SHA512 bcf43f7f9c15016576f225146a34e26122a6e35d953ca8df05d6d3b6b2465bd8e237e824d3d84dfd892f440b40d6e6b3bb7c16c3c79b8e04534b2bed60877f53 WHIRLPOOL 4470d244bed58f9b71a031da19cfe38a79badf426300637211c3e8dfdab02f2b87ed21d9a5340af267685aafd627451f8750b85d9afc73ed2a550c52b43c31ab |
25 |
DIST xen-4.8.1-upstream-patches-1.tar.xz 59600 SHA256 c2072f96e9c3acfac89b758fca31ed6dfa247c320a32359ed52dbe1c01865291 SHA512 962394f2ac891a64233436e49b3b8a94ecd0150d1a009912ab6264c39934585476e1720ead20b9bbf067fee4d67d76b960990c5d2001f26a883a05cf8650a359 WHIRLPOOL fc5409d426ed833039af6b690aa731a7853966930c03db1f59b34d7bcdba06c844860f08e8cbf770180b3a4a0e6e60e844a2f09d6b3798808c2d242ff648cd56 |
26 |
DIST xen-4.8.1.tar.gz 22516631 SHA256 1d69153b94561429293015f66463ee17c26404d1c014e646ecbcca6078581395 SHA512 9f535b4bb57d285dfb92c974d55513505cf485b2d7218fe8f6ed62768e2cee7f225b08adf6706590b2c0a04feca16e10915297c33b98e1b110f8ea7035f46c15 WHIRLPOOL ea367d4d08eaa464417f6c5e7143a52e085a8d0e515c99cbb49ac3ccd5c189aa79947d233754177698a076c28abf7a32c83ae29019ca70c6300839b09ca67bad |
27 |
+DIST xen-4.8.2-upstream-patches-0.tar.xz 7540 SHA256 d4bd4ce76097c49ebbad67a64814b9b41af0528b390ade15814cf0fb144e5e77 SHA512 34118ac114773cfc01a464de2a93b14905d3fb5edd62ae093f6cb40758f89c7fdc8449d0b7e9bfbaaee812b6f32b0c21860adeebb609376a22ce231e405b0837 WHIRLPOOL 0ff8c2fe3c349e6dc85e98644a813dd590c42bc78c6bbf98cdf77ed516e73fe5ca72a44935eae77f6ff9dcba8fef5d24c181d24b63b15bc470e7ed59098d5808 |
28 |
+DIST xen-4.8.2.tar.gz 22522336 SHA256 cb1cc2f0985e3d8651215e5d24c1fcc3036994fa7cc495a5091a2c85ece2aff9 SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da WHIRLPOOL 8e54e79219f89640162673da471a02ee8a39bb884e2376a79a09226462903185b49a771fef51ceca54c4dd42a110ee1214db6dbf94235a156a17d6c597634c3d |
29 |
DIST xen-security-patches-26.tar.xz 8276 SHA256 2a21ec429f8952875f7d95f24697600e606326f1a16d5622cee73628cd0401c1 SHA512 f54fc7e720a70258263d29cc482b8269386818ad75792de87b0d0357fdb6af81f2102e5983100db47563435fa28f875a84e8c6d73d44797aadaf0c469d9fb0ec WHIRLPOOL b31667d8415dc1fbcd60160fdbc2fe0ad4de9bd2171fda875f5585b8d7821c4c035b029dbf382abacf4b6be745aeeb708f419fdcabdd86f78ff1c13703802e3f |
30 |
DIST xen-security-patches-27.tar.xz 2604 SHA256 a8d01bc309894cb1bbde7a264003b873b77d1b4a1cb5c917b25a51e1b068f85b SHA512 ed9ef5ca3a39635a5ebbdc88663ea32f48c12e8ac1f193b8a66486bb62da692add38c5a89051753c992294528b4b4e92d121997317032a864f46776cb91d1897 WHIRLPOOL 07e2321959664083000a6cc90f30fa2365e206e8c1cc22e74afb085760e2c6378ba51f4ebcbf2b433c0d7a8ad9d98d0f43adb423b1bffc6a00eade362e1c59f5 |
31 |
|
32 |
diff --git a/app-emulation/xen/xen-4.8.2.ebuild b/app-emulation/xen/xen-4.8.2.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..924c8cb2fb9 |
35 |
--- /dev/null |
36 |
+++ b/app-emulation/xen/xen-4.8.2.ebuild |
37 |
@@ -0,0 +1,192 @@ |
38 |
+# Copyright 1999-2017 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=5 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python2_7 ) |
44 |
+ |
45 |
+inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs |
46 |
+ |
47 |
+MY_PV=${PV/_/-} |
48 |
+MY_P=${PN}-${PV/_/-} |
49 |
+ |
50 |
+if [[ $PV == *9999 ]]; then |
51 |
+ inherit git-r3 |
52 |
+ KEYWORDS="" |
53 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
54 |
+ SRC_URI="" |
55 |
+else |
56 |
+ KEYWORDS="~amd64 ~arm -x86" |
57 |
+ UPSTREAM_VER=0 |
58 |
+ SECURITY_VER= |
59 |
+ GENTOO_VER= |
60 |
+ |
61 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
62 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
63 |
+ [[ -n ${SECURITY_VER} ]] && \ |
64 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
65 |
+ [[ -n ${GENTOO_VER} ]] && \ |
66 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
67 |
+ SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz |
68 |
+ ${UPSTREAM_PATCHSET_URI} |
69 |
+ ${SECURITY_PATCHSET_URI} |
70 |
+ ${GENTOO_PATCHSET_URI}" |
71 |
+fi |
72 |
+ |
73 |
+DESCRIPTION="The Xen virtual machine monitor" |
74 |
+HOMEPAGE="http://xen.org/" |
75 |
+LICENSE="GPL-2" |
76 |
+SLOT="0" |
77 |
+IUSE="custom-cflags debug efi flask" |
78 |
+ |
79 |
+DEPEND="${PYTHON_DEPS} |
80 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
81 |
+ !efi? ( >=sys-devel/binutils-2.22 )" |
82 |
+RDEPEND="" |
83 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
84 |
+ |
85 |
+# no tests are available for the hypervisor |
86 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
87 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
88 |
+RESTRICT="test splitdebug strip" |
89 |
+ |
90 |
+# Approved by QA team in bug #144032 |
91 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
92 |
+ |
93 |
+REQUIRED_USE="arm? ( debug )" |
94 |
+ |
95 |
+S="${WORKDIR}/${MY_P}" |
96 |
+ |
97 |
+pkg_setup() { |
98 |
+ python-any-r1_pkg_setup |
99 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
100 |
+ if use amd64; then |
101 |
+ export XEN_TARGET_ARCH="x86_64" |
102 |
+ elif use arm; then |
103 |
+ export XEN_TARGET_ARCH="arm32" |
104 |
+ elif use arm64; then |
105 |
+ export XEN_TARGET_ARCH="arm64" |
106 |
+ else |
107 |
+ die "Unsupported architecture!" |
108 |
+ fi |
109 |
+ fi |
110 |
+ |
111 |
+ if use flask ; then |
112 |
+ export "XSM_ENABLE=y" |
113 |
+ export "FLASK_ENABLE=y" |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ # Upstream's patchset |
119 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
120 |
+ EPATCH_SUFFIX="patch" \ |
121 |
+ EPATCH_FORCE="yes" \ |
122 |
+ EPATCH_OPTS="-p1" \ |
123 |
+ epatch "${WORKDIR}"/patches-upstream |
124 |
+ fi |
125 |
+ |
126 |
+ # Security patchset |
127 |
+ if [[ -n ${SECURITY_VER} ]]; then |
128 |
+ einfo "Try to apply Xen Security patch set" |
129 |
+ # apply main xen patches |
130 |
+ # Two parallel systems, both work side by side |
131 |
+ # Over time they may concdense into one. This will suffice for now |
132 |
+ EPATCH_SUFFIX="patch" |
133 |
+ EPATCH_FORCE="yes" |
134 |
+ |
135 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
136 |
+ |
137 |
+ for i in ${XEN_SECURITY_MAIN}; do |
138 |
+ epatch "${WORKDIR}"/patches-security/xen/$i |
139 |
+ done |
140 |
+ fi |
141 |
+ |
142 |
+ # Gentoo's patchset |
143 |
+ if [[ -n ${GENTOO_VER} ]]; then |
144 |
+ EPATCH_SUFFIX="patch" \ |
145 |
+ EPATCH_FORCE="yes" \ |
146 |
+ epatch "${WORKDIR}"/patches-gentoo |
147 |
+ fi |
148 |
+ |
149 |
+ epatch "${FILESDIR}"/${PN}-4.6-efi.patch |
150 |
+ |
151 |
+ # Drop .config |
152 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
153 |
+ |
154 |
+ if use efi; then |
155 |
+ export EFI_VENDOR="gentoo" |
156 |
+ export EFI_MOUNTPOINT="boot" |
157 |
+ fi |
158 |
+ |
159 |
+ # if the user *really* wants to use their own custom-cflags, let them |
160 |
+ if use custom-cflags; then |
161 |
+ einfo "User wants their own CFLAGS - removing defaults" |
162 |
+ # try and remove all the default custom-cflags |
163 |
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
164 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
165 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
166 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
167 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
168 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
169 |
+ -i {} \; || die "failed to re-set custom-cflags" |
170 |
+ fi |
171 |
+ |
172 |
+ # remove -Werror for gcc-4.6's sake |
173 |
+ find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ |
174 |
+ xargs sed -i 's/ *-Werror */ /' |
175 |
+ # not strictly necessary to fix this |
176 |
+ sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py" |
177 |
+ |
178 |
+ # Bug #575868 converted to a sed statement, typo of one char |
179 |
+ sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
180 |
+ |
181 |
+ epatch_user |
182 |
+} |
183 |
+ |
184 |
+src_configure() { |
185 |
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
186 |
+ |
187 |
+ use debug && myopt="${myopt} debug=y" |
188 |
+ |
189 |
+ if use custom-cflags; then |
190 |
+ filter-flags -fPIE -fstack-protector |
191 |
+ replace-flags -O3 -O2 |
192 |
+ else |
193 |
+ unset CFLAGS |
194 |
+ unset LDFLAGS |
195 |
+ unset ASFLAGS |
196 |
+ fi |
197 |
+} |
198 |
+ |
199 |
+src_compile() { |
200 |
+ # Send raw LDFLAGS so that --as-needed works |
201 |
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
202 |
+} |
203 |
+ |
204 |
+src_install() { |
205 |
+ local myopt |
206 |
+ use debug && myopt="${myopt} debug=y" |
207 |
+ |
208 |
+ # The 'make install' doesn't 'mkdir -p' the subdirs |
209 |
+ if use efi; then |
210 |
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
211 |
+ fi |
212 |
+ |
213 |
+ emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
214 |
+ |
215 |
+ # make install likes to throw in some extra EFI bits if it built |
216 |
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
217 |
+} |
218 |
+ |
219 |
+pkg_postinst() { |
220 |
+ elog "Official Xen Guide and the unoffical wiki page:" |
221 |
+ elog " https://wiki.gentoo.org/wiki/Xen" |
222 |
+ elog " http://en.gentoo-wiki.com/wiki/Xen/" |
223 |
+ |
224 |
+ use efi && einfo "The efi executable is installed in boot/efi/gentoo" |
225 |
+ |
226 |
+ elog "You can optionally block the installation of /boot/xen-syms by an entry" |
227 |
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
228 |
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
229 |
+} |