summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-06-06 14:11:31 +0200
committerMichał Górny <mgorny@gentoo.org>2022-06-06 19:12:36 +0200
commitaf28e2269fdec0b73562d44d3fbeb77b2df1afe7 (patch)
treec22297a8c5325f38e65f4b398e0481bb808799b1 /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.17.13 (diff)
downloadgentoo-af28e2269fdec0b73562d44d3fbeb77b2df1afe7.tar.gz
gentoo-af28e2269fdec0b73562d44d3fbeb77b2df1afe7.tar.bz2
gentoo-af28e2269fdec0b73562d44d3fbeb77b2df1afe7.zip
sys-kernel/gentoo-kernel: Bump to 5.17.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.17.13.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 4f2cf8b9ede0..45122a854e79 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -20,6 +20,8 @@ DIST genpatches-5.17-15.base.tar.xz 769140 BLAKE2B dface984138a5b7f75911c7d6a4b7
DIST genpatches-5.17-15.extras.tar.xz 3932 BLAKE2B 8084ec2b3be0e27280efc68d58db4fdbbdd0441fdc6fe89eca6e422d84d8c306122c5fc235c58b8ca3f2af58f5923ab7102a3c157b06e321a4f3c84b5fd951e9 SHA512 bf20e023296469cb4767dd7088fb0772142deec3adac89fe581153dacff74ed4517e8a121aad70004b1f1b21dad40fe0c072817c4043e7d3d8ac0ff3c551ea31
DIST genpatches-5.17-16.base.tar.xz 803164 BLAKE2B 5a5d96e856476fc0fbab018db9276b770d30521d5878c0390098ae4654bb915aa33959da66c3b7bdcd05427b2870527bbd806a8926ff05de9b53b5cf9d0a2bf7 SHA512 66d0978276021e392fef20476e0056bfcab76a55cfbbb1fe84e913a70347db8fe8c8c0b6c7b50f24da4a192517156aaf88449aaa495133f6d933f24b3b7b8d6a
DIST genpatches-5.17-16.extras.tar.xz 3932 BLAKE2B a0f7e32a2f67d3fdfbc1706207f17b18ac2e55932bf7a969762674afb9d4b506e9d3095f811e72ab47addb439cc29c3e98ad16e09f0fbd3e8724477d74baed1a SHA512 07475d9cb94147449765b98acedb9709a707dcadbf293e3cfc927a338e716a45ee40ec26ee942d356ec8461a1bc20ca4eb93d589187759aa52305f27e67bc951
+DIST genpatches-5.17-17.base.tar.xz 823112 BLAKE2B de53871be24c0c7257de3b2ac384bc3de480b79161353fda2cbfa1c26b94d80dbe6257443c630f5a050436a2fdf865ff580db503dd0dba9db9e41f3b357292ea SHA512 345643550ac05c33fd3ba54aae1a70a0a07498eb6a97922f2ea4291247c10a9f3e5f5f0bfc9cc1c0669c95cb5d6f94ca20e01539218b8c5b128f544003a23421
+DIST genpatches-5.17-17.extras.tar.xz 3932 BLAKE2B 8c858ea2d37aa0a60752e051af6a400253e79ad69eb186b5b358ef398992ee62bbd9896c68db0c5e16981ad020f24718f584e5765c6f16d4eab3dd6651940404 SHA512 1a032cbde503850d3ad3a81b8f4fe845d8cd2bb7da6979a676a4c4ed641ad9bffed6cf89aa870fd3f1e0cb9569668a431d7d30ff049ec7c669a06a11896f6c10
DIST genpatches-5.4-199.base.tar.xz 4683396 BLAKE2B e1e66ce10c436bb196a5890e08d5beb8d0a1ece7f19f8fb3b1027747509cc7b6102ace634abdbd299dd48fbc8750f3bc127abe55014410b1d558b4aec497f475 SHA512 8a16d67794e864749fdcdbf413ec0fe996d3c4fb5f04f8c8a2d3001377c8b5d4d7007a96efaa3590fd4b595cccdea36d83c6dc292629566e5398f322658d80f4
DIST genpatches-5.4-199.extras.tar.xz 1812 BLAKE2B 03b9ebf9d306256e58c895006038f4bb3d908590ef2f603487d9b970963c24acfbe78fbe862b2b493ab477e6e901aba332dc69916eb881fc42a79a62d7f81da4 SHA512 d100e876a9b64d662331d4a78b8531a71144bb70b789e0ab0b76e6957c368ee3a88025e040cd622dd4cf6e4da358a3636571ddf55b94e42dbc250a62a629baee
DIST genpatches-5.4-200.base.tar.xz 4700404 BLAKE2B 8420d667947cf912a8d6419581377b5d7daea5a3c03e333403a4c0d0d55200afe4bd7f379c786ff5904c8f1cd1d7735cb7df95a5a5aad93fcb8b90a8750683d3 SHA512 771883d2b15e92dd5e2ea31e9566d3e1d210389323521be5af32fbea75c168d17e947bf004eb515c54f7b0880fa12fde236045bdeb35e08aec8b54465cb253d9
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.13.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.13.ebuild
new file mode 100644
index 000000000000..3f44c735cfff
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.13.ebuild
@@ -0,0 +1,137 @@
+# Copyright 2020-2022 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##*.} + 4 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.17.11-gentoo
+GENTOO_CONFIG_VER=g1
+
+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/${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ amd64? (
+ https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug hardened"
+REQUIRED_USE="arm? ( savedconfig )
+ hppa? ( savedconfig )
+ riscv? ( 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
+ usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
+"
+
+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
+ ;;
+ hppa)
+ return
+ ;;
+ ppc)
+ # assume powermac/powerbook defconfig
+ # we still package.use.force savedconfig
+ cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ biendian=true
+ ;;
+ riscv)
+ return
+ ;;
+ 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[@]}"
+}