commit: 8c0d006fb0e3abcc7575f55fa77615de25d293aa
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 6 13:54:17 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 6 17:49:27 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0d006f
sys-kernel/gentoo-kernel: Bump to 6.15.5
Use upstream patch + own dist-kernel patchset instead of genpatches.
This reduces effective patch size, makes applying faster, enables
verify-sig (using sha256sums) and makes it possible to bump dist-kernels
independently of sys-kernel/gentoo-sources.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-kernel/gentoo-kernel/Manifest | 3 +
.../gentoo-kernel/gentoo-kernel-6.15.5.ebuild | 177 +++++++++++++++++++++
2 files changed, 180 insertions(+)
diff --git a/sys-kernel/gentoo-kernel/Manifest
b/sys-kernel/gentoo-kernel/Manifest
index 691bd29522c0..aa441cf1931b 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -53,3 +53,6 @@ DIST linux-6.1.tar.xz 134728520 BLAKE2B
ae60257860b2bd1bd708d183f0443afc60ebbd2b
DIST linux-6.12.tar.xz 147906904 BLAKE2B
b2ec2fc69218cacabbbe49f78384a5d259ca581b717617c12b000b16f4a4c59ee348ea886b37147f5f70fb9a7a01c1e2c8f19021078f6b23f5bc62d1c48d5e5e
SHA512
a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548
DIST linux-6.15.tar.xz 151168812 BLAKE2B
465596c6dc053ff3a3966302a906d3edb4f7ee1ef82f8c20b96360196d3414f5b1deeafa67b8340fcdecd3617280ba9b756d7073ad15c707865e256397b4af53
SHA512
d03788ffa8d8ae1b84ef1286bb44a08fc01432e509dfec6cccae5c5a5a47201d378aec2bcd21e6f0bbd1e625b26f47780c06ee9c1cef3775358f98b160923f30
DIST linux-6.6.tar.xz 140064536 BLAKE2B
5f02fd8696d42f7ec8c5fbadec8e7270bdcfcb1f9844a6c4db3e1fd461c93ce1ccda650ca72dceb4890ebcbbf768ba8fba0bce91efc49fbd2c307b04e95665f2
SHA512
458b2c34d46206f9b4ccbac54cc57aeca1eaecaf831bc441e59701bac6eadffc17f6ce24af6eadd0454964e843186539ac0d63295ad2cc32d112b60360c39a35
+DIST linux-6.x-sha256sums-20250706.asc 154698 BLAKE2B
8c9f6fce58842bff04a7e67bfa4c526aa4f96e330eb1f340eb4a27255c7c3755143c3bde4b4d4e1a62a73c750bd940ef69902c0da37c8a0a308843bc978dc06d
SHA512
4798b646ed4982fb2024f06f346cf0eed66c94dd1ca1972171101b6848a476b85b9deb5937421b643fc760171a246e348b5fb0809317be82f849be4db81fa8eb
+DIST linux-gentoo-patches-6.15.5.tar.xz 83692 BLAKE2B
0b0831734f25b00a3523592439625342d12b0361b56e4d8243f94c045a27eeedbc02086032f01240d26807721d55d8a4011513b5610d1bf4889e35b7ac171afb
SHA512
876750fbfb36f75ddb69026563a2d43310e116c567491a5428da30383a38d9384b97455c7ea61a1faa949b44dd22f402262c63a3701568ef3f8ab2d5f67f6c0f
+DIST patch-6.15.5.xz 538604 BLAKE2B
3771e14cb95010a9e553191af6888fa26dd5f1084c16a1df3aad97ed2a03de97cf1af8562a1b7c0d1977dfba1f3973e03079278b72943ac104c4208e1eeed315
SHA512
ff35f126fc24cd9fc2ba7dafb10e2c4dc4643a2165893d6dd07ce0ab49bf33d4b67ab33b32875b74371749b5e6f93a061114c9837bdb48203d50b5ec55db5a65
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.15.5.ebuild
b/sys-kernel/gentoo-kernel/gentoo-kernel-6.15.5.ebuild
new file mode 100644
index 000000000000..1730d9901cb2
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.15.5.ebuild
@@ -0,0 +1,177 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KERNEL_IUSE_GENERIC_UKI=1
+KERNEL_IUSE_MODULES_SIGN=1
+
+inherit kernel-build toolchain-funcs verify-sig
+
+MY_P=linux-${PV%.*}
+PATCHSET=linux-gentoo-patches-${PV}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.15.3-gentoo
+GENTOO_CONFIG_VER=g16
+SHA256SUM_DATE=20250706
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="
+ https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
+ https://www.kernel.org/
+"
+SRC_URI+="
+ https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PV}.xz
+ https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
+
https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ verify-sig? (
+ https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut
1).x/sha256sums.asc
+ -> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
+ )
+ amd64? (
+
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ riscv? (
+
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-riscv64-fedora.config
+ -> kernel-riscv64-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )
+"
+S=${WORKDIR}/${MY_P}
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="debug experimental hardened"
+REQUIRED_USE="
+ arm? ( savedconfig )
+ hppa? ( savedconfig )
+ sparc? ( savedconfig )
+"
+
+RDEPEND="
+ !sys-kernel/gentoo-kernel-bin:${SLOT}
+"
+BDEPEND="
+ debug? ( dev-util/pahole )
+ verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
+"
+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
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
+
+src_unpack() {
+ if use verify-sig; then
+ cd "${DISTDIR}" || die
+ verify-sig_verify_signed_checksums \
+ "linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc"
\
+ sha256 "${MY_P}.tar.xz patch-${PV}.xz"
+ cd "${WORKDIR}" || die
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+ eapply "${WORKDIR}/patch-${PV}"
+
+ local patch
+ for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
+ eapply "${patch}"
+ # non-experimental patches always finish with Gentoo Kconfig
+ # when ! use experimental, stop applying after it
+ if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]]
&&
+ ! use experimental
+ then
+ break
+ fi
+ done
+
+ local biendian=false
+
+ # prepare the default config
+ case ${ARCH} in
+ arm | hppa | loong | sparc)
+ > .config || die
+ ;;
+ amd64)
+ cp
"${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ 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}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
+ ;;
+ ppc64)
+ cp
"${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ biendian=true
+ ;;
+ riscv)
+ cp
"${DISTDIR}/kernel-riscv64-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ 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
+ "${dist_conf_path}"/6.12+.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
+
+ use secureboot && merge_configs+=(
"${dist_conf_path}/secureboot.config" )
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}