Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/
Date: Mon, 10 Sep 2018 09:36:25
Message-Id: 1536572053.28d592b1c8dc9b24b3dfd923288c58f8e4ed27e6.whissi@gentoo
1 commit: 28d592b1c8dc9b24b3dfd923288c58f8e4ed27e6
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 10 09:34:13 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 10 09:34:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28d592b1
7
8 app-emulation/xen: security cleanup (bug #643350)
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 app-emulation/xen/Manifest | 3 -
13 app-emulation/xen/xen-4.9.1-r1.ebuild | 171 ----------------------------------
14 app-emulation/xen/xen-4.9.1-r2.ebuild | 171 ----------------------------------
15 3 files changed, 345 deletions(-)
16
17 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
18 index cdc467c4300..bbea8c9067a 100644
19 --- a/app-emulation/xen/Manifest
20 +++ b/app-emulation/xen/Manifest
21 @@ -5,8 +5,5 @@ DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524
22 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
23 DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
24 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
25 -DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
26 -DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
27 -DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274
28 DIST xen-4.9.2-upstream-patches-1.tar.xz 13812 BLAKE2B fe8bf636dea9fbd21c9fc432817dc8e21ffb78bf70279b86babb6963a0dbebc17493eb6c016ee1093ef36e66693df25e8aeb35a568260f2e62a97a787b3c70bb SHA512 d75ea99531a10279736f89057857c257955800df6fe42bd742babfd5a9e527a2cb0d4dc5505b41df5b9db82246a8414f14b7084997ee798ffab657a3991b17ae
29 DIST xen-4.9.2.tar.gz 23392753 BLAKE2B 5f96f0e5062eff8ac2971eef85ea2bae0e94e7542151237937a1cf7e74690bb0ce1c952e830d2fc13b3277f70b9ed1de511afe4f780ad7b3be0c58742ece39b2 SHA512 e06aec25439abcc548c174ba8e271c23031ea704bcc2480905140aa68490064fbb1c58d9c4174f6617b4f7bbcddfda284317df6f480a6e5b5b5a2c71fbe0ac93
30
31 diff --git a/app-emulation/xen/xen-4.9.1-r1.ebuild b/app-emulation/xen/xen-4.9.1-r1.ebuild
32 deleted file mode 100644
33 index ff12221cf11..00000000000
34 --- a/app-emulation/xen/xen-4.9.1-r1.ebuild
35 +++ /dev/null
36 @@ -1,171 +0,0 @@
37 -# Copyright 1999-2018 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=6
41 -
42 -PYTHON_COMPAT=( python2_7 )
43 -
44 -inherit eutils flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
45 -
46 -MY_PV=${PV/_/-}
47 -MY_P=${PN}-${MY_PV}
48 -
49 -if [[ $PV == *9999 ]]; then
50 - inherit git-r3
51 - KEYWORDS="amd64"
52 - EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
53 - SRC_URI=""
54 -else
55 - KEYWORDS="amd64 ~arm -x86"
56 - UPSTREAM_VER=1
57 - SECURITY_VER=
58 - GENTOO_VER=
59 -
60 - [[ -n ${UPSTREAM_VER} ]] && \
61 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
62 - [[ -n ${SECURITY_VER} ]] && \
63 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
64 - [[ -n ${GENTOO_VER} ]] && \
65 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
66 - SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
67 - ${UPSTREAM_PATCHSET_URI}
68 - ${SECURITY_PATCHSET_URI}
69 - ${GENTOO_PATCHSET_URI}"
70 -fi
71 -
72 -DESCRIPTION="The Xen virtual machine monitor"
73 -HOMEPAGE="https://www.xenproject.org"
74 -LICENSE="GPL-2"
75 -SLOT="0"
76 -IUSE="custom-cflags debug efi flask"
77 -
78 -DEPEND="${PYTHON_DEPS}
79 - efi? ( >=sys-devel/binutils-2.22[multitarget] )
80 - !efi? ( >=sys-devel/binutils-2.22 )"
81 -RDEPEND=""
82 -PDEPEND="~app-emulation/xen-tools-${PV}"
83 -
84 -# no tests are available for the hypervisor
85 -# prevent the silliness of /usr/lib/debug/usr/lib/debug files
86 -# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
87 -RESTRICT="test splitdebug strip"
88 -
89 -# Approved by QA team in bug #144032
90 -QA_WX_LOAD="boot/xen-syms-${PV}"
91 -
92 -REQUIRED_USE="arm? ( debug )"
93 -
94 -S="${WORKDIR}/${MY_P}"
95 -
96 -pkg_setup() {
97 - python-any-r1_pkg_setup
98 - if [[ -z ${XEN_TARGET_ARCH} ]]; then
99 - if use amd64; then
100 - export XEN_TARGET_ARCH="x86_64"
101 - elif use arm; then
102 - export XEN_TARGET_ARCH="arm32"
103 - elif use arm64; then
104 - export XEN_TARGET_ARCH="arm64"
105 - else
106 - die "Unsupported architecture!"
107 - fi
108 - fi
109 -
110 - if use flask ; then
111 - export "XSM_ENABLE=y"
112 - export "FLASK_ENABLE=y"
113 - fi
114 -}
115 -
116 -src_prepare() {
117 - # Upstream's patchset
118 - [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
119 -
120 - # Security patchset
121 - if [[ -n ${SECURITY_VER} ]]; then
122 - einfo "Try to apply Xen Security patch set"
123 - # apply main xen patches
124 - # Two parallel systems, both work side by side
125 - # Over time they may concdense into one. This will suffice for now
126 - source "${WORKDIR}"/patches-security/${PV}.conf
127 -
128 - local i
129 - for i in ${XEN_SECURITY_MAIN}; do
130 - eapply "${WORKDIR}"/patches-security/xen/$i
131 - done
132 - fi
133 -
134 - # Gentoo's patchset
135 - [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
136 -
137 - eapply "${FILESDIR}"/${PN}-4.6-efi.patch
138 -
139 - # Drop .config
140 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
141 -
142 - if use efi; then
143 - export EFI_VENDOR="gentoo"
144 - export EFI_MOUNTPOINT="boot"
145 - fi
146 -
147 - # if the user *really* wants to use their own custom-cflags, let them
148 - if use custom-cflags; then
149 - einfo "User wants their own CFLAGS - removing defaults"
150 - # try and remove all the default custom-cflags
151 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
152 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
153 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
154 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
155 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
156 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
157 - -i {} \; || die "failed to re-set custom-cflags"
158 - fi
159 -
160 - default
161 -}
162 -
163 -src_configure() {
164 - use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
165 -
166 - use debug && myopt="${myopt} debug=y"
167 -
168 - if use custom-cflags; then
169 - filter-flags -fPIE -fstack-protector
170 - replace-flags -O3 -O2
171 - else
172 - unset CFLAGS
173 - unset LDFLAGS
174 - unset ASFLAGS
175 - fi
176 -}
177 -
178 -src_compile() {
179 - # Send raw LDFLAGS so that --as-needed works
180 - emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
181 -}
182 -
183 -src_install() {
184 - local myopt
185 - use debug && myopt="${myopt} debug=y"
186 -
187 - # The 'make install' doesn't 'mkdir -p' the subdirs
188 - if use efi; then
189 - mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
190 - fi
191 -
192 - emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
193 -
194 - # make install likes to throw in some extra EFI bits if it built
195 - use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
196 -}
197 -
198 -pkg_postinst() {
199 - elog "Official Xen Guide:"
200 - elog " https://wiki.gentoo.org/wiki/Xen"
201 -
202 - use efi && einfo "The efi executable is installed in boot/efi/gentoo"
203 -
204 - elog "You can optionally block the installation of /boot/xen-syms by an entry"
205 - elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
206 - elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
207 -}
208
209 diff --git a/app-emulation/xen/xen-4.9.1-r2.ebuild b/app-emulation/xen/xen-4.9.1-r2.ebuild
210 deleted file mode 100644
211 index 42dbb4d4642..00000000000
212 --- a/app-emulation/xen/xen-4.9.1-r2.ebuild
213 +++ /dev/null
214 @@ -1,171 +0,0 @@
215 -# Copyright 1999-2018 Gentoo Foundation
216 -# Distributed under the terms of the GNU General Public License v2
217 -
218 -EAPI=6
219 -
220 -PYTHON_COMPAT=( python2_7 )
221 -
222 -inherit eutils flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
223 -
224 -MY_PV=${PV/_/-}
225 -MY_P=${PN}-${MY_PV}
226 -
227 -if [[ $PV == *9999 ]]; then
228 - inherit git-r3
229 - KEYWORDS=""
230 - EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
231 - SRC_URI=""
232 -else
233 - KEYWORDS="~amd64 ~arm -x86"
234 - UPSTREAM_VER=2
235 - SECURITY_VER=
236 - GENTOO_VER=
237 -
238 - [[ -n ${UPSTREAM_VER} ]] && \
239 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
240 - [[ -n ${SECURITY_VER} ]] && \
241 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
242 - [[ -n ${GENTOO_VER} ]] && \
243 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
244 - SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
245 - ${UPSTREAM_PATCHSET_URI}
246 - ${SECURITY_PATCHSET_URI}
247 - ${GENTOO_PATCHSET_URI}"
248 -fi
249 -
250 -DESCRIPTION="The Xen virtual machine monitor"
251 -HOMEPAGE="https://www.xenproject.org"
252 -LICENSE="GPL-2"
253 -SLOT="0"
254 -IUSE="custom-cflags debug efi flask"
255 -
256 -DEPEND="${PYTHON_DEPS}
257 - efi? ( >=sys-devel/binutils-2.22[multitarget] )
258 - !efi? ( >=sys-devel/binutils-2.22 )"
259 -RDEPEND=""
260 -PDEPEND="~app-emulation/xen-tools-${PV}"
261 -
262 -# no tests are available for the hypervisor
263 -# prevent the silliness of /usr/lib/debug/usr/lib/debug files
264 -# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
265 -RESTRICT="test splitdebug strip"
266 -
267 -# Approved by QA team in bug #144032
268 -QA_WX_LOAD="boot/xen-syms-${PV}"
269 -
270 -REQUIRED_USE="arm? ( debug )"
271 -
272 -S="${WORKDIR}/${MY_P}"
273 -
274 -pkg_setup() {
275 - python-any-r1_pkg_setup
276 - if [[ -z ${XEN_TARGET_ARCH} ]]; then
277 - if use amd64; then
278 - export XEN_TARGET_ARCH="x86_64"
279 - elif use arm; then
280 - export XEN_TARGET_ARCH="arm32"
281 - elif use arm64; then
282 - export XEN_TARGET_ARCH="arm64"
283 - else
284 - die "Unsupported architecture!"
285 - fi
286 - fi
287 -
288 - if use flask ; then
289 - export "XSM_ENABLE=y"
290 - export "FLASK_ENABLE=y"
291 - fi
292 -}
293 -
294 -src_prepare() {
295 - # Upstream's patchset
296 - [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
297 -
298 - # Security patchset
299 - if [[ -n ${SECURITY_VER} ]]; then
300 - einfo "Try to apply Xen Security patch set"
301 - # apply main xen patches
302 - # Two parallel systems, both work side by side
303 - # Over time they may concdense into one. This will suffice for now
304 - source "${WORKDIR}"/patches-security/${PV}.conf
305 -
306 - local i
307 - for i in ${XEN_SECURITY_MAIN}; do
308 - eapply "${WORKDIR}"/patches-security/xen/$i
309 - done
310 - fi
311 -
312 - # Gentoo's patchset
313 - [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
314 -
315 - eapply "${FILESDIR}"/${PN}-4.6-efi.patch
316 -
317 - # Drop .config
318 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
319 -
320 - if use efi; then
321 - export EFI_VENDOR="gentoo"
322 - export EFI_MOUNTPOINT="boot"
323 - fi
324 -
325 - # if the user *really* wants to use their own custom-cflags, let them
326 - if use custom-cflags; then
327 - einfo "User wants their own CFLAGS - removing defaults"
328 - # try and remove all the default custom-cflags
329 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
330 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
331 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
332 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
333 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
334 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
335 - -i {} \; || die "failed to re-set custom-cflags"
336 - fi
337 -
338 - default
339 -}
340 -
341 -src_configure() {
342 - use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
343 -
344 - use debug && myopt="${myopt} debug=y"
345 -
346 - if use custom-cflags; then
347 - filter-flags -fPIE -fstack-protector
348 - replace-flags -O3 -O2
349 - else
350 - unset CFLAGS
351 - unset LDFLAGS
352 - unset ASFLAGS
353 - fi
354 -}
355 -
356 -src_compile() {
357 - # Send raw LDFLAGS so that --as-needed works
358 - emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
359 -}
360 -
361 -src_install() {
362 - local myopt
363 - use debug && myopt="${myopt} debug=y"
364 -
365 - # The 'make install' doesn't 'mkdir -p' the subdirs
366 - if use efi; then
367 - mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
368 - fi
369 -
370 - emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
371 -
372 - # make install likes to throw in some extra EFI bits if it built
373 - use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
374 -}
375 -
376 -pkg_postinst() {
377 - elog "Official Xen Guide:"
378 - elog " https://wiki.gentoo.org/wiki/Xen"
379 -
380 - use efi && einfo "The efi executable is installed in boot/efi/gentoo"
381 -
382 - elog "You can optionally block the installation of /boot/xen-syms by an entry"
383 - elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
384 - elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
385 -}