commit:     87cb192050e15380f98e73c18263793473eb0a04
Author:     Ivan S. Titov <iohann.s.titov <AT> gmail <DOT> com>
AuthorDate: Thu Dec  4 22:42:11 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Dec  5 17:43:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87cb1920

sys-kernel/pf-sources: add 6.17_p4, 6.18_p2

Signed-off-by: Ivan S. Titov <iohann.s.titov <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44902
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-kernel/pf-sources/Manifest                  |  6 ++
 sys-kernel/pf-sources/pf-sources-6.17_p4.ebuild | 94 +++++++++++++++++++++++++
 sys-kernel/pf-sources/pf-sources-6.18_p2.ebuild | 94 +++++++++++++++++++++++++
 3 files changed, 194 insertions(+)

diff --git a/sys-kernel/pf-sources/Manifest b/sys-kernel/pf-sources/Manifest
index 46711469225c..926be59fb37e 100644
--- a/sys-kernel/pf-sources/Manifest
+++ b/sys-kernel/pf-sources/Manifest
@@ -1,3 +1,7 @@
+DIST genpatches-6.17-11.base.tar.xz 720796 BLAKE2B 
230ae20155e4750d3afa98503b32bf68c853d2776866909f9b3ae90fde734b93857acefdee3ca155f5b7298f3ad3e7975abd5d074fb8d5e86440b8a424453d89
 SHA512 
6b438da081a1d017a37c017185aed8c9330ab7a67647a790573285c6caa109d0349ffc2f4f08467071fc258dcae0450303c82d1bc6b9c2c3a3dbd6604531a9b4
+DIST genpatches-6.17-11.extras.tar.xz 4324 BLAKE2B 
97cb8e62bc57fe4bcbb8456d38a08000528625dc8bcbddaffb0db21ec58d66f4bd81008b2cc5b9f10378cf0797b7af1269f0e07e098c7bbd1529609c3bbc8ae3
 SHA512 
39ffedf67fdf97b3ac8033e1e4717df0957ee5b17b52bafaa5ed4d42dcc093d77237f61b53fc526fa0d66928e382d255a643da830f4ef71750b32db94c807b5f
+DIST genpatches-6.18-1.base.tar.xz 12736 BLAKE2B 
5b7b6c7529510e217844debddb9297827c2d32f23be4745f23b14e087ec898ae6b8f22bb24a8cc23786dcf746ea68a6a12e48fa9280c2882027f1c7a505077d9
 SHA512 
f00d8b3e0db9e1878cd6ba77936b6a4a3d6c74e69ce5a1d7666dfb45ff8d33b55089ea2e63ca8fa29b4821c00d2425cb205b2d4b45d28ff5bae52276144de409
+DIST genpatches-6.18-1.extras.tar.xz 4324 BLAKE2B 
b9d4fe05d9ffa2642a62280aa67227971b00b878a190b03db1d46f0e7564e759702950440c35bfab077cc690315efb14bcd1f49cc5ae0ebabed4782d9aa58392
 SHA512 
8a0b46484272cc7fc771b3353c76b1d211aab430d57822b8946db22be3af2f206afd3eb59ea92e5a9e86a325d444f8f49c9b10cfd5275adc58848c0a41a2778c
 DIST genpatches-6.8-1.base.tar.xz 4136 BLAKE2B 
a5bda1bbbe2f1d772226661e15329f52a09166e049b2c7df259fcf4bdfce0585fdafe798ce15cfbe8d66e7fbd69a3fbd29abd1bc0e2f98cca89fd09c9bac2884
 SHA512 
a6a9bceb77afab73d2f7686b27079b6d294861408c1e7cae399e1a8ab6f7a4e31d196f73cce84aa81f38ee8a8880ff2bad81541c2b22503105f0f4198d2001a0
 DIST genpatches-6.8-1.extras.tar.xz 3700 BLAKE2B 
ba0d9f61231a6df70eec23c74d18343420f8ff8e04777a1e19b90b64f89bbe345647fc5df41636458ed567bcb2ebf42445013060caff604654c4d0b9c259c5f0
 SHA512 
