Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Francis Laniel <flaniel@linux.microsoft.com>,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: [Buildroot] [PATCH 6/9] package/falcosecurity-libs: convert to a virtual package
Date: Fri, 30 Oct 2026 14:59:13 +0100	[thread overview]
Message-ID: <20261030135916.3599219-6-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20261030135916.3599219-1-angelo.compagnucci@gmail.com>

Since version 0.11.0, the falcosecurity-libs userspace libraries only
support 64-bit architectures, as they get the system call numbers from
tables which only exist for them.

In order to provide a different version for 32-bit architectures,
convert falcosecurity-libs into a virtual package. For now, it is only
provided by falcosecurity-libs-latest, which is the former
falcosecurity-libs package, unchanged.

The license, the driver name, the kernel module make options and the
Linux kernel configuration fixups, which will be shared by the
providers, stay in the virtual package.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
 package/falcosecurity-libs/Config.in          | 16 +++--
 ...-pass-ARCH-and-CROSS_COMPILE-to-the-.patch |  0
 ...ver-replace-removed-task_euid-helper.patch |  0
 .../falcosecurity-libs-latest/Config.in       |  9 +++
 .../falcosecurity-libs-latest.hash}           |  0
 .../falcosecurity-libs-latest.mk              | 67 +++++++++++++++++++
 .../falcosecurity-libs/falcosecurity-libs.mk  | 59 ++--------------
 7 files changed, 91 insertions(+), 60 deletions(-)
 rename package/falcosecurity-libs/{ => falcosecurity-libs-latest}/0001-driver-configure-pass-ARCH-and-CROSS_COMPILE-to-the-.patch (100%)
 rename package/falcosecurity-libs/{ => falcosecurity-libs-latest}/0002-fix-driver-replace-removed-task_euid-helper.patch (100%)
 create mode 100644 package/falcosecurity-libs/falcosecurity-libs-latest/Config.in
 rename package/falcosecurity-libs/{falcosecurity-libs.hash => falcosecurity-libs-latest/falcosecurity-libs-latest.hash} (100%)
 create mode 100644 package/falcosecurity-libs/falcosecurity-libs-latest/falcosecurity-libs-latest.mk

diff --git a/package/falcosecurity-libs/Config.in b/package/falcosecurity-libs/Config.in
index c73b92d78f..495dd2b8ca 100644
--- a/package/falcosecurity-libs/Config.in
+++ b/package/falcosecurity-libs/Config.in
@@ -19,14 +19,18 @@ config BR2_PACKAGE_FALCOSECURITY_LIBS
 	depends on !BR2_STATIC_LIBS # re2, tbb
 	depends on !BR2_TOOLCHAIN_USES_UCLIBC # tbb
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # tbb
-	select BR2_PACKAGE_JSONCPP
-	select BR2_PACKAGE_RE2
-	select BR2_PACKAGE_TBB
-	select BR2_PACKAGE_UTHASH
-	select BR2_PACKAGE_VALIJSON
-	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_FALCOSECURITY_LIBS_LATEST
 	help
 	  falcosecurity/libs provides libsinsp, libscap, the kernel
 	  module driver and the eBPF driver sources.
 
 	  https://github.com/falcosecurity/libs
