From c719fdcee603a5a706a45d10cb598762d56a727d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Sep 2021 20:21:45 +0100 Subject: gentoo resync : 25.09.2021 --- app-emulation/xen/Manifest | 5 + app-emulation/xen/files/xen-4.15-flask.patch | 13 +++ app-emulation/xen/xen-4.14.3.ebuild | 167 +++++++++++++++++++++++++++ app-emulation/xen/xen-4.15.1.ebuild | 167 +++++++++++++++++++++++++++ 4 files changed, 352 insertions(+) create mode 100644 app-emulation/xen/files/xen-4.15-flask.patch create mode 100644 app-emulation/xen/xen-4.14.3.ebuild create mode 100644 app-emulation/xen/xen-4.15.1.ebuild (limited to 'app-emulation/xen') diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest index ab3fee237a36..30991c8229e8 100644 --- a/app-emulation/xen/Manifest +++ b/app-emulation/xen/Manifest @@ -1,9 +1,14 @@ AUX xen-4.14-efi.patch 1969 BLAKE2B dec62e9b04ce23025443caa68df2fd69c50a3fdf650bf26047b28f3a72d1aa58124127274cd2c1373a4e133784b2691145c49c9a182bd635aa9c60bb1e45a0c1 SHA512 3e32aac5ba2ec371a3877d64532e8d134c3b4fe3a6644477ee8ecf56cbb8378b20f9d5d7415bec891d96910550a787848779c82ee4b9d57046f4c13235531ea0 AUX xen-4.15-efi.patch 2181 BLAKE2B a06b944dea37c3dfdbe4344191ec4a286348f46bcccf1b5a75f061e55b961d767972456803b8c9aa15120b2b2497651495e903925bf93b04c483e0713d9117a9 SHA512 7ec52fc65b5b8a22877c941f0ab6f249ba1d7b40ad7d50d8f0ac793069cc0eb85b1e5394ce81adf60fa23b01ecc8ce983e6c508b8e0d22189dc46e2c1ad8c1b4 +AUX xen-4.15-flask.patch 400 BLAKE2B 68ee04b8b0923cbe7e2b93b834a23b465c9c8e63ae41bea98c8b4bce4ff59374534294b8c5cd5be30ea64d7c66caec54de0bc1bf70d80275d027b3a082ec2003 SHA512 146c6a161d3def5ab947264d6ac5932066f3124e25be14185ebd75eaa18932adcf35daf21edd051861cacd28b950b6a3ee5c5ac335ccc1d0e27b3242da5c4441 DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78 DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39 +DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16 DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5 DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7 +DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9 EBUILD xen-4.14.2-r1.ebuild 4592 BLAKE2B a2864d4f2deab4f806b673a0e129bcee9b3142cd859d7c1293a8638d2122534439a042feab690e634e75deeb7c8afc7a94dd9188447faea283a59f2eec453537 SHA512 ff083e3655f2fa78b2f0f1c286298f56e96ab259ea9dce2389fd38dc0c2ad9ad0da2eadc966ebbbf8efefb6dc05445b969fabacb376ea30f72b339ece6d0b0d1 +EBUILD xen-4.14.3.ebuild 4626 BLAKE2B a342c96582d3d36f293981457ca7ee2f97b95de813e6d7c9a6ddfed5383875bfa20e9b4fb78878eac3475f9221a1a9271ed91d250cc45f350861b3dcf185f7d3 SHA512 780343cf02e20aeb6effebda25f0870f1822efbf0db9d85ffd0af46b210a4f8a06bb4fb27ec8652adaadb3cf13a60c32881fafb2036cf139613f42e6c1e3b83d EBUILD xen-4.15.0-r1.ebuild 4593 BLAKE2B 5000db5af318b142a4909265d0670602956cf098b1307379e2dbfc0d3edb36bd7c6429f0355d34065d2aa9148bbd77d0d1cb8333fe0d7ce5fd2d9d2d398eccd5 SHA512 084ba7c9cce964b200c65b05a43bd548d3fa541f39e0b7403a6f006a40415ed457cb25fdcb8b5ab9b12f97878a0d9a4897443eec1439bb66c0d4a6fe4b69cd44 +EBUILD xen-4.15.1.ebuild 4627 BLAKE2B 6d98b7959fff0cc4a559c226c997c3d8a29de79c96fa52c3d2ec470bd4422426b6fafc4264ed666e982e6e6d9e47f3b2fce7f7df35e35b4be83482e1b50a2632 SHA512 052cbfd11dce2764157243a476572be5ea3b99dda68e60f18a04cf6cde58de4de5e1bd23b468e6ed6e38950fe57f25a243676ef654f46ee88a88358ba781979d MISC metadata.xml 676 BLAKE2B 23003620a5ae9ecc8fca8bea77951fdf0469bb3b997819bfaccb7be4ece20b8a2c2f4b3385f1fc04e749d40a3f2353ed8559806049069fa6bf6bcbe43921db03 SHA512 027f25045231ae0425f5d60e7cf0981654f9e0f445ebfecdee9d7ca0f13272c0edc0440faf9bca85feb55711391d4e3dce402b138a5d4e72f30aa7ee680e14fb diff --git a/app-emulation/xen/files/xen-4.15-flask.patch b/app-emulation/xen/files/xen-4.15-flask.patch new file mode 100644 index 000000000000..7dcf91b30fc1 --- /dev/null +++ b/app-emulation/xen/files/xen-4.15-flask.patch @@ -0,0 +1,13 @@ +diff --git a/xen/common/Kconfig b/xen/common/Kconfig +index eb953d1..78f058c 100644 +--- a/xen/common/Kconfig ++++ b/xen/common/Kconfig +@@ -198,7 +198,7 @@ config XENOPROF + + config XSM + bool "Xen Security Modules support" +- default ARM ++ default y + ---help--- + Enables the security framework known as Xen Security Modules which + allows administrators fine-grained control over a Xen domain and diff --git a/app-emulation/xen/xen-4.14.3.ebuild b/app-emulation/xen/xen-4.14.3.ebuild new file mode 100644 index 000000000000..aa58a7aae317 --- /dev/null +++ b/app-emulation/xen/xen-4.14.3.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..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= + 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 ) + flask? ( sys-apps/checkpolicy )" +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 +} + +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 + + # Symlinks do not work on fat32 volumes + eapply "${FILESDIR}"/${PN}-4.14-efi.patch + + # Enable XSM-FLASK + use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch + + # Workaround new gcc-11 options + sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die + + # 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)" LD="$(tc-getLD)" 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.15.1.ebuild b/app-emulation/xen/xen-4.15.1.ebuild new file mode 100644 index 000000000000..ddd079776931 --- /dev/null +++ b/app-emulation/xen/xen-4.15.1.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..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= + 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 ) + flask? ( sys-apps/checkpolicy )" +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 +} + +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 + + # Symlinks do not work on fat32 volumes + eapply "${FILESDIR}"/${PN}-4.15-efi.patch + + # Enable XSM-FLASK + use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch + + # Workaround new gcc-11 options + sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die + + # 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)" LD="$(tc-getLD)" 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