56c7c8996afc570775d5341066614f815d0233ddfc9ae55689c0929758e39fc01427da59b973c102451776f63a98f95c54fc8801bc303c3f5c14fe2612ec27a8
 DIST genpatches-6.8-10.base.tar.xz 574628 BLAKE2B 
87b6006dd317b24157dc7af3e0386ff598c9b596e0fe7cdc5f8f109d56191ff6741d6c55f359bc1e43ce9fc2887a614edbc1a2871343dace4ee57d2f472ff8a4
 SHA512 
fdc83b414ca5d72323646d345d95071a175f0a52470fb4a4b5cc7e9a3c8fd59e8d257396a8ff0bfdff81177bc24aaa3b22ba20b27b7bcf31eb71d8b428edfe0f
@@ -14,6 +18,8 @@ DIST genpatches-6.9-4.base.tar.xz 158304 BLAKE2B 
cf964990abe6f7428e3a590752519f9
 DIST genpatches-6.9-4.extras.tar.xz 4048 BLAKE2B 
7a47f3ef9bd870175c4373d064316fa746c3480a4075492fb04b4eca4496ab2c33c713875997a4fa33695177bbade0b6686f7d7e4f2cba110cd89a0f2017e2cd
 SHA512 
5cd79406ad14a07fb95fc94a5aaee2bcd18f143996c111e16675b77402e9ee0917fd51f2a2023fd58d462caa2edfe5a950eb72bdb04870b185012b20ff302560
 DIST genpatches-6.9-9.base.tar.xz 548708 BLAKE2B 
e0130d225056f77c92e566eef9db643ecdef6faf2f81e8329859830850bb5409e212aca0ab0da85b9b1e3377121221259044dac650986ec05feac46f4d588a5d
 SHA512 
714016638f866b536b85edd24e3e44513048591aa270dbee1460c5893b3e8b0508f299d86a202deacd10f105c0da48038d78219226b2808e17012d1811df391e
 DIST genpatches-6.9-9.extras.tar.xz 4048 BLAKE2B 
7be69cb63abf9df9267bc61e3e365672dbd1c0b3568d48bf949b660ff1abb483b28846eb36a162ddd9bd91473c25462440fd41a7ba3bac70467ad45fa88fdd29
 SHA512 
955cd846bb020d08888aac04ebc5c1e56429e11ac59601a3e068971ad05aee59b75a24722dc7fe2645ef4414424d21e117e2eeb24ae72a5949476a213f3383fa
+DIST linux-6.17-pf4.tar.gz 253598641 BLAKE2B 
5a6774f02f1ea67e587cf1374c8e826bb2bf73ddaed3741d60f02ae2c84217ea845233b0ff01d2043b61cf360f1b5a289d329deb41cec804106a63e9296e7619
 SHA512 
4abf01fbedbc448b0714f175112e35c6e1d1ace89ce3a4ea93978fb3c7e138daa2710bd718255dd59ec90d9ada554179988ae2bd0ca9798798ee76ab3e24b454
+DIST linux-6.18-pf2.tar.gz 254943201 BLAKE2B 
487fdaae3baf1e4bb62bad1da171869b38addb919753d7a035ab59ebbd8474b9d2dab4775a5654cfb50e1be5d30980ff706c214823b5f92ccc021700e6ff98f5
 SHA512 
1ca5de1570324256b4287f72b40b841273873488b17b6fa3c4fc79e6a716fcef6fe8846161fa6fa6cc8430c926ff4207c82673cbde655cc091fc467e0e8af594
 DIST linux-6.8-pf1.tar.gz 234545846 BLAKE2B 
d51b5d7ad395f8abd68636290f21a4800736e2b57b6ba5a29cc8983cdf81a13ed6db8a8a7468704561200d2d299eeb9d5bc6378a19e1b0948cdfca2f6c93bf76
 SHA512 
18d5816f70a02efc45a1b26f703b7d1686fd0196aa396c2fe007bf60357249deeb482e87d024e5ee78dcd4e19e48da2d17e8161c1154bd0f23b792ebb3578568
 DIST linux-6.8-pf5.tar.gz 234552841 BLAKE2B 
