summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger@applied-asynchrony.com>2024-07-05 12:56:54 +0200
committerYixun Lan <dlan@gentoo.org>2024-07-24 12:34:58 +0000
commit848fa1ac70306f7eaa3513fe531c056b2458e52d (patch)
tree707d08df19996b5053a17b3af40331298f4ae1f6 /dev-debug
parentmedia-libs/tiff: Stabilize 4.6.0-r1 amd64, #936572 (diff)
downloadgentoo-848fa1ac70306f7eaa3513fe531c056b2458e52d.tar.gz
gentoo-848fa1ac70306f7eaa3513fe531c056b2458e52d.tar.bz2
gentoo-848fa1ac70306f7eaa3513fe531c056b2458e52d.zip
dev-debug/scap-driver: add 0.17.2
This adds the latest & greatest version of the scap kernel driver. Since we're now finally able to use proper version numbers we no longer need to rely on random git commits. Unfortunately this means we have to travel back in version-time; this should not pose a problem as sysdig-0.38.x is pinned to this version and will automatically do the right thing. Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'dev-debug')
-rw-r--r--dev-debug/scap-driver/Manifest1
-rw-r--r--dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch29
-rw-r--r--dev-debug/scap-driver/scap-driver-0.17.2.ebuild46
3 files changed, 76 insertions, 0 deletions
diff --git a/dev-debug/scap-driver/Manifest b/dev-debug/scap-driver/Manifest
index ea647a605682..7d0200368674 100644
--- a/dev-debug/scap-driver/Manifest
+++ b/dev-debug/scap-driver/Manifest
@@ -1 +1,2 @@
+DIST falcosecurity-libs-0.17.2.tar.gz 4424458 BLAKE2B cbe3a689d3d93a6896b94fd54b35665b11263c07690a36d40617651f97806b0177af657824f62259df95a984d598a34c17ff942c73e3abd774569607dc22380f SHA512 8bb449d91c12225c08d678ea9a8e97a5b5e8828788b56d5b83ec3b3c6ad5e25d4f56120dba523ac9c593d02ee155026e2d4d47587be6f73f373f06fe7ddc2a0c
DIST falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz 816972 BLAKE2B b47ae6a7677935500ebdab8aea7f4c49ef50b7175ec097e7213a1f041ac2b5aa642379924927ec12c84271016e9ab9d191c0c1d4ffacd6ade58b7a03c37f9221 SHA512 65e5916e5f9507fd867a5e9ba3b2670a1b73b7672a22479d3019e948a52ad74441d7e2ce1c74ebd0fdbd1ce66808efa49f285bd5180bceae9d4e6730a60787ce
diff --git a/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch b/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch
new file mode 100644
index 000000000000..11b3f41e7519
--- /dev/null
+++ b/dev-debug/scap-driver/files/0.17.2-fix-kmod-build-on-6.10+.patch
@@ -0,0 +1,29 @@
+
+Patch taken from: https://github.com/falcosecurity/libs/pull/1884
+
+From b52aec86c96f26e14afcdece6a6ccb6ce2f0a7ec Mon Sep 17 00:00:00 2001
+From: Federico Di Pierro <nierro92@gmail.com>
+Date: Thu, 30 May 2024 11:36:32 +0200
+Subject: [PATCH] fix(driver): fix build of kmod on linux 6.10.
+
+Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
+---
+ driver/main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/driver/main.c b/driver/main.c
+index 1bcd600675..af1470b8d7 100644
+--- a/driver/main.c
++++ b/driver/main.c
+@@ -1649,8 +1649,10 @@ static inline int drop_nostate_event(ppm_event_code event_type,
+ if (close_fd < 0 || close_fd >= fdt->max_fds ||
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0))
+ !FD_ISSET(close_fd, fdt->open_fds)
+-#else
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0))
+ !fd_is_open(close_fd, fdt)
++#else
++ !test_bit(close_fd, fdt->open_fds)
+ #endif
+ ) {
+ drop = true;
diff --git a/dev-debug/scap-driver/scap-driver-0.17.2.ebuild b/dev-debug/scap-driver/scap-driver-0.17.2.ebuild
new file mode 100644
index 000000000000..ccc6d37ec84d
--- /dev/null
+++ b/dev-debug/scap-driver/scap-driver-0.17.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake linux-mod-r1
+
+DESCRIPTION="Kernel module for dev-debug/sysdig"
+HOMEPAGE="https://sysdig.com/"
+SRC_URI="https://github.com/falcosecurity/libs/archive/${PV}.tar.gz -> falcosecurity-libs-${PV}.tar.gz"
+S="${WORKDIR}/libs-${PV}"
+
+LICENSE="Apache-2.0 GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+RDEPEND="!<dev-debug/sysdig-${PV}[modules]"
+
+CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
+
+# We need to specify the driver version manually since we do not use a git tree.
+# This version can be found in the corresponding *sysdig* tree in cmake/modules/driver.cmake
+DRIVER_VERSION="7.2.0+driver"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-fix-kmod-build-on-6.10+.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ # we will use linux-mod, so just pretend to use bundled deps
+ # in order to make it through the cmake setup.
+ -DUSE_BUNDLED_DEPS=ON
+ -DCREATE_TEST_TARGETS=OFF
+ -DDRIVER_VERSION="${DRIVER_VERSION}"
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local modlist=( scap=:"${BUILD_DIR}"/driver/src )
+ local modargs=( KERNELDIR="${KV_OUT_DIR}" )
+
+ linux-mod-r1_src_compile
+}