[packages/falcosecurity-libs] - updated to 0.18.1, added fix for missing includes in gvisor engine (x86_64 only)

qboosh qboosh at pld-linux.org
Sat Sep 28 16:54:38 CEST 2024


commit 63ec75ed63e3b54c2ffd094ad901d524148e1526
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 28 16:57:45 2024 +0200

    - updated to 0.18.1, added fix for missing includes in gvisor engine (x86_64 only)

 falcosecurity-libs-cmake.patch | 10 ++++++
 falcosecurity-libs-link.patch  | 81 ++++++++++++++++++++----------------------
 falcosecurity-libs.spec        | 11 ++++--
 3 files changed, 56 insertions(+), 46 deletions(-)
---
diff --git a/falcosecurity-libs.spec b/falcosecurity-libs.spec
index 0b5001e..83118be 100644
--- a/falcosecurity-libs.spec
+++ b/falcosecurity-libs.spec
@@ -1,4 +1,6 @@
-# TODO: build drivers (like with BUILD_DRIVER=ON, eventually DKMS; only x86_64, aarch64, s390x?)
+# TODO:
+# - build drivers (like with BUILD_DRIVER=ON, eventually DKMS; only x86_64, aarch64, s390x?)
+# - system bs_threadpool
 #
 # Conditional build:
 %bcond_without	apidocs		# API documentation
@@ -7,15 +9,16 @@
 Summary:	Falco foundation libraries
 Summary(pl.UTF-8):	Biblioteki podstawowe Falco
 Name:		falcosecurity-libs
-Version:	0.17.3
+Version:	0.18.1
 Release:	1
 License:	Apache v2.0
 Group:		Libraries
 #Source0Download: https://github.com/falcosecurity/libs/releases
 Source0:	https://github.com/falcosecurity/libs/archive/%{version}/libs-%{version}.tar.gz
-# Source0-md5:	603e6404f2895a1fdcd19f019f254176
+# Source0-md5:	f89553c9aba58f669deabdbe64d1d808
 Patch0:		%{name}-syscalls.patch
 Patch1:		%{name}-link.patch
+Patch2:		%{name}-cmake.patch
 URL:		https://github.com/falcosecurity/libs
 BuildRequires:	c-ares-devel
 BuildRequires:	cmake >= 3.12
@@ -26,6 +29,7 @@ BuildRequires:	grpc-devel
 BuildRequires:	gtest-devel
 BuildRequires:	jq-devel
 BuildRequires:	jsoncpp-devel
+BuildRequires:	libbpf-devel
 BuildRequires:	openssl-devel
 BuildRequires:	protobuf-devel
 BuildRequires:	re2-devel
@@ -80,6 +84,7 @@ Statyczna biblioteka %{name}.
 %setup -q -n libs-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 cp -p /usr/include/uthash.h userspace/libscap/uthash.h
 
