Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Laniel <flaniel@linux.microsoft.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [RFC PATCH v1 2/2] package/falcosecurity-libs: bump to version 0.10.5
Date: Fri, 11 Aug 2023 17:18:05 +0200	[thread overview]
Message-ID: <21975130.EfDdHjke4D@pwmachine> (raw)
In-Reply-To: <20230731224956.0d3d88c7@windsurf>

Hi.

Le lundi 31 juillet 2023, 22:49:56 CEST Thomas Petazzoni a écrit :
> Hello Francis,
> 
> On Fri, 28 Apr 2023 16:22:11 +0100
> 
> Francis Laniel <flaniel@linux.microsoft.com> wrote:
> > diff --git
> > a/package/falcosecurity-libs/0002-cmake-Install-shared-libraries.patch
> > b/package/falcosecurity-libs/0002-cmake-Install-shared-libraries.patch
> > new file mode 100644
> > index 0000000000..38a8bdd4f4
> > --- /dev/null
> > +++ b/package/falcosecurity-libs/0002-cmake-Install-shared-libraries.patch
> > @@ -0,0 +1,61 @@
> > +From b6d847fe8aa0513c6d19bd8187133699b9c4efd3 Mon Sep 17 00:00:00 2001
> > +From: Francis Laniel <flaniel@linux.microsoft.com>
> > +Date: Fri, 28 Apr 2023 15:14:27 +0100
> > +Subject: [PATCH] cmake: Install shared libraries.
> > +
> > +This is needed as sysdig is compiled as a non static binary which relies
> > on +these libraries.
> 
> Not clear. An executable can use a mix of shared and static libraries.

Indeed, but it causes troubles without this modification (see below).
Moreover, this whole magic causes a big increase in the rootfs image, as the 
limit should be increased from 60 MB to 195 MB (more than 3 times).

> What is the upstream status of this? How is falcosecurity-libs supposed
> to be used by sysdig according to upstream?

Sadly, I do not have any clue on this.
I will reach someone upstream to understand how everything is built because 
their way of building is totally incompatible with how Buildroot builds.

> All patches now need to have an "Upstream: <link>" tag that indicates
> where the patch has been submitted.

I will ensure this once I would have deal with all the issues here.

> > +diff --git a/cmake/modules/libelf.cmake b/cmake/modules/libelf.cmake
> > +index 8ca2f4f7..73d13d26 100644
> > +--- a/cmake/modules/libelf.cmake
> > ++++ b/cmake/modules/libelf.cmake
> > +@@ -10,7 +10,7 @@ if(LIBELF_INCLUDE)
> > +     add_custom_target(libelf)
> > + elseif(NOT USE_BUNDLED_LIBELF)
> > +     find_path(LIBELF_INCLUDE elf.h PATH_SUFFIXES elf)
> > +-    find_library(LIBELF_LIB NAMES libelf.a libelf.so)
> > ++    find_library(LIBELF_LIB NAMES libelf.so)
> 
> Is this really related?

We need this patch, otherwise, building sysdig fails with the following:
[ 22%] Linking C shared library libscap_engine_bpf.so
/home/francis-buildroot/buildroot/output/host/lib/gcc/x86_64-buildroot-linux-
gnu/12.3.0/../../../../x86_64-buildroot-linux-gnu/bin/ld: /home/francis-
buildroot/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/../
lib64/libelf.a(elf_error.o): relocation R_X86_64_TPOFF32 against 
`global_error' can not be used when making a shared object; recompile with -
fPIC
/home/francis-buildroot/buildroot/output/host/lib/gcc/x86_64-buildroot-linux-
gnu/12.3.0/../../../../x86_64-buildroot-linux-gnu/bin/ld: failed to set 
dynamic section sizes: bad value

> > diff --git a/package/falcosecurity-libs/falcosecurity-libs.hash
> > b/package/falcosecurity-libs/falcosecurity-libs.hash index
> > 2e239ca2fe..ef805cbcf6 100644
> > --- a/package/falcosecurity-libs/falcosecurity-libs.hash
> > +++ b/package/falcosecurity-libs/falcosecurity-libs.hash
> > @@ -1,5 +1,5 @@
> > 
> >  # sha256 locally computed
> > 
> > -sha256  80903bc57b7f9c5f24298ecf1531cf66ef571681b4bd1e05f6e4db704ffb380b 
> > falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz
> > +sha256  2a4b37c08bec4ba81326314831f341385aff267062e8d4483437958689662936
> >  falcosecurity-libs-0.10.5.tar.gz> 
> >  sha256  21ec9433a87459b3477faf542bacec419dc03af841309eac35edeffe481cf10b 
> >  COPYING sha256 
> >  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 
> >  driver/GPL2.txt sha256 
> >  f17d3f2c2d565a74a7d5bf96f880c43701e141897e8dff0c8aa13e5d07aaf226 
> >  driver/MIT.txt> 
> > diff --git a/package/falcosecurity-libs/falcosecurity-libs.mk
> > b/package/falcosecurity-libs/falcosecurity-libs.mk index
> > 92d5c61832..acd46cf7a5 100644
> > --- a/package/falcosecurity-libs/falcosecurity-libs.mk
> > +++ b/package/falcosecurity-libs/falcosecurity-libs.mk
> > @@ -4,7 +4,7 @@
> > 
> >  #
> >  #########################################################################
> >  #######> 
> > -FALCOSECURITY_LIBS_VERSION = e5c53d648f3c4694385bbe488e7d47eaa36c229a
> > +FALCOSECURITY_LIBS_VERSION = 0.10.5
> > 
> >  FALCOSECURITY_LIBS_SITE = $(call
> >  github,falcosecurity,libs,$(FALCOSECURITY_LIBS_VERSION))
> >  FALCOSECURITY_LIBS_LICENSE = Apache-2.0 (userspace), MIT or GPL-2.0
> >  (driver) FALCOSECURITY_LIBS_LICENSE_FILES = COPYING driver/MIT.txt
> >  driver/GPL2.txt> 
> > @@ -57,17 +57,19 @@ endef
> > 
> >  # For the others, it was taken by inspecting
> >  # falcosecurity-libs/*/CMakeLists.txt, which normally creates these
> >  # files, but doesn't work well with the kernel-module infrastructure.
> > 
> > +# The magical number for API_VERSION and SCHEMA_VERSION are taken from
> > +# corresponding files.
> 
> Which corresponding files? :-)

I just removed this comment as the files were already mentioned above.

> 
> Thomas




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

  reply	other threads:[~2023-08-11 15:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 15:22 [Buildroot] [RFC PATCH v1 0/2] Bump sysdig and falco libs Francis Laniel
2023-04-28 15:22 ` [Buildroot] [RFC PATCH v1 1/2] package/sysdig: bump to version 0.31.4 Francis Laniel
2023-07-31 20:18   ` Thomas Petazzoni via buildroot
2023-07-31 20:35     ` Thomas Petazzoni via buildroot
2023-08-11 15:18     ` Francis Laniel
2023-04-28 15:22 ` [Buildroot] [RFC PATCH v1 2/2] package/falcosecurity-libs: bump to version 0.10.5 Francis Laniel
2023-07-31 20:49   ` Thomas Petazzoni via buildroot
2023-08-11 15:18     ` Francis Laniel [this message]
2023-07-07 14:26 ` [Buildroot] [RFC PATCH v1 0/2] Bump sysdig and falco libs Francis Laniel

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=21975130.EfDdHjke4D@pwmachine \
    --to=flaniel@linux.microsoft.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.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