Re: [PATCH] config: Enable Debuginfod RPM sig checking and eu-stacktrace in spec
On Thu, Oct 24, 2024 at 5:34 AM Mark Wielaard wrote: > > For testing that the eu-stacktrace and debuginfod ima verification > code builds correctly explicitly add --enable-stacktrace and > --enable-debuginfod-ima-verification to configure. > > * config/elfutils.spec.in (enable_stacktrace): New global, > depends on arch. > (BuildRequires): Add sysprof-capture-devel. > (configure): Add --enable-stacktrace and > --enable-debuginfod-ima-verification. > (files): Add eu-stacktrace. > > Signed-off-by: Mark Wielaard > --- > config/elfutils.spec.in | 23 ++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in > index e63a3c1083ef..96934514818d 100644 > --- a/config/elfutils.spec.in > +++ b/config/elfutils.spec.in > @@ -7,6 +7,13 @@ License: GPLv3+ and (GPLv2+ or LGPLv3+) and GFDL > Source: > ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 > Summary: A collection of utilities and DSOs to handle ELF files and DWARF > data > > +# eu-stacktrace currently only supports x86_64 > +%ifarch x86_64 > +%global enable_stacktrace 1 > +%else > +%global enable_stacktrace 0 > +%endif > + > Requires: elfutils-libelf = %{version}-%{release} > Requires: elfutils-libs = %{version}-%{release} > # Can be a Recommends if rpm supports that > @@ -53,6 +60,11 @@ BuildRequires: ima-evm-utils-devel > BuildRequires: openssl-devel > BuildRequires: rpm-sign > > +# For eu-stacktrace > +%if %{enable_stacktrace} > +BuildRequires: sysprof-capture-devel > +%endif > + > %define _gnu %{nil} > %define _programprefix eu- > > @@ -197,7 +209,13 @@ such servers to download those files on demand. > %setup -q > > %build > -%configure --program-prefix=%{_programprefix} --enable-debuginfod > --enable-debuginfod-urls > +%configure --program-prefix=%{_programprefix} \ > + --enable-debuginfod \ > + --enable-debuginfod-urls=https://debuginfod.elfutils.org/ \ > +%if %{enable_stacktrace} > + --enable-stacktrace \ > +%endif > + --enable-debuginfod-ima-verification > make -s %{?_smp_mflags} > > %install > @@ -259,6 +277,9 @@ fi > %{_bindir}/eu-size > %{_bindir}/eu-srcfiles > %{_bindir}/eu-stack > +%if %{enable_stacktrace} > +%{_bindir}/eu-stacktrace > +%endif > %{_bindir}/eu-strings > %{_bindir}/eu-strip > %{_bindir}/eu-unstrip > -- > 2.47.0 > LGTM. Thanks, Aaron
Re: [PATCH] stacktrace: Init elf_fd in sysprof_init_dwfl
Hi Aaron, On Thu, 2024-10-24 at 10:22 -0400, Aaron Merey wrote: > On Thu, Oct 24, 2024 at 5:08 AM Mark Wielaard wrote: > > > > When building with LTO gcc believes elf_fd can be used uninitialized: > > LGTM Thanks, pushed. Cheers, Mark
Re: [PATCH v2] configure: better error message for [lib]debuginfod missing dependencies
On Wed, Oct 23, 2024 at 9:13 AM Mark Wielaard wrote: > > When dependencies for libdebuginfod, debuginfod or ima verification are > missing and these features are explicitly enabled the user might not > immediately know which of the dependicies are missing. Move the checks > around a little so checks for dependencies are done immediately before > the enable error message. And add the possible reason to the error to > make things more clear. > > * configure.ac: Move libcurl and json-c tests before libdebuginfod > check, move libmicrohttpd, sqlite3 and libarchive tests before > debuginfod check and move librpm, libcrypto and imaevm.h tests > before ima verification check. > > https://sourceware.org/bugzilla/show_bug.cgi?id=32294 > > Signed-off-by: Mark Wielaard > --- > configure.ac | 27 ++- > 1 file changed, 14 insertions(+), 13 deletions(-) > > diff --git a/configure.ac b/configure.ac > index f191488f9402..072bd4e226d1 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -837,16 +837,7 @@ > AC_ARG_ENABLE([debuginfod-ima-verification],[AS_HELP_STRING([--enable-debuginfod > # Look for various packages, minimum versions as per rhel7. > PKG_PROG_PKG_CONFIG > PKG_CHECK_MODULES([libcurl],[libcurl >= > 7.29.0],[have_libcurl=yes],[have_libcurl=no]) > -AC_CHECK_LIB(pthread, pthread_setname_np, > [AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],[Enable pthread_setname_np])]) > PKG_CHECK_MODULES([jsonc],[json-c >= 0.11],[have_jsonc=yes],[have_jsonc=no]) > -PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= > 0.9.33],[],[enable_debuginfod=no]) > -PKG_CHECK_MODULES([oldlibmicrohttpd],[libmicrohttpd < > 0.9.51],[old_libmicrohttpd=yes],[old_libmicrohttpd=no]) > -PKG_CHECK_MODULES([sqlite3],[sqlite3 >= > 3.7.17],[have_sqlite3=yes],[have_sqlite3=no]) > -PKG_CHECK_MODULES([libarchive],[libarchive >= > 3.1.2],[have_libarchive=yes],[have_libarchive=no]) > -AC_CHECK_LIB(rpm, headerGet, [AC_CHECK_DECL(RPMSIGTAG_FILESIGNATURES, > -[AC_SUBST(rpm_LIBS, '-lrpm > -lrpmio')],[], [#include ])]) > -AC_CHECK_LIB(crypto, EVP_MD_CTX_new, [AC_SUBST(crypto_LIBS, '-lcrypto')]) > -AC_CHECK_HEADER(imaevm.h) > # > # pronounce judgement on ability to build client, overridden by =yes/=no > if test "x$enable_libdebuginfod" = "xno"; then > @@ -855,11 +846,15 @@ elif test "x$enable_libdebuginfod" = "xdummy"; then > true > elif test "x$have_jsonc$have_libcurl" = "xyesyes"; then > enable_libdebuginfod=yes > -elif test "x$enable_libdebuginfod" = "xyes" -o "x$enable_libdebuginfod" = > "xdummy"; then > - AC_MSG_ERROR([unable to build libdebuginfod]) > +elif test "x$enable_libdebuginfod" = "xyes"; then > + AC_MSG_ERROR([unable to build libdebuginfod, missing libjson-c or > libcurl]) > else > enable_libdebuginfod=no > fi > +PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= > 0.9.33],[],[enable_debuginfod=no]) > +PKG_CHECK_MODULES([oldlibmicrohttpd],[libmicrohttpd < > 0.9.51],[old_libmicrohttpd=yes],[old_libmicrohttpd=no]) > +PKG_CHECK_MODULES([sqlite3],[sqlite3 >= > 3.7.17],[have_sqlite3=yes],[have_sqlite3=no]) > +PKG_CHECK_MODULES([libarchive],[libarchive >= > 3.1.2],[have_libarchive=yes],[have_libarchive=no]) > # > # pronounce judgement on ability to build server, overridden by =yes/=no > if test "x$enable_debuginfod" = "xno"; then > @@ -867,18 +862,22 @@ if test "x$enable_debuginfod" = "xno"; then > elif test "x$have_jsonc$HAVE_CXX11$have_libarchive$have_sqlite3" = > "xyesyesyesyes"; then > enable_debuginfod=yes > elif test "x$enable_debuginfod" = "xyes"; then > - AC_MSG_ERROR([unable to build debuginfod]) > + AC_MSG_ERROR([unable to build debuginfod, missing libmicrohttpd, sqlite3 > or libarchive]) > else > enable_debuginfod=no > fi > # > +AC_CHECK_LIB(rpm, headerGet, [AC_CHECK_DECL(RPMSIGTAG_FILESIGNATURES, > +[AC_SUBST(rpm_LIBS, '-lrpm > -lrpmio')],[], [#include ])]) > +AC_CHECK_LIB(crypto, EVP_MD_CTX_new, [AC_SUBST(crypto_LIBS, '-lcrypto')]) > +AC_CHECK_HEADER(imaevm.h) > # pronounce judgment on ima signature support > if test "x$enable_debuginfod_ima_verification" = "xno"; then > true > elif test > "x$ac_cv_lib_rpm_headerGet$ac_cv_have_decl_RPMSIGTAG_FILESIGNATURES$ac_cv_lib_crypto_EVP_MD_CTX_new$ac_cv_header_imaevm_h" > = "xyesyesyesyes"; then > enable_debuginfod_ima_verification=yes > elif test "x$enable_debuginfod_ima_verification" = "xyes"; then > - AC_MSG_ERROR([unable to enable debuginfod ima verification]) > + AC_MSG_ERROR([unable to enable ima verification, missing librpm, > libcrypto or imaevm.h]) > else > enable_debuginfod_ima_verification=no > fi > @@ -895,6 +894,8 @@ AS_IF([test "x$have_libarchive" = > "xyes"],AC_DEFINE([HAVE_LIBARCHIVE],[1],[Defin > AM_CONDITIONAL([ENABLE_IMA_VERIFICATION],[test > "$enable_debuginfod_ima_verification" = "xyes"]) > AM_CONDITIONAL([OLD_LIBMICROHTTPD],[test "x$old_libmicrohttpd" = "xyes"
[Bug tools/32253] FAIL: run-strip-reloc-self.sh with binutils master
https://sourceware.org/bugzilla/show_bug.cgi?id=32253 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1 from Mark Wielaard --- This now also happens on Fedora rawhide which just got binutils-2.43.1-1.fc42.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug debuginfod/32294] configure fails without json-c support
https://sourceware.org/bugzilla/show_bug.cgi?id=32294 Mark Wielaard changed: What|Removed |Added Assignee|unassigned at sourceware dot org |mark at klomp dot org Status|NEW |ASSIGNED --- Comment #2 from Mark Wielaard --- (In reply to Mark Wielaard from comment #1) > The error message is confusing. The issue isn't missing rpm headerGet > support (that will disable Debuginfod RPM sig checking). But the missing > json-c support (which is now mandatory to build libdebuginfod). > > We should improve the configure error message here. https://inbox.sourceware.org/elfutils-devel/20241023131306.1926797-1-m...@klomp.org/ -- You are receiving this mail because: You are on the CC list for the bug.
[PATCH] config: Enable Debuginfod RPM sig checking and eu-stacktrace in spec
For testing that the eu-stacktrace and debuginfod ima verification code builds correctly explicitly add --enable-stacktrace and --enable-debuginfod-ima-verification to configure. * config/elfutils.spec.in (enable_stacktrace): New global, depends on arch. (BuildRequires): Add sysprof-capture-devel. (configure): Add --enable-stacktrace and --enable-debuginfod-ima-verification. (files): Add eu-stacktrace. Signed-off-by: Mark Wielaard --- config/elfutils.spec.in | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index e63a3c1083ef..96934514818d 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -7,6 +7,13 @@ License: GPLv3+ and (GPLv2+ or LGPLv3+) and GFDL Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 Summary: A collection of utilities and DSOs to handle ELF files and DWARF data +# eu-stacktrace currently only supports x86_64 +%ifarch x86_64 +%global enable_stacktrace 1 +%else +%global enable_stacktrace 0 +%endif + Requires: elfutils-libelf = %{version}-%{release} Requires: elfutils-libs = %{version}-%{release} # Can be a Recommends if rpm supports that @@ -53,6 +60,11 @@ BuildRequires: ima-evm-utils-devel BuildRequires: openssl-devel BuildRequires: rpm-sign +# For eu-stacktrace +%if %{enable_stacktrace} +BuildRequires: sysprof-capture-devel +%endif + %define _gnu %{nil} %define _programprefix eu- @@ -197,7 +209,13 @@ such servers to download those files on demand. %setup -q %build -%configure --program-prefix=%{_programprefix} --enable-debuginfod --enable-debuginfod-urls +%configure --program-prefix=%{_programprefix} \ + --enable-debuginfod \ + --enable-debuginfod-urls=https://debuginfod.elfutils.org/ \ +%if %{enable_stacktrace} + --enable-stacktrace \ +%endif + --enable-debuginfod-ima-verification make -s %{?_smp_mflags} %install @@ -259,6 +277,9 @@ fi %{_bindir}/eu-size %{_bindir}/eu-srcfiles %{_bindir}/eu-stack +%if %{enable_stacktrace} +%{_bindir}/eu-stacktrace +%endif %{_bindir}/eu-strings %{_bindir}/eu-strip %{_bindir}/eu-unstrip -- 2.47.0
Re: ☠ Buildbot (Sourceware): elfutils - failed test (failure) (main)
On Wed, Oct 23, 2024 at 10:38:46PM +, buil...@sourceware.org wrote: > A new failure has been detected on builder elfutils-debian-ppc64 while > building elfutils. > > Full details are available at: > https://builder.sourceware.org/buildbot/#/builders/63/builds/411 Sadly this is again an out of memory issue. Cheers, Mark