1 |
commit: 77ffd89b56ed7492a0a3d6c9e11c433e6b00f8cd |
2 |
Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com> |
3 |
AuthorDate: Wed Jul 20 11:56:56 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 23 05:34:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ffd89b |
7 |
|
8 |
dev-util/scap-driver: new package, replacement for sysdig-kmod |
9 |
|
10 |
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
dev-util/scap-driver/Manifest | 1 + |
14 |
dev-util/scap-driver/metadata.xml | 15 +++++++ |
15 |
dev-util/scap-driver/scap-driver-0.29.3.ebuild | 54 ++++++++++++++++++++++++++ |
16 |
3 files changed, 70 insertions(+) |
17 |
|
18 |
diff --git a/dev-util/scap-driver/Manifest b/dev-util/scap-driver/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000000..ea647a605682 |
21 |
--- /dev/null |
22 |
+++ b/dev-util/scap-driver/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz 816972 BLAKE2B b47ae6a7677935500ebdab8aea7f4c49ef50b7175ec097e7213a1f041ac2b5aa642379924927ec12c84271016e9ab9d191c0c1d4ffacd6ade58b7a03c37f9221 SHA512 65e5916e5f9507fd867a5e9ba3b2670a1b73b7672a22479d3019e948a52ad74441d7e2ce1c74ebd0fdbd1ce66808efa49f285bd5180bceae9d4e6730a60787ce |
25 |
|
26 |
diff --git a/dev-util/scap-driver/metadata.xml b/dev-util/scap-driver/metadata.xml |
27 |
new file mode 100644 |
28 |
index 000000000000..e786b1b99988 |
29 |
--- /dev/null |
30 |
+++ b/dev-util/scap-driver/metadata.xml |
31 |
@@ -0,0 +1,15 @@ |
32 |
+<?xml version="1.0" encoding="UTF-8"?> |
33 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
34 |
+<pkgmetadata> |
35 |
+ <maintainer type="person" proxied="yes"> |
36 |
+ <email>holger@××××××××××××××××××.com</email> |
37 |
+ <name>Holger Hoffstätte</name> |
38 |
+ </maintainer> |
39 |
+ <maintainer type="project" proxied="proxy"> |
40 |
+ <email>proxy-maint@g.o</email> |
41 |
+ <name>Proxy Maintainers</name> |
42 |
+ </maintainer> |
43 |
+ <upstream> |
44 |
+ <remote-id type="github">falcosecuity/libs</remote-id> |
45 |
+ </upstream> |
46 |
+</pkgmetadata> |
47 |
|
48 |
diff --git a/dev-util/scap-driver/scap-driver-0.29.3.ebuild b/dev-util/scap-driver/scap-driver-0.29.3.ebuild |
49 |
new file mode 100644 |
50 |
index 000000000000..518e80e54462 |
51 |
--- /dev/null |
52 |
+++ b/dev-util/scap-driver/scap-driver-0.29.3.ebuild |
53 |
@@ -0,0 +1,54 @@ |
54 |
+# Copyright 1999-2022 Gentoo Authors |
55 |
+# Distributed under the terms of the GNU General Public License v2 |
56 |
+ |
57 |
+EAPI=8 |
58 |
+ |
59 |
+inherit cmake linux-mod |
60 |
+ |
61 |
+DESCRIPTION="Kernel module for dev-util/sysdig" |
62 |
+HOMEPAGE="https://sysdig.com/" |
63 |
+ |
64 |
+# The driver is part of falcosecurity/libs, but for versioning reasons we cannot (yet) |
65 |
+# use semver-released packages; instead we pull in a commit that is used and known |
66 |
+# to work with sysdig, see sysdig/cmake/modules/falcosecurity-libs.cmake for details. |
67 |
+# For now the commit here and the one referenced in sysdig should be in sync. |
68 |
+LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a" |
69 |
+SRC_URI="https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz" |
70 |
+S="${WORKDIR}/libs-${LIBS_COMMIT}" |
71 |
+ |
72 |
+LICENSE="Apache-2.0" |
73 |
+SLOT="0" |
74 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
75 |
+ |
76 |
+RDEPEND="!<dev-util/sysdig-${PV}[modules]" |
77 |
+ |
78 |
+CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS" |
79 |
+ |
80 |
+src_configure() { |
81 |
+ local mycmakeargs=( |
82 |
+ # we will use linux-mod, so just pretend to use bundled deps |
83 |
+ # in order to make it through the cmake setup. |
84 |
+ -DUSE_BUNDLED_DEPS=ON |
85 |
+ -DCREATE_TEST_TARGETS=OFF |
86 |
+ -DDRIVER_VERSION=${LIBS_COMMIT} |
87 |
+ ) |
88 |
+ |
89 |
+ cmake_src_configure |
90 |
+ |
91 |
+ # setup linux-mod ugliness |
92 |
+ MODULE_NAMES="scap(extra:${BUILD_DIR}/driver/src:)" |
93 |
+ BUILD_PARAMS='KERNELDIR="${KERNEL_DIR}"' |
94 |
+ # work with clang-built kernels (#816024) |
95 |
+ if linux_chkconfig_present CC_IS_CLANG; then |
96 |
+ BUILD_PARAMS+=' CC=${CHOST}-clang' |
97 |
+ if linux_chkconfig_present LD_IS_LLD; then |
98 |
+ BUILD_PARAMS+=' LD=ld.lld' |
99 |
+ if linux_chkconfig_present LTO_CLANG_THIN; then |
100 |
+ # kernel enables cache by default leading to sandbox violations |
101 |
+ BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' |
102 |
+ fi |
103 |
+ fi |
104 |
+ fi |
105 |
+ |
106 |
+ BUILD_TARGETS="all" |
107 |
+} |