commit:     cb94f0949a5c1becb461eac4f75ff11e9c9a6022
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  6 11:54:54 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct  6 16:12:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb94f094

sys-kernel/gentoo-kernel: Bump to 6.12.51

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

 sys-kernel/gentoo-kernel/Manifest                  |   1 +
 .../gentoo-kernel/gentoo-kernel-6.12.51.ebuild     | 185 +++++++++++++++++++++
 2 files changed, 186 insertions(+)

diff --git a/sys-kernel/gentoo-kernel/Manifest 
b/sys-kernel/gentoo-kernel/Manifest
index a35345b0f7cc..86f61dada4c5 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -83,6 +83,7 @@ DIST patch-6.12.47.xz 2896968 BLAKE2B 
4064af2ae029d13d63a0a6cfb9e4121266ab33622c
 DIST patch-6.12.48.xz 2931416 BLAKE2B 
888711e5a4b9578bdd09379aac0b385b901e9784e1307b2c36a700f996e6deb9c2e6531ea2a4fd4daec6bd2cb44c8a7767d00e59922c2311e448592605929e00
 SHA512 
f7a4999b1f2d2019fcaf691a2c0f1797be73858404fd4825962ec32945733fe98f625d8451d9bc264a1c14500b4596be6b73ea947da35e7b27f044f08642f2ab
 DIST patch-6.12.49.xz 2955076 BLAKE2B 
8f333d832ea1fe060000b3b14fb2e91ee2302df73f3e84a49a4813f59a254f56b51e7d7b8ad0a1f6c83655f34eaad41f97d70111c12ecd781d62b273a91c1af1
 SHA512 
38d48f5d76489936562b1ea0b62482ecfea1b2e1ccde07742f93950ce5f059897904b2c4342b6e91d2b647c283485c6f69d56719a9a3ed41a9e35f282b5e1dd1
 DIST patch-6.12.50.xz 2972204 BLAKE2B 
589b11a26af4f14181e12f156a4d34e884e7b8310802c22a63d3494b9a4507d275e3a437aaef7c7c5e2736ddbf71fc91ee4a9ab11acb252c89a16697c8964ed0
 SHA512 
3ec4639bec29bfe04765efa90abbda5ec5384ce616114b926e0c4bc7601a43ddf45c71634d8e846e1b5189460210099ccf4a4c0f20278a2e564cc25767543a7b
+DIST patch-6.12.51.xz 2974844 BLAKE2B 
cfb7242811febee3e506aa8775189f90cb1501341ca7aea7153aca28553cb5e953902f1c7bc23b2872f3f4617ee76641888c0cc0ae7a4611399a892030832b58
 SHA512 
5e04752b3432809212315b24c8fc18764b367e9e3282325d3d52b75190b4e0eeca48a10dc3baf09abfde3a633a7b14e03b4224251ae4e0b6206085683cce5dd2
 DIST patch-6.16.10.xz 796140 BLAKE2B 
fb1868512d250eded50e32cbe9233e8a89e63d9004d0ca6cb1c5f156c128358bc294da6e0e7fe011cfbcac1358b1ef6b860d82628e34e15ac141a45465109c53
 SHA512 
0a2c34c2f64cd87f7079388295d120c81ad6bf3797873bac5bdaf4baeb0ae419f1beccb4f5415ed4a6b14f583f671073f7db2b7de92930ccf5bf59169a714e8f
 DIST patch-6.16.11.xz 799032 BLAKE2B 
5e0a522494c81839a9a0c06825ebdbdce4c7a802ce62c337dd819cfe04012ecfed7bab3d93574aa6a3e66477971d687d0ef1971dff409ff49d0d18e09d68df21
 SHA512 
46423abc9bd8aaf0611f285947726dba54c24c73966cbfd03203314a6c235e98b110681335c2a1d0528c43abd13f285edec73a43f4df872c0cc7221677fd318c
 DIST patch-6.16.7.xz 650544 BLAKE2B 
5ceb5a463cf7c9df15a894103913e7f872af9b879a6a8751b2cd4208c687e477654a2b23f468a44d6af66a987f55e76da55c0080de5025dcc286ddf1d1be9e4b
 SHA512 
9351c2d01a914854831cd5db71aec3ebf9887161871ba7a00fdd234849121764b0af9ce4b08c5f275d9278268fc960e4aa4232edec15220e75113fc9610ca59e

diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.51.ebuild 
b/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.51.ebuild
new file mode 100644
index 000000000000..37a80c770380
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.51.ebuild
@@ -0,0 +1,185 @@
+# 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
+
+BASE_P=linux-${PV%.*}
+PATCH_PV=${PV%_p*}
+PATCHSET=linux-gentoo-patches-6.12.48
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.12.41-gentoo
+GENTOO_CONFIG_VER=g17
+SHA256SUM_DATE=20251006
+
+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}
+       )
+       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}/${BASE_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 "${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 | 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
+                       ;;
+               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"
+               "${dist_conf_path}/zboot.config"
+       )
+
+       kernel-build_merge_configs "${merge_configs[@]}"
+}

Reply via email to