From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1454952-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id F3047158020
	for <garchives@archives.gentoo.org>; Wed,  9 Nov 2022 06:13:46 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 462E1E07EF;
	Wed,  9 Nov 2022 06:13:46 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 283F5E07EF
	for <gentoo-commits@lists.gentoo.org>; Wed,  9 Nov 2022 06:13:46 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 23CF6340EC2
	for <gentoo-commits@lists.gentoo.org>; Wed,  9 Nov 2022 06:13:45 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B8FC8603
	for <gentoo-commits@lists.gentoo.org>; Wed,  9 Nov 2022 06:13:43 +0000 (UTC)
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" <juippis@gentoo.org>
Message-ID: <1667974421.c0e84f7c80f0ff2244b97fbccf63af57b470efcb.juippis@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/pf-sources/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-kernel/pf-sources/Manifest sys-kernel/pf-sources/pf-sources-6.0_p4.ebuild
X-VCS-Directories: sys-kernel/pf-sources/
X-VCS-Committer: juippis
X-VCS-Committer-Name: Joonas Niilola
X-VCS-Revision: c0e84f7c80f0ff2244b97fbccf63af57b470efcb
X-VCS-Branch: master
Date: Wed,  9 Nov 2022 06:13:43 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ae7375fa-ac0b-4838-a136-cdfc784ba101
X-Archives-Hash: ab575f79f8481ce336f30472263203db

commit:     c0e84f7c80f0ff2244b97fbccf63af57b470efcb
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 06:11:24 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 06:13:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0e84f7c

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

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

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

diff --git a/sys-kernel/pf-sources/Manifest b/sys-kernel/pf-sources/Manifest
index 93441241047c..6e9a103f3679 100644
--- a/sys-kernel/pf-sources/Manifest
+++ b/sys-kernel/pf-sources/Manifest
@@ -9,5 +9,6 @@ DIST linux-5.19-pf6.tar.gz 212237665 BLAKE2B 7ecace44c0bff940009fdb1cd8924096cc4
 DIST linux-6.0-pf1.tar.gz 218275822 BLAKE2B bb283adca2398ef3e09a9c02e5a6609f898c765cc322376e5621c736a2b38832e1e13bc53fc3b21b1dae8214bd039ce43be57e97e7b129624124e58cd1123f51 SHA512 e97c449693b5702e18560c86a65dac2022828d2d57a8734a3cd26b304f8c0d5aa5773041701c8bd5a63b31481191b501070ad9d811a08382e8c846517a7930e0
 DIST linux-6.0-pf2.tar.gz 218282377 BLAKE2B 753efa1e2e05255540301f9bbf9aa85eff8eb2c45c9092e9b9e09e288df626c93bab2621af6ee1758631ea7759890dc69a124201bde5151b429885a014cf782e SHA512 faa581fa6d3deda5ee67a82f49e19e7680f134fc198a50bd8a37bbe495c70663bea8e5887615e0d4315ef8086359c9da74fb3ecc222170a06f5b7702f6b2f8da
 DIST linux-6.0-pf3.tar.gz 218344594 BLAKE2B e71a0c0a9bd67f34610a59858c911b5a10c858baad18b18d459f973ce7499d194aebb5d3a8827e50eeab40bcd88e6e22a17903b534f6ef11e62febb0ead8a4b5 SHA512 9e075a088bc85eafaf24426f70ee46291b0e67b295598b20d6fa69e395cc13c41ecd36ef424ad08f3af814af3f3b3ac533e57dd8581ce016825bf6f87ee6aafe
+DIST linux-6.0-pf4.tar.gz 218368702 BLAKE2B d6585d02938abd1bc587dc5d6c3597bc8b961c0c7c05d2be906c46cc6d2872d5aafb9579ba8df485c1c270c0ee0f2c8e7d7ac68d431be02942aac40fe402df20 SHA512 29c63beee17c273b356be32dab73817c9c576c8bc3df65cc531dd38d2c0d640b239d5908f514d50eac4fee4bdc6e0e40c909cb6bd09acfa1d9f914bfddbc3423
 DIST prjc-519-r1-vd-test.patch 274504 BLAKE2B 87950689ffe97134100aa91d0ff89acd6f4e93b626ad7ab08af464a49457f16526cae7b863d53213dd129d47b6f97b3407ae7027b02656d9eba85942241e8d3f SHA512 d652b6060400329d051257fedee5d9f37a70554ab722e93a15f294d1c6229bfa227941461147e0128178b02875cdf838e0d71e89884d8c01e7549ee482213b71
 DIST prjc_v5.18-r2.patch 270353 BLAKE2B 15d7ed7a0eb6f7ad37feaf52ab7c383e1c7c3e72fb41a767c8d1151a0ad41255c216ede1e4938a041f3b628874ed61398c61dd7b0e0b62090730f2fd0f6a70db SHA512 25c558bd6281a09bb611c6cca68084b27d0f2e290d2c0575e88b6a94322fad86de6dbeda30eb77919edd5adff921ad445593d9478f115ec93fa2e4c7ed6b5c1e

diff --git a/sys-kernel/pf-sources/pf-sources-6.0_p4.ebuild b/sys-kernel/pf-sources/pf-sources-6.0_p4.ebuild
new file mode 100644
index 000000000000..3f80ddc991c8
--- /dev/null
+++ b/sys-kernel/pf-sources/pf-sources-6.0_p4.ebuild
@@ -0,0 +1,86 @@
+# 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}"
+
+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"
+
+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() {
+	# 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() {
+	# 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
+}