+
+config BR2_PACKAGE_HAS_FALCOSECURITY_LIBS
+	bool
+
+config BR2_PACKAGE_PROVIDES_FALCOSECURITY_LIBS
+	string
+	default "falcosecurity-libs-latest"
+
+source "package/falcosecurity-libs/falcosecurity-libs-latest/Config.in"
diff --git a/package/falcosecurity-libs/0001-driver-configure-pass-ARCH-and-CROSS_COMPILE-to-the-.patch b/package/falcosecurity-libs/falcosecurity-libs-latest/0001-driver-configure-pass-ARCH-and-CROSS_COMPILE-to-the-.patch
similarity index 100%
rename from package/falcosecurity-libs/0001-driver-configure-pass-ARCH-and-CROSS_COMPILE-to-the-.patch
rename to package/falcosecurity-libs/falcosecurity-libs-latest/0001-driver-configure-pass-ARCH-and-CROSS_COMPILE-to-the-.patch
diff --git a/package/falcosecurity-libs/0002-fix-driver-replace-removed-task_euid-helper.patch b/package/falcosecurity-libs/falcosecurity-libs-latest/0002-fix-driver-replace-removed-task_euid-helper.patch
similarity index 100%
rename from package/falcosecurity-libs/0002-fix-driver-replace-removed-task_euid-helper.patch
rename to package/falcosecurity-libs/falcosecurity-libs-latest/0002-fix-driver-replace-removed-task_euid-helper.patch
diff --git a/package/falcosecurity-libs/falcosecurity-libs-latest/Config.in b/package/falcosecurity-libs/falcosecurity-libs-latest/Config.in
new file mode 100644
index 0000000000..2115e9a928
--- /dev/null
+++ b/package/falcosecurity-libs/falcosecurity-libs-latest/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_FALCOSECURITY_LIBS_LATEST
+	bool
+	select BR2_PACKAGE_HAS_FALCOSECURITY_LIBS
+	select BR2_PACKAGE_JSONCPP
+	select BR2_PACKAGE_RE2
+	select BR2_PACKAGE_TBB
+	select BR2_PACKAGE_UTHASH
+	select BR2_PACKAGE_VALIJSON
+	select BR2_PACKAGE_ZLIB
diff --git a/package/falcosecurity-libs/falcosecurity-libs.hash b/package/falcosecurity-libs/falcosecurity-libs-latest/falcosecurity-libs-latest.hash
similarity index 100%
rename from package/falcosecurity-libs/falcosecurity-libs.hash
rename to package/falcosecurity-libs/falcosecurity-libs-latest/falcosecurity-libs-latest.hash
diff --git a/package/falcosecurity-libs/falcosecurity-libs-latest/falcosecurity-libs-latest.mk b/package/falcosecurity-libs/falcosecurity-libs-latest/falcosecurity-libs-latest.mk
new file mode 100644
index 0000000000..6e078e080a
--- /dev/null
+++ b/package/falcosecurity-libs/falcosecurity-libs-latest/falcosecurity-libs-latest.mk
@@ -0,0 +1,67 @@
+################################################################################
+#
+# falcosecurity-libs-latest
+#
+################################################################################
+
+FALCOSECURITY_LIBS_LATEST_VERSION = 0.21.0
+FALCOSECURITY_LIBS_LATEST_SITE = $(call github,falcosecurity,libs,$(FALCOSECURITY_LIBS_LATEST_VERSION))
+FALCOSECURITY_LIBS_LATEST_SOURCE = falcosecurity-libs-$(FALCOSECURITY_LIBS_LATEST_VERSION).tar.gz
+FALCOSECURITY_LIBS_LATEST_DL_SUBDIR = falcosecurity-libs
+FALCOSECURITY_LIBS_LATEST_LICENSE = $(FALCOSECURITY_LIBS_LICENSE)
+FALCOSECURITY_LIBS_LATEST_LICENSE_FILES = $(FALCOSECURITY_LIBS_LICENSE_FILES)
+FALCOSECURITY_LIBS_LATEST_PROVIDES = falcosecurity-libs
+FALCOSECURITY_LIBS_LATEST_INSTALL_STAGING = YES
+FALCOSECURITY_LIBS_LATEST_SUPPORTS_IN_SOURCE_BUILD = NO
+
+FALCOSECURITY_LIBS_LATEST_DEPENDENCIES = \
+	jsoncpp \
+	re2 \
+	tbb \
+	uthash \
+	valijson \
+	zlib
+
+# The version can't be computed from git, as we build from a tarball.
+FALCOSECURITY_LIBS_LATEST_CONF_OPTS = \
+	-DUSE_BUNDLED_DEPS=OFF \
+	-DFALCOSECURITY_LIBS_VERSION=$(FALCOSECURITY_LIBS_LATEST_VERSION) \
+	-DCREATE_TEST_TARGETS=OFF \
+	-DBUILD_LIBSCAP_EXAMPLES=OFF \
+	-DBUILD_LIBSINSP_EXAMPLES=OFF
+
+# Only the kernel module driver is built. To keep the build small, the
+# eBPF engine, which needs elfutils, and the gVisor engine, only
+# available on x86_64, which needs protobuf, are disabled: they can be
+# enabled in a following patch. The modern eBPF probe would also need
+# clang and bpftool to be built.
+FALCOSECURITY_LIBS_LATEST_CONF_OPTS += \
+	-DENABLE_ENGINE_BPF=OFF \
+	-DBUILD_LIBSCAP_MODERN_BPF=OFF \
+	-DBUILD_LIBSCAP_GVISOR=OFF
+
+# The driver CMakeLists.txt only prepares the kernel module sources and
+# Makefile in the driver/src build directory, which are then built with
+# the kernel-module infrastructure.
+FALCOSECURITY_LIBS_LATEST_CONF_OPTS += \
+	-DUSE_BUNDLED_DRIVER=ON \
+	-DBUILD_DRIVER=OFF \
+	-DENABLE_DKMS=OFF \
+	-DDRIVER_VERSION=$(FALCOSECURITY_LIBS_LATEST_VERSION) \
+	-DDRIVER_NAME=$(FALCOSECURITY_LIBS_DRIVER_NAME)
+
+# The pkg-config files define the prefix relative to their location and
+# contain the absolute paths of the dependencies in staging, which
+# pkg-config would all prefix with the sysroot again.
+define FALCOSECURITY_LIBS_LATEST_FIX_PKGCONFIG
+	$(SED) 's%^prefix=.*%prefix=/usr%;s%$(STAGING_DIR)%%g' \
+		$(STAGING_DIR)/usr/lib/pkgconfig/libscap.pc \
+		$(STAGING_DIR)/usr/lib/pkgconfig/libsinsp.pc
+endef
+FALCOSECURITY_LIBS_LATEST_POST_INSTALL_STAGING_HOOKS += FALCOSECURITY_LIBS_LATEST_FIX_PKGCONFIG
+
+FALCOSECURITY_LIBS_LATEST_MODULE_SUBDIRS = buildroot-build/driver/src
+FALCOSECURITY_LIBS_LATEST_MODULE_MAKE_OPTS = $(FALCOSECURITY_LIBS_MODULE_MAKE_OPTS)
+
+$(eval $(kernel-module))
+$(eval $(cmake-package))
diff --git a/package/falcosecurity-libs/falcosecurity-libs.mk b/package/falcosecurity-libs/falcosecurity-libs.mk
index 28de5c0c9d..0437648383 100644
--- a/package/falcosecurity-libs/falcosecurity-libs.mk
+++ b/package/falcosecurity-libs/falcosecurity-libs.mk
@@ -4,62 +4,12 @@
 #
 ################################################################################
 