87247f718fa88f6cb3071d2ebd85d89e506d7b82ca2444c006aabbdad200fbbda7d0a8cc25d1e24d5c670962de01890ef4ff9b4b556a72661803a2d7f8840084
 SHA512 
ea3cd473a07ca3a67b4a6800b65d75c3743d20759824100654d4fe8339c7a32b17bdeb500d4de1039442a00714b28dfce5332637800bba539428df40a6d05dcb
 DIST linux-6.8-pf6.tar.gz 234549951 BLAKE2B 
ca15c7e8223ce99ddcb00e6099e49c7dd0b433ac46d7c922bf37b416b6a29bcba544f180713d60dc29fc5f4b0c21f02c4360044e6da949f3116b1a066284ecb6
 SHA512 
e6639ddc59c2d2c7234ba44fe44b8a66b39187130aa4555345cb25d5f478f85c56f7611b6f6b61ffe46e6bf2e7aae1b46d6b53ee1242de79b8d094dcaec5c3b1

diff --git a/sys-kernel/pf-sources/pf-sources-6.17_p4.ebuild 
b/sys-kernel/pf-sources/pf-sources-6.17_p4.ebuild
new file mode 100644
index 000000000000..65b616137748
--- /dev/null
+++ b/sys-kernel/pf-sources/pf-sources-6.17_p4.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Define what default functions to run.
+ETYPE="sources"
+
+# Use genpatches but don't include the 'experimental' use flag.
+K_EXP_GENPATCHES_NOUSE="1"
+
+# Genpatches version to use. -pf patch set already includes vanilla linux 
updates. Regularly "1"
+# is the wanted value here, but the genpatches patch set can be bumped if it 
includes some
+# important fixes. src_prepare() will handle deleting the updated vanilla 
linux patches.
+# See https://archives.gentoo.org/gentoo-kernel/ (or subscribe to the list) to 
see all patches.
+K_GENPATCHES_VER="11"
+
+# -pf patch set already sets EXTRAVERSION to kernel Makefile.
+K_NOSETEXTRAVERSION="1"
+
+# pf-sources is not officially supported/covered by the Gentoo security team.
+K_SECURITY_UNSUPPORTED="1"
+
+# Define which parts to use from genpatches - experimental is already included 
in the -pf patch
+# set.
+K_WANT_GENPATCHES="base extras"
+
+# Major kernel version, e.g. 5.14.
+SHPV="${PV/_p*/}"
+
+# Replace "_p" with "-pf", since using "-pf" is not allowed for an ebuild name 
by PMS.
+PFPV="${PV/_p/-pf}"
+
+inherit kernel-2 optfeature
+detect_version
+
+DESCRIPTION="Linux kernel fork that includes the pf-kernel patchset and 
Gentoo's genpatches"
+HOMEPAGE="https://pfkernel.natalenko.name/
+       https://dev.gentoo.org/~mpagano/genpatches/";
+SRC_URI="https://codeberg.org/pf-kernel/linux/archive/v${PFPV}.tar.gz -> 
linux-${PFPV}.tar.gz
+       ${GENPATCHES_URI}"
+
+S="${WORKDIR}/linux-${PFPV}"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+K_EXTRAEINFO="For more info on pf-sources 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 contact the pf developers directly."
+       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() {
+       # Since the Codeberg-hosted pf-sources include full kernel sources, we 
need to manually override
+       # the src_unpack phase because kernel-2_src_unpack() does a lot of 
unwanted magic here.
+       unpack ${A}
+
+       mv linux linux-${PFPV} || die "Failed to move source directory"
+}
+
+src_prepare() {
+       # When genpatches basic version is bumped, it also includes vanilla 
linux updates. Those are
+       # already in the -pf patch set, so need to remove the vanilla linux 
patches to avoid conflicts.
+       if [[ ${K_GENPATCHES_VER} -ne 1 ]]; then
+               find "${WORKDIR}"/ -type f -name '10*linux*patch' -delete ||
+                       die "Failed to delete vanilla linux patches in 
src_prepare."
+       fi
+
+       # kernel-2_src_prepare doesn't apply PATCHES(). Chosen genpatches are 
also applied here.
+       eapply "${WORKDIR}"/*.patch
+       default
+}
+
+pkg_postinst() {
+       # Fixes "wrongly" detected directory name, bgo#862534.
+       local KV_FULL="${PFPV}"
+       kernel-2_pkg_postinst
+
+       optfeature "userspace KSM helper" sys-process/uksmd
+}
+
+pkg_postrm() {
+       # Same here, bgo#862534.
+       local KV_FULL="${PFPV}"
+       kernel-2_pkg_postrm
+}

diff --git a/sys-kernel/pf-sources/pf-sources-6.18_p2.ebuild 
b/sys-kernel/pf-sources/pf-sources-6.18_p2.ebuild
new file mode 100644
index 000000000000..bef4138075c2
--- /dev/null
+++ b/sys-kernel/pf-sources/pf-sources-6.18_p2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Define what default functions to run.
+ETYPE="sources"
+
+# Use genpatches but don't include the 'experimental' use flag.
+K_EXP_GENPATCHES_NOUSE="1"
+
+# Genpatches version to use. -pf patch set already includes vanilla linux 
updates. Regularly "1"
+# is the wanted value here, but the genpatches patch set can be bumped if it 
includes some
+# important fixes. src_prepare() will handle deleting the updated vanilla 
linux patches.
+# See https://archives.gentoo.org/gentoo-kernel/ (or subscribe to the list) to 
see all patches.
+K_GENPATCHES_VER="1"
+
+# -pf patch set already sets EXTRAVERSION to kernel Makefile.
+K_NOSETEXTRAVERSION="1"
+
+# pf-sources is not officially supported/covered by the Gentoo security team.
+K_SECURITY_UNSUPPORTED="1"
+
+# Define which parts to use from genpatches - experimental is already included 
in the -pf patch
+# set.
+K_WANT_GENPATCHES="base extras"
+
+# Major kernel version, e.g. 5.14.
+SHPV="${PV/_p*/}"
+
+# Replace "_p" with "-pf", since using "-pf" is not allowed for an ebuild name 
by PMS.
+PFPV="${PV/_p/-pf}"
+
+inherit kernel-2 optfeature
+detect_version
+
+DESCRIPTION="Linux kernel fork that includes the pf-kernel patchset and 
Gentoo's genpatches"
+HOMEPAGE="https://pfkernel.natalenko.name/
+       https://dev.gentoo.org/~mpagano/genpatches/";
+SRC_URI="https://codeberg.org/pf-kernel/linux/archive/v${PFPV}.tar.gz -> 
linux-${PFPV}.tar.gz
+       ${GENPATCHES_URI}"
+
+S="${WORKDIR}/linux-${PFPV}"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+K_EXTRAEINFO="For more info on pf-sources 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 contact the pf developers directly."
+       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() {
+       # Since the Codeberg-hosted pf-sources include full kernel sources, we 
need to manually override
+       # the src_unpack phase because kernel-2_src_unpack() does a lot of 
unwanted magic here.
+       unpack ${A}
+
+       mv linux linux-${PFPV} || die "Failed to move source directory"
+}
+
+src_prepare() {
+       # When genpatches basic version is bumped, it also includes vanilla 
linux updates. Those are
+       # already in the -pf patch set, so need to remove the vanilla linux 
patches to avoid conflicts.
+       if [[ ${K_GENPATCHES_VER} -ne 1 ]]; then
+               find "${WORKDIR}"/ -type f -name '10*linux*patch' -delete ||
+                       die "Failed to delete vanilla linux patches in 
src_prepare."
+       fi
+
+       # kernel-2_src_prepare doesn't apply PATCHES(). Chosen genpatches are 
also applied here.
+       eapply "${WORKDIR}"/*.patch
+       default
+}
+
+pkg_postinst() {
+       # Fixes "wrongly" detected directory name, bgo#862534.
+       local KV_FULL="${PFPV}"
+       kernel-2_pkg_postinst
+
+       optfeature "userspace KSM helper" sys-process/uksmd
+}
+
+pkg_postrm() {
+       # Same here, bgo#862534.
+       local KV_FULL="${PFPV}"
+       kernel-2_pkg_postrm
+}

Reply via email to