Skip to content

Commit

Permalink
upd pf-sources
Browse files Browse the repository at this point in the history
  • Loading branch information
istitov committed Nov 8, 2024
1 parent bf9d9f5 commit c01c190
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-kernel/pf-sources/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ DIST linux-6.10-pf4.tar.gz 238936181 BLAKE2B 853e2008b002eec6ea04cee7ed9ecb8bd95
DIST linux-6.11-pf1.tar.gz 243072051 BLAKE2B cfd9e2a7dc92de7ba6a8bc9362e93bef8b8dc79a086909a76ef4e4dc1a53e13d6238f10c2e42f5a664dc5e40d393ed57ceada470ef18e25e08b857aa0e924dcb SHA512 c4e518cb7c3a4072518558e70d6c5c0a5f2c3cefed3e00c5b797d38cf3241c5bd4721173a6f434310dd776bb0db08f9c1f0869c625529b1df87e43df8adbc2c2
DIST linux-6.11-pf2.tar.gz 243066507 BLAKE2B d08aa3e3d2e2b17fe7dd343dc4d894bd1f4e6387c0d5e87ce1eb8c13f80155002106bfcee93a6b0132f6c23ff77da1385089f92c82b4bf69fa3cc69fdac613f5 SHA512 634b1035c2551a7268a6f1644eee78c2cf03803f1b4bec5fbbe022a56329c31002c65a7d4d5e1cf873d00db43c9b4839e9dcc8bb42d52074bd378504d96d18a8
DIST linux-6.11-pf3.tar.gz 243073814 BLAKE2B 14c95ae522f41c0043e7c2d06eaa15aacee3aa8f2d54fd28416496e1ce0473609fdbbb66a0eadc52762850d3ee37770c3b7679eb176dc025b7a97f491433504f SHA512 df1d36ddd57b3328c770f2bbc6df7483cb0af46b7a315f662e385ee9e6cf755d1606fae8a5101402fcc0146c82bd50a4a5ae532902d1234a47fab7779b269210
DIST linux-6.11-pf4.tar.gz 243072952 BLAKE2B 11865d6538a4490d21fbe1caf4be680c72c8af2b9eb6609329809035e03785f5598f69dbc30e058a1fbee3ace4214b466ba359cce2cd8674c2ccd06dd0e42b23 SHA512 29aba18b3929b9f57c0529962545968378466a33513addb0ca6afe7d6ed56a5d1abf40600f319b6183ab06e21dd13f60bad907d87615b389a78fde537362bec0
DIST linux-6.2-pf7.tar.gz 222943378 BLAKE2B 414277f7d9a256b9ae6c2f14886019b4c22bac69558ef225c3b45e9d4e58727429b32528aad124d8bc764b5b7527074455aaeff25141530a5534630c81da4f6e SHA512 ffa153c936a8e847a7ae070f915c3a6a7b770636061b7ac3a07e1c7ed81e973bd8b8c977eb796bffd38b1eaa3082169e0e77c70f88db34cc2a9154e7ee69339b
DIST linux-6.3-pf5.tar.gz 223560069 BLAKE2B b0382a35d4196827b609693289a4da01aca608a77040b963c5806269686c50ddeb5b01fee44d81632ef5baaf012e6e3071a4975478a242f996acdbe1071f87b5 SHA512 1a30f26ac624dccc418fbca75a1d62331a493c37a95ab79ebd59ff29814b9eae8402566cd312274819d66827b5e640a4d416929615bf3683d8bb13c919957b59
DIST linux-6.4-pf6.tar.gz 226016445 BLAKE2B a369cfd66be2287e98af4e982990432b9a536b5f175ffcef10bd63c3937bf6899e7002cbdfd70cdc808b93988eb940b1ccff7a28427a160e2ac3665bdcb946d0 SHA512 2bb85e364c87c976e575dc72050f11a41470dc6c3629982d364bebee351c79cb8ad906373ef6057e63f3ce3a5231d0d7b79a68c17445c315aae06ec768c042f2
Expand Down
94 changes: 94 additions & 0 deletions sys-kernel/pf-sources/pf-sources-6.11_p4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright 1999-2024 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="6"

# -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
}

0 comments on commit c01c190

Please sign in to comment.