diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-23 08:58:35 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-23 08:58:35 +0100 |
commit | 955b5fcaf4acc77c39a1f145d7c56e99f13083a7 (patch) | |
tree | 1141703ebc6ca24ff935b991e261d716a5d98243 /dev-util/scap-driver/scap-driver-0.29.3-r3.ebuild | |
parent | 24c53d42e0294f4f6e36fbb051891af86c9ae503 (diff) |
gentoo auto-resync : 23:05:2023 - 08:58:35
Diffstat (limited to 'dev-util/scap-driver/scap-driver-0.29.3-r3.ebuild')
-rw-r--r-- | dev-util/scap-driver/scap-driver-0.29.3-r3.ebuild | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-util/scap-driver/scap-driver-0.29.3-r3.ebuild b/dev-util/scap-driver/scap-driver-0.29.3-r3.ebuild new file mode 100644 index 000000000000..deb27234ee35 --- /dev/null +++ b/dev-util/scap-driver/scap-driver-0.29.3-r3.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake linux-mod + +DESCRIPTION="Kernel module for dev-util/sysdig" +HOMEPAGE="https://sysdig.com/" + +# The driver is part of falcosecurity/libs, but for versioning reasons we cannot (yet) +# use semver-released packages; instead we pull in a commit that is used and known +# to work with sysdig, see sysdig/cmake/modules/falcosecurity-libs.cmake for details. +# For now the commit here and the one referenced in sysdig should be in sync. +LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a" +SRC_URI="https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz" +S="${WORKDIR}/libs-${LIBS_COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +RDEPEND="!<dev-util/sysdig-${PV}[modules]" + +CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS" + +PATCHES=( + "${FILESDIR}"/${PV}-fix-kmod-build-on-5.18+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.2+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.3+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.4+.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=${LIBS_COMMIT} + ) + + cmake_src_configure + + # setup linux-mod ugliness + MODULE_NAMES="scap(extra:${BUILD_DIR}/driver/src:)" + BUILD_PARAMS='KERNELDIR="${KERNEL_DIR}"' + # work with clang-built kernels (#816024) + if linux_chkconfig_present CC_IS_CLANG; then + BUILD_PARAMS+=' CC=${CHOST}-clang' + if linux_chkconfig_present LD_IS_LLD; then + BUILD_PARAMS+=' LD=ld.lld' + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + fi + fi + + BUILD_TARGETS="all" +} |