# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # 6.10 is a non-LTS kernel that reached end-of-life upstream (linux-stable # stopped at 6.10.14). The trunk-pinned patches captured here track # stable all the way to 6.10.14 — full coverage for this EOL branch. # # Per-branch judgment on 5xxx (genpatches "experimental" category): # * 5010_enable-cpu-optimizations-universal: NOT included. Same failure # mode as 6.9 — trunk's 5010 is calibrated against pf-flavored # vanilla rather than kernel.org pristine, hunk anchors don't match. # Dropping 5010 lets pf's arch/x86 fall into pf-only naturally so # the curated subset applies pf's full ISA Kconfig. # * 5020_BMQ-and-PDS-io-scheduler + 5021_BMQ-and-PDS-gentoo-defaults: # NOT included. Out of scope for the "minimal pf identity on # gentoo-sources" model. ETYPE="sources" K_NOSETEXTRAVERSION="1" K_SECURITY_UNSUPPORTED="1" SHPV="${PV/_p*/}" PFPV="${PV/_p/-pf}" inherit kernel-2 optfeature DESCRIPTION="Linux kernel: gentoo-sources base + curated pf-kernel patchset" HOMEPAGE="https://pfkernel.natalenko.name/ https://dev.gentoo.org/~alicef/genpatches/" # Per-slot snapshot of alicef's genpatches trunk for this branch, # bundled into pf-genpatches-${SHPV}.tar.xz on the sister overlay # extra-stuff (https://github.com/istitov/extra-stuff). Pinned by # tag (-r70-1) so the URL is immutable; refreshing the snapshot # means a new tag suffix. The original alicef trunk dir is a live # working dir, so this bundle is the durable reference. SRC_URI="https://www.kernel.org/pub/linux/kernel/v6.x/linux-${SHPV}.tar.xz https://raw.githubusercontent.com/istitov/extra-stuff/pf-genpatches-${SHPV}-r70-1/sys-kernel/pf-sources-extended/pf-genpatches-${SHPV}.tar.xz -> pf-genpatches-${SHPV}-r70-1.tar.xz https://codeberg.org/istitov/extra-stuff/raw/tag/pf-genpatches-${SHPV}-r70-1/sys-kernel/pf-sources-extended/pf-genpatches-${SHPV}.tar.xz -> pf-genpatches-${SHPV}-r70-1.tar.xz https://gitlab.com/istitov/extra-stuff/-/raw/pf-genpatches-${SHPV}-r70-1/sys-kernel/pf-sources-extended/pf-genpatches-${SHPV}.tar.xz -> pf-genpatches-${SHPV}-r70-1.tar.xz https://raw.githubusercontent.com/istitov/extra-stuff/pf-curated-${SHPV}-r70-1/sys-kernel/pf-sources-extended/pf-curated-${SHPV}.tar.xz -> pf-curated-${SHPV}-r70-1.tar.xz https://codeberg.org/istitov/extra-stuff/raw/tag/pf-curated-${SHPV}-r70-1/sys-kernel/pf-sources-extended/pf-curated-${SHPV}.tar.xz -> pf-curated-${SHPV}-r70-1.tar.xz https://gitlab.com/istitov/extra-stuff/-/raw/pf-curated-${SHPV}-r70-1/sys-kernel/pf-sources-extended/pf-curated-${SHPV}.tar.xz -> pf-curated-${SHPV}-r70-1.tar.xz" S="${WORKDIR}/linux-${SHPV}" KEYWORDS="" K_EXTRAEINFO="For more info on pf-kernel and details on how to report problems, see: ${HOMEPAGE}." pkg_setup() { ewarn "" ewarn "${PN} is *not* supported by the Gentoo Kernel Project in any way." ewarn "If you need support, please create an issue at" ewarn "https://github.com/istitov/stuff/issues" ewarn "Do *not* open bugs in Gentoo's bugzilla unless you have issues with" ewarn "the ebuilds. Thank you." ewarn "" kernel-2_pkg_setup } src_unpack() { unpack ${A} } src_prepare() { eapply "${WORKDIR}/pf-genpatches-${SHPV}"/*.patch eapply "${WORKDIR}/pf-curated-${SHPV}"/*.patch default } pkg_postinst() { local KV_FULL="${PFPV}" kernel-2_pkg_postinst elog "" elog "This is the gentoo-sources-based pf-sources-extended kernel." elog "It tracks linux-stable through 6.10.14 (full upstream coverage — 6.10" elog "ended at .14) via alicef's genpatches trunk AND keeps a curated" elog "subset of natalenko's pf-kernel delta on top. 6.10 is an EOL non-LTS" elog "branch — no further linux-stable backports will arrive." elog "" elog "Curated pf features RETAINED from natalenko's patchset:" elog " * BBRv3 TCP congestion control (net/ipv4/tcp_bbr* and helpers)" elog " * x86 ISA levels (pf-style: MNATIVE / X86_64_ISA_LEVEL)" elog " * zstd compression library updates (lib/zstd/)" elog " * DDCCI / DDCCI-backlight drivers (drivers/char/ddcci.c)" elog " * AMD-pstate cpufreq enhancements (drivers/cpufreq/amd-pstate.c)" elog " * syscall.tbl additions across arches (futex_waitv etc.)" elog " * Subset of mm/include hooks (madvise, ksm, smpboot)" elog "" elog "Genpatches non-stable additions retained on this slot include the" elog "DTrace patch (2995_dtrace-6.10_p4.patch) and the libbpf" elog "Wmaybe-uninitialized workarounds (2911_/2990_)." elog "" elog "Patches DROPPED from natalenko's patchset, with reasons:" elog " * kernel/sched/{core,fair,rt}.c: gentoo-sources has newer" elog " scheduler helpers. pf's older form would regress, not improve." elog " * Most 'minor fixes' pf carries are now in linux-stable's 6.10.X" elog " backports already (often in newer/better form)." elog "" elog "Patches NOT FETCHED from genpatches (per-branch judgment):" elog " * 5010_enable-cpu-optimizations-universal: trunk's 5010 expects" elog " pf-flavored vanilla; section anchors are off in vanilla 6.10" elog " from kernel.org. Dropped — pf's own ISA Kconfig naturally" elog " lands in the curated subset." elog " * 5020_BMQ-and-PDS-io-scheduler + 5021_BMQ-and-PDS-gentoo-defaults:" elog " opt-in alternative scheduler. Out of scope for the 'minimal pf" elog " identity on gentoo-sources' model. Use -r1 for pf's scheduler." elog "" elog "If you specifically need pf-kernel's full patchset, install" elog "pf-sources-6.10_p4-r1 instead — it stays GA-frozen and ships" elog "natalenko's patchset verbatim, at the cost of missing all fourteen" elog "linux-stable releases (6.10.1-6.10.14) that this revision applies." elog "" optfeature "userspace KSM helper" sys-process/uksmd } pkg_postrm() { local KV_FULL="${PFPV}" kernel-2_pkg_postrm }