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: Fri, 29 Nov 2019 14:51:27
Message-Id: 1575038757.63579eaf3afd6a5206aa0cb48d071207192bf63a.dlan@gentoo
1 commit: 63579eaf3afd6a5206aa0cb48d071207192bf63a
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 28 05:09:11 2019 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 29 14:45:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63579eaf
7
8 app-emulation/xen: bump to 4.11.2-r3
9
10 Security fixes, XSA-296, XSA-304
11 Closes: https://github.com/gentoo/gentoo/pull/13774
12
13 Package-Manager: Portage-2.3.79, Repoman-2.3.18
14 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
15 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
16
17 app-emulation/xen/Manifest | 1 +
18 app-emulation/xen/xen-4.11.2-r3.ebuild | 154 +++++++++++++++++++++++++++++++++
19 2 files changed, 155 insertions(+)
20
21 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
22 index 5d5ffc07cec..169651818b1 100644
23 --- a/app-emulation/xen/Manifest
24 +++ b/app-emulation/xen/Manifest
25 @@ -1,4 +1,5 @@
26 DIST xen-4.11.2-upstream-patches-2.tar.xz 86812 BLAKE2B c2dcb7e031f9dd0a18fed5705f1c81901e94264d8bc0993a8e6c10108ac01efc6a52487076ece078a96395608c6233f26696c6b9d4f89d0f034f5e14dd546793 SHA512 c11b848396258a403c8148c054f9ac5650e149a50aba3ee1554bbacda6e2fcc4c84b8e02a1bb1bcfaf406c637165ac3fe6ea6826365875444098fce30112136e
27 +DIST xen-4.11.2-upstream-patches-3.tar.xz 98796 BLAKE2B 5bfb86a54b5bb1452849ac78eabf49c4622010f089f20d334fd5d6bf8537c6ccf179dc6f9ff5c1208c8e6b3276ef8b37f42360cbba4f83cfbbdae6f3475d88d2 SHA512 5e8cf109b9a00acea6e843f5793f01a14edb0f29573a12b632b93b328393b0cbf5f048088d9a82b2eb0aa51b4d355509921e63696225c355fe667b5b1da6b5d9
28 DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e
29 DIST xen-4.12.1-upstream-patches-2.tar.xz 72316 BLAKE2B 6297a52ba39363b71115d1582af7ee05e5fb7aea7b0fb8717d717d212949ce2f249764f5dc3f992ce16b1f82118a8de2018e8dd3e8306bb18e82db6d141b9f9a SHA512 ff4c804c094bd86896e14f8288499a1cf86d7ddb10c566c3998b432787937d782f9ba94b9f0d7affc6ada891c1abeb0012f541d07ab93428b2bbff71c06eae20
30 DIST xen-4.12.1.tar.gz 26970584 BLAKE2B ceab2af3d36b72d838d7b4f58f6855c97cf05282a4ea3c82eda29b8945ee20563845b7be02884bf0a061a633fb2b3016a2f7396ce34d9b3d93f90d6ee6d449ed SHA512 be15d3af6b109771aaf59b3621e4e1560b7d9a963d9b7f6a1f6f4a1c907fd97434b060c15f75849b44fbda33f26eb51b030d14d068c6ad5103ad240fe7a98f40
31
32 diff --git a/app-emulation/xen/xen-4.11.2-r3.ebuild b/app-emulation/xen/xen-4.11.2-r3.ebuild
33 new file mode 100644
34 index 00000000000..2f5212664be
35 --- /dev/null
36 +++ b/app-emulation/xen/xen-4.11.2-r3.ebuild
37 @@ -0,0 +1,154 @@
38 +# Copyright 1999-2019 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=7
42 +
43 +PYTHON_COMPAT=( python2_7 )
44 +
45 +inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
46 +
47 +MY_PV=${PV/_/-}
48 +MY_P=${PN}-${MY_PV}
49 +
50 +if [[ $PV == *9999 ]]; then
51 + inherit git-r3
52 + EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
53 + SRC_URI=""
54 +else
55 + KEYWORDS="~amd64 ~arm -x86"
56 + UPSTREAM_VER=3
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="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 + default
149 +}
150 +
151 +src_configure() {
152 + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
153 +
154 + use debug && myopt="${myopt} debug=y"
155 +
156 + # remove flags
157 + unset CFLAGS
158 + unset LDFLAGS
159 + unset ASFLAGS
160 +}
161 +
162 +src_compile() {
163 + # Send raw LDFLAGS so that --as-needed works
164 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
165 +}
166 +
167 +src_install() {
168 + local myopt
169 + use debug && myopt="${myopt} debug=y"
170 +
171 + # The 'make install' doesn't 'mkdir -p' the subdirs
172 + if use efi; then
173 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
174 + fi
175 +
176 + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
177 +
178 + # make install likes to throw in some extra EFI bits if it built
179 + use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
180 +}
181 +
182 +pkg_postinst() {
183 + elog "Official Xen Guide:"
184 + elog " https://wiki.gentoo.org/wiki/Xen"
185 +
186 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
187 +
188 + elog "You can optionally block the installation of /boot/xen-syms by an entry"
189 + elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
190 + elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
191 +}