From 45f7fcc210ec97bc12ac0f57ae600eacde7b0673 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 4 Jan 2022 17:44:53 +0100 Subject: [PATCH] sysdig: update to 0.28.0. --- srcpkgs/sysdig/patches/fix-luajit.patch | 92 ------------------------ srcpkgs/sysdig/patches/grpc-abseil.patch | 11 --- srcpkgs/sysdig/patches/nostatic.patch | 7 +- srcpkgs/sysdig/template | 13 ++-- 4 files changed, 10 insertions(+), 113 deletions(-) delete mode 100644 srcpkgs/sysdig/patches/fix-luajit.patch delete mode 100644 srcpkgs/sysdig/patches/grpc-abseil.patch diff --git a/srcpkgs/sysdig/patches/fix-luajit.patch b/srcpkgs/sysdig/patches/fix-luajit.patch deleted file mode 100644 index f7c744788d9..00000000000 --- a/srcpkgs/sysdig/patches/fix-luajit.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 1147b9a4f6f1f9e97b43735e7980da387837de4a Mon Sep 17 00:00:00 2001 -From: Evgeni Golov -Date: Sun, 27 Aug 2017 13:51:19 +0200 -Subject: [PATCH] fix build with LuaJIT 2.1 betas - -LuaJIT 2.1 drops some compat symbols [1]. And while I think that this is -wrong, as it breaks compatibility with Lua 5.1 [2], it is quite easy to -adopt the code to work with both versions (2.0 and 2.1) of LuaJIT and -remain Lua 5.1 compatible. - -[1] https://github.com/LuaJIT/LuaJIT/commit/dc320ca70f2c5bb3977b82853bcee6dad2523d01 -[2] https://github.com/LuaJIT/LuaJIT/issues/325 - -Signed-off-by: Evgeni Golov -sysdig-CLA-1.0-signed-off-by: Evgeni Golov ---- - CMakeLists.txt | 2 +- - userspace/libsinsp/chisel.cpp | 6 +++--- - userspace/libsinsp/lua_parser.cpp | 2 +- - userspace/libsinsp/lua_parser_api.cpp | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -Index: CMakeLists.txt -=================================================================== ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -103,7 +103,7 @@ option(USE_BUNDLED_DEPS "Enable bundled - option(USE_BUNDLED_LUAJIT "Enable building of the bundled LuaJIT" ${USE_BUNDLED_DEPS}) - - if(NOT USE_BUNDLED_LUAJIT) -- find_path(LUAJIT_INCLUDE luajit.h PATH_SUFFIXES luajit-2.0 luajit) -+ find_path(LUAJIT_INCLUDE luajit.h PATH_SUFFIXES luajit-2.1 luajit-2.0 luajit) - find_library(LUAJIT_LIB NAMES luajit luajit-5.1) - if(LUAJIT_INCLUDE AND LUAJIT_LIB) - message(STATUS "Found LuaJIT: include: ${LUAJIT_INCLUDE}, lib: ${LUAJIT_LIB}") -Index: userspace/libsinsp/chisel.cpp -=================================================================== ---- a/userspace/libsinsp/chisel.cpp -+++ b/userspace/libsinsp/chisel.cpp -@@ -96,7 +96,7 @@ void lua_stackdump(lua_State *L) - // Lua callbacks - /////////////////////////////////////////////////////////////////////////////// - #ifdef HAS_LUA_CHISELS --const static struct luaL_reg ll_sysdig [] = -+const static struct luaL_Reg ll_sysdig [] = - { - {"set_filter", &lua_cbacks::set_global_filter}, - {"set_snaplen", &lua_cbacks::set_snaplen}, -@@ -132,7 +132,7 @@ const static struct luaL_reg ll_sysdig [ - {NULL,NULL} - }; - --const static struct luaL_reg ll_chisel [] = -+const static struct luaL_Reg ll_chisel [] = - { - {"request_field", &lua_cbacks::request_field}, - {"set_filter", &lua_cbacks::set_filter}, -@@ -144,7 +144,7 @@ const static struct luaL_reg ll_chisel [ - {NULL,NULL} - }; - --const static struct luaL_reg ll_evt [] = -+const static struct luaL_Reg ll_evt [] = - { - {"field", &lua_cbacks::field}, - {"get_num", &lua_cbacks::get_num}, -Index: userspace/libsinsp/lua_parser.cpp -=================================================================== ---- a/userspace/libsinsp/lua_parser.cpp -+++ b/userspace/libsinsp/lua_parser.cpp -@@ -14,7 +14,7 @@ extern "C" { - #include "lauxlib.h" - } - --const static struct luaL_reg ll_filter [] = -+const static struct luaL_Reg ll_filter [] = - { - {"rel_expr", &lua_parser_cbacks::rel_expr}, - {"bool_op", &lua_parser_cbacks::bool_op}, -Index: userspace/libsinsp/lua_parser_api.cpp -=================================================================== ---- a/userspace/libsinsp/lua_parser_api.cpp -+++ b/userspace/libsinsp/lua_parser_api.cpp -@@ -231,7 +231,7 @@ int lua_parser_cbacks::rel_expr(lua_Stat - fprintf(stderr, "%s\n", err.c_str()); - throw sinsp_exception("parser API error"); - } -- int n = luaL_getn(ls, 4); /* get size of table */ -+ int n = (int)lua_objlen(ls, 4); /* get size of table */ - for (i=1; i<=n; i++) - { - lua_rawgeti(ls, 4, i); diff --git a/srcpkgs/sysdig/patches/grpc-abseil.patch b/srcpkgs/sysdig/patches/grpc-abseil.patch deleted file mode 100644 index 641c900b25b..00000000000 --- a/srcpkgs/sysdig/patches/grpc-abseil.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/userspace/libsinsp/CMakeLists.txt -+++ b/userspace/libsinsp/CMakeLists.txt -@@ -31,7 +31,7 @@ - include_directories("${B64_INCLUDE}") - include_directories("${CURSES_INCLUDE_DIR}") - if(NOT MINIMAL_BUILD) -- include_directories("${GRPC_INCLUDE}") -+ include_directories("${GRPC_INCLUDE}" "${GRPC_INCLUDE}/grpc_absl") - include_directories("${PROTOBUF_INCLUDE}") - include_directories("${OPENSSL_INCLUDE_DIR}") - include_directories("${CURL_INCLUDE_DIR}") diff --git a/srcpkgs/sysdig/patches/nostatic.patch b/srcpkgs/sysdig/patches/nostatic.patch index 3f60c22f239..be93bde79bd 100644 --- a/srcpkgs/sysdig/patches/nostatic.patch +++ b/srcpkgs/sysdig/patches/nostatic.patch @@ -1,13 +1,12 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -68,11 +68,6 @@ +--- sysdig-0.28.0/CMakeLists.txt.orig ++++ sysdig-0.28.0/CMakeLists.txt +@@ -73,10 +73,6 @@ set(MINIMAL_BUILD_FLAGS "-DMINIMAL_BUILD") endif() -if(MUSL_OPTIMIZED_BUILD) - set(SYSDIG_MUSL_FLAGS "-static -Os") -endif() -- - if(NOT WIN32) diff --git a/srcpkgs/sysdig/template b/srcpkgs/sysdig/template index 160bd7bbe41..02c943c9f82 100644 --- a/srcpkgs/sysdig/template +++ b/srcpkgs/sysdig/template @@ -1,12 +1,12 @@ # Template file for 'sysdig' pkgname=sysdig -version=0.27.1 -revision=12 +version=0.28.0 +revision=1 build_style=cmake configure_args="-DSYSDIG_VERSION=${version} -DUSE_BUNDLED_DEPS=OFF -DUSE_BUNDLED_B64=ON -DUSE_BUNDLED_JQ=ON -DBUILD_DRIVER=OFF -DLUA_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/luajit-2.1 - -DLUA_LIBRARY=libluajit-5.1.so -DCREATE_TEST_TARGETS=OFF" + -DLUA_LIBRARY=/usr/lib/libluajit-5.1.so -DCREATE_TEST_TARGETS=OFF" make_cmd=make hostmakedepends="wget pkg-config protobuf" makedepends="LuaJIT-devel c-ares-devel elfutils-devel grpc-devel jsoncpp-devel @@ -19,9 +19,9 @@ license="Apache-2.0, MIT, GPL-2.0-only" homepage="http://www.sysdig.org/" changelog="https://github.com/draios/sysdig/releases" distfiles="https://github.com/draios/${pkgname}/archive/${version}.tar.gz" -checksum=b9d05854493d245a7a7e75f77fc654508f720aab5e5e8a3a932bd8eb54e49bda +checksum=817e595d501acf3fe11dc659a154aadbba848dd87ae801f5bf34a42e84979f37 disable_parallel_build=yes -dkms_modules="sysdig ${version}" +dkms_modules="scap 2160111cd088aea9ae2235d3385ecb0b1ab6623c" nocross=yes case "$XBPS_TARGET_MACHINE" in @@ -33,9 +33,10 @@ export CMAKE_GENERATOR="Unix Makefiles" # Avoid excessive warnings spam to the log CXXFLAGS="-Wno-deprecated-declarations" +CXXFLAGS+=" -I/usr/include/grpc_absl" + post_extract() { sed -i 's,"${DIR_ETC}/bash_completion.d",share/bash-completion/completions,g' scripts/CMakeLists.txt - sed -i '1iset(CMAKE_EXE_LINKER_FLAGS "-ltbb -lcurl")' CMakeLists.txt } post_install() {