commit: 90c20da15d612ccd2134f42128b3779cfc6f4609
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 5 11:17:28 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Sep 5 15:03:52 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90c20da1
sys-kernel/gentoo-kernel: Backport pde_set_flags() fix to 6.12.45_p1
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-kernel/gentoo-kernel/Manifest | 1 +
.../gentoo-kernel/gentoo-kernel-6.12.45_p1.ebuild | 185 +++++++++++++++++++++
2 files changed, 186 insertions(+)
diff --git a/sys-kernel/gentoo-kernel/Manifest
b/sys-kernel/gentoo-kernel/Manifest
index 4451654f2e1e..f3cf0d131c04 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -48,6 +48,7 @@ DIST linux-gentoo-patches-6.12.40.tar.xz 19240 BLAKE2B
2e5bdafcbe44cab520c86d7ab
DIST linux-gentoo-patches-6.12.43.tar.xz 20956 BLAKE2B
29333fc247ce5a1cc75ff70a2190e65943e23ec457b13e043ff9df77522fe27152a448074933ac801c91faa6ede75386743ebe58fc399c70067612d5ed1d71c5
SHA512
dc9efdc9852cbc33039eb335e8d4d9d490c707b62e2889898cc64a3691e271083f574e1afada68a73e4f94beb8c1ba4ec990d1e5522a585d856152b37d88af3e
DIST linux-gentoo-patches-6.12.44.tar.xz 22180 BLAKE2B
97b49825846827d29ca2bb313de8983f3dc3e18cf576a9b5bd5869bc38ebc42c8b61aeb7b6cf068aab918a58b48f024163ee6f3da448a4edbbbb37074a5b1397
SHA512
74292ae4f88746be65096a8c7025577b0d4920751d94f88417429e9aae91247e3aff7ce62b17b62503df8bb501a74c8f4e20c5c7ca5f4314549f21d977c97f44
DIST linux-gentoo-patches-6.12.45.tar.xz 21680 BLAKE2B
4f45815da949c681b4768665629342011910bd949309d643a1e225a035ca2a5d5a90e0ab9133a482f41018e9fbb10b33f145f8039cddbeaf5ba0aa293c6a32b8
SHA512
84f9d56e49ede8cadda0142f9ae23e7cf6b8fab4fdf47ce258d43d99537100c6d1c376a8f15482403b76054cf8d9f86dec126cd0edfd1bbbb0073f58af3b16c6
+DIST linux-gentoo-patches-6.12.45_p1.tar.xz 21996 BLAKE2B
d0fa141b468267f77d3b0fb331c719277e754390edf343e6687c110a6332b575779d3214b77632c2ba368d254e2063e5c8f4505f1a594aff5041b7074d11a6b5
SHA512
cbe1035826a8f79259295594019c98c275dbbd774c815cd65165ca1d83dfa49e8a35ae568cdd5ff29d19c0e25570c066b5ee7c35221f5fd3e05b8e59896f0005
DIST linux-gentoo-patches-6.16.2.tar.xz 85676 BLAKE2B
31adfc6ebdfe2412c1576734351a6ff5bc0c1cae86e87f3cfbf555d07e8441c64bd0e31f3760674e931a510a9401935dee46689eeff6f5ee5c28029a889a40cf
SHA512
aa74585b4c71202176c851cc2b08569a752da58f5a43c5b1fb3dfd59db8ff016907985d448c51f4163b951a5bc500b81eca647e1b6a7c20ab7287292d4c2a3b8
DIST linux-gentoo-patches-6.16.3.tar.xz 90080 BLAKE2B
0fdafabbaf6ebcbb997debdc17b5baec5a7e3154902a9093891e5d839540c55ddcba94ba34af11bbc374badcff67d1e47999bc998e5b21168eb92b332438ea01
SHA512
83de7cefae3d9ad9d47ae49db4a8328725b7b44fbd4e854dfad2a33917eace57958e9e25d275c83a5d026c2391b529015ac840e2fa3f3cf13733e570349d25e0
DIST linux-gentoo-patches-6.16.4.tar.xz 89184 BLAKE2B
57ee7fcbbc519ff327162163b81f910ff90216b19b066acf7c873f69afdcba99f9d38be7c8998522b3870376441d8b3be5c9de7a12f8464bbaf597e18162a966
SHA512
b4c02d84b7023359e0f378459c31a6b0984d743a9415f667824295292f448aae185665c39537ca9fb8bbff3473956dd90419bbf42dce0b9eb3bdd1fa9465a7c5
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.45_p1.ebuild
b/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.45_p1.ebuild
new file mode 100644
index 000000000000..24b81dea0c6d
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.45_p1.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.45_p1
+# 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=20250904
+
+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-${PATCH_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[@]}"
+}