commit:     f23017c5a10d756bf441fce06fdb54955eba3374
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 19 15:31:14 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 19 19:10:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f23017c5

sys-kernel/gentoo-kernel: Bump to 6.1.157

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   1 +
 .../gentoo-kernel/gentoo-kernel-6.1.157.ebuild     | 174 +++++++++++++++++++++
 2 files changed, 175 insertions(+)

diff --git a/sys-kernel/gentoo-kernel/Manifest 
b/sys-kernel/gentoo-kernel/Manifest
index 3f91b04dd6f2..d15e69c7979d 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -92,6 +92,7 @@ DIST patch-6.1.153.xz 6497932 BLAKE2B 
67a540a290ccb6db0b4f83916102323a53907adb1d
 DIST patch-6.1.154.xz 6507340 BLAKE2B 
5333097c2375c59b2bd73acf4b02cf60bf8aedb085031075dfb6c1df88995330e62163fda59e98e756b1456ebc3995b699102932b50e5e15ba59a1f92eb6c877
 SHA512 
268c89cef61d4fa0c83eed99f7056ca5483f855b6e78004c384c963cff3a21b68313683ced3b211d4b3eacc9481d3ca7e71dd8aa98912444ea1e10b5ed40cd33
 DIST patch-6.1.155.xz 6523120 BLAKE2B 
d7fded35eb0b20ced762bbaf0caadc53bae23243f3fe3a2ce25a3461c5cfce131541826aacc8764803edb6eb6abbf8253a324659f65186ce683909382ddd43b3
 SHA512 
4ec98b90483f80fce40dcfb134b7ebeb4b3fc9d257b0a2a6ef6b23f77e786e8a13c7812fdcd8928b40ebfab28b247a1e8d917b5429bbac538a2af441c4f53b77
 DIST patch-6.1.156.xz 6549524 BLAKE2B 
3dd6e04f40fe58351f4a832550ff3058d840fa0e71768f72cf9b0930772a67f5bf60b0719460ec0a9e33185c13240f26946979bdf9d1982e48e69f35e7642b0e
 SHA512 
abbea02001a8caf931baadb38fc30346fe69786fa26d6494689fb4fb77fe83a5716714363d0f7d5d47f3c13c43fd09ecee3862a6c5b926064ca64aee7b3d8184
+DIST patch-6.1.157.xz 6579568 BLAKE2B 
57556c1ebd47576a12155d3b00a5c238d3667a18f9d16f260ca3c2638239f5ec983d77df1ad8e7d161977c7197d3f7e0df54d6d4f695a60052975b3cc11f93c8
 SHA512 
0b4b7d14a47cae3f62812ee17b9de7224d0b678249148729639fa2f3563208237ec047f6a52f7c904f49f0442f630dd7e5a09f1c445dd8912d98df7f10c2d409
 DIST patch-6.12.41.xz 2584360 BLAKE2B 
8cb7d77a45e79b186e24bc59be15d74f4e9ea4b7c7f7b5c81b82eaa9b1a8b88a7aabff6768471d905e24539366bdb85593304365726307e19bcfa41937764bf0
 SHA512 
b9307fafe443eb61b0edc624b2c9ab7a0206765eb614683e0f01d7f7fab04a729a91d92d67b8ace03208d6b63088ff235203e8fdfad27adc97cdbf7df872b3c2
 DIST patch-6.12.47.xz 2896968 BLAKE2B 
4064af2ae029d13d63a0a6cfb9e4121266ab33622c03e088ad3544a0f5bf443d75a2ff2f7c35b58d7cc8669acb0eac93165cd3bfe5d8567f332516850bc9f7a4
 SHA512 
19bb9e9e235fa408e3b37dd6fe475f1dc7690bd09274dcdcb722ccc9733da9169dbaa97dffb15e0b32da6a62cd89b2da8cad32b4d2f16f2fbbd9d023b5ebae9b
 DIST patch-6.12.48.xz 2931416 BLAKE2B 
888711e5a4b9578bdd09379aac0b385b901e9784e1307b2c36a700f996e6deb9c2e6531ea2a4fd4daec6bd2cb44c8a7767d00e59922c2311e448592605929e00
 SHA512 
f7a4999b1f2d2019fcaf691a2c0f1797be73858404fd4825962ec32945733fe98f625d8451d9bc264a1c14500b4596be6b73ea947da35e7b27f044f08642f2ab

diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.157.ebuild 
b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.157.ebuild
new file mode 100644
index 000000000000..50661b098f2a
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.157.ebuild
@@ -0,0 +1,174 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KERNEL_IUSE_MODULES_SIGN=1
+
+inherit kernel-build toolchain-funcs verify-sig
+
+BASE_P=linux-${PV%.*}
+PATCH_PV=${PV%_p*}
+PATCHSET=linux-gentoo-patches-6.1.156
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.1.102-gentoo
+GENTOO_CONFIG_VER=g17
+SHA256SUM_DATE=20251019
+
+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/${BASE_P}.tar.xz
+       https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 
1).x/patch-${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}
+       )
+       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}/${BASE_P}
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="debug experimental hardened"
+REQUIRED_USE="
+       arm? ( savedconfig )
+       hppa? ( savedconfig )
+       riscv? ( 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 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
+               cd "${WORKDIR}" || die
+       fi
+
+       default
+}
+
+src_prepare() {
+       local patch
+       eapply "${WORKDIR}/patch-${PATCH_PV}"
+       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
+
+       default
+
+       # add Gentoo patchset version
+       local extraversion=${PV#${PATCH_PV}}
+       sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || 
die
+
+       local biendian=false
+
+       # prepare the default config
+       case ${ARCH} in
+               arm | hppa | loong | riscv | 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}/${BASE_P}/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
+
+       use secureboot && merge_configs+=( 
"${dist_conf_path}/secureboot.config" )
+
+       kernel-build_merge_configs "${merge_configs[@]}"
+}

Reply via email to