Skip to content

Commit

Permalink
upd pf
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan S. Titov committed Aug 4, 2024
1 parent e32c54b commit d217d5c
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys-kernel/pf-sources/Manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
DIST genpatches-6.1-14.base.tar.xz 774040 BLAKE2B 8e0866c762e2711b766cc75630d66c7c46221bdc47357a903c7e8506ad122b7b5ba84d102b19743d236ac5579b44d24f77b9f52f3c23695ab6a279cf7875e735 SHA512 6a753146013baf0b94d83abd690118517679d4d7dcf6e9f86cf8de35e24f80a792e9c0692f237098671c316d046d6f65f8d3512255e572daf6a8ca81853beca0
DIST genpatches-6.1-14.extras.tar.xz 3804 BLAKE2B 7f016579b130c9a4f7a8ec946254dbd682f22e5654ae777d11b265dafe2b177a4c40c5a979a760a5bd6ed3dac057b90a3120c60b958f6b748ea4731b9a5f1ea6 SHA512 2807d359459dd11b9d3356fcac609dbfb8487e8c924cc543ef37698667b1c8b74cff7b015839ca0677cf1f96b566e0b5018c057b517275886ab500cd2ca49653
DIST genpatches-6.10-4.base.tar.xz 15672 BLAKE2B 3dfb069409ca8c1cc8022daaeda3f45443c4e11ab1b086d8178ae4bd7e9a77fdbd8016484324248370bfa4b92e1a10cfa67d40592fafcd8540cc917c60b52ea1 SHA512 ea2f80b065c59b485446c8acc174b93a688b9e6d5de8cd9bf307a43811f6087368b528647a2371636b22dc082735b57e470e9c5d1092972c3890a9c628db723c
DIST genpatches-6.10-4.extras.tar.xz 4056 BLAKE2B b1cc5a0d37760aac34837b9f7b26240d92afa816b5456a334deaaff8e911cba25f15c5e168bcba86b80d9fbe006a4b07cf4aa963e68a92e5152033cbcb080be0 SHA512 765b58ae1ce61678dce39b27e9212844cfd991e222384c7650355a374a236918f622549d49d5d483bfbc6dfaa74120b66976e85bbfdb6b54b0e871f1d5d5ec60
DIST genpatches-6.2-1.base.tar.xz 4308 BLAKE2B 0b28cf39d9977e5a5c6fe446c0bc318b33f37995897ec379e6ee6d5420a73cd4d3ccf78111df1a2bbe9ee568c6fde6d7c52ba4f01a8b9534c71b597de65aa850 SHA512 da9ab52792c8b6881cf7718128889ccb536723ad7362ccc89be734a479ab6a03f6c844bd97197f3a4574d3bf4278ad10f453a57d076d297586be1db3ac2380c8
DIST genpatches-6.2-1.extras.tar.xz 3808 BLAKE2B e2e6b77fde25dda7c048376fa1435b7ae77eb6889e69bc7f516435a29335d30bc60ccadf196f37408430f5f9899f5502e05404b4bb5ffc8a9e48a6918103780b SHA512 b44df841c08ef03d0638b3b1ebea014979d4e1f70f70c9db21d2a531d7856f0a2eab74d9ad411e0c7387caade6a5cf1afe9e0153d83e51924c881af079c18c83
DIST genpatches-6.3-1.base.tar.xz 4304 BLAKE2B 24ef2e99be1e444526f6786cae000cfb63ea8c0e1107cea066daf2bd7336f1bb968e59395163d3d6a816d92add61b07f58642c3d55ff4b8b341a88a574e57845 SHA512 b20adc8f05814eba47c1a088005e6b04135efd3a388db55693e88f1f039242b60a3749bbac9c5c84f99a1f8a9ac9f7cca0c2f67e9cac465781b43fa1e71db525
Expand Down Expand Up @@ -31,6 +33,7 @@ DIST linux-5.7.tar.xz 112690468 BLAKE2B b2b71e231507429b178b6b89be546c4a3ee2757f
DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556
DIST linux-5.9.tar.xz 115507140 BLAKE2B e8d11472d63a9f8409ca12a2e8c97c6963a3d4516b5a398b627d6ece565584526f9b5a1377a2fa4bd184c09c7db94c987428bc5d52df0c788464a67e9e8d6dcb SHA512 d3d92ce4246bad74c9a784212f160d98449b1e8793970c2c308276568d852b8effe0528686bdb87d55d691f09a826abf7938d69bdd4759ce65ddd5c05ffe4eca
DIST linux-6.1-pf6.tar.gz 220761768 BLAKE2B 8b0f3d16be65f245978a823bc4c3130f76017dcb4e51c0e5c77815ffe61d3122eabec28001571badc8eceed490cb14f27540bbf574fbb0feffba59804e1169ed SHA512 66b2a4d221bc9caf4c22353d39a9a13e990b8e50ef47d1882d9f950b4cf42f6d240d787979a5272eeb8ffba142fb07fcadf438827d3410e220b20e41ac079ea0
DIST linux-6.10-pf2.tar.gz 238923998 BLAKE2B aa9d80bcae6cbdf87d9840b25b7822a7509f79001e956f565e7838c6227b82c833bf320018618d24d4664e868544bcec1f50666c1117353a58a51106c15cebd3 SHA512 c173da596f7860485b09f12db24beaf5e08461bcc79a9143e7974c16c19c1e9f22e5fc2477a6e9c8b2ee666f8a0d7917098be22dd8dbd8708644850dea4c2ab6
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.10_p2.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="4"

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

Please sign in to comment.