-FALCOSECURITY_LIBS_VERSION = 0.21.0
-FALCOSECURITY_LIBS_SITE = $(call github,falcosecurity,libs,$(FALCOSECURITY_LIBS_VERSION))
+# falcosecurity-libs is provided by falcosecurity-libs-latest.
+
 FALCOSECURITY_LIBS_LICENSE = Apache-2.0 (userspace), MIT or GPL-2.0 (driver)
 FALCOSECURITY_LIBS_LICENSE_FILES = COPYING driver/MIT.txt driver/GPL2.txt
-FALCOSECURITY_LIBS_INSTALL_STAGING = YES
-FALCOSECURITY_LIBS_SUPPORTS_IN_SOURCE_BUILD = NO
-
-FALCOSECURITY_LIBS_DEPENDENCIES = \
-	jsoncpp \
-	re2 \
-	tbb \
-	uthash \
-	valijson \
-	zlib
 
 FALCOSECURITY_LIBS_DRIVER_NAME = scap
-
-# The version can't be computed from git, as we build from a tarball.
-FALCOSECURITY_LIBS_CONF_OPTS = \
-	-DUSE_BUNDLED_DEPS=OFF \
-	-DFALCOSECURITY_LIBS_VERSION=$(FALCOSECURITY_LIBS_VERSION) \
-	-DCREATE_TEST_TARGETS=OFF \
-	-DBUILD_LIBSCAP_EXAMPLES=OFF \
-	-DBUILD_LIBSINSP_EXAMPLES=OFF
-
-# Only the kernel module driver is built. To keep the build small, the
-# eBPF engine, which needs elfutils, and the gVisor engine, only
-# available on x86_64, which needs protobuf, are disabled: they can be
-# enabled in a following patch. The modern eBPF probe would also need
-# clang and bpftool to be built.
-FALCOSECURITY_LIBS_CONF_OPTS += \
-	-DENABLE_ENGINE_BPF=OFF \
-	-DBUILD_LIBSCAP_MODERN_BPF=OFF \
-	-DBUILD_LIBSCAP_GVISOR=OFF
-
-# The driver CMakeLists.txt only prepares the kernel module sources and
-# Makefile in the driver/src build directory, which are then built with
-# the kernel-module infrastructure.
-FALCOSECURITY_LIBS_CONF_OPTS += \
-	-DUSE_BUNDLED_DRIVER=ON \
-	-DBUILD_DRIVER=OFF \
-	-DENABLE_DKMS=OFF \
-	-DDRIVER_VERSION=$(FALCOSECURITY_LIBS_VERSION) \
-	-DDRIVER_NAME=$(FALCOSECURITY_LIBS_DRIVER_NAME)
-
-# The pkg-config files define the prefix relative to their location and
-# contain the absolute paths of the dependencies in staging, which
-# pkg-config would all prefix with the sysroot again.
-define FALCOSECURITY_LIBS_FIX_PKGCONFIG
-	$(SED) 's%^prefix=.*%prefix=/usr%;s%$(STAGING_DIR)%%g' \
-		$(STAGING_DIR)/usr/lib/pkgconfig/libscap.pc \
-		$(STAGING_DIR)/usr/lib/pkgconfig/libsinsp.pc
-endef
-FALCOSECURITY_LIBS_POST_INSTALL_STAGING_HOOKS += FALCOSECURITY_LIBS_FIX_PKGCONFIG
-
-FALCOSECURITY_LIBS_MODULE_SUBDIRS = buildroot-build/driver/src
 FALCOSECURITY_LIBS_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR)
 
 # falcosecurity-libs module needs these two kernel options to be set:
