summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrits Letteboer <dagraver@gmail.com>2023-12-11 12:51:09 +0100
committerJoonas Niilola <juippis@gentoo.org>2023-12-11 15:00:54 +0200
commitf2f48d02d5eb5dfc20dd9acd80ec5cb5076ae880 (patch)
treea9f9723df609ba6e93181271d4a87a72b0c6172b /sys-kernel
parentnet-misc/openvswitch: Fix build when dev-python/sphinx is missing (diff)
downloadgentoo-f2f48d02d5eb5dfc20dd9acd80ec5cb5076ae880.tar.gz
gentoo-f2f48d02d5eb5dfc20dd9acd80ec5cb5076ae880.tar.bz2
gentoo-f2f48d02d5eb5dfc20dd9acd80ec5cb5076ae880.zip
sys-kernel/pf-sources: add 6.6_p4
Signed-off-by: Frits Letteboer <dagraver@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/34232 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/pf-sources/Manifest1
-rw-r--r--sys-kernel/pf-sources/pf-sources-6.6_p4.ebuild95
2 files changed, 96 insertions, 0 deletions
diff --git a/sys-kernel/pf-sources/Manifest b/sys-kernel/pf-sources/Manifest
index 0a5912b4aa08..3c4a27892a07 100644
--- a/sys-kernel/pf-sources/Manifest
+++ b/sys-kernel/pf-sources/Manifest
@@ -9,3 +9,4 @@ DIST linux-6.5-pf6.tar.gz 227889902 BLAKE2B d45e370b566cc903bf9cc0880e4f50a68ea6
DIST linux-6.6-pf1.tar.gz 229217046 BLAKE2B 9426ebab28f9ee516dcc48ef8343c624960b1de6b6ddd9b00393b2261ee1516d7f4fd126ff87a597fdfee85387811e9da0c57458909ac85a7edc4cb60594e8eb SHA512 54be704ff20b47df3c1d774ed9c997620df46188739c6f72b305a88200901afb0d0d534011ee65c41974d0a5aa91ad318c0c426332e05c70949a06292b17547c
DIST linux-6.6-pf2.tar.gz 229223034 BLAKE2B 8e089eb63597d9069a3dd9cafe38269a7c49dffb646f39082916ec818bd9754ff691d4c0c60c7f6df5f720dd404007a1d8a7e2931977a4dcd474dfb04c950562 SHA512 49a7bba50ee00008b6441aa0c6e191866bc1beb042c107b950639e48c3a2c345f7704930c14df0e9e3b6ffeb2fbbfb1330a1a5c1e07378232e2cb2160dd4da4d
DIST linux-6.6-pf3.tar.gz 229268485 BLAKE2B 31f58d15ede9f8d741d2c7f0d5a8d0264aa4ec48b174601897cda903a33760a9222846c1c282b2f895c40d5044ee63723848938ba95dcb6ea6ed948d618f7dd3 SHA512 c71bcdf7bd1ed7eb8dc2b7a09cfef90a8df1018517b79311432e4ce0a8d3b4d6f77728d2840fbf05c4489ea4091d129b0686e467e3ef26401398595f8efada08
+DIST linux-6.6-pf4.tar.gz 229255097 BLAKE2B 01c2c4b84ad6bfa7b944acba6fcc5bd27edbb8d2d34c3e5136177cf48c3cc5bc61ceb6be1aa5ab46c92998e783ca264fc15fef1fb43ac143cf001b75e7d7f30a SHA512 2595886d208bd3319a3bfff418a463129c1b037e1fa5e25de08864ec3b34bb61bf10900a24b1c0a1d94b287593a6213fa20b15d3df47d1155015e0b973cf0114
diff --git a/sys-kernel/pf-sources/pf-sources-6.6_p4.ebuild b/sys-kernel/pf-sources/pf-sources-6.6_p4.ebuild
new file mode 100644
index 000000000000..9dd911d25032
--- /dev/null
+++ b/sys-kernel/pf-sources/pf-sources-6.6_p4.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2023 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="7"
+
+# -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
+ https://dev.gentoo.org/~mpagano/genpatches/tarballs/genpatches-${SHPV}-${K_GENPATCHES_VER}.base.tar.xz
+ https://dev.gentoo.org/~mpagano/genpatches/tarballs/genpatches-${SHPV}-${K_GENPATCHES_VER}.extras.tar.xz"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+S="${WORKDIR}/linux-${PFPV}"
+
+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
+}