summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2023-06-18 15:57:34 -0700
committerJohn Helmert III <ajak@gentoo.org>2023-06-18 15:58:11 -0700
commitb87c33217a3ff2ef3882ee50c4ae6c22563a9651 (patch)
tree3cfce5ac4511e38a3fbf98ace609f4de18259f08 /app-antivirus/lkrg
parentsys-devel/gcc: add 14.0.0_pre20230618 (diff)
downloadgentoo-b87c33217a3ff2ef3882ee50c4ae6c22563a9651.tar.gz
gentoo-b87c33217a3ff2ef3882ee50c4ae6c22563a9651.tar.bz2
gentoo-b87c33217a3ff2ef3882ee50c4ae6c22563a9651.zip
app-antivirus/lkrg: migrate to linux-mod-r1
Closes: https://bugs.gentoo.org/908693 Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'app-antivirus/lkrg')
-rw-r--r--app-antivirus/lkrg/lkrg-0.9.6-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/app-antivirus/lkrg/lkrg-0.9.6-r1.ebuild b/app-antivirus/lkrg/lkrg-0.9.6-r1.ebuild
new file mode 100644
index 000000000000..bbad480d3a9a
--- /dev/null
+++ b/app-antivirus/lkrg/lkrg-0.9.6-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1 linux-info systemd verify-sig
+
+DESCRIPTION="Linux Kernel Runtime Guard"
+HOMEPAGE="https://lkrg.org"
+SRC_URI="https://lkrg.org/download/${P}.tar.gz
+ verify-sig? ( https://lkrg.org/download/${P}.tar.gz.sign )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-openwall )"
+
+# MODULE_NAMES="lkrg(misc:${S}:${S})"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/openwall.asc"
+
+PATCHES=( "${FILESDIR}/${PN}-0.9.4-gentoo-paths.patch" )
+
+pkg_setup() {
+ CONFIG_CHECK="HAVE_KRETPROBES KALLSYMS_ALL KPROBES JUMP_LABEL"
+ CONFIG_CHECK+=" MODULE_UNLOAD !PREEMPT_RT ~STACKTRACE"
+ linux-mod-r1_pkg_setup
+}
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.sign}
+ fi
+
+ default
+}
+
+src_compile() {
+ local modlist=( lkrg )
+ local modargs=(
+ P_KVER="${KV_FULL}"
+ P_KERNEL="${KERNEL_DIR}"
+ )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ systemd_dounit scripts/bootup/systemd/lkrg.service
+ newinitd scripts/bootup/openrc/lkrg lkrg.initd
+
+ insinto /lib/sysctl.d
+ newins scripts/bootup/lkrg.conf 01-lkrg.conf
+}