From 61faa1ea0e8302df305bc281038fc00dc7eb1dd4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 27 Jun 2023 07:34:25 +0100 Subject: gentoo auto-resync : 27:06:2023 - 07:34:25 --- sys-kernel/Manifest.gz | Bin 4409 -> 4410 bytes sys-kernel/kpatch/Manifest | 6 +- sys-kernel/kpatch/kpatch-0.9.7.ebuild | 4 +- sys-kernel/kpatch/kpatch-0.9.8.ebuild | 100 ++++++++++++++++++++++++++++++++++ sys-kernel/kpatch/kpatch-9999.ebuild | 4 +- 5 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 sys-kernel/kpatch/kpatch-0.9.8.ebuild (limited to 'sys-kernel') diff --git a/sys-kernel/Manifest.gz b/sys-kernel/Manifest.gz index 50b5c70bbcab..81541243d1b9 100644 Binary files a/sys-kernel/Manifest.gz and b/sys-kernel/Manifest.gz differ diff --git a/sys-kernel/kpatch/Manifest b/sys-kernel/kpatch/Manifest index 2cda534a0be3..a83dee302a3d 100644 --- a/sys-kernel/kpatch/Manifest +++ b/sys-kernel/kpatch/Manifest @@ -1,5 +1,7 @@ AUX kpatch-0.9.4-no-werror.patch 373 BLAKE2B b7e0d7c35fc87df6d2cb9f0a86a82f01d5a72561d62281abaf7290696d890a997ce3221be506e6213dda891a2f5100b9de83edccac8c6b6af3322353fef9f394 SHA512 3a4392ca1d56a3b2625f11b8a91c140a51d8a5ce45bec8f1a5d901d7515d07ffc85922623464576af0f89966a725faec99b9bc801610ead9102d7f69108f5cc6 DIST kpatch-0.9.7.tar.gz 283662 BLAKE2B c57578b2e5db8582cb09b9ba2bf2040cc5a178cd6c8fdb7f14a0819c50fd71eb8576b08264d019678498e98baf2875c3bd38247ebae31a9631f0e6a17ec5941a SHA512 c876d9b1e5f6e6ab858fa6f302e78152beb3e50cedd93f3c61ab6f747e32199b0601ad4a36d426d43d0e9a37d9bf1d6bbfddccc86df4b31d5e3e6edead6cded3 -EBUILD kpatch-0.9.7.ebuild 2747 BLAKE2B 81fcf1b53be9657a258e5d02cae05e603957224da2c9b0b50682943278070f29256c0e5cccc7cca43df64099c6eb955612ed80ec24309d5976244472b36706b4 SHA512 57a541b21dd727c924e94c696e55e9342599694191fb54d22f0309a78dc57164ee1ccc9d5f408aaa7963dd9ac09a9c8b7e40c8f525ae2404ef2a5c4c4d188a0d -EBUILD kpatch-9999.ebuild 2691 BLAKE2B 0d29b435251fc64c68cdf12cc238b0beda7e9cc20a5a4ef12b207e72175aa4bcacd83fc842b44da04441d1b3109dfdc63ae14e0644c1bdd93f2d3a13de6c17ee SHA512 b7545eb6a562b86d4700e56766eed3684324d4bb201a4393afd119c800e21f689cd7f03da74997e0b5e24bdde74632b9bc455c2c45994b229e3351468b227e7e +DIST kpatch-0.9.8.tar.gz 297451 BLAKE2B 7970da061d2dfb66871e6fc3ff058da97dfb6bc224c9cff3fb25df586056389e1632e891cc481b007405f4662466441f78f82032ad0803d5ac7b10f9b5c500b6 SHA512 ab3a771dfcde92a9eee768afcf7fddb6f1ad5ba9e8c7f44d579d258ce9b6ee1722869b1b70c4597ae951b0faf71413efa26a5b135f50308c996b284a9dcee5b7 +EBUILD kpatch-0.9.7.ebuild 2774 BLAKE2B 5890e29efbdd9671d7c3b7b63b7e7db3da60fc9c6f7d8900fd37ece8060d56b76c0e4fb9c8aa34d9c66aad5c76115647c59a5c9a582ca6bb83bca6b9c65772da SHA512 c8f436ae4b735301633a56afa1cf167625a53b20d8f66b6ab78d8ba71fd6629ec23d93df84d55a04dfe5922acb8175eed32bdb17af02b0ceb62884aa70748c30 +EBUILD kpatch-0.9.8.ebuild 2777 BLAKE2B 3d99373abdfbe82d6ac7f1e0267caeead0e5d1d5d41605303c0c7233888e99def1db725e23cb33f9b983e2dbcae66cba4ecab00798d82160ffdbc01bd5085367 SHA512 45c297c8d1949aa0eea1aecec23a9cdcae2c905b48666a9a492b5abb1e341729d8b8f6193d25470036f622d71a968c104671d998b46c5ee42234da911b748d42 +EBUILD kpatch-9999.ebuild 2718 BLAKE2B 8bfe588fc171a55d944f16cd7673860789576515f1baea9bf19eef1167c0c5207770f0f460ed80fd86260e58453cc1f08a1c3ab106756f681b14ac22af5940d1 SHA512 97bae7e42f2982e4f1f401829237973e7eb569368a73ab26d60b8f61fd322617f9363b2ced223e73c19660cc84639b177adee2d5fdbabbcde36e1d01fbace73a MISC metadata.xml 671 BLAKE2B 27b8de92bfdcd0343388ee8c657a3a3625a3f3879ec597b18516ff5dbe78e6ba93ffb8e0f251a0920ca11405d6c9344378865a65799009a53c71c627dd159ef3 SHA512 e960dac661381d042b3a9fcaf6e7d1e4b246970e262d972596ed3eaf5f25ee5c9a8eca0a88d416f3c360073cf5d25db481b10550db58b3f3b47ceadcf0d85668 diff --git a/sys-kernel/kpatch/kpatch-0.9.7.ebuild b/sys-kernel/kpatch/kpatch-0.9.7.ebuild index c900d328d08d..d3729ed70f9a 100644 --- a/sys-kernel/kpatch/kpatch-0.9.7.ebuild +++ b/sys-kernel/kpatch/kpatch-0.9.7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -31,7 +31,7 @@ DEPEND=" ${RDEPEND} dev-libs/elfutils sys-devel/bison - test? ( dev-util/shellcheck-bin ) + test? ( || ( dev-util/shellcheck-bin dev-util/shellcheck ) ) " PATCHES=( diff --git a/sys-kernel/kpatch/kpatch-0.9.8.ebuild b/sys-kernel/kpatch/kpatch-0.9.8.ebuild new file mode 100644 index 000000000000..830df5138431 --- /dev/null +++ b/sys-kernel/kpatch/kpatch-0.9.8.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic linux-mod-r1 + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dynup/${PN}.git" +else + SRC_URI="https://github.com/dynup/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Dynamic kernel patching for Linux" +HOMEPAGE="https://github.com/dynup/kpatch" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="contrib +kpatch +kpatch-build kmod test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-crypt/pesign + sys-libs/zlib + sys-apps/pciutils +" + +DEPEND=" + ${RDEPEND} + dev-libs/elfutils + sys-devel/bison + test? ( || ( dev-util/shellcheck-bin dev-util/shellcheck ) ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.4-no-werror.patch +) + +pkg_setup() { + if use kmod; then + if kernel_is gt 3 9 0; then + if ! linux_config_exists; then + eerror "Unable to check the currently running kernel for kpatch support" + eerror "Please be sure a .config file is available in the kernel src dir" + eerror "and ensure the kernel has been built." + else + # Fail to build if these kernel options are not enabled (see kpatch/kmod/core/Makefile) + CONFIG_CHECK="FUNCTION_TRACER HAVE_FENTRY MODULES SYSFS KALLSYMS_ALL" + ERROR_FUNCTION_TRACER="CONFIG_FUNCTION_TRACER must be enabled in the kernel's config file" + ERROR_HAVE_FENTRY="CONFIG_HAVE_FENTRY must be enabled in the kernel's config file" + ERROR_MODULES="CONFIG_MODULES must be enabled in the kernel's config file" + ERROR_SYSFS="CONFIG_SYSFS must be enabled in the kernel's config file" + ERROR_KALLSYMS_ALL="CONFIG_KALLSYMS_ALL must be enabled in the kernel's config file" + fi + else + eerror + eerror "kpatch is not available for Linux kernels below 4.0.0" + eerror + die "Upgrade the kernel sources before installing kpatch." + fi + check_extra_config + fi + +} + +src_prepare() { + replace-flags '-O?' '-O1' + default +} + +src_compile() { + use kpatch-build && emake -C kpatch-build + use kpatch && emake -C kpatch + use kmod && set_arch_to_kernel && emake -C kmod + use contrib && emake -C contrib + use test && emake check +} + +src_install() { + if use kpatch-build; then + emake DESTDIR="${D}" PREFIX="/usr" install -C kpatch-build + insinto /usr/share/${PN}/patch + doins kmod/patch/kpatch{.lds.S,-macros.h,-patch.h,-patch-hook.c} + doins kmod/patch/{livepatch-patch-hook.c,Makefile,patch-hook.c} + doins kmod/core/kpatch.h + doman man/kpatch-build.1 + fi + + if use kpatch; then + emake DESTDIR="${D}" PREFIX="/usr" install -C kpatch + doman man/kpatch.1 + fi + + use kmod && set_arch_to_kernel && emake DESTDIR="${D}" PREFIX="/usr" install -C kmod + use contrib && emake DESTDIR="${D}" PREFIX="/usr" install -C contrib + + dodoc README.md doc/patch-author-guide.md +} diff --git a/sys-kernel/kpatch/kpatch-9999.ebuild b/sys-kernel/kpatch/kpatch-9999.ebuild index f75259ae7a68..bf640f01cef4 100644 --- a/sys-kernel/kpatch/kpatch-9999.ebuild +++ b/sys-kernel/kpatch/kpatch-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -31,7 +31,7 @@ DEPEND=" ${RDEPEND} dev-libs/elfutils sys-devel/bison - test? ( dev-util/shellcheck-bin ) + test? ( || ( dev-util/shellcheck-bin dev-util/shellcheck ) ) " pkg_setup() { -- cgit v1.2.3