diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-extended/sysdig | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/sysdig')
3 files changed, 199 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch b/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch new file mode 100644 index 000000000..7d3f8a19d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch @@ -0,0 +1,50 @@ +From 290703a5d21f34ea5ec23efc815a9f4df241e7e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 23 Oct 2015 00:33:32 -0700 +Subject: [PATCH] Fix build with musl, backtrace() APIs are glibc specific + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + userspace/libsinsp/utils.cpp | 4 +++- + 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/>. + #include <limits.h> + #include <stdlib.h> + #include <sys/time.h> ++#ifdef __GLIBC__ + #include <execinfo.h> ++#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; + } + +-#ifndef _WIN32 ++#if defined(_WIN32) && defined(__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 +--- a/userspace/libsinsp/utils.h ++++ b/userspace/libsinsp/utils.h +@@ -79,7 +79,7 @@ public: + + static uint64_t get_current_time_ns(); + +-#ifndef _WIN32 ++#if not defined(_WIN32) && defined(__GLIBC__) + // + // Print the call stack + // +-- +2.6.2 + diff --git a/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch b/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch new file mode 100644 index 000000000..8fec0ca59 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig/0001-libsinsp-Port-to-build-with-lua-5.2.patch @@ -0,0 +1,108 @@ +From c2782a6ca968190e221c25b0890600ba8cd43798 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 23 Oct 2015 00:23:15 -0700 +Subject: [PATCH] libsinsp: Port to build with lua >= 5.2 + +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) + // 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}, +@@ -120,7 +120,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}, +@@ -131,7 +131,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}, +@@ -853,10 +853,28 @@ bool sinsp_chisel::parse_view_info(lua_State *ls, OUT chisel_desc* cd) + + + #ifdef HAS_LUA_CHISELS ++static void chisel_lua_registerlib(lua_State *L, const char *libname, ++ const luaL_Reg *l, int ind) ++{ ++#if LUA_VERSION_NUM >= 502 ++ if (libname) ++ { ++ lua_newtable(L); ++ luaL_setfuncs(L, l, ind); ++ lua_pushvalue(L, -1); ++ lua_setglobal(L, libname); ++ } ++ else ++ luaL_setfuncs(L, l, ind); ++#else ++ luaL_register(L, libname, l); ++#endif ++} ++ + // Initializes a lua chisel + bool sinsp_chisel::init_lua_chisel(chisel_desc &cd, string const &fpath) + { +- lua_State* ls = lua_open(); ++ lua_State* ls = luaL_newstate(); + if(ls == NULL) + { + return false; +@@ -867,9 +885,9 @@ bool sinsp_chisel::init_lua_chisel(chisel_desc &cd, string const &fpath) + // + // Load our own lua libs + // +- luaL_openlib(ls, "sysdig", ll_sysdig, 0); +- luaL_openlib(ls, "chisel", ll_chisel, 0); +- luaL_openlib(ls, "evt", ll_evt, 0); ++ chisel_lua_registerlib(ls, "sysdig", ll_sysdig, 0); ++ chisel_lua_registerlib(ls, "chisel", ll_chisel, 0); ++ chisel_lua_registerlib(ls, "evt", ll_evt, 0); + + // + // Add our chisel paths to package.path +@@ -1111,16 +1129,16 @@ void sinsp_chisel::load(string cmdstr) + // + // Open the script + // +- m_ls = lua_open(); ++ m_ls = luaL_newstate(); + + luaL_openlibs(m_ls); + + // + // Load our own lua libs + // +- luaL_openlib(m_ls, "sysdig", ll_sysdig, 0); +- luaL_openlib(m_ls, "chisel", ll_chisel, 0); +- luaL_openlib(m_ls, "evt", ll_evt, 0); ++ chisel_lua_registerlib(m_ls, "sysdig", ll_sysdig, 0); ++ chisel_lua_registerlib(m_ls, "chisel", ll_chisel, 0); ++ chisel_lua_registerlib(m_ls, "evt", ll_evt, 0); + + // + // Add our chisel paths to package.path +-- +2.6.2 + diff --git a/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb b/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb new file mode 100644 index 000000000..4f58281f9 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/sysdig/sysdig_git.bb @@ -0,0 +1,41 @@ +SUMMARY = "A New System Troubleshooting Tool Built for the Way You Work" +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" + +inherit cmake pkgconfig + +OECMAKE_GENERATOR = "Unix Makefiles" + +DEPENDS = "luajit zlib ncurses" +RDEPENDS_${PN} = "bash" + +SRC_URI = "git://github.com/draios/sysdig.git;branch=master \ + 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}" + +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}" \ + ' + +FILES_${PN} += " \ + ${DIR_ETC}/* \ + ${datadir}/zsh/* \ + ${prefix}/src/* \ +" + +# luajit not supported on Aarch64 +COMPATIBLE_HOST = "^(?!aarch64).*" + |