summaryrefslogtreecommitdiff
path: root/dev-debug/sysdig
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-02 03:04:24 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-02 03:04:24 +0000
commit37a097af13d675b83911ac006ee9ee22d2163f9a (patch)
tree75294129093c3332ea0ba918643a3485b19550f6 /dev-debug/sysdig
parentaac5e1b02ac846f5e1ce85f4f66fdec46aa9b0d1 (diff)
gentoo auto-resync : 02:11:2024 - 03:04:23
Diffstat (limited to 'dev-debug/sysdig')
-rw-r--r--dev-debug/sysdig/Manifest13
-rw-r--r--dev-debug/sysdig/files/0.29.3-libs-gcc13.patch41
-rw-r--r--dev-debug/sysdig/files/0.29.3-libs-no-libanl.patch16
-rw-r--r--dev-debug/sysdig/metadata.xml2
-rw-r--r--dev-debug/sysdig/sysdig-0.29.3-r1.ebuild91
-rw-r--r--dev-debug/sysdig/sysdig-0.29.3-r2.ebuild103
-rw-r--r--dev-debug/sysdig/sysdig-0.39.0.ebuild (renamed from dev-debug/sysdig/sysdig-0.38.1.ebuild)83
7 files changed, 66 insertions, 283 deletions
diff --git a/dev-debug/sysdig/Manifest b/dev-debug/sysdig/Manifest
index bace326b17f8..75ab9442820e 100644
--- a/dev-debug/sysdig/Manifest
+++ b/dev-debug/sysdig/Manifest
@@ -1,14 +1,9 @@
-AUX 0.29.3-libs-gcc13.patch 1757 BLAKE2B 5094b765aa5009024edea3a333e1a70a6b7380a24312eeb628e53138fd348583c515287c1b0ceed8fac151f5cb4b439ae9b04aaa092ae58661ed373599f1e90d SHA512 344b01c574cefae03d217f7defd3fb58dd1e99cee3ae9ade4347b665d83ed865078067dc6733bbaa1199d562ba21781e8322437a35775ae13cfdf95c752a350f
-AUX 0.29.3-libs-no-libanl.patch 495 BLAKE2B 5e77a8712f04ba7a1386bd2d40ee34093dc39798d451f92117667b3787becf578bc2e2d8a2e5b4ace7d69d71f6faf4cc68a6ae91e7431725ffaa46b5a7f338eb SHA512 34436744c960c9eaa58e0281d829f929d334e30dc811180a3c2e2614a981ab2e4620c3815d430d8e1f739482d42920cfdfcbb4de41a8f73e5dc5ca2cb46f9e9b
AUX 0.38.1-libs-no-libanl.patch 676 BLAKE2B 81bec8c1e6472833dfa9b038561194bc5be41bec9e8412dd9c6d8f316bffde968175cf45617a444c96b55f7bba7308c7b1234b6632abfa717d958155b3af7b73 SHA512 7f6d439bd881a7eeb6633f68f221c826113c87d4a2d749e7eb27dfca792145cad980cc403a32d87c9c903172565f75f6e15ed09abba411a9588360ea569c0895
AUX 0.38.1-scap-loader.patch 1341 BLAKE2B 9184949725cf369ad1bc43abc3f8093425457fe2831ffcd61326b6f182635b20abff957c9602a35001c14895053003ddc94c0e11419d7273868557261bc11c45 SHA512 bc7fb0bc0a744293598333e528b060b4cc4763347615b86a2a18ed43d04b59dd60f86b7da21b1a9d098d58c6641c36005a16de77fd60621c961115de4fcb3403
-DIST falcosecurity-libs-0.17.2.tar.gz 4424458 BLAKE2B cbe3a689d3d93a6896b94fd54b35665b11263c07690a36d40617651f97806b0177af657824f62259df95a984d598a34c17ff942c73e3abd774569607dc22380f SHA512 8bb449d91c12225c08d678ea9a8e97a5b5e8828788b56d5b83ec3b3c6ad5e25d4f56120dba523ac9c593d02ee155026e2d4d47587be6f73f373f06fe7ddc2a0c
DIST falcosecurity-libs-0.17.3.tar.gz 4425090 BLAKE2B 3d6300bba2303715581d9b35f63e453f85a3889fa93233d3b1ca69f6ba92b33e0a7d90bbd160b765487b44771a1d94f5a1fb380cf4e5130506a885471dddb7e7 SHA512 05707c404bdd45c2e944b903dbbc1e5e0e5991a3d4cbe9ea357efb35b5ad0c4ede7cdd7b056a7dde2543cc2c0b8d5d3b42606202128b7287a80a1da686de169e
-DIST falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz 816972 BLAKE2B b47ae6a7677935500ebdab8aea7f4c49ef50b7175ec097e7213a1f041ac2b5aa642379924927ec12c84271016e9ab9d191c0c1d4ffacd6ade58b7a03c37f9221 SHA512 65e5916e5f9507fd867a5e9ba3b2670a1b73b7672a22479d3019e948a52ad74441d7e2ce1c74ebd0fdbd1ce66808efa49f285bd5180bceae9d4e6730a60787ce
-DIST sysdig-0.29.3.tar.gz 306984 BLAKE2B 51e9a0a085fa91d65963fd33e00b139d97d22b551de8ca85e48b4af73991897378970dfde54754a970e79300f06a54bad1d9c8fdfdb44f24150d0b21077e423f SHA512 1dbe1195f245921c671ed2343325aee79fd0cde34681b9cab445135662d3ed7c84884e46b2270c0e868b5de1a3f2800b84e8bf9fcf0dfe581dd17e2e633f46d8
+DIST falcosecurity-libs-0.18.1.tar.gz 4473396 BLAKE2B 9e875430032adfc79db086e92e6bb356a9c87a529da27a613f49b18e7e32ebeb28e1859bdba8b35c826e9a0d9c77454d4b804e35d5bf13c2f077fed915355045 SHA512 eb9e4d770888d70cbcc9468a4044f50bbb16729f545660c9f1aa91da862410ee7cfa2702dba7eef161bf3a3e0b9090b64dd8e1694fdb83c55a6d2418d281042a
DIST sysdig-0.38.1.tar.gz 67528905 BLAKE2B 9b0e0f337bf64df200b44f7e23c64d00477d6ebfb2bc995dcb04951c8e25fb9274431022b8fa54f54851436f063b79d1268045ba686e97fb0195922bc8dfcf28 SHA512 17275c029368b203ec590cf448a33275bd6c20b81be77edcd393f1a3c04e6c4714c7286b6268823bb0c629d52a88cd97f7b3ef588bd10a000b65de23eb5b5a45
-EBUILD sysdig-0.29.3-r1.ebuild 2173 BLAKE2B 898a43a024a5acff4464462d630249faf539d3715dfcb5900bb3262ff793c8c277ce0e30796c2d09cb19e400430a976d3b9f6dd301fe5269bdc15e6698cf0f6a SHA512 46f162c0aa04094b80566bc988553d50a23671f1d6e34b241491d2d632b3f9a72b229416358e261adb154bf94ce8714c1e1ee8d094799ff941f238e1d5df61aa
-EBUILD sysdig-0.29.3-r2.ebuild 2554 BLAKE2B b7e9f236d3f51c3c56b9fc0840296e24fb4fec65b4aa0d70c4e5c8eba97c440811e34be3a5f34fd7be28aacfb8fb2d7c81e85971716a6faefdd7434c49cb93bf SHA512 a1ddd6d3479438f26b60654282b7700d98a4eb8304686b6d01128e8ba7ed3dce6ffb19487cbd25e2d71f00aab3fe65e0ab4fff94cfadc8179c1223ea37432b77
+DIST sysdig-0.39.0.tar.gz 85742724 BLAKE2B 7e6414b3b87bd4cc43ede8c28f99ebd385a63b0efd711d6648b832d64d518bbfe7ddb2bff469232933413a2807d4df66775c8d57072d9e80aeffb5b2dd5690fd SHA512 d43c816d4c29cc283d3247ac0ac3591b8adea7a08194a80b4e530f0c45730a824d16eda7b07bb70e4658cbae0f851fbb67ec880eedf33477bf5bfc911d8a7936
EBUILD sysdig-0.38.1-r1.ebuild 3404 BLAKE2B 8d0a578a92aee5af76f46d4cf7863f6bfbad952863379f7fb000fca7352d48f69da1ad0628533148e1f1aa3edee47f8b9544ab024391d93eb47f48e4d9deb5e4 SHA512 fd746ff2ec03f46d035c0229cbb33ba33de8b8e53855a3aa499ac9e1e500b49a778a96076903e12602725dc3893e81009da61468ad8bc65aaea94d96e2c4706e
-EBUILD sysdig-0.38.1.ebuild 3380 BLAKE2B 7b5d47ce41ba2511b6a3f4096c7e2f3730ce6fea2b38c87b405e8aa07039dfc66fa1a0293fb94cc0b6e456a2a45b97fc916072c9ebe22a6f658c6f7dbb1627bd SHA512 daa3b175cc1dc2a298512f3b1a5e7158683e2d69e05a33fe3dd1b44a46412594ab50b2606d7aaaa8ae8e7c33692eacba3a3f9354bccaad967e0c1d739d9542f3
-MISC metadata.xml 671 BLAKE2B 553dbbe2ea2a56f5a88bb0276b3f97c5d4d8d798291eaef42d5aadd842cf5cbbb770515729c9779890f9227f7cc96fc8e35457009f066cfb43993b02c7406d7a SHA512 4d0b92b271bd4ceb86db363a29cd465124ab71ec6941848cafec4ebba0232a52bf62a4128d8cbaf5a7a6c9350aef29e4a797b6a659d5d5896c077b0b5df9f73d
+EBUILD sysdig-0.39.0.ebuild 4034 BLAKE2B 1e8c9a51c2f90578f8adf2679dd3310a4b293b6fd4e4a9260b5138fb31571a8fb5f2273e3b6531d8e15650137246245f4fc12a7bd92d295231af42ff40898e0a SHA512 9546e308e90dc7db6f874eac2c0e26b64c64644e8432f8b3083f377be24070478bd409be7de74798dc7ab110c9193a14a45d417e0a400ad89034a1a42ff0504b
+MISC metadata.xml 786 BLAKE2B a450cef4fda00c66e71a847a69dce989a7a8b743d6e277e8d3c3035067d9d245c3612d7f7631dd41ded3963dc668d3d7f61c6b2cace5b82664887e7c035f16cb SHA512 926a07f842676753a6d308ec6010c02301e295fccf1e34500e98d6b91c9eb34cc5b02c64704996fdf0d33466d526961036b777dcac18efe83b27c60a3d75849c
diff --git a/dev-debug/sysdig/files/0.29.3-libs-gcc13.patch b/dev-debug/sysdig/files/0.29.3-libs-gcc13.patch
deleted file mode 100644
index 4fb4d52c1db4..000000000000
--- a/dev-debug/sysdig/files/0.29.3-libs-gcc13.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-
-Manual backport of the upstream fix at:
-https://github.com/falcosecurity/libs/commit/1406858fa5223d980e66e2a5fb2c1b014c9db5c8
-
-diff --git libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/filter_value.h libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/filter_value.h
-index 47f5367..6cc8b83 100644
---- libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/filter_value.h
-+++ libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/filter_value.h
-@@ -17,6 +17,7 @@ limitations under the License.
-
- #pragma once
-
-+#include <cstdint>
- #include <string.h>
- #include <utility>
-
-diff --git libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/sinsp.h libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/sinsp.h
-index c15c13c..f9f9f45 100644
---- libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/sinsp.h
-+++ libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/sinsp.h
-@@ -56,6 +56,7 @@ limitations under the License.
-
- #define __STDC_FORMAT_MACROS
-
-+#include <cstdint>
- #include <string>
- #include <unordered_map>
- #include <map>
-
-diff --git libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/scap_open_exception.h libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/scap_open_exception.h
-index 6877456..b6fa6be 100644
---- libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/scap_open_exception.h
-+++ libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/scap_open_exception.h
-@@ -17,6 +17,7 @@ limitations under the License.
- #pragma once
-
- #include "sinsp_exception.h"
-+#include <cstdint>
-
- /*!
- \brief Instances of this exception are thrown when calls to scap_open()
diff --git a/dev-debug/sysdig/files/0.29.3-libs-no-libanl.patch b/dev-debug/sysdig/files/0.29.3-libs-no-libanl.patch
deleted file mode 100644
index 16563aee8ca0..000000000000
--- a/dev-debug/sysdig/files/0.29.3-libs-no-libanl.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-Remove libanl from list of linked libraries as it is not needed at all
-and does not exist on musl.
-
---- libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/CMakeLists.txt~ 2022-03-25 09:50:03.000000000 +0000
-+++ libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/CMakeLists.txt 2024-04-13 13:40:53.222240196 +0000
-@@ -230,8 +230,7 @@ if(NOT WIN32)
-
- if(NOT MUSL_OPTIMIZED_BUILD)
- list(APPEND SINSP_LIBRARIES
-- rt
-- anl)
-+ rt)
- endif()
-
- else()
diff --git a/dev-debug/sysdig/metadata.xml b/dev-debug/sysdig/metadata.xml
index c16f8ef41665..05dad048fe79 100644
--- a/dev-debug/sysdig/metadata.xml
+++ b/dev-debug/sysdig/metadata.xml
@@ -10,6 +10,8 @@
<name>Proxy Maintainers</name>
</maintainer>
<use>
+ <flag name="bpf">Enable the BPF probe as alternative event source
+ to <pkg>dev-debug/scap-driver</pkg>.</flag>
<flag name="modules">Build kernel modules needed for tracing local
events. Disable this only if you intend to use sysdig purely
to work with dumpfiles.</flag>
diff --git a/dev-debug/sysdig/sysdig-0.29.3-r1.ebuild b/dev-debug/sysdig/sysdig-0.29.3-r1.ebuild
deleted file mode 100644
index 619c30f3a3a3..000000000000
--- a/dev-debug/sysdig/sysdig-0.29.3-r1.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( luajit )
-
-inherit bash-completion-r1 cmake lua-single
-
-DESCRIPTION="A system exploration and troubleshooting tool"
-HOMEPAGE="https://sysdig.com/"
-
-# For now we need to bump this version of falcosecurity/libs manually;
-# check the used git revision in <src>/cmake/modules/falcosecurity-libs.cmake
-LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a"
-
-SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="+modules"
-REQUIRED_USE="${LUA_REQUIRED_USE}"
-
-RDEPEND="${LUA_DEPS}
- app-misc/jq
- dev-cpp/tbb:=
- dev-cpp/yaml-cpp:=
- dev-libs/libb64:=
- dev-libs/openssl:=
- dev-libs/protobuf:=
- net-dns/c-ares:=
- net-libs/grpc:=
- net-misc/curl
- sys-libs/ncurses:=
- sys-libs/zlib:="
-
-DEPEND="${RDEPEND}
- dev-cpp/nlohmann_json
- dev-cpp/valijson
- virtual/os-headers"
-
-# for now pin the driver to the same ebuild version
-PDEPEND="modules? ( =dev-debug/scap-driver-${PV}* )"
-
-src_prepare() {
- # manually apply patch to falcosecurity-libs dependency
- pushd "${WORKDIR}" && eapply -p0 "${FILESDIR}/${PV}-libs-gcc13.patch" && popd
-
- sed -i -e 's:-ggdb::' CMakeLists.txt || die
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- # don't build driver
- -DBUILD_DRIVER=OFF
-
- # libscap examples are not installed or really useful
- -DBUILD_LIBSCAP_EXAMPLES=OFF
-
- # point to the falcosecurity-libs tree
- -DFALCOSECURITY_LIBS_SOURCE_DIR="${WORKDIR}"/libs-${LIBS_COMMIT}
-
- # explicitly set version
- -DSYSDIG_VERSION=${PV}
-
- # unbundle the deps
- -DUSE_BUNDLED_DEPS=OFF
-
- # add valijson include path to prevent downloading
- -DVALIJSON_INCLUDE="${ESYSROOT}"/usr/include
-
- # enable chisels
- -DWITH_CHISEL=ON
- )
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- # remove driver headers
- rm -r "${ED}"/usr/src || die
-
- # move bashcomp to the proper location
- dobashcomp "${ED}"/usr/etc/bash_completion.d/sysdig || die
- rm -r "${ED}"/usr/etc || die
-}
diff --git a/dev-debug/sysdig/sysdig-0.29.3-r2.ebuild b/dev-debug/sysdig/sysdig-0.29.3-r2.ebuild
deleted file mode 100644
index 64902719ed6b..000000000000
--- a/dev-debug/sysdig/sysdig-0.29.3-r2.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( luajit )
-
-inherit bash-completion-r1 cmake lua-single
-
-DESCRIPTION="A system exploration and troubleshooting tool"
-HOMEPAGE="https://sysdig.com/"
-
-# For now we need to bump this version of falcosecurity/libs manually;
-# check the used git revision in <src>/cmake/modules/falcosecurity-libs.cmake
-LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a"
-
-SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+modules"
-REQUIRED_USE="${LUA_REQUIRED_USE}"
-
-RDEPEND="${LUA_DEPS}
- app-misc/jq
- dev-cpp/tbb:=
- dev-cpp/yaml-cpp:=
- dev-libs/libb64:=
- dev-libs/openssl:=
- dev-libs/protobuf:=
- net-dns/c-ares:=
- net-libs/grpc:=
- net-misc/curl
- sys-libs/ncurses:=
- sys-libs/zlib:=
- virtual/libelf:="
-
-DEPEND="${RDEPEND}
- dev-cpp/nlohmann_json
- dev-cpp/valijson
- virtual/os-headers"
-
-# for now pin the driver to the same ebuild version
-PDEPEND="modules? ( =dev-debug/scap-driver-${PV}* )"
-
-src_prepare() {
- # manually apply patches to falcosecurity-libs dependency
- pushd "${WORKDIR}"
- # gcc13 needs explicit <cstdint>
- eapply -p0 "${FILESDIR}/${PV}-libs-gcc13.patch" || die
-
- # musl has no libanl (#929227)
- if [ ${ELIBC} == "musl" ] ; then
- eapply -p0 "${FILESDIR}/${PV}-libs-no-libanl.patch" || die
- fi
- popd
-
- # force C++14 standard for libs & main
- sed -i -e 's:-std=c++0x:-std=c++14:' "${WORKDIR}"/libs-${LIBS_COMMIT}/cmake/modules/CompilerFlags.cmake || die
- sed -i -e 's:-std=c++0x:-std=c++14:' -e 's:-ggdb::' CMakeLists.txt || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- # don't build driver
- -DBUILD_DRIVER=OFF
-
- # libscap examples are not installed or really useful
- -DBUILD_LIBSCAP_EXAMPLES=OFF
-
- # point to the falcosecurity-libs tree
- -DFALCOSECURITY_LIBS_SOURCE_DIR="${WORKDIR}"/libs-${LIBS_COMMIT}
-
- # explicitly set version
- -DSYSDIG_VERSION=${PV}
-
- # unbundle the deps
- -DUSE_BUNDLED_DEPS=OFF
-
- # add valijson include path to prevent downloading
- -DVALIJSON_INCLUDE="${ESYSROOT}"/usr/include
-
- # enable chisels
- -DWITH_CHISEL=ON
- )
-
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
-
- # remove driver headers
- rm -r "${ED}"/usr/src || die
-
- # move bashcomp to the proper location
- dobashcomp "${ED}"/usr/etc/bash_completion.d/sysdig || die
- rm -r "${ED}"/usr/etc || die
-}
diff --git a/dev-debug/sysdig/sysdig-0.38.1.ebuild b/dev-debug/sysdig/sysdig-0.39.0.ebuild
index be7cf88d7db3..2a9539574c2c 100644
--- a/dev-debug/sysdig/sysdig-0.38.1.ebuild
+++ b/dev-debug/sysdig/sysdig-0.39.0.ebuild
@@ -3,37 +3,43 @@
EAPI=8
+LLVM_COMPAT=( {15..19} )
+LLVM_OPTIONAL=1
+
LUA_COMPAT=( luajit )
-inherit bash-completion-r1 cmake flag-o-matic lua-single
+inherit bash-completion-r1 cmake flag-o-matic linux-info llvm-r1 lua-single
DESCRIPTION="A system exploration and troubleshooting tool"
HOMEPAGE="https://sysdig.com/"
# The version of falcosecurity-libs required by sysdig as source tree
-LIBS_VERSION="0.17.2"
+LIBS_VERSION="0.18.1"
+LIBS="falcosecurity-libs-${LIBS_VERSION}"
+
SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/falcosecurity/libs/archive/${LIBS_VERSION}.tar.gz -> falcosecurity-libs-${LIBS_VERSION}.tar.gz"
+ https://github.com/falcosecurity/libs/archive/${LIBS_VERSION}.tar.gz -> ${LIBS}.tar.gz"
-# The driver version as found in cmake/modules/driver.cmake
-DRIVER_VERSION="7.2.0+driver"
+# The driver version as found in cmake/modules/driver.cmake or alternatively
+# as git tag on the $LIBS_VERSION of falcosecurity-libs.
+DRIVER_VERSION="7.3.0+driver"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="+modules"
+IUSE="bpf +modules"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RDEPEND="${LUA_DEPS}
+ dev-cpp/abseil-cpp:=
dev-cpp/tbb:=
dev-cpp/yaml-cpp:=
dev-libs/jsoncpp:=
dev-libs/libb64:=
- dev-libs/openssl:=
+ bpf? ( >=dev-libs/libbpf-1.1:= )
dev-libs/protobuf:=
dev-libs/re2:=
dev-libs/uthash
- net-dns/c-ares:=
net-libs/grpc:=
net-misc/curl
sys-libs/ncurses:=
@@ -43,22 +49,41 @@ RDEPEND="${LUA_DEPS}
DEPEND="${RDEPEND}
dev-cpp/nlohmann_json
dev-cpp/valijson
+ bpf? ( $(llvm_gen_dep '
+ sys-devel/clang:${LLVM_SLOT}=
+ sys-devel/llvm:${LLVM_SLOT}=[llvm_targets_BPF(+)]
+ ')
+ )
virtual/os-headers"
+BDEPEND="bpf? ( dev-util/bpftool )"
+
# pin the driver to the falcosecurity-libs version
PDEPEND="modules? ( =dev-debug/scap-driver-${LIBS_VERSION}* )"
-PATCHES=( "${FILESDIR}/${PV}-scap-loader.patch" )
+PATCHES=(
+ "${FILESDIR}/0.38.1-scap-loader.patch"
+)
+
+pkg_pretend() {
+ if use bpf; then
+ local CONFIG_CHECK="
+ ~BPF
+ ~BPF_EVENTS
+ ~BPF_JIT
+ ~BPF_SYSCALL
+ ~FTRACE_SYSCALLS
+ ~HAVE_EBPF_JIT
+ "
+ check_extra_config
+ fi
+}
-src_prepare() {
- # manually apply patches to falcosecurity-libs dependency
- pushd "${WORKDIR}"
- # musl has no libanl (#929227)
- if [ ${ELIBC} == "musl" ] ; then
- eapply -p0 "${FILESDIR}/${PV}-libs-no-libanl.patch" || die
- fi
- popd
+pkg_setup() {
+ use bpf && llvm-r1_pkg_setup
+}
+src_prepare() {
# do not build with debugging info
sed -i -e 's/-ggdb//g' CMakeLists.txt "${WORKDIR}"/libs-${LIBS_VERSION}/cmake/modules/CompilerFlags.cmake || die
@@ -73,10 +98,6 @@ src_configure() {
# https://github.com/falcosecurity/libs/issues/1964
append-flags -fno-strict-aliasing
- # multiple issues with LTO (known/in progress)
- # https://github.com/falcosecurity/libs/issues/1963
- filter-lto
-
local mycmakeargs=(
# do not build the kernel driver
-DBUILD_DRIVER=OFF
@@ -87,8 +108,8 @@ src_configure() {
# do not build internal libs as shared
-DBUILD_SHARED_LIBS=OFF
- # do not build eBPF driver for now
- -DBUILD_SYSDIG_MODERN_BPF=OFF
+ # build BPF probe depending on USE
+ -DBUILD_SYSDIG_MODERN_BPF:BOOL=$(usex bpf)
# set driver version to prevent downloading (don't ask..)
-DDRIVER_SOURCE_DIR="${WORKDIR}"/libs-${LIBS_VERSION}/driver
@@ -126,7 +147,23 @@ src_install() {
# remove driver headers
rm -r "${ED}"/usr/src || die
+ # remove libscap/libsinsp headers & libs (see #938187)
+ rm -r "${ED}"/usr/include/sysdig || die
+ rm -r "${ED}"/usr/$(get_libdir) || die
+
# move bashcomp to the proper location
dobashcomp "${ED}"/usr/etc/bash_completion.d/sysdig || die
rm -r "${ED}"/usr/etc || die
}
+
+pkg_postinst() {
+ if use bpf; then
+ elog
+ elog "You have enabled the 'modern BPF' probe."
+ elog "This eBPF-based event source is an alternative to the traditional"
+ elog "scap kernel module."
+ elog
+ elog "To use it, start sysdig/csysdig with '--modern-bpf'."
+ elog
+ fi
+}