diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-05-23 08:12:29 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-05-23 09:13:04 +0200 |
commit | c9dace943fcd67bc9ca9ed5a2320cf6148540fb3 (patch) | |
tree | 6f3761fa87ce1881e84da4d9c6dd8395cf59df47 /dev-util/sysdig | |
parent | net-misc/networkmanager: arm64 stable (diff) | |
download | gentoo-c9dace943fcd67bc9ca9ed5a2320cf6148540fb3.tar.gz gentoo-c9dace943fcd67bc9ca9ed5a2320cf6148540fb3.tar.bz2 gentoo-c9dace943fcd67bc9ca9ed5a2320cf6148540fb3.zip |
dev-util/sysdig: Bump to 0.26.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-util/sysdig')
-rw-r--r-- | dev-util/sysdig/Manifest | 1 | ||||
-rw-r--r-- | dev-util/sysdig/files/sysdig-0.26.0-build-fixes.patch | 52 | ||||
-rw-r--r-- | dev-util/sysdig/sysdig-0.26.0.ebuild | 97 |
3 files changed, 150 insertions, 0 deletions
diff --git a/dev-util/sysdig/Manifest b/dev-util/sysdig/Manifest index 5aa2f3d474b8..ea74ad0f5c3d 100644 --- a/dev-util/sysdig/Manifest +++ b/dev-util/sysdig/Manifest @@ -1 +1,2 @@ DIST sysdig-0.24.2.tar.gz 855317 BLAKE2B d394ac3bd7e405664da2b45d8cfd5d3433e20266a9489f63b7d4c3bb955a60640d13bb33e6dd2057b16b6ce0617afab88cad2ceab58aa50f6b43a64f6a50f45b SHA512 10ec381144733abc2c386f6570d4245ac2c1eec64d0f56800963acbd9cc38eece504f836f1ab0e24224ff44233945c8273b72efc77d7eadce98d7c4fc378740b +DIST sysdig-0.26.0.tar.gz 892090 BLAKE2B ea80eacfedeca0348c86611d960c8e65eb31c4dfb2386813973d37a92cb186fd0b8b2597305c0617e59c7254b8507ed32c6f1fed37e920929e45a72fffb32cb7 SHA512 8f6ebcd0a0d14586b204b3fa90e27581082390b57d0547e531db258be341fd5e1b77c45c02018267836c867e291d842fcbd05bbe994d3e32a678a2926426e2b6 diff --git a/dev-util/sysdig/files/sysdig-0.26.0-build-fixes.patch b/dev-util/sysdig/files/sysdig-0.26.0-build-fixes.patch new file mode 100644 index 000000000000..8e0dfd606a16 --- /dev/null +++ b/dev-util/sysdig/files/sysdig-0.26.0-build-fixes.patch @@ -0,0 +1,52 @@ +diff --git a/userspace/libscap/scap_fds.c b/userspace/libscap/scap_fds.c +index 452353a6..6eb7cd16 100644 +--- a/userspace/libscap/scap_fds.c ++++ b/userspace/libscap/scap_fds.c +@@ -49,6 +49,7 @@ limitations under the License. + #include <errno.h> + #include <netinet/tcp.h> + #if defined(__linux__) ++#include <sys/sysmacros.h> + #include <linux/netlink.h> + #include <linux/rtnetlink.h> + //#include <linux/sock_diag.h> +diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt +index bc851319..ec454de7 100644 +--- a/userspace/libsinsp/CMakeLists.txt ++++ b/userspace/libsinsp/CMakeLists.txt +@@ -145,7 +145,9 @@ add_library(sinsp STATIC ${SINSP_SOURCES}) + + target_link_libraries(sinsp + scap +- "${JSONCPP_LIB}") ++ "${CURL_LIBRARIES}" ++ "${JSONCPP_LIB}" ++ "${TBB_LIB}") + + if(USE_BUNDLED_LUAJIT) + add_dependencies(sinsp luajit) +@@ -157,13 +159,12 @@ if(NOT WIN32) + endif() + if(USE_BUNDLED_CURL) + add_dependencies(sinsp curl) +- target_link_libraries(sinsp +- "${CURL_LIBRARIES}") + endif() + if(USE_BUNDLED_TBB) + add_dependencies(sinsp tbb) +- target_link_libraries(sinsp +- "${TBB_LIB}") ++ endif() ++ if(USE_BUNDLED_GRPC) ++ add_dependencies(sinsp grpc) + endif() + + if(NOT APPLE) +@@ -177,7 +178,6 @@ if(NOT WIN32) + COMMAND ${PROTOC} -I ${CMAKE_CURRENT_SOURCE_DIR} --grpc_out=. --plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN} ${CMAKE_CURRENT_SOURCE_DIR}/cri.proto + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + +- add_dependencies(sinsp grpc) + target_link_libraries(sinsp + "${GRPCPP_LIB}" + "${GRPC_LIB}" diff --git a/dev-util/sysdig/sysdig-0.26.0.ebuild b/dev-util/sysdig/sysdig-0.26.0.ebuild new file mode 100644 index 000000000000..a6c3bad4d48f --- /dev/null +++ b/dev-util/sysdig/sysdig-0.26.0.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MODULES_OPTIONAL_USE=modules +inherit linux-mod bash-completion-r1 cmake-utils + +DESCRIPTION="A system exploration and troubleshooting tool" +HOMEPAGE="https://www.sysdig.org/" +SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 + modules? ( || ( MIT GPL-2 ) )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +modules" + +RDEPEND=" + app-misc/jq:0= + dev-cpp/tbb:0= + dev-lang/luajit:2= + >=dev-libs/jsoncpp-0.6_pre:0= + dev-libs/libb64:0= + dev-libs/protobuf:0= + net-dns/c-ares:0= + net-libs/grpc:0= + sys-libs/ncurses:0= + sys-libs/zlib:0= + libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:0= ) + net-misc/curl:0=" +DEPEND="${RDEPEND} + app-arch/xz-utils + virtual/os-headers" + +# needed for the kernel module +CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS" + +pkg_pretend() { + linux-mod_pkg_setup +} + +pkg_setup() { + linux-mod_pkg_setup +} + +src_prepare() { + sed -i -e 's:-ggdb::' CMakeLists.txt || die + + eapply "${FILESDIR}"/sysdig-0.26.0-build-fixes.patch + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + # we will use linux-mod for that + -DBUILD_DRIVER=OFF + # libscap examples are not installed or really useful + -DBUILD_LIBSCAP_EXAMPLES=OFF + + # unbundle the deps + -DUSE_BUNDLED_DEPS=OFF + ) + + cmake-utils_src_configure + + # setup linux-mod ugliness + MODULE_NAMES="sysdig-probe(extra:${S}/driver:)" + BUILD_PARAMS='KERNELDIR="${KERNEL_DIR}"' + BUILD_TARGETS="all" + + if use modules; then + cmake-utils_src_make configure_driver + + cp "${BUILD_DIR}"/driver/Makefile.dkms driver/Makefile || die + fi +} + +src_compile() { + cmake-utils_src_compile + + linux-mod_src_compile +} + +src_install() { + cmake-utils_src_install + + linux-mod_src_install + + # remove sources + 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 +} |