From: Mark Wielaard Date: Thu, 24 Oct 2024 09:34:11 +0000 (+0200) Subject: config: Enable Debuginfod RPM sig checking and eu-stacktrace in spec X-Git-Tag: elfutils-0.193~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a0537c7d0465297fc9d5e2a53e62cd1407d35c3;p=thirdparty%2Felfutils.git 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 --- diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index e63a3c10..96934514 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