diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index f181dfbb9764d..f6b865d2fe495 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -2,6 +2,8 @@ DIST genpatches-5.10-92.base.tar.xz 2744152 BLAKE2B 17fb94359b2c2c137093fb7d54a6 DIST genpatches-5.10-92.extras.tar.xz 3844 BLAKE2B 0adbc9d201b5ef2f9ccca1e05bd2b4d086ceae9545526bf92a5e9704d63827b3df1f0f784155a517c989cb9fc87fa3203cf45cb5cf8212b8b30dc03a318579fb SHA512 1ac5acb0734ce0ed89c0358ba13f14abc54e63ebb20ad7a32b2ab5e7491f26a0f9efccdb9322ae35c8b4dd29e64b9a27892fe04a92938e9b439ea13028a61f79 DIST genpatches-5.10-94.base.tar.xz 2750672 BLAKE2B a504548a085dc347be062a5ce44c80983a9dea51389002c6a131678111007c41185572486ea3b2c3173114fcb93eed4dc3482442ffabe7a0aedf1f0b658ecdbb SHA512 c8be80f7b275f5ecc5a4efc5c7c031927a96199481078fbf0f38378b492f92d593689de7ee08de5ac1b7a5de1e838fcecaeba092d527aa45e5f73821b0be826b DIST genpatches-5.10-94.extras.tar.xz 3840 BLAKE2B 842c7a0ce6a2663fbe84b9e64ebdcd478b0c7c6f09e6cc445633bc6619f19c4330414f5087c6360f402aea60aea4bc7717b7c336720b858768b876aafcbbc95f SHA512 976232c1cb16c5eac908176645f077e7de3e98f3ad3f089dc8d77480fd88117e251dac3eb36564a4fba715d6dd0efe8c8bfe5bce6d4ce62ba1dfce85b79be9a6 +DIST genpatches-5.10-95.base.tar.xz 2769920 BLAKE2B 5de95da15985c9188801c6dfc413faa7fae2c534ccbc17ca3e8e3f70ff1422e00819b177cc4e1828eb6234ec110930af6e747089482e8efca010c1dd7fffa098 SHA512 4f6d6196406af59c3f9b7d9d069cf0d2186e45f10bccdaac0c1473520ed67606fd363d97b64eb53cb76c08c4d8e4198d67744af34a60e78419cc7c6ffe28a26f +DIST genpatches-5.10-95.extras.tar.xz 3852 BLAKE2B 1deb0958934dfe7b0092ffe9254269fc8ca900cb526f4805e38d7c69e8d4d587b50a169b1a54d32ed83fdf481626f853ae56e007a21554d82a7befc598d571b2 SHA512 f3c5ca1aaa1f7ba0743fe0d0f3046e411547c09d3590766b76778dbdbe1221ffd3542f3231e6ac6a77773caf3327d28aaa7bcb767cdf132a4fac7cf8afd3e86c DIST genpatches-5.14-24.base.tar.xz 865892 BLAKE2B 5855b54e7ad2fe9fec353706d026b774c939f82967af5b57c41245762e0ea7fd18731faf1251b1b7aa814c2949d354ff24ce9f078dc68a5c8409490e5517462b SHA512 d83feb3e3c9a32df559fd25b598cb358987f076c107a233a8503390f85132fe6d2a62ee163482439308fa7a62d15aa83ebf9bebaabe0e631eb831fbbbfb700c8 DIST genpatches-5.14-24.extras.tar.xz 3844 BLAKE2B b11a8019a920d12c848fdc34514ed7352217e41f659bb7935c6211132897e8f948a8ebfd281b89e67e3993e3e5a03f2f32b0b4d3b73f5d1228e65812cf6cbeea SHA512 a2b757955740078aa3891a6a696bd50fa35606bfc6dac0e739abe2869d5322554417b4bfd6a989d23a2d31bea14c06294747578025ffac3d77e8a91ea16f4ee6 DIST genpatches-5.15-12.base.tar.xz 562448 BLAKE2B f9bb15119aed4b64c5e4ec78cb108baea49615b2114d5d64e86b24c3fb6d1e010ca120a4e527924229fca20559c65d8a58002c80b1bc6a034c1bf557788c7d29 SHA512 1d1053b32fa4176e6b0fa50ebd3ca4b3ae7c5d2d8a9ee89133e6c189a9a9c86ddcc7f14b6948ef8360466f484c745150b93706401839d2b44390bf2dcc0b2ce5 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.88.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.88.ebuild new file mode 100644 index 0000000000000..6eb4ef17fc176 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.88.ebuild @@ -0,0 +1,124 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build toolchain-funcs + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 7 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.10.12 +CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530 +GENTOO_CONFIG_VER=5.15.5 + +DESCRIPTION="Linux kernel built with Gentoo patches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + amd64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config + -> kernel-x86_64-fedora.config.${CONFIG_VER} + ) + arm64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config + -> kernel-aarch64-fedora.config.${CONFIG_VER} + ) + ppc64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config + -> kernel-ppc64le-fedora.config.${CONFIG_VER} + ) + x86? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config + -> kernel-i686-fedora.config.${CONFIG_VER} + )" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="debug hardened" +REQUIRED_USE="arm? ( savedconfig )" + +RDEPEND=" + !sys-kernel/gentoo-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +QA_FLAGS_IGNORED=" + usr/src/linux-.*/scripts/gcc-plugins/.*.so + usr/src/linux-.*/vmlinux +" + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + default + + local biendian=false + + # prepare the default config + case ${ARCH} in + amd64) + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die + ;; + arm) + return + ;; + arm64) + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die + biendian=true + ;; + ppc) + # assume powermac/powerbook defconfig + # we still package.use.force savedconfig + cp "${WORKDIR}"/linux-*/arch/powerpc/configs/pmac32_defconfig .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die + biendian=true + ;; + x86) + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die + ;; + *) + die "Unsupported arch ${ARCH}" + ;; + esac + + local myversion="-gentoo-dist" + use hardened && myversion+="-hardened" + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}" + + local merge_configs=( + "${T}"/version.config + "${dist_conf_path}"/base.config + ) + use debug || merge_configs+=( + "${dist_conf_path}"/no-debug.config + ) + if use hardened; then + merge_configs+=( "${dist_conf_path}"/hardened-base.config ) + + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config ) + + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" ) + fi + fi + + # this covers ppc64 and aarch64_be only for now + if [[ ${biendian} == true && $(tc-endian) == big ]]; then + merge_configs+=( "${dist_conf_path}/big-endian.config" ) + fi + + kernel-build_merge_configs "${merge_configs[@]}" +}