commit:     18d6b9fe064a7747cb95a89a72f0de49568f301b
Author:     Ivan S. Titov <iohann.s.titov <AT> gmail <DOT> com>
AuthorDate: Mon Dec 15 09:25:05 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Dec 18 16:11:30 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18d6b9fe

sys-kernel/pf-sources: add 6.18_p3

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

 sys-kernel/pf-sources/Manifest                  |  3 +
 sys-kernel/pf-sources/pf-sources-6.18_p3.ebuild | 94 +++++++++++++++++++++++++
 2 files changed, 97 insertions(+)

diff --git a/sys-kernel/pf-sources/Manifest b/sys-kernel/pf-sources/Manifest
index c98fb761fc08..1bf85da75d2b 100644
--- a/sys-kernel/pf-sources/Manifest
+++ b/sys-kernel/pf-sources/Manifest
@@ -2,5 +2,8 @@ DIST genpatches-6.17-11.base.tar.xz 720796 BLAKE2B 
230ae20155e4750d3afa98503b32b
 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.18-2.base.tar.xz 27772 BLAKE2B 
d1c497a82068ccabd70e76f7df9231a965e801b7bf3e35378c67ebbd704bd3fc3fb183ac0affffbef43d5fa7d44e402e5c2d60e443c9eed544dc87dbc9d99713
 SHA512 
3fdd064a48fe13c9d915e30cfccfb74487dc28078c62080f721a5d92e7a4f0533ad8f05e2ab8f3ab1aead92dab480334997c0a6446248d3c4ad3fffbfe82bb2e
+DIST genpatches-6.18-2.extras.tar.xz 4324 BLAKE2B 
037e692cba93a5bc1397eeeca02061f68afbd13a6ca3d8efb1214f3cfdffb643bb357b5f4a7dc367f10e5837e9cc4633a3771b70f3afdcb1883c117a1b8d859a
 SHA512 
9ce8fb5529294808f837ab002e2d0031f6e9608b1288202030b6f4549930439a30b50f982e05d706233790b5a4f75465a626864cabf7c2485347fb2bf7e9ebe5
 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.18-pf3.tar.gz 254950500 BLAKE2B 
54a122998f27735f5f05f2d0e3430c0e94fa9d713f1514b97543cee4fb3b3e84eec85135abbe3ac4f773f52e697f5dabcba88818355338b7cb1cd4edd5cd2401
 SHA512 
ea8424660654b89e3c4996f4bbd246658705814d2bdc0be12b8aeae9fdc8a20a235942671aaac43cdc04bcae67ed64911e9967b300e8525fe3103617cb359a0c

diff --git a/sys-kernel/pf-sources/pf-sources-6.18_p3.ebuild 
b/sys-kernel/pf-sources/pf-sources-6.18_p3.ebuild
new file mode 100644
index 000000000000..6b6c2401b3a2
--- /dev/null
+++ b/sys-kernel/pf-sources/pf-sources-6.18_p3.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="2"
+
+# -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