summaryrefslogtreecommitdiff
path: root/sys-kernel
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-12-01 20:18:16 +0100
committerMichał Górny <mgorny@gentoo.org>2025-12-02 07:47:33 +0100
commit4e4efa96dbef4d4531817c415138ae663e77ac67 (patch)
tree5490aa698d2d77807e092e208690999a5f219d06 /sys-kernel
parent3f2ece25f478cd3fa96fce5b0715ba77f2e2a64d (diff)
downloadgentoo-4e4efa96dbef4d4531817c415138ae663e77ac67.tar.gz
gentoo-4e4efa96dbef4d4531817c415138ae663e77ac67.tar.bz2
gentoo-4e4efa96dbef4d4531817c415138ae663e77ac67.zip
sys-kernel/gentoo-kernel: Bump to 6.6.118
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest1
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-6.6.118.ebuild178
2 files changed, 179 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index f86a99843831..8b04836f0b53 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -55,3 +55,4 @@ DIST patch-6.17.10.xz 806232 BLAKE2B 49252accd7f37554a2783cfa92523dad3e39f41764e
DIST patch-6.17.9.xz 764968 BLAKE2B a0ce8311be7c251ad21b7cc11be4f30ec5125e3763f97a750afef855be385a3ceae24df3b65b5dd751729575aa0cd254a95cbae0f2e8cc8f95539dcfa2d9d3a1 SHA512 35593bc973cc7f626aa7a41cf8b7dea1b46fe8922bd57194db363d26e8854af514d103e39d02c642c26748bd933d5e402ff89d2a20d2da5f8d901e4713eafc46
DIST patch-6.6.116.xz 5054680 BLAKE2B 0ff38d6f77204767a2a2f79080405634a53ee304754156fc1c5f0c8aa339b39b2382d3d4e33132a2a5c02d0c2c81ae07e20eb55ef76b62788411321399c49569 SHA512 60d1d70b217a4908d3b67b61596013b3ecc06d44ab095ad50accb21a71bb9b3d20128d38cb73790b9999e0e922092c06a414cad0efaab4c1739accc7cf8b5510
DIST patch-6.6.117.xz 5149968 BLAKE2B 5557cb9181cb2885ebf7bda52e37c69b91f6be11b8338b8ab5d691d3786a0d1ceac432062a2954256203a63c19277725a915284c520cfd7d1ef72df82ba41ccf SHA512 387d134e42416f90a32b349a5c941ad99d135cd57388fbd90ca0479b0521bb1aff0f3b8f6b8af6f9d73ed0f0f83ded8728300bd99c63473cf62a0f700d03de25
+DIST patch-6.6.118.xz 5155016 BLAKE2B 3d5ca3e87d1eb8605d3973347e551ba0e3184aaeba6f895872838327cccf7a2046f53f8586db547fc9c2e38586e630db9274a2347d90896f7a15730b247cb3a6 SHA512 d692a749b9b7b21a50f6bb404b3da9f77b529e855167f633e4a70e177f358cb1ad072edba6512ed37fd04c0fa986463e5bbb34472555b419ef71fc946a487eff
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.6.118.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.6.118.ebuild
new file mode 100644
index 000000000000..bf3ef9c51f26
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.6.118.ebuild
@@ -0,0 +1,178 @@
+# 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.6.111
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.6.12-gentoo
+GENTOO_CONFIG_VER=g17
+SHA256SUM_DATE=20251201
+
+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"
+ "${dist_conf_path}/zboot.config"
+ )
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}