-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'agent-release-9-6-0' into agent-master-3
- Loading branch information
Showing
21 changed files
with
481 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,27 @@ else() | |
set(LUAJIT_INCLUDE "${LUAJIT_SRC}") | ||
if(NOT WIN32) | ||
set(LUAJIT_LIB "${LUAJIT_SRC}/libluajit.a") | ||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le") | ||
ExternalProject_Add(luajit | ||
GIT_REPOSITORY "https://github.com/moonjit/moonjit" | ||
GIT_TAG "2.1.2" | ||
PATCH_COMMAND sed -i "s/luaL_reg/luaL_Reg/g" ${PROJECT_SOURCE_DIR}/userspace/libsinsp/chisel.cpp && sed -i "s/luaL_reg/luaL_Reg/g" ${PROJECT_SOURCE_DIR}/userspace/libsinsp/lua_parser.cpp && sed -i "s/luaL_getn/lua_objlen /g" ${PROJECT_SOURCE_DIR}/userspace/libsinsp/lua_parser_api.cpp | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${LUAJIT_LIB} | ||
INSTALL_COMMAND "") | ||
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "s390x") | ||
ExternalProject_Add(luajit | ||
GIT_REPOSITORY "https://github.com/linux-on-ibm-z/LuaJIT.git" | ||
GIT_TAG "v2.1" | ||
PATCH_COMMAND sed -i "s/luaL_reg/luaL_Reg/g" ${PROJECT_SOURCE_DIR}/userspace/libsinsp/chisel.cpp && sed -i "s/luaL_reg/luaL_Reg/g" ${PROJECT_SOURCE_DIR}/userspace/libsinsp/lua_parser.cpp && sed -i "s/luaL_getn/lua_objlen /g" ${PROJECT_SOURCE_DIR}/userspace/libsinsp/lua_parser_api.cpp | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${LUAJIT_LIB} | ||
INSTALL_COMMAND "") | ||
else() | ||
ExternalProject_Add(luajit | ||
URL "http://download.draios.com/dependencies/LuaJIT-2.0.3.tar.gz" | ||
URL_MD5 "f14e9104be513913810cd59c8c658dc0" | ||
|
@@ -168,6 +189,7 @@ else() | |
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${LUAJIT_LIB} | ||
INSTALL_COMMAND "") | ||
endif() | ||
else() | ||
set(LUAJIT_LIB "${LUAJIT_SRC}/lua51.lib") | ||
ExternalProject_Add(luajit | ||
|
@@ -464,17 +486,31 @@ if(NOT WIN32 AND NOT APPLE) | |
set(PROTOC "${PROTOBUF_SRC}/target/bin/protoc") | ||
set(PROTOBUF_INCLUDE "${PROTOBUF_SRC}/target/include") | ||
set(PROTOBUF_LIB "${PROTOBUF_SRC}/target/lib/libprotobuf.a") | ||
ExternalProject_Add(protobuf | ||
DEPENDS openssl zlib | ||
URL "http://download.sysdig.com/dependencies/protobuf-cpp-3.5.0.tar.gz" | ||
URL_MD5 "e4ba8284a407712168593e79e6555eb2" | ||
# TODO what if using system zlib? | ||
CONFIGURE_COMMAND /usr/bin/env CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure --with-zlib --prefix=${PROTOBUF_SRC}/target | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${PROTOC} ${PROTOBUF_INCLUDE} ${PROTOBUF_LIB} | ||
# TODO s390x support | ||
INSTALL_COMMAND make install) | ||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "s390x") | ||
ExternalProject_Add(protobuf | ||
DEPENDS openssl zlib | ||
URL "http://download.sysdig.com/dependencies/protobuf-cpp-3.5.0.tar.gz" | ||
URL_MD5 "e4ba8284a407712168593e79e6555eb2" | ||
PATCH_COMMAND wget http://download.sysdig.com/dependencies/protobuf-3.5.0-s390x.patch && patch -p1 -i protobuf-3.5.0-s390x.patch | ||
# TODO what if using system zlib? | ||
CONFIGURE_COMMAND /usr/bin/env CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure --with-zlib --prefix=${PROTOBUF_SRC}/target | ||
COMMAND aclocal && automake | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${PROTOC} ${PROTOBUF_INCLUDE} ${PROTOBUF_LIB} | ||
INSTALL_COMMAND make install) | ||
else() | ||
ExternalProject_Add(protobuf | ||
DEPENDS openssl zlib | ||
URL "http://download.sysdig.com/dependencies/protobuf-cpp-3.5.0.tar.gz" | ||
URL_MD5 "e4ba8284a407712168593e79e6555eb2" | ||
# TODO what if using system zlib? | ||
CONFIGURE_COMMAND /usr/bin/env CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure --with-zlib --prefix=${PROTOBUF_SRC}/target | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${PROTOC} ${PROTOBUF_INCLUDE} ${PROTOBUF_LIB} | ||
INSTALL_COMMAND make install) | ||
endif() | ||
endif() | ||
|
||
option(USE_BUNDLED_GRPC "Enable building of the bundled grpc" ${USE_BUNDLED_DEPS}) | ||
|
@@ -581,7 +617,7 @@ if(CREATE_TEST_TARGETS AND NOT WIN32) | |
# This is preferred vs using ctest's add_test because it will build | ||
# the code and output to stdout. | ||
add_custom_target(run-unit-tests | ||
COMMAND $(MAKE) run-unit-test-libsinsp | ||
COMMAND ${CMAKE_MAKE_PROGRAM} run-unit-test-libsinsp | ||
) | ||
endif() | ||
|
||
|
@@ -598,12 +634,12 @@ set(CPACK_GENERATOR DEB RPM TGZ) | |
|
||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Sysdig <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "utils") | ||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.sysdig.org") | ||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.sysdig.com") | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "dkms (>= 2.1.0.0)") | ||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/scripts/debian/postinst;${CMAKE_BINARY_DIR}/scripts/debian/prerm") | ||
|
||
set(CPACK_RPM_PACKAGE_LICENSE "Apache v2.0") | ||
set(CPACK_RPM_PACKAGE_URL "http://www.sysdig.org") | ||
set(CPACK_RPM_PACKAGE_URL "http://www.sysdig.com") | ||
set(CPACK_RPM_PACKAGE_REQUIRES "dkms, gcc, make, kernel-devel, perl") | ||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/postinstall") | ||
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/scripts/rpm/preuninstall") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.