summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2018-08-13 14:55:38 +0800
committerYixun Lan <dlan@gentoo.org>2018-08-14 09:20:30 +0800
commit81a8b88b7ee40bb33ce8494f134ba44a4c6020ed (patch)
treed26452cd8eeb43f8a9d1b150173bf44764274ced /app-emulation/xen
parentapp-emulation/xen: fix efi building (diff)
downloadgentoo-81a8b88b7ee40bb33ce8494f134ba44a4c6020ed.tar.gz
gentoo-81a8b88b7ee40bb33ce8494f134ba44a4c6020ed.tar.bz2
gentoo-81a8b88b7ee40bb33ce8494f134ba44a4c6020ed.zip
app-emulation/xen: revision bump
mostly bump security patches Package-Manager: Portage-2.3.40, Repoman-2.3.9 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'app-emulation/xen')
-rw-r--r--app-emulation/xen/Manifest1
-rw-r--r--app-emulation/xen/xen-4.11.0-r1.ebuild172
2 files changed, 173 insertions, 0 deletions
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 6192ecb535a9..d191d4322506 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -3,6 +3,7 @@ DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285
DIST xen-4.10.1-upstream-patches-0.tar.xz 69172 BLAKE2B 6da6f3938b5c20692bf7a7f79c21a1f0ed4fa010c8d99a95a2d3a19923f59aad677a3f23ceedf751921105f682ae2e6deb9539802e03c01be267dfc30d53b17e SHA512 b0086c15f811706a0993b92d253d736041b8d7bc4effd082bf092e0d4d372a8b1580f499d225eb0d1a449e14845885bdd749e3df9609c657de6ff8d389c2eb45
DIST xen-4.10.1-upstream-patches-1.tar.xz 85048 BLAKE2B d00f01980e1c889b2f6899970999b93a7ddbaa03f88219d576bfbe4ccfe0ef3f75afad1538065045833430baa16b64d8dd7eb42af6ad7c3ef948601b941c51bc SHA512 ede74a53faf82712d6ee0cf2a995bb78b7079481e47e829243632fac40069194671e6b9b765e535aa533f618cdcd7715f540e81acd947a42f7b8cbb693a3df82
DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
+DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
diff --git a/app-emulation/xen/xen-4.11.0-r1.ebuild b/app-emulation/xen/xen-4.11.0-r1.ebuild
new file mode 100644
index 000000000000..8027e789237b
--- /dev/null
+++ b/app-emulation/xen/xen-4.11.0-r1.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils 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
+ KEYWORDS=""
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~arm -x86"
+ UPSTREAM_VER=0
+ 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"
+}