aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-01-02 17:59:20 -0800
committerKhem Raj <raj.khem@gmail.com>2019-07-21 22:54:31 -0700
commit657d0c5608893b654717003a7e20893a9ab4956a (patch)
tree670ac7a12badea6181c0ba1bf41d215e5c393412
parent0c0bffde740fb1e1b16ccf1c55dc034deda1f84b (diff)
downloadmeta-openembedded-contrib-yoe/mut.tar.gz
meta-openembedded-contrib-yoe/mut.tar.bz2
meta-openembedded-contrib-yoe/mut.zip
sysdig: Upgrade to 0.26.1+yoe/mut
* License changed to Apache-2.0 upstream as well [1] * Forward port patches to apply on 0.26 * Just build libb64 from internal modules everything else should be provided by OE recipes * Disable luajit on aarch64 and mips64 since luajit on these arches is not available, fall back to liblua Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch37
-rw-r--r--meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch25
-rw-r--r--meta-oe/recipes-extended/sysdig/sysdig_git.bb40
3 files changed, 52 insertions, 50 deletions
diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch
index 7d3f8a19d7..6ba436911a 100644
--- a/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch
+++ b/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch
@@ -9,42 +9,41 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
userspace/libsinsp/utils.h | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
-diff --git a/userspace/libsinsp/utils.cpp b/userspace/libsinsp/utils.cpp
-index 8f23f9c..c496a57 100644
--- a/userspace/libsinsp/utils.cpp
+++ b/userspace/libsinsp/utils.cpp
-@@ -21,7 +21,9 @@ along with sysdig. If not, see <http://www.gnu.org/licenses/>.
+@@ -22,7 +22,7 @@ limitations under the License.
#include <limits.h>
#include <stdlib.h>
#include <sys/time.h>
-+#ifdef __GLIBC__
+-#ifndef CYGWING_AGENT
++#if !defined(CYGWING_AGENT) || defined(__GLIBC__)
#include <execinfo.h>
-+#endif
+ #endif
#include <unistd.h>
- #include <sys/time.h>
- #include <netdb.h>
-@@ -741,7 +743,7 @@ uint64_t sinsp_utils::get_current_time_ns()
- return tv.tv_sec * (uint64_t) 1000000000 + tv.tv_usec * 1000;
- }
+@@ -772,6 +772,7 @@ bool sinsp_utils::glob_match(const char
--#ifndef _WIN32
-+#if defined(_WIN32) && defined(__GLIBC__)
+ #ifndef CYGWING_AGENT
+ #ifndef _WIN32
++#ifdef __GLIBC__
void sinsp_utils::bt(void)
{
static const char start[] = "BACKTRACE ------------";
-diff --git a/userspace/libsinsp/utils.h b/userspace/libsinsp/utils.h
-index 600d00b..4ab4650 100644
+@@ -793,6 +794,7 @@ void sinsp_utils::bt(void)
+
+ free(bt_syms);
+ }
++#endif // Glibc
+ #endif // _WIN32
+ #endif // CYGWING_AGENT
+
--- a/userspace/libsinsp/utils.h
+++ b/userspace/libsinsp/utils.h
-@@ -79,7 +79,7 @@ public:
+@@ -104,7 +104,7 @@ public:
- static uint64_t get_current_time_ns();
+ static bool glob_match(const char *pattern, const char *string);
-#ifndef _WIN32
+#if not defined(_WIN32) && defined(__GLIBC__)
//
// Print the call stack
//
---
-2.6.2
-
diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch
index 8fec0ca59f..1c71b91fcc 100644
--- a/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch
+++ b/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch
@@ -8,38 +8,36 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
userspace/libsinsp/chisel.cpp | 40 +++++++++++++++++++++++++++++-----------
1 file changed, 29 insertions(+), 11 deletions(-)
-diff --git a/userspace/libsinsp/chisel.cpp b/userspace/libsinsp/chisel.cpp
-index 3cfbd8d..2db9348 100644
--- a/userspace/libsinsp/chisel.cpp
+++ b/userspace/libsinsp/chisel.cpp
-@@ -94,7 +94,7 @@ void lua_stackdump(lua_State *L)
+@@ -97,7 +97,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 [] =
+const static struct luaL_Reg ll_sysdig [] =
{
{"set_filter", &lua_cbacks::set_global_filter},
{"set_snaplen", &lua_cbacks::set_snaplen},
-@@ -120,7 +120,7 @@ const static struct luaL_reg ll_sysdig [] =
+@@ -133,7 +133,7 @@ const static struct luaL_reg ll_sysdig [
{NULL,NULL}
};
--const static struct luaL_reg ll_chisel [] =
+-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},
-@@ -131,7 +131,7 @@ const static struct luaL_reg ll_chisel [] =
+@@ -145,7 +145,7 @@ const static struct luaL_reg ll_chisel [
{NULL,NULL}
};
--const static struct luaL_reg ll_evt [] =
+-const static struct luaL_reg ll_evt [] =
+const static struct luaL_Reg ll_evt [] =
{
{"field", &lua_cbacks::field},
{"get_num", &lua_cbacks::get_num},
-@@ -853,10 +853,28 @@ bool sinsp_chisel::parse_view_info(lua_State *ls, OUT chisel_desc* cd)
+@@ -959,10 +959,28 @@ bool sinsp_chisel::parse_view_info(lua_S
#ifdef HAS_LUA_CHISELS
@@ -69,7 +67,7 @@ index 3cfbd8d..2db9348 100644
if(ls == NULL)
{
return false;
-@@ -867,9 +885,9 @@ bool sinsp_chisel::init_lua_chisel(chisel_desc &cd, string const &fpath)
+@@ -973,9 +991,9 @@ bool sinsp_chisel::init_lua_chisel(chise
//
// Load our own lua libs
//
@@ -82,13 +80,13 @@ index 3cfbd8d..2db9348 100644
//
// Add our chisel paths to package.path
-@@ -1111,16 +1129,16 @@ void sinsp_chisel::load(string cmdstr)
+@@ -1203,16 +1221,16 @@ void sinsp_chisel::load(string cmdstr)
//
// Open the script
//
- m_ls = lua_open();
+ m_ls = luaL_newstate();
-
+
luaL_openlibs(m_ls);
//
@@ -103,6 +101,3 @@ index 3cfbd8d..2db9348 100644
//
// Add our chisel paths to package.path
---
-2.6.2
-
diff --git a/meta-oe/recipes-extended/sysdig/sysdig_git.bb b/meta-oe/recipes-extended/sysdig/sysdig_git.bb
index 4f58281f9f..df489c7408 100644
--- a/meta-oe/recipes-extended/sysdig/sysdig_git.bb
+++ b/meta-oe/recipes-extended/sysdig/sysdig_git.bb
@@ -3,32 +3,41 @@ DESCRIPTION = "Sysdig is open source, system-level exploration: capture \
system state and activity from a running Linux instance, then save, \
filter and analyze."
HOMEPAGE = "http://www.sysdig.org/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f8fee3d59797546cffab04f3b88b2d44"
inherit cmake pkgconfig
OECMAKE_GENERATOR = "Unix Makefiles"
+JIT ?= "jit"
+JIT_mipsarchn32 = ""
+JIT_mipsarchn64 = ""
+JIT_aarch64 = ""
-DEPENDS = "luajit zlib ncurses"
+DEPENDS = "lua${JIT} zlib ncurses jsoncpp tbb jq openssl elfutils protobuf"
RDEPENDS_${PN} = "bash"
-SRC_URI = "git://github.com/draios/sysdig.git;branch=master \
+SRC_URI = "git://github.com/draios/sysdig.git;branch=dev \
file://0001-libsinsp-Port-to-build-with-lua-5.2.patch \
file://0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch \
"
-SRCREV = "85d16f33a82a17f87ccdbc088749271c71d87013"
-PV = "0.1.102+git${SRCPV}"
+# v0.26.1
+SRCREV = "baf311c42c99e4ab06f7c436aad90b8fde4a2963"
+PV = "0.26.1+git${SRCPV}"
S = "${WORKDIR}/git"
-DIR_ETC="/etc"
-EXTRA_OECMAKE = ' -DUSE_BUNDLED_LUAJIT="OFF" \
- -DUSE_BUNDLED_ZLIB="OFF" \
- -DBUILD_DRIVER="OFF" \
- -DUSE_BUNDLED_NCURSES="OFF" \
- -DDIR_ETC="${DIR_ETC}" \
- '
+EXTRA_OECMAKE = "\
+ -DBUILD_DRIVER=OFF \
+ -DUSE_BUNDLED_DEPS=ON \
+ -DUSE_BUNDLED_LUAJIT=OFF \
+ -DUSE_BUNDLED_B64=ON \
+ -DUSE_BUNDLED_CARES=ON \
+ -DUSE_BUNDLED_PROTOBUF=ON \
+ -DUSE_BUNDLED_ZLIB=ON \
+ -DUSE_BUNDLED_GRPC=ON \
+ -DDIR_ETC=${sysconfdir} \
+"
FILES_${PN} += " \
${DIR_ETC}/* \
@@ -36,6 +45,5 @@ FILES_${PN} += " \
${prefix}/src/* \
"
-# luajit not supported on Aarch64
-COMPATIBLE_HOST = "^(?!aarch64).*"
-
+SECURITY_CFLAGS = ""
+SECURITY_LDFLAGS = ""