diff options
author | Alice Ferrazzi <alicef@gentoo.org> | 2017-06-15 15:47:28 +0900 |
---|---|---|
committer | Alice Ferrazzi <alicef@gentoo.org> | 2017-06-15 15:47:28 +0900 |
commit | 63ff79707cd3050e26af0e8baca382d049abcd80 (patch) | |
tree | c7ba18dfa24935f37a6f0ac4c303c9e2433b96df /sys-kernel | |
parent | starting to write the argparser using cli python library (diff) | |
download | elivepatch-63ff79707cd3050e26af0e8baca382d049abcd80.tar.gz elivepatch-63ff79707cd3050e26af0e8baca382d049abcd80.tar.bz2 elivepatch-63ff79707cd3050e26af0e8baca382d049abcd80.zip |
added kpatch revision
removed ncurses as dependency
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/kpatch/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/kpatch/kpatch-0.4.0-r1.ebuild | 76 |
2 files changed, 77 insertions, 0 deletions
diff --git a/sys-kernel/kpatch/Manifest b/sys-kernel/kpatch/Manifest index 7ab8d09..af51d4a 100644 --- a/sys-kernel/kpatch/Manifest +++ b/sys-kernel/kpatch/Manifest @@ -1,2 +1,3 @@ DIST kpatch-0.4.0.tar.gz 124433 SHA256 852b8bea7b4ed8712793d7a8e5692536fc68468063dffb873bd55801f78e994a SHA512 0bbb49a06d02e9eb026be458eb904cf50f50461a67f16835a306bb3a4a57ef88b86ecf6bca6dfc91b921ba87b4c8b9d532e2a77e987e7c71583b8cb53520a1d7 WHIRLPOOL adf5e76183153e02a70659f5d47cbc70ed65c3ed9f004f83764029a8caff12faa62b6f41eff71011024653f025b836b340f79dc084ba374fc21293af10a75e6b +EBUILD kpatch-0.4.0-r1.ebuild 1921 SHA256 19bac50d3e8d05c6708b3486f82202b9be3e1e4508b4dbfcf4980ea5e001b466 SHA512 ab0db6ce451aebd04142d1439f8e2e66d36a6e7abd548f3fbada115650d512c62c1a01918d4529ead08b06e66b5ad6521122efe788a35ca09c65ce9b47e94300 WHIRLPOOL 95314652f84c1a8a8c9889b3f948d633ee6bcc346d0f78dc758f8051a17541b4284bd05452cd514192b67b1e245a799657e848c08830c0aab3fa60fb5c0784c9 EBUILD kpatch-0.4.0.ebuild 1941 SHA256 c68592bf5f73a8947a17cea6774ee23ec9ec83c54041ae06b41c92a33735237d SHA512 ef3b8f7e3e4dd70e5ebb07ae29d2c64e89bbaea646eb20743b574bf02ef30251751c4921e5144e4505a60db76edc273c0481322162a83a219fdac0176adc819b WHIRLPOOL cb37c6468661318a8b4292d4bf7c723848431652a096effaf4126884a632edfb99807b202ffd758cb97db4ed430f121e7f158ea720649e90cd68ac88a6d9fae4 diff --git a/sys-kernel/kpatch/kpatch-0.4.0-r1.ebuild b/sys-kernel/kpatch/kpatch-0.4.0-r1.ebuild new file mode 100644 index 0000000..2dae0d7 --- /dev/null +++ b/sys-kernel/kpatch/kpatch-0.4.0-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit linux-info linux-mod flag-o-matic + +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="examples +modules test" + +RDEPEND=" + app-crypt/pesign + dev-libs/openssl:0= + sys-libs/zlib + sys-apps/pciutils +" + +DEPEND=" + ${RDEPEND} + dev-libs/elfutils + sys-devel/bison +" + +pkg_pretend() { + 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 +} + +src_prepare() { + replace-flags '-O?' '-O1' + default +} + +src_compile() { + set_arch_to_kernel + emake all +} + +src_install() { + set_arch_to_kernel + emake DESTDIR="${D}" PREFIX="/usr" install + + einstalldocs +} |