Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/
Date: Tue, 17 Jul 2018 11:07:35
Message-Id: 1531825616.2ec669947a76c8f65210a5e57cb1b66eaae18987.zlogene@gentoo
1 commit: 2ec669947a76c8f65210a5e57cb1b66eaae18987
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Fri Jul 13 16:51:07 2018 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 17 11:06:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ec66994
7
8 app-emulation/xen: bump to 4.10.1
9
10 Bug: https://bugs.gentoo.org/655544
11 Bug: https://bugs.gentoo.org/655188
12 Package-Manager: Portage-2.3.42, Repoman-2.3.9
13
14 app-emulation/xen/Manifest | 2 +
15 app-emulation/xen/xen-4.10.1.ebuild | 172 ++++++++++++++++++++++++++++++++++++
16 2 files changed, 174 insertions(+)
17
18 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
19 index 190d2e937aa..706faaa843d 100644
20 --- a/app-emulation/xen/Manifest
21 +++ b/app-emulation/xen/Manifest
22 @@ -1,5 +1,7 @@
23 DIST xen-4.10.0-upstream-patches-0.tar.xz 70884 BLAKE2B 9a27e7989486ba3ba59548de356384527cc5b78e63b6ed042506e6534e488272369f021cd2daa516820313c3fe18625a5864794ae0806e7018b8ad28b0a294b1 SHA512 e64bf1d30d24e922c60c3b518a4de7874b43cc695134b4cdd65f6d95ae9ae579c521fab13ca82409fde55e43815d072c3194997e2bda106204cbf329e93a0a00
24 DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285aeb6b4af91bb2c32a2e98376ded0b1114b541d11e2d4353f4f588d58e8add5b1e0d7de2fe3399d4687c5bfae SHA512 5a37935c382f9cfe3641a35c3be0ba11689bca10c7d3c2401963513e3a834ee8d0c8a0ddcf3716dbf0a795aea1bab78caf19acf1272e5e054bf012cfa06a4690
25 +DIST xen-4.10.1-upstream-patches-0.tar.xz 69120 BLAKE2B 5d81e58eeb4e6de48a8534352df2c07f8825600bec9d0714735c2262dd13b937f2ef55a91d70273dcdd9621c477ced4662d76a16f557930c8b86e117fd49bb67 SHA512 094139d9173324bc43c4caedaf6453ebd0a86fc7ce9499690e4dacdadfde8efeaf6b70e652d6e1e27845c507f70c3a7b5d93c4c677bcd6a2ba56cf3742df4476
26 +DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
27 DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
28 DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
29 DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274
30
31 diff --git a/app-emulation/xen/xen-4.10.1.ebuild b/app-emulation/xen/xen-4.10.1.ebuild
32 new file mode 100644
33 index 00000000000..8027e789237
34 --- /dev/null
35 +++ b/app-emulation/xen/xen-4.10.1.ebuild
36 @@ -0,0 +1,172 @@
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=""
52 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
53 + SRC_URI=""
54 +else
55 + KEYWORDS="~amd64 ~arm -x86"
56 + UPSTREAM_VER=0
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 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${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="https://www.xenproject.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 + [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
120 +
121 + # Security patchset
122 + if [[ -n ${SECURITY_VER} ]]; then
123 + einfo "Try to apply Xen Security patch set"
124 + # apply main xen patches
125 + # Two parallel systems, both work side by side
126 + # Over time they may concdense into one. This will suffice for now
127 + source "${WORKDIR}"/patches-security/${PV}.conf
128 +
129 + local i
130 + for i in ${XEN_SECURITY_MAIN}; do
131 + eapply "${WORKDIR}"/patches-security/xen/$i
132 + done
133 + fi
134 +
135 + # Gentoo's patchset
136 + [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
137 +
138 + eapply "${FILESDIR}"/${PN}-4.6-efi.patch
139 +
140 + # Drop .config
141 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
142 +
143 + if use efi; then
144 + export EFI_VENDOR="gentoo"
145 + export EFI_MOUNTPOINT="boot"
146 + fi
147 +
148 + # if the user *really* wants to use their own custom-cflags, let them
149 + if use custom-cflags; then
150 + einfo "User wants their own CFLAGS - removing defaults"
151 + # try and remove all the default custom-cflags
152 + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
153 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
154 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
155 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
156 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
157 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
158 + -i {} \; || die "failed to re-set custom-cflags"
159 + fi
160 +
161 + default
162 +}
163 +
164 +src_configure() {
165 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
166 +
167 + use debug && myopt="${myopt} debug=y"
168 +
169 + if use custom-cflags; then
170 + filter-flags -fPIE -fstack-protector
171 + replace-flags -O3 -O2
172 + else
173 + unset CFLAGS
174 + unset LDFLAGS
175 + unset ASFLAGS
176 + fi
177 +}
178 +
179 +src_compile() {
180 + # Send raw LDFLAGS so that --as-needed works
181 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
182 +}
183 +
184 +src_install() {
185 + local myopt
186 + use debug && myopt="${myopt} debug=y"
187 +
188 + # The 'make install' doesn't 'mkdir -p' the subdirs
189 + if use efi; then
190 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
191 + fi
192 +
193 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
194 +
195 + # make install likes to throw in some extra EFI bits if it built
196 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
197 +}
198 +
199 +pkg_postinst() {
200 + elog "Official Xen Guide:"
201 + elog " https://wiki.gentoo.org/wiki/Xen"
202 +
203 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
204 +
205 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
206 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
207 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
208 +}