diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index f9f4c646e552d..4fd3c094b26ce 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -64,6 +64,7 @@ DIST patch-6.12.69.xz 3832080 BLAKE2B f70cbf90f1a96e1b0384990bb238f6d433a6fe4e72 DIST patch-6.12.70.xz 3851836 BLAKE2B e271ff2ca48b4d7b339a66c3aaa0a47bb5311af45aa4a69adeabeec45377382290e9c9693444a36ae05bd63ebc5fedfe6e05130ad6aac1be972e1122b0e40d59 SHA512 66c8713ec2f637e0de4b357626d976dc6a1a55471d5c58818377a8913376ebb13ec6331a9fb5fb0c6905fd22a26ad972a4a6c824ef5dec2947eb5ab5dbd7d17b DIST patch-6.12.71.xz 3853788 BLAKE2B d472c0583aad7a51d7734b44fae29fe007dc4f7261f18ba725f863cfe053e99382fd587aab90c5a7554159fc6263667b51247f0aa1762cb9d693e5d83973753f SHA512 8f3a8d7aeee3bbbb4541002a6c9766836900e091a6c9ee0ea0d866d7ef6e48169f0187c70ef750e6e0e0e93259e8a991e1583d4e05d1d785b4b44d170128c3ea DIST patch-6.12.72.xz 3857460 BLAKE2B b716b5f20c75f1cb80a2b1e67383f3ff536ef0c4707a5b3b2d45f42639f409aaf9049a4a59ceca7c19b0ba684be31b416c214c03c2664bc909592a108239fe03 SHA512 5456674d084225295c9a1784c863608fb783690ba103788d7a27514a72dfcf04efd6817f6fa86e04fd12917ff51667dd100747ea5661a86687a8a7e062f016ee +DIST patch-6.12.73.xz 3856712 BLAKE2B e5adcfd54e99e232b6c682b8baee915bc9fb2b1ed1a3b22e3077f6fa27573c1449f57549c4476b1e6f11f864ae9886091dfd335c1a99f81d039277aa75fc0575 SHA512 a93d89091de7931ec187cd3043967e90a6959dd8a223481bbe84e89e98fe0b7166de42e4c9fa97f9bbf11dae6551578d3d18a290d406e87a4aa541ff71cf690d DIST patch-6.18.10.xz 658132 BLAKE2B 1ae06ff14a3f6e8fddc13044607db2aca2349cde4a2a6ed0dee08805d00344fce0653d292c5df5f063532fe4c3459d14ea2f3595bd173446e037cfba8c735855 SHA512 47441292df0bcfd1d673c98232ee82547d88e0c83b571d50d1ee4d5eadd46f2664dde74203c6df0183b33c4201b35e4d52543e47001efa23d37f1a664d022985 DIST patch-6.18.11.xz 670712 BLAKE2B 392006377b043bcbb6ee74f936e0b2f8d09b7be9f35c6aacdef68e60c3b117f645d35e3b4241dd0df603ccfc3866a3d307d2d4b654eb3f887d213240cb78ff68 SHA512 4ddf03816166d411924bc36a29e2f34ceac307aa07f7293863ddb75313e3bb05813d3b138f210164f77f6d8c0326c9ca95d5dbe4febcc2c7520a8e01f4121174 DIST patch-6.18.12.xz 670328 BLAKE2B 777a3043ffd89dda18c6373e447b0181dbbc1d123efddd7a0d669cbcd02ae9e7d07529ee6380641976a56c7ca23c5c4a521c55d5824e07df6ed1fc9f40c9dec0 SHA512 b71074dfff3fb28d781b1cabc5aed4207de286a7e6f1b896e4aa40ecc794a38243496f8325bbacc39431fed71e283bec030157777b701da099ee772af5e100cf diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.73.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.73.ebuild new file mode 100644 index 0000000000000..2c36fd46ad892 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.12.73.ebuild @@ -0,0 +1,184 @@ +# Copyright 2020-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +KERNEL_IUSE_GENERIC_UKI=1 + +inherit kernel-build toolchain-funcs verify-sig + +BASE_P=linux-${PV%.*} +PATCH_PV=${PV%_p*} +PATCHSET=linux-gentoo-patches-6.12.68 +# 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=g18 +SHA256SUM_DATE=20260217 + +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[@]}" +}