diff --git a/falcosecurity-libs-cmake.patch b/falcosecurity-libs-cmake.patch
new file mode 100644
index 0000000..c516da1
--- /dev/null
+++ b/falcosecurity-libs-cmake.patch
@@ -0,0 +1,10 @@
+--- libs-0.18.1/userspace/libscap/engine/gvisor/CMakeLists.txt.orig	2024-09-25 14:54:11.000000000 +0200
++++ libs-0.18.1/userspace/libscap/engine/gvisor/CMakeLists.txt	2024-09-28 16:40:16.775134205 +0200
+@@ -74,6 +74,7 @@ if(BUILD_SHARED_LIBS)
+ 	add_dependencies(scap_engine_gvisor_o uthash)
+ 	add_dependencies(scap scap_engine_gvisor_o)
+ 	target_sources(scap PRIVATE $<TARGET_OBJECTS:scap_engine_gvisor_o>)
++	target_include_directories(scap_engine_gvisor_o PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/userspace)
+ else()
+ 	add_library(
+ 		scap_engine_gvisor ${scap_engine_gvisor_sources} ${scap_engine_gvisor_generated_sources}
diff --git a/falcosecurity-libs-link.patch b/falcosecurity-libs-link.patch
index 86882b4..69511af 100644
--- a/falcosecurity-libs-link.patch
+++ b/falcosecurity-libs-link.patch
@@ -1,49 +1,44 @@
---- libs-0.17.3/userspace/libsinsp/CMakeLists.txt.orig	2024-08-07 10:36:46.000000000 +0200
-+++ libs-0.17.3/userspace/libsinsp/CMakeLists.txt	2024-08-25 12:34:45.385155574 +0200
-@@ -179,7 +179,7 @@ set(SINSP_PKGCONFIG_LIBRARIES
- 
+--- libs-0.18.1/userspace/libsinsp/CMakeLists.txt.orig	2024-09-25 14:54:11.000000000 +0200
++++ libs-0.18.1/userspace/libsinsp/CMakeLists.txt	2024-09-28 16:01:35.515141564 +0200
+@@ -170,7 +170,7 @@ set(SINSP_PKGCONFIG_LIBRARIES scap "${ZL
  if(NOT EMSCRIPTEN)
- 	target_link_libraries(sinsp
--		INTERFACE
-+		PUBLIC
- 			"${CARES_LIB}"
- 		PRIVATE
- 		"${TBB_LIB}"
-@@ -240,7 +240,7 @@ if(NOT WIN32)
- 					PRIVATE
- 						cri_v1alpha2
- 						cri_v1
--					INTERFACE
-+					PUBLIC
- 						"${GRPC_LIBRARIES}"
- 						"${GRPCPP_LIB}"
- 						"${GRPC_LIB}"
-@@ -249,34 +249,33 @@ if(NOT WIN32)
- 						"${CARES_LIB}"
+ 	target_link_libraries(
+ 		sinsp
+-		INTERFACE "${CARES_LIB}"
++		PUBLIC "${CARES_LIB}"
+ 		PRIVATE "${TBB_LIB}"
+ 	)
+ 	list(APPEND SINSP_PKGCONFIG_LIBRARIES "${CARES_LIB}")
+@@ -243,23 +243,21 @@ if(NOT WIN32)
+ 			target_link_libraries(
+ 				sinsp
+ 				PRIVATE cri_v1alpha2 cri_v1
+-				INTERFACE "${GRPC_LIBRARIES}" "${GRPCPP_LIB}" "${GRPC_LIB}" "${GPR_LIB}"
++				PUBLIC "${GRPC_LIBRARIES}" "${GRPCPP_LIB}" "${GRPC_LIB}" "${GPR_LIB}"
+ 						  "${PROTOBUF_LIB}" "${CARES_LIB}"
  			)
- 			list(APPEND SINSP_PKGCONFIG_LIBRARIES
--						"${GRPC_LIBRARIES}"
--						"${GRPCPP_LIB}"
--						"${GRPC_LIB}"
--						"${GPR_LIB}"
-+						"-lgrpc++"
-+						"-lgrpc"
-+						"-lgpr"
- 						"${PROTOBUF_LIB}"
- 						"${CARES_LIB}"
+ 			list(
+ 				APPEND
+ 				SINSP_PKGCONFIG_LIBRARIES
+-				"${GRPC_LIBRARIES}"
+-				"${GRPCPP_LIB}"
+-				"${GRPC_LIB}"
+-				"${GPR_LIB}"
++				"-lgrpc++"
++				"-lgrpc"
++				"-lgpr"
+ 				"${PROTOBUF_LIB}"
+ 				"${CARES_LIB}"
  			)
  
  			if(NOT MUSL_OPTIMIZED_BUILD)
--				target_link_libraries(sinsp INTERFACE rt anl)
--				list(APPEND SINSP_PKGCONFIG_LIBRARIES rt anl)
-+				target_link_libraries(sinsp PUBLIC rt)
-+				list(APPEND SINSP_PKGCONFIG_LIBRARIES rt)
- 			endif()
- 
- 		else()
--			target_link_libraries(sinsp INTERFACE rt)
-+			target_link_libraries(sinsp PUBLIC rt)
- 			list(APPEND SINSP_PKGCONFIG_LIBRARIES rt)
+-				find_library(LIB_ANL anl)
+-				if(LIB_ANL)
++				if(FALSE)
+ 					target_link_libraries(sinsp INTERFACE rt anl)
+ 					list(APPEND SINSP_PKGCONFIG_LIBRARIES rt anl)
+ 				else()
+@@ -274,15 +272,15 @@ if(NOT WIN32)
  		endif() # NOT MINIMAL_BUILD
  	endif() # NOT APPLE
  
@@ -55,14 +50,14 @@
 +	target_link_libraries(sinsp PUBLIC dl pthread)
  	list(APPEND SINSP_PKGCONFIG_LIBRARIES dl pthread)
  
- 	if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ 	if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  		if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
 -			target_link_libraries(sinsp INTERFACE stdc++fs)
 +			target_link_libraries(sinsp PUBLIC stdc++fs)
  			list(APPEND SINSP_PKGCONFIG_LIBRARIES stdc++fs)
  		endif()
  	endif()
-@@ -321,7 +320,7 @@ foreach(sinsp_lib ${SINSP_PKGCONFIG_LIBR
+@@ -326,7 +324,7 @@ foreach(sinsp_lib ${SINSP_PKGCONFIG_LIBR
  		# We have a path. Convert it to -L<dir> + -l<lib>.
  		get_filename_component(sinsp_lib_dir ${sinsp_lib} DIRECTORY)
  		list(APPEND SINSP_PKG_CONFIG_LIBDIRS -L${sinsp_lib_dir})
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/falcosecurity-libs.git/commitdiff/63ec75ed63e3b54c2ffd094ad901d524148e1526



More information about the pld-cvs-commit mailing list