commit:     a72f78514aa2412476cbfe1fae135af0c77d2c1d
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Nov 21 05:29:57 2018 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Nov 22 07:03:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a72f7851

app-emulation/xen: bump to 4.11.0-r4

Fixes for XSA-275,XSA-276,XSA-277,XSA-279,XSA-280

Closes: https://github.com/gentoo/gentoo/pull/10457

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen/Manifest             |   1 +
 app-emulation/xen/xen-4.11.0-r4.ebuild | 171 +++++++++++++++++++++++++++++++++
 2 files changed, 172 insertions(+)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index b45e8941bfd..fe84f955f64 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -4,4 +4,5 @@ DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 
9205e5fa011426ae3eeaa196
 DIST xen-4.10.2-upstream-patches-2.tar.xz 37800 BLAKE2B 
ecf4c1a97a1d76eef925e79fd25a654695a954f81bf8a5884cd4b1007714c888d6d7e19839556c457cf49a2f20ee88d5689a0287ffd7b16487dac676b3386daf
 SHA512 
e9212efd65827286b729b08eded4bd6deda4a9f0b72af26bf0d106a111dddd1b56e51154d3e2a2ee4b38fcf4e8a81f30ffe2a6b711b9261e50e5954447d30e60
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B 
b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722
 SHA512 
2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
 DIST xen-4.11.0-upstream-patches-2.tar.xz 83788 BLAKE2B 
3f612492827a1408a3ba058c64b8b9562f7415d19f15241257b7b6754aed472e37538bfed2a017c6664b276f43a1e9c5f87b60454b2eaa0613c84edeb035a28d
 SHA512 
cddc270f2fddbf75f33b45496f5db4586b5463d65fa3604e9df48c116231f088551213c2a021f2b0ad329f7290b36bfdd577cda506c359311c65e897cdf50bd1
+DIST xen-4.11.0-upstream-patches-3.tar.xz 91692 BLAKE2B 
500f6099b89d741264b72dc25919e16de0f1d5e1e3adebbe7788de25f1b82692c56b271f241e39733911e2d7d3e27e3ad29d91b94e1f4d8f0257d08b173b62f1
 SHA512 
bdb8dc5ff868434043d40417b013370e5fd7dc07570ac0bdaa6c253b50521d7fd79af8f7d85578a961b4631cc1ba3c4942d5c60ccc165205da0135506adfb4d2
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 
892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573
 SHA512 
33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a

diff --git a/app-emulation/xen/xen-4.11.0-r4.ebuild 
b/app-emulation/xen/xen-4.11.0-r4.ebuild
new file mode 100644
index 00000000000..d12c123f943
--- /dev/null
+++ b/app-emulation/xen/xen-4.11.0-r4.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ $PV == *9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+       SRC_URI=""
+else
+       KEYWORDS="~amd64 ~arm -x86"
+       UPSTREAM_VER=3
+       SECURITY_VER=
+       GENTOO_VER=
+
+       [[ -n ${UPSTREAM_VER} ]] && \
+               
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
+               
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz";
+       [[ -n ${SECURITY_VER} ]] && \
+               
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz";
+       [[ -n ${GENTOO_VER} ]] && \
+               
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz";
+       
SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
+               ${UPSTREAM_PATCHSET_URI}
+               ${SECURITY_PATCHSET_URI}
+               ${GENTOO_PATCHSET_URI}"
+fi
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="https://www.xenproject.org";
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="custom-cflags debug efi flask"
+
+DEPEND="${PYTHON_DEPS}
+       efi? ( >=sys-devel/binutils-2.22[multitarget] )
+       !efi? ( >=sys-devel/binutils-2.22 )"
+RDEPEND=""
+PDEPEND="~app-emulation/xen-tools-${PV}"
+
+# no tests are available for the hypervisor
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
+RESTRICT="test splitdebug strip"
+
+# Approved by QA team in bug #144032
+QA_WX_LOAD="boot/xen-syms-${PV}"
+
+REQUIRED_USE="arm? ( debug )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+       python-any-r1_pkg_setup
+       if [[ -z ${XEN_TARGET_ARCH} ]]; then
+               if use amd64; then
+                       export XEN_TARGET_ARCH="x86_64"
+               elif use arm; then
+                       export XEN_TARGET_ARCH="arm32"
+               elif use arm64; then
+                       export XEN_TARGET_ARCH="arm64"
+               else
+                       die "Unsupported architecture!"
+               fi
+       fi
+
+       if use flask ; then
+               export "XSM_ENABLE=y"
+               export "FLASK_ENABLE=y"
+       fi
+}
+
+src_prepare() {
+       # Upstream's patchset
+       [[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
+
+       # Security patchset
+       if [[ -n ${SECURITY_VER} ]]; then
+       einfo "Try to apply Xen Security patch set"
+               # apply main xen patches
+               # Two parallel systems, both work side by side
+               # Over time they may concdense into one. This will suffice for 
now
+               source "${WORKDIR}"/patches-security/${PV}.conf
+
+               local i
+               for i in ${XEN_SECURITY_MAIN}; do
+                       eapply "${WORKDIR}"/patches-security/xen/$i
+               done
+       fi
+
+       # Gentoo's patchset
+       [[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
+
+       eapply "${FILESDIR}"/${PN}-4.6-efi.patch
+
+       # Drop .config
+       sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't 
drop"
+
+       if use efi; then
+               export EFI_VENDOR="gentoo"
+               export EFI_MOUNTPOINT="boot"
+       fi
+
+       # if the user *really* wants to use their own custom-cflags, let them
+       if use custom-cflags; then
+               einfo "User wants their own CFLAGS - removing defaults"
+               # try and remove all the default custom-cflags
+               find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk 
-exec sed \
+                       -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+                       -e 
's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+                       -e 
's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+                       -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+                       -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+                       -i {} \; || die "failed to re-set custom-cflags"
+       fi
+
+       default
+}
+
+src_configure() {
+       use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
+
+       use debug && myopt="${myopt} debug=y"
+
+       if use custom-cflags; then
+               filter-flags -fPIE -fstack-protector
+               replace-flags -O3 -O2
+       else
+               unset CFLAGS
+               unset LDFLAGS
+               unset ASFLAGS
+       fi
+}
+
+src_compile() {
+       # Send raw LDFLAGS so that --as-needed works
+       emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C 
xen ${myopt}
+}
+
+src_install() {
+       local myopt
+       use debug && myopt="${myopt} debug=y"
+
+       # The 'make install' doesn't 'mkdir -p' the subdirs
+       if use efi; then
+               mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
+       fi
+
+       emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
+
+       # make install likes to throw in some extra EFI bits if it built
+       use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
+}
+
+pkg_postinst() {
+       elog "Official Xen Guide:"
+       elog " https://wiki.gentoo.org/wiki/Xen";
+
+       use efi && einfo "The efi executable is installed in boot/efi/gentoo"
+
+       elog "You can optionally block the installation of /boot/xen-syms by an 
entry"
+       elog "in folder /etc/portage/env using the portage's feature 
INSTALL_MASK"
+       elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
+}

Reply via email to