All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Laniel <flaniel@linux.microsoft.com>
To: buildroot@buildroot.org, Arnout Vandecappelle <arnout@mind.be>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	Samuel Martin <s.martin49@gmail.com>,
	"Yann E . MORIN" <yann.morin.1998@free.fr>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [RFC PATCH v4 2/2] package/sysdig: bump to 0.29.1
Date: Tue, 03 May 2022 15:15:13 +0100	[thread overview]
Message-ID: <2627901.mvXUDI8C0e@pwmachine> (raw)
In-Reply-To: <e15d95db-043a-aa7f-baee-78ade04669f2@mind.be>

Hi!

Le samedi 30 avril 2022, 19:07:41 BST Arnout Vandecappelle a écrit :
> On 25/04/2022 18:43, Francis Laniel wrote:
> > sysdig 0.27.1 cannot be cross-compiled to, e.g., aarch64 because it uses
> > open() syscall [1].
> > This patch bumps its version to enable cross-compilation.
> > 
> > By doing so, we can remove the previous patches.
> > But this commit introduces new patches.
> > Indeed, libsinsp (lib system inspection), libscap (lib system capture) and
> > the kernel module were moved to falcosecurity/libs.
> > Sadly, it is not possible to compile sysdig with pre-compiled libs (like
> > we do in buildroot).
> > So, this contribution introduces a new patch to build sysdig with already
> > built falcosecurity/libs.
> > 
> > [1] https://marc.info/?l=buildroot&m=164951521629400
> > 
> > Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
> 
> [snip]
> 
> > diff --git a/package/sysdig/Config.in b/package/sysdig/Config.in
> > index c124054105..392d858ac6 100644
> > --- a/package/sysdig/Config.in
> > +++ b/package/sysdig/Config.in
> > @@ -2,25 +2,17 @@ config BR2_PACKAGE_SYSDIG
> > 
> >   	bool "sysdig"
> >   	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
> >   	depends on BR2_LINUX_KERNEL
> > 
> > -	depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb
> > +	depends on BR2_INSTALL_LIBSTDCPP # jsoncpp, protobuf, tbb, yaml-cpp
> > 
> >   	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf
> >   	depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, jq, protobuf, tbb
> 
>   This is now an indirect dependency. We normally show that as
> ... # falcosecurity-libs -> elfutils, jq, protobuf, tbb
> but that would get really long, so I changed all of them to just mention
> falcosecurity-libs.
> 
> >   	depends on !BR2_STATIC_LIBS # elfutils, protobuf, tbb
> >   	depends on BR2_USE_WCHAR # elfutils
> 
>   This one is not present in falcosecurity-libs (anyway implied by glibc),
> so I removed it.
> 
> >   	depends on BR2_TOOLCHAIN_USES_GLIBC # elfutils
> >   	depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
> > 
> > -	select BR2_PACKAGE_C_ARES
> > -	select BR2_PACKAGE_ELFUTILS
> > -	select BR2_PACKAGE_GRPC
> > -	select BR2_PACKAGE_JQ
> > -	select BR2_PACKAGE_JSONCPP
> > -	select BR2_PACKAGE_LIBB64
> > -	select BR2_PACKAGE_LIBCURL
> > +	select BR2_PACKAGE_FALCOSECURITY_LIBS
> > 
> >   	select BR2_PACKAGE_NCURSES
> > 
> > -	select BR2_PACKAGE_OPENSSL
> > -	select BR2_PACKAGE_PROTOBUF
> > -	select BR2_PACKAGE_TBB
> > -	select BR2_PACKAGE_ZLIB
> > +	select BR2_PACKAGE_JSON_FOR_MODERN_CPP
> > +	select BR2_PACKAGE_YAML_CPP
> > 
> >   	help
> >   	
> >   	  Sysdig is open source, system-level exploration:
> >   	  capture system state and activity from a running Linux
> > 
> > @@ -36,4 +28,4 @@ comment "sysdig needs a glibc toolchain w/ C++, threads,
> > gcc >= 4.8, dynamic lib> 
> >   		|| !BR2_TOOLCHAIN_HAS_THREADS \
> >   		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS \
> >   		|| !BR2_TOOLCHAIN_USES_GLIBC \
> > 
> > -	    || !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
> > +		|| !BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
> > diff --git a/package/sysdig/sysdig.hash b/package/sysdig/sysdig.hash
> > index 4ec46abfc3..380c9dce1e 100644
> > --- a/package/sysdig/sysdig.hash
> > +++ b/package/sysdig/sysdig.hash
> > @@ -1,5 +1,3 @@
> > 
> >   # sha256 locally computed
> > 
> > -sha256  b9d05854493d245a7a7e75f77fc654508f720aab5e5e8a3a932bd8eb54e49bda 
> > sysdig-0.27.1.tar.gz +sha256 
> > 3721c97f0da43c1a68d2962d30363525d8532ab5f2534dfefc86d175e17e423e 
> > sysdig-0.29.1.tar.gz> 
> >   sha256  a88fbf820b38b1c7fabc6efe291b8259e02ae21326f56fe31c6c9adf374b2702
> >    COPYING> 
> > -sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 
> > driver/GPL2.txt -sha256 
> > e3f6a43d097ed68176e9738de925d98b938e1bccf6d6bd1bcd79395eca8f76ed 
> > driver/MIT.txt diff --git a/package/sysdig/sysdig.mk
> > b/package/sysdig/sysdig.mk
> > index 9a9aaa35c3..3ce5d0bb79 100644
> > --- a/package/sysdig/sysdig.mk
> > +++ b/package/sysdig/sysdig.mk
> > @@ -4,10 +4,10 @@
> > 
> >   #
> >   ########################################################################
> >   ########> 
> > -SYSDIG_VERSION = 0.27.1
> > +SYSDIG_VERSION = 0.29.1
> > 
> >   SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION))
> > 
> > -SYSDIG_LICENSE = Apache-2.0 (userspace), MIT or GPL-2.0 (driver)
> > -SYSDIG_LICENSE_FILES = COPYING driver/MIT.txt driver/GPL2.txt
> > +SYSDIG_LICENSE = Apache-2.0
> > +SYSDIG_LICENSE_FILE = COPYING
> > 
> >   SYSDIG_CPE_ID_VENDOR = sysdig
> >   SYSDIG_CONF_OPTS = \
> >   
> >   	-DENABLE_DKMS=OFF \
> > 
> > @@ -16,39 +16,26 @@ SYSDIG_CONF_OPTS = \
> > 
> >   SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO
> >   
> >   SYSDIG_DEPENDENCIES = \
> > 
> > -	c-ares \
> > -	elfutils \
> > -	grpc \
> > -	jq \
> > -	jsoncpp \
> > -	libb64 \
> > -	libcurl \
> > -	luainterpreter \
> > +	falcosecurity-libs \
> > 
> >   	ncurses \
> > 
> > -	openssl \
> > -	protobuf \
> > -	tbb \
> > -	zlib
> > +	json-for-modern-cpp \
> > +	yaml-cpp
> > 
> > -# sysdig creates the module Makefile from a template, which contains a
> > -# single place-holder, KBUILD_FLAGS, wich is only replaced with two
> > -# things:
> > -#   - debug flags, which we don't care about here,
> > -#   - 'sysdig-feature' flags, which are never set, so always empty
> > -# So, just replace the place-holder with the only meaningful value:
> > nothing. -define SYSDIG_MODULE_GEN_MAKEFILE
> > -	$(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile
> > -	$(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile
> > -	$(SED) 's/@PROBE_NAME@/sysdig-probe/;' $(@D)/driver/Makefile
> > -endef
> > -SYSDIG_POST_PATCH_HOOKS += SYSDIG_MODULE_GEN_MAKEFILE
> > +# For sysdig to automatically loads the driver, SYSDIG_DRIVER_NAME should
> > be +# the same than FALCOSECURITY_LIBS_DRIVER_NAME.
> > +SYSDIG_DRIVER_NAME = scap
> 
>   It's a bit silly to have this huge comment and then define a variable that
> is used only once. So I removed all that and directly used
> FALCOSECURITY_LIBS_DRIVER_NAME below.
> 
>   Applied to master, thanks.

Thank you for it!
I actually did a small mistake when sending this patch...
I will send a new series which corrects the problem and bump to 0.29.2 before 
end of the day!

>   Regards,
>   Arnout
> 
> > -# Don't build the driver as part of the 'standard' procedure, we'll
> > -# build it on our own with the kernel-module infra.
> > -SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF
> > -
> > -SYSDIG_MODULE_SUBDIRS = driver
> > -SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR)
> > +# Don't build the driver as part of the 'standard' procedure, it has been
> > built +# by falcosecurity-libs.mk.
> > +# grpc_cpp_plugin is needed to build falcosecurity libs, so we give the
> > host +# one there.
> > +SYSDIG_CONF_OPTS +=
> > -DFALCOSECURITY_LIBS_SOURCE_DIR=$(FALCOSECURITY_LIBS_SRCDIR) \
> > +	-DBUILD_DRIVER=OFF \
> > +	-DGRPC_CPP_PLUGIN=$(HOST_DIR)/bin/grpc_cpp_plugin \
> > +	-DDRIVER_NAME=$(SYSDIG_DRIVER_NAME) \
> > +	-DENABLE_DKMS=OFF \
> > +	-DUSE_BUNDLED_DEPS=OFF \
> > +	-DWITH_CHISEL=ON \
> > +	-DVALIJSON_INCLUDE=$(BUILD_DIR)/valijson-0.6/include/valijson
> > 
> > -$(eval $(kernel-module))
> > 
> >   $(eval $(cmake-package))




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

      reply	other threads:[~2022-05-03 14:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 16:43 [Buildroot] [RFC PATCH v4 0/2] Bump sysdig to 0.29.1 Francis Laniel
2022-04-25 16:43 ` [Buildroot] [RFC PATCH v4 1/2] falcosecurity-libs: add new package Francis Laniel
2022-04-30 17:57   ` Arnout Vandecappelle
2022-05-03 14:15     ` Francis Laniel
2022-04-25 16:43 ` [Buildroot] [RFC PATCH v4 2/2] package/sysdig: bump to 0.29.1 Francis Laniel
2022-04-30 18:07   ` Arnout Vandecappelle
2022-05-03 14:15     ` Francis Laniel [this message]

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=2627901.mvXUDI8C0e@pwmachine \
    --to=flaniel@linux.microsoft.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=s.martin49@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.