From d934827bf44b7cfcf6711964418148fa60877668 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Nov 2020 22:39:15 +0000 Subject: gentoo resync : 25.11.2020 --- app-emulation/xen/Manifest | 14 +-- app-emulation/xen/xen-4.13.1-r3.ebuild | 165 --------------------------------- app-emulation/xen/xen-4.13.1-r4.ebuild | 165 --------------------------------- app-emulation/xen/xen-4.13.1-r5.ebuild | 165 +++++++++++++++++++++++++++++++++ app-emulation/xen/xen-4.13.2-r1.ebuild | 165 +++++++++++++++++++++++++++++++++ app-emulation/xen/xen-4.13.2.ebuild | 165 +++++++++++++++++++++++++++++++++ app-emulation/xen/xen-4.14.0-r2.ebuild | 165 --------------------------------- app-emulation/xen/xen-4.14.0-r5.ebuild | 165 +++++++++++++++++++++++++++++++++ 8 files changed, 668 insertions(+), 501 deletions(-) delete mode 100644 app-emulation/xen/xen-4.13.1-r3.ebuild delete mode 100644 app-emulation/xen/xen-4.13.1-r4.ebuild create mode 100644 app-emulation/xen/xen-4.13.1-r5.ebuild create mode 100644 app-emulation/xen/xen-4.13.2-r1.ebuild create mode 100644 app-emulation/xen/xen-4.13.2.ebuild delete mode 100644 app-emulation/xen/xen-4.14.0-r2.ebuild create mode 100644 app-emulation/xen/xen-4.14.0-r5.ebuild (limited to 'app-emulation/xen') diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest index 76ab23eabc43..645c568a17f8 100644 --- a/app-emulation/xen/Manifest +++ b/app-emulation/xen/Manifest @@ -1,11 +1,13 @@ AUX xen-4.11-efi.patch 1971 BLAKE2B b24f9315cff7f2de2a945088363429b9f4dd7a4101d3f1c0d4bf9733189808f5e1c47f1d90d1784f17fa52ca1626972c81d20c5e1ee3d42d082cdefcf67eb8dc SHA512 17208dc107f4ae4c5ec226c2ac05126817134fb6084cd8923204dc1b014e645e12c34cd11296319127e595ccbf17747931e9df78218bf49814f66e3cc6a789fd AUX xen-4.14-efi.patch 1969 BLAKE2B dec62e9b04ce23025443caa68df2fd69c50a3fdf650bf26047b28f3a72d1aa58124127274cd2c1373a4e133784b2691145c49c9a182bd635aa9c60bb1e45a0c1 SHA512 3e32aac5ba2ec371a3877d64532e8d134c3b4fe3a6644477ee8ecf56cbb8378b20f9d5d7415bec891d96910550a787848779c82ee4b9d57046f4c13235531ea0 -DIST xen-4.13.1-upstream-patches-2.tar.xz 53744 BLAKE2B 769b5b8022f7db66f677d8107c6473606376718bffeac7eba09c4270f4005811f472fb9ed2a2804260e0486228edbadfcf8f81bf1dae6d68df37da213d281390 SHA512 b07c865b96c6f48b9d0b4e4c2f3ec19f4dc44884f4024e440a3e537f594f9f5edd6edf805bdefc82e5f1f2520f35f940b64c158972cbf5bfdc8fb2ca7a1b0ac1 -DIST xen-4.13.1-upstream-patches-3.tar.xz 87056 BLAKE2B 01d7133b8f7e3c9a42b9771dcb7739777f79f229941114cce70ba2897dd52bf53f08de35602a0b40a120fc155c274dbf91e107856f4afdae2c4f7b4bc0a67cdd SHA512 d67e9ddfbf27dc5a23a77679b1b2524a49c2aec3ff9eb3472f9e075893d87401f8e99707b0652744eb4af7a3ed9a815c3925de49995bcd7c82d97c13a69b5309 +DIST xen-4.13.1-upstream-patches-4.tar.xz 100580 BLAKE2B 1ac4ac5fe7aa7da2b486f2ac5ae60b96cf3c012acac50e8472b88ae273d99e9545f48a896f21eebd5e58427a817e11aa9806d9b45750784fc5382cbadf8162d4 SHA512 54230ea6aa2add038a438d46caae3bba83f2cc8b92021e2c34761015ec08a807331767d432bfa2c7bab864f5b8d0d667c68fc04a089fd35eda9a4f0afd4f6df6 DIST xen-4.13.1.tar.gz 39024612 BLAKE2B efff138699fac2c14fad2e0dfd4535ebd744577df3dddccc2a589b81a76f24fc81c75e295f4cd33ca2e820929417b22d714504b576cb0737a563037bd56b6a95 SHA512 b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90 -DIST xen-4.14.0-upstream-patches-1.tar.xz 45360 BLAKE2B 0f72a2cc3d18557b86a2a83f97e4141be46a20e3ba59ccc881a34a4408988eba9827e3b927bc07aba9678123d783303e7d47d789e57323a7f6691d718c019dc8 SHA512 3d5093e4367d27e7f6e8d4cc31841a5c80cc3fb870d6cb32131d064e16cbb559e9a783c70eec1ce13c960b3e2a8d5e23e18d26b936bc418b434df3bb801d3e4f +DIST xen-4.13.2-upstream-patches-0.tar.xz 15404 BLAKE2B e4f679e4281e4edfe4f1e7722c19a973461b9a6423828f17719dfd766a73ef61a74b1cd87f375e2b0c2ec9cbed7b6a0f12c4a9982bbc325cdbba4c70a7145248 SHA512 122fe404f9c19567016e43208ddd08bdac56e7f264853d6cbe0929650fc4ada7175cc24c0e4fbf088acab77127eb76454948b98cbc731e35a12e1b068a5fd793 +DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3 +DIST xen-4.14.0-upstream-patches-4.tar.xz 79204 BLAKE2B 54d3ba5eac263d78c052cdf2b7958662dc29f689f03d03692c20c881a6b520bf08c86cf830a2727c2a2249c256aa0d06dea75496c8ee6699361c86c3f91bbd83 SHA512 c18b43a16e225cd1c50fe975fa1daf414e8e5fd47e4d3c9e2c655001ae59ab6fed5d332e5f34acc4f01b3c9d42bd425a86e084a4eb22c360257689aab3fe6825 DIST xen-4.14.0.tar.gz 39950576 BLAKE2B db4c3e79cfdfb10260d0d14d9d28e8c8bd9bf23f42aee743acf8f560bf4cdb96a425c0df887c70f9755f62680be24bfbe0149e52a4cb843ae83090cd9d6afc71 SHA512 ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0 -EBUILD xen-4.13.1-r3.ebuild 4444 BLAKE2B a03adf601033f94e9c6169aa8a109465d8bd1daa4945280a0defdf41b90411123598c626a3cd4b0c6ab22a539c26389f389f1483a1606d8fc8dc35a9cdac929d SHA512 ea5915fe2d39b3d471e0de1b29d0e6a41b1a63a1858be7122db5fc8bc71c310ff13a91b63969d009d33bbbe3d85146df22c151b251bedbbe6971bf08ae3fcfe5 -EBUILD xen-4.13.1-r4.ebuild 4445 BLAKE2B 309a956271494090acd7f1d687fe1056f95c34a50ada3dfbee165fe1f3a935aa3a7c92e13d778a425bd587497879170efa73b65c8029ab08cb4716da13cf641b SHA512 f2efcbd096cdd92246a5d8c4d877b7ec17c84ae27f6822c3f62ba43087cb975a395a30753eeb920f6339bd5c1c9c64d2d50e254f9cb10d8db898df87c43c275d -EBUILD xen-4.14.0-r2.ebuild 4444 BLAKE2B 297aa1e2c31336165a71043ac7537a640a2233606b0f725d889548f32fc305f3a335230d8a52fabd841ebb2ef404565983f21855b05ba0f9d2136d3da7647a6b SHA512 d9e933fbaed725d038a23409470e28a606162797bec6708089f0d34347396e3b4003214052c863de3754c586734823e99302885698258b23279163bd1f1cdac7 +EBUILD xen-4.13.1-r5.ebuild 4444 BLAKE2B 8aa81910b404669e0dda108d549a9e81733e46eb97d66c5700b57e390ce45ed459e8ef568815176335be9f9f234d8e202604cc46457831ff590d6efea35dcd7d SHA512 b29225a3e97435fa407bc5ba8a953ec824184126d0f7967ea7ffa145e552cbe9aec6cd7eedd9bdc929805004c5885142e62e340de08ce8e61fb820480a9315bf +EBUILD xen-4.13.2-r1.ebuild 4443 BLAKE2B e84906b185538496d167ec43151f6620d5f5da3f7e84f107f4448bd6f659e82115be913d96c5a2b18e4fde97b69b07061ed80eb383a33c4f526394f58ba45adf SHA512 510dec9a78f1562b4988c5838ecc5babfc5ef12c11a43cc98e049dc326a9b31cbeb9b4ca127519d25541e2ddf04d7bdde6e472e0b8072f23fb052dfa1beffcba +EBUILD xen-4.13.2.ebuild 4443 BLAKE2B 96e639029b54575de310fee0d7b5bde4548e19da93ea9ed3279fe6f2a339452cde52de67dfe08db4a7f4a92bbadf709c6712fffe747a2721d490e1127ba17c5e SHA512 79ed73b9601ae6f89e5fb8aa2994008c9050f74c1fea238217602ebd5f3d8bcf2a1c9e6e967ff2c24b1c1e1b45c5d014bec82620db0d97d8faacdc4815cd502c +EBUILD xen-4.14.0-r5.ebuild 4444 BLAKE2B 532f922cca4d9155b3b5de84ecc1ab884e2745722c3302cc3ed474125df28c256521ba97b5b90ac408768245230b7368b6d89a8e1b82474ff6bf65234a71f87c SHA512 02bbdafc46bef658507a5e417307c5372d9a1c6c6efa62df1d26bce66f6dacc698ba8f7cd601e27b6ed06c75ef94ac08cb581ca545c1a0ed9fb6147bda545e48 MISC metadata.xml 645 BLAKE2B ad902c521cc93a54b16faaea212f23c7bdf83a9efe19606eca7bf00b49104386dbc095ff30c4287bb79d5fcd073b77e7c1bbf929ee7b025039a50f8238572f17 SHA512 313d501abeb906c360d7965e35a18d9851e38af73a72a95351517c60a1a39553555a0a250f0bee5bfc8f6496312d6e9c70874be267c14edab45cb4841e34c248 diff --git a/app-emulation/xen/xen-4.13.1-r3.ebuild b/app-emulation/xen/xen-4.13.1-r3.ebuild deleted file mode 100644 index 11f6a671698a..000000000000 --- a/app-emulation/xen/xen-4.13.1-r3.ebuild +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8} ) - -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=2 - 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="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.11-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 - - default -} - -src_configure() { - use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" - - use debug && myopt="${myopt} debug=y" - - # remove flags - unset CFLAGS - unset LDFLAGS - unset ASFLAGS - - tc-ld-disable-gold # Bug 700374 -} - -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" - - ewarn - ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" - ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" - ewarn "to work fine." - ewarn - ewarn "Add sched=credit to xen command line options to use the legacy scheduler." - ewarn - ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" -} diff --git a/app-emulation/xen/xen-4.13.1-r4.ebuild b/app-emulation/xen/xen-4.13.1-r4.ebuild deleted file mode 100644 index 5bde79cb7c82..000000000000 --- a/app-emulation/xen/xen-4.13.1-r4.ebuild +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8} ) - -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="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.11-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 - - default -} - -src_configure() { - use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" - - use debug && myopt="${myopt} debug=y" - - # remove flags - unset CFLAGS - unset LDFLAGS - unset ASFLAGS - - tc-ld-disable-gold # Bug 700374 -} - -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" - - ewarn - ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" - ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" - ewarn "to work fine." - ewarn - ewarn "Add sched=credit to xen command line options to use the legacy scheduler." - ewarn - ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" -} diff --git a/app-emulation/xen/xen-4.13.1-r5.ebuild b/app-emulation/xen/xen-4.13.1-r5.ebuild new file mode 100644 index 000000000000..4a8a3262d8dc --- /dev/null +++ b/app-emulation/xen/xen-4.13.1-r5.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +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=4 + 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="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.11-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 + + default +} + +src_configure() { + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" + + use debug && myopt="${myopt} debug=y" + + # remove flags + unset CFLAGS + unset LDFLAGS + unset ASFLAGS + + tc-ld-disable-gold # Bug 700374 +} + +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" + + ewarn + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" + ewarn "to work fine." + ewarn + ewarn "Add sched=credit to xen command line options to use the legacy scheduler." + ewarn + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" +} diff --git a/app-emulation/xen/xen-4.13.2-r1.ebuild b/app-emulation/xen/xen-4.13.2-r1.ebuild new file mode 100644 index 000000000000..7dd88696d9ba --- /dev/null +++ b/app-emulation/xen/xen-4.13.2-r1.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +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=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="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.11-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 + + default +} + +src_configure() { + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" + + use debug && myopt="${myopt} debug=y" + + # remove flags + unset CFLAGS + unset LDFLAGS + unset ASFLAGS + + tc-ld-disable-gold # Bug 700374 +} + +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" + + ewarn + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" + ewarn "to work fine." + ewarn + ewarn "Add sched=credit to xen command line options to use the legacy scheduler." + ewarn + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" +} diff --git a/app-emulation/xen/xen-4.13.2.ebuild b/app-emulation/xen/xen-4.13.2.ebuild new file mode 100644 index 000000000000..2be4c168106c --- /dev/null +++ b/app-emulation/xen/xen-4.13.2.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +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= + 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="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.11-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 + + default +} + +src_configure() { + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" + + use debug && myopt="${myopt} debug=y" + + # remove flags + unset CFLAGS + unset LDFLAGS + unset ASFLAGS + + tc-ld-disable-gold # Bug 700374 +} + +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" + + ewarn + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" + ewarn "to work fine." + ewarn + ewarn "Add sched=credit to xen command line options to use the legacy scheduler." + ewarn + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" +} diff --git a/app-emulation/xen/xen-4.14.0-r2.ebuild b/app-emulation/xen/xen-4.14.0-r2.ebuild deleted file mode 100644 index 2738d77fd9d3..000000000000 --- a/app-emulation/xen/xen-4.14.0-r2.ebuild +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6..9} ) - -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=1 - 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="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.14-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 - - default -} - -src_configure() { - use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" - - use debug && myopt="${myopt} debug=y" - - # remove flags - unset CFLAGS - unset LDFLAGS - unset ASFLAGS - - tc-ld-disable-gold # Bug 700374 -} - -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" - - ewarn - ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" - ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" - ewarn "to work fine." - ewarn - ewarn "Add sched=credit to xen command line options to use the legacy scheduler." - ewarn - ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" -} diff --git a/app-emulation/xen/xen-4.14.0-r5.ebuild b/app-emulation/xen/xen-4.14.0-r5.ebuild new file mode 100644 index 000000000000..f0bb232c0bb3 --- /dev/null +++ b/app-emulation/xen/xen-4.14.0-r5.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +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=4 + 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="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.14-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 + + default +} + +src_configure() { + use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" + + use debug && myopt="${myopt} debug=y" + + # remove flags + unset CFLAGS + unset LDFLAGS + unset ASFLAGS + + tc-ld-disable-gold # Bug 700374 +} + +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" + + ewarn + ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause" + ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems" + ewarn "to work fine." + ewarn + ewarn "Add sched=credit to xen command line options to use the legacy scheduler." + ewarn + ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B" +} -- cgit v1.2.3