commit:     17d5f9824455fb379845dbacb93925bad32771a6
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 16 06:17:19 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jul 16 06:18:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d5f982

sys-kernel/pf-sources: add 5.18-pf4

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sys-kernel/pf-sources/Manifest                  |  1 +
 sys-kernel/pf-sources/pf-sources-5.18_p4.ebuild | 85 +++++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/sys-kernel/pf-sources/Manifest b/sys-kernel/pf-sources/Manifest
index d0a8c0ddbb3a..0248f87cfc4c 100644
--- a/sys-kernel/pf-sources/Manifest
+++ b/sys-kernel/pf-sources/Manifest
@@ -1,4 +1,5 @@
 DIST genpatches-5.18-1.base.tar.xz 3800 BLAKE2B 
52cf33aea903e8783b554127936ebde68b1c2655567a27a6dff8b94df675cde779f940735824766d2267c7d09df970522ed3721b3fe661dc12e64c4b105b4c99
 SHA512 
461037cb2fc9246f1e778123a9fd58682ed2749c95acd8d30dddc1a31a66cc4961bb5b133a05fd6fb19aea1a83bf0be8a76f9e6422fb4d696010d248609534a7
 DIST genpatches-5.18-1.extras.tar.xz 3924 BLAKE2B 
b4c7e29f0237ae9e4e3300c8be75c0def63969e5c4dec52d4d5259a6b3b6d27406883e45d2ad4d0fe576a1285121037fb88fcdeab58a5fabbb58d4847cbfbbfe
 SHA512 
0182a96feca475471d1dde2e8326067e98f8f43a6e9122e29635a52ae4ca56eaf6ac349b189a0198704c9adee62cbdbd2def7e90d2dad564c72bec2f8ff32ec9
 DIST linux-5.18-pf3.tar.gz 206979899 BLAKE2B 
e66670f81f55353f5850272316141833d5dfb804defd03bce2d1a84e404a2631cc5918714cb7dac75b4a9344d1cc597377bcdff94a034e5a544109e0ac2d12ae
 SHA512 
85d9be125bc378ac5aada2f557e6636987c93a108bc7768ae3f314b03bdb4b2bfea66e4226ab04c6323464b3a299381356be49e85a458294fe3d39cd04ebed13
+DIST linux-5.18-pf4.tar.gz 206956302 BLAKE2B 
7eb7240792e2ab676facf7c3bae0811ec0db54c0d95d6ccd1ab60c50956e3fdb6cb4d5db3d77e5b08e7b18b78ffeebb5ac98d26ea4be0a7d04a49bc93421421d
 SHA512 
b3b62618f0acb64f66369071eea503a0e894b3bb0c52941c738cc4ac7826a8327ddc32a27db02d493f3e022eacc18b1c7ed6d624b4a798e0773f17ee51f923fb
 DIST prjc_v5.18-r2.patch 270353 BLAKE2B 
15d7ed7a0eb6f7ad37feaf52ab7c383e1c7c3e72fb41a767c8d1151a0ad41255c216ede1e4938a041f3b628874ed61398c61dd7b0e0b62090730f2fd0f6a70db
 SHA512 
25c558bd6281a09bb611c6cca68084b27d0f2e290d2c0575e88b6a94322fad86de6dbeda30eb77919edd5adff921ad445593d9478f115ec93fa2e4c7ed6b5c1e

diff --git a/sys-kernel/pf-sources/pf-sources-5.18_p4.ebuild 
b/sys-kernel/pf-sources/pf-sources-5.18_p4.ebuild
new file mode 100644
index 000000000000..0227431b90ac
--- /dev/null
+++ b/sys-kernel/pf-sources/pf-sources-5.18_p4.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Define what default functions to run
+ETYPE="sources"
+
+# No 'experimental' USE flag provided, but we still want to use genpatches
+K_EXP_GENPATCHES_NOUSE="1"
+
+# Just get basic genpatches, -pf patch set already includes vanilla-linux 
updates
+K_GENPATCHES_VER="1"
+
+# -pf already sets EXTRAVERSION to kernel Makefile
+K_NOSETEXTRAVERSION="1"
+
+# Not supported by the Gentoo security team
+K_SECURITY_UNSUPPORTED="1"
+
+# We want the very basic patches from gentoo-sources, experimental patch is
+# already included in pf-sources
+K_WANT_GENPATCHES="base extras"
+
+# major kernel version, e.g. 5.14
+SHPV="${PV/_p*/}"
+
+# Replace "_p" with "-pf"
+PFPV="${PV/_p/-pf}"
+
+# https://gitlab.com/alfredchen/projectc/ revision for a major version,
+# e.g. prjc-v5.14-r2 = 2
+PRJC_R=2
+
+inherit kernel-2 optfeature
+detect_version
+
+DESCRIPTION="Linux kernel fork that includes the pf-kernel patchset and 
Gentoo's genpatches"
+HOMEPAGE="https://codeberg.org/pf-kernel/linux/wiki/README
+       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
+       
https://gitlab.com/alfredchen/projectc/-/raw/master/${SHPV}/prjc_v${SHPV}-r${PRJC_R}.patch";
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+S="${WORKDIR}/linux-${PFPV}"
+
+PATCHES=( "${DISTDIR}/prjc_v${SHPV}-r${PRJC_R}.patch" )
+
+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() {
+       # kernel-2_src_prepare doesn't apply PATCHES(). After pf-sources moved 
to Codeberg, we need
+       # to manually eapply the genpatches too.
+       eapply "${WORKDIR}"/*.patch
+       default
+}
+
+pkg_postinst() {
+       kernel-2_pkg_postinst
+
+       optfeature "userspace KSM helper" sys-process/uksmd
+}

Reply via email to