commit:     90cee9f2f3a8d12c68523e814f4fd4ab79311683
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 00:19:36 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun Jan  3 00:20:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90cee9f2

app-emulation/xen: revbump to vn. 4.6.0-r5

wrt security patch in the gentoo bug

Gentoo bug: #569554

Package-Manager: portage-2.2.26

 app-emulation/xen/Manifest            |   1 +
 app-emulation/xen/xen-4.6.0-r5.ebuild | 190 ++++++++++++++++++++++++++++++++++
 2 files changed, 191 insertions(+)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 46d8b48..df9efb1 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -9,4 +9,5 @@ DIST xen-security-patches-1.tar.gz 7040 SHA256 
30733e9ca71bf4291ff212eb191afb226
 DIST xen-security-patches-2.tar.gz 7370 SHA256 
f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 
209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57
 WHIRLPOOL 
ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
 DIST xen-security-patches-3.tar.gz 7349 SHA256 
a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 
f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818
 WHIRLPOOL 
14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
 DIST xen-security-patches-3.tar.xz 17028 SHA256 
fb6301beb9a5c2d1e5d4de8783d8670e382b1bef48ec61e73d2d9be6901d289f SHA512 
787fee8f7822577c6de91c4cf4d56d0e73ce46bac5524537ff66a718b6d7eae9d362265515743e8577b2c75f2841baed9837f71467b3b7b91a3111220da5f236
 WHIRLPOOL 
5c136289e654776bf918fe125fbecba7dac0929b236f7ae8158026a6bd6be12bc786a5ec96cb4022c18a5e7ffde82155deb57eb9639600e4c42c9c209f4a2ed6
+DIST xen-security-patches-4.tar.gz 7731 SHA256 
b51c6616a303b4d5123fed1e58240163c8e0cf8e0de32db58c11a40a48124d52 SHA512 
cef89bb68bdb4a5f947d6be8ae7a799276fd187e396c5ba85f8aa2b0b5349ba606d3742d5b8d8212df6da38f8af9711416d9a25176e713240a0a7f2194d84fc5
 WHIRLPOOL 
912dc869fa4eb355a86023133adcb818e87f4979d537a885b3f1c6e35ff141b7d7a33e81105dcddf34aafa4c306df79a210346f5037337173923e1dc8280ac47
 DIST xen-security-patches-7.tar.xz 22604 SHA256 
e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 
051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2
 WHIRLPOOL 
8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

diff --git a/app-emulation/xen/xen-4.6.0-r5.ebuild 
b/app-emulation/xen/xen-4.6.0-r5.ebuild
new file mode 100644
index 0000000..f3e0d76
--- /dev/null
+++ b/app-emulation/xen/xen-4.6.0-r5.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+       inherit git-r3
+       KEYWORDS=""
+       EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+       SRC_URI=""
+else
+       KEYWORDS="~amd64 ~arm ~arm64 -x86"
+       UPSTREAM_VER=0
+       SECURITY_VER=0
+       # var set to reflect https://dev.gentoo.org/~idella4/
+       SEC_VER=4
+       GENTOO_VER=
+
+       [[ -n ${UPSTREAM_VER} ]] && \
+               
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz";
+       [[ -n ${SECURITY_VER} ]] && \
+               
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+               
https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz";
+       [[ -n ${GENTOO_VER} ]] && \
+               
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz";
+       
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
+               ${UPSTREAM_PATCHSET_URI}
+               ${SECURITY_PATCHSET_URI}
+               ${GENTOO_PATCHSET_URI}"
+fi
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="http://xen.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}"
+
+RESTRICT="test"
+
+# 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
+       if [[ -n ${UPSTREAM_VER} ]]; then
+               EPATCH_SUFFIX="patch" \
+               EPATCH_FORCE="yes" \
+               EPATCH_OPTS="-p1" \
+                       epatch "${WORKDIR}"/patches-upstream
+       fi
+
+       if [[ -n ${SECURITY_VER} ]]; then
+               einfo "Try to apply Xen Security patcheset"
+               # apply main xen patches
+               # Two parallel systems, both work side by side
+               # Over time they may concdense into one. This will suffice for 
now
+               EPATCH_SUFFIX="patch"
+               EPATCH_FORCE="yes"
+               for i in ${XEN_SECURITY_MAIN}; do
+                       epatch "${WORKDIR}"/patches-security/xen/$i
+               done
+
+               for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+                       epatch $i
+               done
+       fi
+
+       # Gentoo's patchset
+       if [[ -n ${GENTOO_VER} ]]; then
+               EPATCH_SUFFIX="patch" \
+               EPATCH_FORCE="yes" \
+                       epatch "${WORKDIR}"/patches-gentoo
+       fi
+
+       epatch "${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
+
+       # remove -Werror for gcc-4.6's sake
+       find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
+               xargs sed -i 's/ *-Werror */ /'
+       # not strictly necessary to fix this
+       sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to 
re-set setup.py"
+
+       epatch_user
+}
+
+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 and the unoffical wiki page:"
+       elog " https://wiki.gentoo.org/wiki/Xen";
+       elog " http://en.gentoo-wiki.com/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