Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/pf-sources/
Date: Sun, 31 Jul 2022 06:11:02
Message-Id: 1659247830.d3540cbfba28a2c72e4bea2238e74e3857009dbb.juippis@gentoo
1 commit: d3540cbfba28a2c72e4bea2238e74e3857009dbb
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 31 06:10:30 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 31 06:10:30 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3540cbf
7
8 sys-kernel/pf-sources: add 5.18-pf5
9
10 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
11
12 sys-kernel/pf-sources/Manifest | 1 +
13 sys-kernel/pf-sources/pf-sources-5.18_p5.ebuild | 85 +++++++++++++++++++++++++
14 2 files changed, 86 insertions(+)
15
16 diff --git a/sys-kernel/pf-sources/Manifest b/sys-kernel/pf-sources/Manifest
17 index 0248f87cfc4c..badd9ccbee1d 100644
18 --- a/sys-kernel/pf-sources/Manifest
19 +++ b/sys-kernel/pf-sources/Manifest
20 @@ -2,4 +2,5 @@ DIST genpatches-5.18-1.base.tar.xz 3800 BLAKE2B 52cf33aea903e8783b554127936ebde6
21 DIST genpatches-5.18-1.extras.tar.xz 3924 BLAKE2B b4c7e29f0237ae9e4e3300c8be75c0def63969e5c4dec52d4d5259a6b3b6d27406883e45d2ad4d0fe576a1285121037fb88fcdeab58a5fabbb58d4847cbfbbfe SHA512 0182a96feca475471d1dde2e8326067e98f8f43a6e9122e29635a52ae4ca56eaf6ac349b189a0198704c9adee62cbdbd2def7e90d2dad564c72bec2f8ff32ec9
22 DIST linux-5.18-pf3.tar.gz 206979899 BLAKE2B e66670f81f55353f5850272316141833d5dfb804defd03bce2d1a84e404a2631cc5918714cb7dac75b4a9344d1cc597377bcdff94a034e5a544109e0ac2d12ae SHA512 85d9be125bc378ac5aada2f557e6636987c93a108bc7768ae3f314b03bdb4b2bfea66e4226ab04c6323464b3a299381356be49e85a458294fe3d39cd04ebed13
23 DIST linux-5.18-pf4.tar.gz 206956302 BLAKE2B 7eb7240792e2ab676facf7c3bae0811ec0db54c0d95d6ccd1ab60c50956e3fdb6cb4d5db3d77e5b08e7b18b78ffeebb5ac98d26ea4be0a7d04a49bc93421421d SHA512 b3b62618f0acb64f66369071eea503a0e894b3bb0c52941c738cc4ac7826a8327ddc32a27db02d493f3e022eacc18b1c7ed6d624b4a798e0773f17ee51f923fb
24 +DIST linux-5.18-pf5.tar.gz 206988172 BLAKE2B ae5abdee064b429019d7aaa4801d0bf852ed94dfef3965486cbc58d084e68ab9276651297857c1e64d5430e8b17728d1ebd7db597afd7ed7580d100e84431921 SHA512 dde7c08750858a719c70ff332df67b73432ace56571c73dfb7af7bf4ab4d5b5fbfb94486ac97b4b95e252f51a3be125fdb05a3abdc1b7443fb45ca4074810996
25 DIST prjc_v5.18-r2.patch 270353 BLAKE2B 15d7ed7a0eb6f7ad37feaf52ab7c383e1c7c3e72fb41a767c8d1151a0ad41255c216ede1e4938a041f3b628874ed61398c61dd7b0e0b62090730f2fd0f6a70db SHA512 25c558bd6281a09bb611c6cca68084b27d0f2e290d2c0575e88b6a94322fad86de6dbeda30eb77919edd5adff921ad445593d9478f115ec93fa2e4c7ed6b5c1e
26
27 diff --git a/sys-kernel/pf-sources/pf-sources-5.18_p5.ebuild b/sys-kernel/pf-sources/pf-sources-5.18_p5.ebuild
28 new file mode 100644
29 index 000000000000..0227431b90ac
30 --- /dev/null
31 +++ b/sys-kernel/pf-sources/pf-sources-5.18_p5.ebuild
32 @@ -0,0 +1,85 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +# Define what default functions to run
39 +ETYPE="sources"
40 +
41 +# No 'experimental' USE flag provided, but we still want to use genpatches
42 +K_EXP_GENPATCHES_NOUSE="1"
43 +
44 +# Just get basic genpatches, -pf patch set already includes vanilla-linux updates
45 +K_GENPATCHES_VER="1"
46 +
47 +# -pf already sets EXTRAVERSION to kernel Makefile
48 +K_NOSETEXTRAVERSION="1"
49 +
50 +# Not supported by the Gentoo security team
51 +K_SECURITY_UNSUPPORTED="1"
52 +
53 +# We want the very basic patches from gentoo-sources, experimental patch is
54 +# already included in pf-sources
55 +K_WANT_GENPATCHES="base extras"
56 +
57 +# major kernel version, e.g. 5.14
58 +SHPV="${PV/_p*/}"
59 +
60 +# Replace "_p" with "-pf"
61 +PFPV="${PV/_p/-pf}"
62 +
63 +# https://gitlab.com/alfredchen/projectc/ revision for a major version,
64 +# e.g. prjc-v5.14-r2 = 2
65 +PRJC_R=2
66 +
67 +inherit kernel-2 optfeature
68 +detect_version
69 +
70 +DESCRIPTION="Linux kernel fork that includes the pf-kernel patchset and Gentoo's genpatches"
71 +HOMEPAGE="https://codeberg.org/pf-kernel/linux/wiki/README
72 + https://dev.gentoo.org/~mpagano/genpatches/"
73 +SRC_URI="https://codeberg.org/pf-kernel/linux/archive/v${PFPV}.tar.gz -> linux-${PFPV}.tar.gz
74 + https://dev.gentoo.org/~mpagano/genpatches/tarballs/genpatches-${SHPV}-${K_GENPATCHES_VER}.base.tar.xz
75 + https://dev.gentoo.org/~mpagano/genpatches/tarballs/genpatches-${SHPV}-${K_GENPATCHES_VER}.extras.tar.xz
76 + https://gitlab.com/alfredchen/projectc/-/raw/master/${SHPV}/prjc_v${SHPV}-r${PRJC_R}.patch"
77 +
78 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
79 +
80 +S="${WORKDIR}/linux-${PFPV}"
81 +
82 +PATCHES=( "${DISTDIR}/prjc_v${SHPV}-r${PRJC_R}.patch" )
83 +
84 +K_EXTRAEINFO="For more info on pf-sources and details on how to report problems,
85 + see: ${HOMEPAGE}."
86 +
87 +pkg_setup() {
88 + ewarn ""
89 + ewarn "${PN} is *not* supported by the Gentoo Kernel Project in any way."
90 + ewarn "If you need support, please contact the pf developers directly."
91 + ewarn "Do *not* open bugs in Gentoo's bugzilla unless you have issues with"
92 + ewarn "the ebuilds. Thank you."
93 + ewarn ""
94 +
95 + kernel-2_pkg_setup
96 +}
97 +
98 +src_unpack() {
99 + # Since the Codeberg-hosted pf-sources include full kernel sources, we need to manually override
100 + # the src_unpack phase because kernel-2_src_unpack() does a lot of unwanted magic here.
101 + unpack ${A}
102 +
103 + mv linux linux-${PFPV} || die "Failed to move source directory"
104 +}
105 +
106 +src_prepare() {
107 + # kernel-2_src_prepare doesn't apply PATCHES(). After pf-sources moved to Codeberg, we need
108 + # to manually eapply the genpatches too.
109 + eapply "${WORKDIR}"/*.patch
110 + default
111 +}
112 +
113 +pkg_postinst() {
114 + kernel-2_pkg_postinst
115 +
116 + optfeature "userspace KSM helper" sys-process/uksmd
117 +}