@@ -76,5 +26,6 @@ define FALCOSECURITY_LIBS_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_IPV6)
 endef
 
-$(eval $(kernel-module))
-$(eval $(cmake-package))
+$(eval $(virtual-package))
+
+include $(sort $(wildcard package/falcosecurity-libs/*/*.mk))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-10-30 13:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 13:59 [Buildroot] [PATCH 1/9] package/uthash: new package Angelo Compagnucci
2026-10-30 13:59 ` [Buildroot] [PATCH 2/9] package/webrtc-audio-processing: fix build with musl Angelo Compagnucci
2026-10-30 13:59 ` [Buildroot] [PATCH 3/9] package/libabseil-cpp: allow building " Angelo Compagnucci
2026-10-30 13:59 ` [Buildroot] [PATCH 4/9] package/falcosecurity-libs: bump to version 0.21.0 Angelo Compagnucci
2026-10-30 13:59 ` [Buildroot] [PATCH 5/9] package/sysdig: bump to version 0.41.4 Angelo Compagnucci
2026-10-30 13:59 ` Angelo Compagnucci [this message]
2026-10-30 13:59 ` [Buildroot] [PATCH 7/9] package/sysdig: convert to a virtual package Angelo Compagnucci
2026-10-30 13:59 ` [Buildroot] [PATCH 8/9] package/falcosecurity-libs: add falcosecurity-libs-legacy Angelo Compagnucci
2026-10-30 13:59 ` [Buildroot] [PATCH 9/9] package/sysdig: add sysdig-legacy Angelo Compagnucci
  -- strict thread matches above, loose matches on Subject: below --
2026-10-30 15:24 [Buildroot] [PATCH 1/9] package/uthash: new package Angelo Compagnucci
2026-10-30 15:24 ` [Buildroot] [PATCH 6/9] package/falcosecurity-libs: convert to a virtual package Angelo Compagnucci

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030135916.3599219-6-angelo.compagnucci@gmail.com \
    --to=angelo.compagnucci@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=flaniel@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox