commit:     f0d8779a636da24d10df8bf8c75631c0ca061b25
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 30 14:25:02 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 30 16:41:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0d8779a

sys-kernel/gentoo-kernel: Bump to 6.18.2_p1

Bug: https://bugs.gentoo.org/968116
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   1 +
 .../gentoo-kernel/gentoo-kernel-6.18.2_p1.ebuild   | 176 +++++++++++++++++++++
 2 files changed, 177 insertions(+)

diff --git a/sys-kernel/gentoo-kernel/Manifest 
b/sys-kernel/gentoo-kernel/Manifest
index 1cc68c6e7843..47f6cd920519 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -60,6 +60,7 @@ DIST linux-gentoo-patches-6.17.13.tar.xz 86188 BLAKE2B 
d146fa4c14321f0b3841e1914
 DIST linux-gentoo-patches-6.17.2.tar.xz 99184 BLAKE2B 
867bbf3a8cce987dba3381a874985e614187649e5341bc8c43f97e0b501ed4cfc4bce2ee7d8114ce54d75605151c7dbfdea51e9e5da7af3a834b169bb6998eb1
 SHA512 
149946fd38c22ef5a8b198011f4a044d3c00a93635f85b3c0d0f1f4d74faead20355acf3ff0ee55df89361fd48e8270219f52feeae0688b92d090a1c59a20ba8
 DIST linux-gentoo-patches-6.18.1.tar.xz 14304 BLAKE2B 
e9bc17c8a9bc7334017f61738ce0b5d17d6b9a770927f3e3f848b9a10f5efad1ad6ec0e9697e5ceb844d0f625299794b7d31d3fe09e0854ab4c98235be637d8a
 SHA512 
00db6b73624f953f0c2f18095556bd3045f1b08603ce5ede971767c4f161758d79b049304826dd765bb44f46345ff44b3c17d9e0d83616349599fe75ac38e714
 DIST linux-gentoo-patches-6.18.2.tar.xz 11656 BLAKE2B 
ebac8222e1a9f94753d45bddc35fcfde7a1f66b19307cf64a9e3ab47fe12f35b70e65d1cab48a85741ee6bf6c2bd92e05e0587f9903ab3a1535bc9168b819dd8
 SHA512 
1548015f42cdc55927a3c42b37cde1871f88adcdd0bd04f53fefabc5dee5cf22bb6a3f188200efc2c4ccd484906c2642cdd30ab9ba2ffe524afdbd17cdc5fa09
+DIST linux-gentoo-patches-6.18.2_p1.tar.xz 14964 BLAKE2B 
1a7766dfb5f9d107b4125aa24b7e6c1972f7bc0bf5d2dd92d5ee10e17a2b4175015fd4ddf71b93fe18c1d278f28f6abe4ba88acb0d41042f6455f446b7a0c42e
 SHA512 
6ab511813f9aa5f1d6dedc2ec104f92579f6d90a9206a33cd3bcac772940e7e503be6df596290dc9652a6dad240324fe9486cc93d0d6fc88cae907c2a3d7d5f5
 DIST linux-gentoo-patches-6.6.111.tar.xz 45328 BLAKE2B 
d940d418295c07fcf55614fe415b8124bb9e6abdd2cdb992f9b06ceb3f752503bf17df4224f781cef85170928a76013227340235d50b514899d3893d2f94efcf
 SHA512 
4555fad79908133b0fd0ac0ec03ef4f5b6345974e4243b35255e1ee24182f1091366bb39f8d0cf40f67dde04eb688e95e2902c048b8a3b7aebae64fcc7c2847e
 DIST patch-5.10.246.xz 6964592 BLAKE2B 
b893135670cd9068a8af6f05607ef680d38c4bdd121e1bd3289007df7f0cbc22987c810fe697b939885e20346fb759b4c907870000a5c64f8cad23568ed10a55
 SHA512 
52e6f9bf483c3a588f934eeafdb40bcf0d39ad4c32f3e176ff1ed6f8485c1705ff1e5fc268352772e7aba3a93736653211baaa90df64a6c3d7494fa631c1eb5e
 DIST patch-5.10.247.xz 6997100 BLAKE2B 
aead70810bfd903f1ea2be4e24a0eb7d3282032115ba1d61334193d33420e08abf87bd537243199b5d4e8d4d161f972fa487ae607eee7a5d5fd38eb9f08cb704
 SHA512 
dba332c649b8b05956ed98fc13f939e699fd8b7f6acabfddb69a7243c4e449a3be6ef15ebab72dfb5d906342b79753210a33415f6c079d1e804b789ab165aae9

diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.18.2_p1.ebuild 
b/sys-kernel/gentoo-kernel/gentoo-kernel-6.18.2_p1.ebuild
new file mode 100644
index 000000000000..430bd281e5f9
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.18.2_p1.ebuild
@@ -0,0 +1,176 @@
+# 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.18.2_p1
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.18.1-gentoo
+GENTOO_CONFIG_VER=g18
+SHA256SUM_DATE=20251218
+
+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 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}"
+       eapply "${WORKDIR}/${PATCHSET}"
+
+       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