From 288f6b199a8b1a60d4fb1f54ca7b883cdd5afca2 Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Mon, 28 Oct 2019 13:29:26 -0400 Subject: debuginfod 1/2: client side Introduce the debuginfod/ subdirectory, containing the client for a new debuginfo-over-http service, in shared-library and command-line forms. Two functions in libdwfl make calls into the client library to fetch elf/dwarf files by buildid, as a fallback. Instead of normal dynamic linking (thus pulling in a variety of curl dependencies), the libdwfl hooks use dlopen/dlsym. Server & tests coming in patch 2. Signed-off-by: Aaron Merey Signed-off-by: Frank Ch. Eigler --- config/Makefile.am | 4 ++-- config/libdebuginfod.pc.in | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 config/libdebuginfod.pc.in (limited to 'config') diff --git a/config/Makefile.am b/config/Makefile.am index 9d292cee..10bd8d31 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -29,10 +29,10 @@ ## not, see . ## EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf - libelf.pc.in libdw.pc.in + libelf.pc.in libdw.pc.in libdebuginfod.pc.in pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libelf.pc libdw.pc +pkgconfig_DATA = libelf.pc libdw.pc libdebuginfod.pc if MAINTAINER_MODE $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS diff --git a/config/libdebuginfod.pc.in b/config/libdebuginfod.pc.in new file mode 100644 index 00000000..46722a76 --- /dev/null +++ b/config/libdebuginfod.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: debuginfod +Description: elfutils library to query debuginfo files from debuginfod servers +Version: @VERSION@ +URL: http://elfutils.org/ + +Libs: -L${libdir} -ldebuginfod +Cflags: -I${includedir} -- cgit v1.2.3 From e27e30cae0468903473641efe3853c12d9294ac3 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 28 Oct 2019 13:29:26 -0400 Subject: debuginfod 2/2: server side Add the server to the debuginfod/ subdirectory. This is a highly multithreaded c++11 program (still buildable on rhel7's gcc 4.8, which is only partly c++11 compliant). Includes an initial suite of tests, man pages, and a sample systemd service. Signed-off-by: Frank Ch. Eigler Signed-off-by: Aaron Merey --- config/ChangeLog | 7 ++++ config/Makefile.am | 5 ++- config/debuginfod.service | 15 +++++++ config/debuginfod.sysconfig | 14 +++++++ config/elfutils.spec.in | 100 ++++++++++++++++++++++++++++++++++++++++++-- config/eu.am | 10 +++++ 6 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 config/debuginfod.service create mode 100644 config/debuginfod.sysconfig (limited to 'config') diff --git a/config/ChangeLog b/config/ChangeLog index b641d0d5..73643f91 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,10 @@ +2019-10-28 Frank Ch. Eigler + + * eu.am (AM_CXXFLAGS): Clone & amend AM_CFLAGS for c++11 code. + * debuginfod.service, debuginfod.sysconfig: New files: systemd. + * Makefile.am: Install them. + * elfutils.spec.in: Add debuginfod and debuginfod-client subrpms. + 2019-08-29 Mark Wielaard * elfutils.spec.in (%description devel): Remove libebl text. diff --git a/config/Makefile.am b/config/Makefile.am index 10bd8d31..55e895ac 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -28,8 +28,9 @@ ## the GNU Lesser General Public License along with this program. If ## not, see . ## -EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf - libelf.pc.in libdw.pc.in libdebuginfod.pc.in +EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf \ + libelf.pc.in libdw.pc.in libdebuginfod.pc.in \ + debuginfod.service debuginfod.sysconfig pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libelf.pc libdw.pc libdebuginfod.pc diff --git a/config/debuginfod.service b/config/debuginfod.service new file mode 100644 index 00000000..d8ef072b --- /dev/null +++ b/config/debuginfod.service @@ -0,0 +1,15 @@ +[Unit] +Description=elfutils debuginfo-over-http server +Documentation=http://elfutils.org/ +After=network.target + +[Service] +EnvironmentFile=/etc/sysconfig/debuginfod +User=debuginfod +Group=debuginfod +#CacheDirectory=debuginfod +ExecStart=/usr/bin/debuginfod -d /var/cache/debuginfod/debuginfod.sqlite -p $DEBUGINFOD_PORT $DEBUGINFOD_VERBOSE $DEBUGINFOD_PRAGMAS $DEBUGINFOD_PATHS +TimeoutStopSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/config/debuginfod.sysconfig b/config/debuginfod.sysconfig new file mode 100644 index 00000000..c56bcf3f --- /dev/null +++ b/config/debuginfod.sysconfig @@ -0,0 +1,14 @@ +# +DEBUGINFOD_PORT="8002" +#DEBUGINFOD_VERBOSE="-v" + +# some common places to find trustworthy ELF/DWARF files and RPMs +DEBUGINFOD_PATHS="-t43200 -F -R /usr/lib/debug /usr/bin /usr/libexec /usr/sbin /usr/lib /usr/lib64 /var/cache/yum /var/cache/dnf" + +# prefer reliability/durability over performance +#DEBUGINFOD_PRAGMAS="-D 'pragma synchronous=full;'" + +# upstream debuginfods +#DEBUGINFOD_URLS="http://secondhost:8002 http://thirdhost:8002" +#DEBUGINFOD_TIMEOUT="5" +#DEBUGINFOD_CACHE_DIR="" diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index 6771d13b..3cd15ce3 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -12,6 +12,11 @@ Requires: elfutils-libelf = %{version}-%{release} Requires: glibc >= 2.7 Requires: libstdc++ Requires: default-yama-scope +%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20 +Recommends: elfutils-debuginfod-client +%else +Requires: elfutils-debuginfod-client +%endif # ExcludeArch: xxx @@ -23,10 +28,20 @@ BuildRequires: flex >= 2.5.4a BuildRequires: bzip2 BuildRequires: m4 BuildRequires: gettext -BuildRequires: zlib-devel +BuildRequires: pkgconfig(zlib) +%if 0%{?rhel} == 7 BuildRequires: bzip2-devel -BuildRequires: xz-devel +%else +BuildRequires: pkgconfig(bzip2) +%endif +BuildRequires: pkgconfig(liblzma) BuildRequires: gcc-c++ +BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 +BuildRequires: pkgconfig(libcurl) >= 7.29.0 +BuildRequires: pkgconfig(sqlite3) >= 3.7.17 +BuildRequires: pkgconfig(libarchive) >= 3.1.2 +# for the run-debuginfod-find.sh test case in %check for /usr/sbin/ss +BuildRequires: iproute %define _gnu %{nil} %define _programprefix eu- @@ -116,18 +131,53 @@ interprocess services, communication and introspection (like synchronisation, signaling, debugging, tracing and profiling) of processes. +%package debuginfod-client +Summary: Libraries and command-line frontend for HTTP ELF/DWARF file server addressed by build-id. +License: GPLv3+ and (GPLv2+ or LGPLv3+) + +%package debuginfod-client-devel +Summary: Libraries and headers to build debuginfod client applications. +License: GPLv2+ or LGPLv3+ + +%package debuginfod +Summary: HTTP ELF/DWARF file server addressed by build-id. +License: GPLv3+ +BuildRequires: systemd +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires: shadow-utils +Requires: /usr/bin/rpm2cpio + +%description debuginfod-client +The elfutils-debuginfod-client package contains shared libraries +dynamically loaded from -ldw, which use a debuginfod service +to look up debuginfo and associated data. Also includes a +command-line frontend. + +%description debuginfod-client-devel +The elfutils-debuginfod-client-devel package contains the libraries +to create applications to use the debuginfod service. + +%description debuginfod +The elfutils-debuginfod package contains the debuginfod binary +and control files for a service that can provide ELF/DWARF +files to remote clients, based on build-id identification. +The ELF/DWARF file searching functions in libdwfl can query +such servers to download those files on demand. + %prep %setup -q %build -%configure --program-prefix=%{_programprefix} +%configure --program-prefix=%{_programprefix} --enable-debuginfod make %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_prefix} -%makeinstall +%make_install chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so* @@ -140,6 +190,11 @@ chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so* install -Dm0644 config/10-default-yama-scope.conf ${RPM_BUILD_ROOT}%{_sysctldir}/10-default-yama-scope.conf +install -Dm0644 config/debuginfod.service ${RPM_BUILD_ROOT}%{_unitdir}/debuginfod.service +install -Dm0644 config/debuginfod.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/debuginfod +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod +touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite + %check make check @@ -225,6 +280,43 @@ rm -rf ${RPM_BUILD_ROOT} %files default-yama-scope %{_sysctldir}/10-default-yama-scope.conf +%files debuginfod-client +%defattr(-,root,root) +%{_libdir}/libdebuginfod-%{version}.so +%{_bindir}/debuginfod-find +%{_mandir}/man1/debuginfod-find.1* + +%files debuginfod-client-devel +%defattr(-,root,root) +%{_libdir}/pkgconfig/libdebuginfod.pc +%{_mandir}/man3/debuginfod_*.3* +%{_includedir}/elfutils/debuginfod.h +%{_libdir}/libdebuginfod.so* + +%files debuginfod +%defattr(-,root,root) +%{_bindir}/debuginfod +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/debuginfod +%{_unitdir}/debuginfod.service +%{_sysconfdir}/sysconfig/debuginfod +%{_mandir}/man8/debuginfod.8* + +%dir %attr(0700,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod +%verify(not md5 size mtime) %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite + +%pre debuginfod +getent group debuginfod >/dev/null || groupadd -r debuginfod +getent passwd debuginfod >/dev/null || \ + useradd -r -g debuginfod -d /var/cache/debuginfod -s /sbin/nologin \ + -c "elfutils debuginfo server" debuginfod +exit 0 + +%post debuginfod +%systemd_post debuginfod.service + +%postun debuginfod +%systemd_postun_with_restart debuginfod.service + %changelog * Tue Aug 13 2019 Mark Wielaard 0.177-1 - elfclassify: New tool to analyze ELF objects. diff --git a/config/eu.am b/config/eu.am index 82acda3a..6c3c444f 100644 --- a/config/eu.am +++ b/config/eu.am @@ -79,6 +79,16 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \ $($(*F)_CFLAGS) +AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \ + -Wtrampolines \ + $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ + $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ + $(if $($(*F)_no_Werror),,-Werror) \ + $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ + $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \ + $($(*F)_CXXFLAGS) + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) DEFS.os = -DPIC -DSHARED -- cgit v1.2.3 From edf79a4bbc80b35f40abce73986dc6d6e10d40bc Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 25 Nov 2019 23:20:35 +0100 Subject: elfutils.spec: Add BuildRequires: curl The run-debuginfod-find.sh now relies on curl to fetch the metrics. Signed-off-by: Mark Wielaard --- config/ChangeLog | 4 ++++ config/elfutils.spec.in | 1 + 2 files changed, 5 insertions(+) (limited to 'config') diff --git a/config/ChangeLog b/config/ChangeLog index 73643f91..ff004d6e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2019-11-25 Mark Wielaard + + * elfutils.spec.in: Add BuildRequires curl. + 2019-10-28 Frank Ch. Eigler * eu.am (AM_CXXFLAGS): Clone & amend AM_CFLAGS for c++11 code. diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index 3cd15ce3..f244f363 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -42,6 +42,7 @@ BuildRequires: pkgconfig(sqlite3) >= 3.7.17 BuildRequires: pkgconfig(libarchive) >= 3.1.2 # for the run-debuginfod-find.sh test case in %check for /usr/sbin/ss BuildRequires: iproute +BuildRequires: curl %define _gnu %{nil} %define _programprefix eu- -- cgit v1.2.3 From 6b13cb00099e6499e56eb07f83c926bca9471015 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 26 Nov 2019 09:52:24 +0100 Subject: Prepare for 0.178 Set version to 0.178. Update NEWS and elfutils.spec.in. Regenerate po/*.po files. Signed-off-by: Mark Wielaard --- config/elfutils.spec.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'config') diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index f244f363..aa57b436 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -319,6 +319,21 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Tue Nov 26 2019 Mark Wielaard 0.178-1 +- debuginfod: New server, client tool and library to index and fetch + ELF/DWARF files addressed by build-id through HTTP. +- doc: There are now some manual pages for functions and tools. +- backends: The libebl libraries are no longer dynamically loaded + through dlopen, but are now compiled into libdw.so directly. +- readelf: -n, --notes now takes an optional "SECTION" argument. + -p and -x now also handle section numbers. + New option --dyn-sym to show just the dynamic symbol table. +- libcpu: Add RISC-V disassembler. +- libdw: Abbrevs and DIEs can now be read concurrently by multiple + threads through the same Dwarf handle. +- libdwfl: Will try to use debuginfod when installed as fallback to + retrieve ELF and DWARF debug data files by build-id. + * Tue Aug 13 2019 Mark Wielaard 0.177-1 - elfclassify: New tool to analyze ELF objects. - readelf: Print DW_AT_data_member_location as decimal offset. -- cgit v1.2.3 From 2c7c40373b68968cce20a60a28234e2a2cbc55cb Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 26 Nov 2019 23:34:27 +0100 Subject: elfutils.spec.in: Sync with fedora spec, remove rhel/fedora specifics. This makes the sample elfutils.spec file more like the fedora elfutils.spec but with all fedora and rhel specifics removed. In particular it introduces a new elfutils-libs subpackage and updates the requires accordingly. Other cleanups are removal of Group tags, remove dot at end of Summary tags, add post/postun ldconfig for elfutils-libs and elfutils debuginfod-client subpackages, remove default defattr(-,root,root) for file lists and order binaries by name. Signed-off-by: Mark Wielaard --- config/ChangeLog | 9 +++ config/elfutils.spec.in | 145 +++++++++++++++++++++++++----------------------- 2 files changed, 84 insertions(+), 70 deletions(-) (limited to 'config') diff --git a/config/ChangeLog b/config/ChangeLog index ff004d6e..16379207 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,12 @@ +2019-11-26 Mark Wielaard + + * elfutils.spec.in: Remove Group tags, remove fedora and rhel + specifics, introduce elfutils-libs subpackage, move Requires + and BuildRequires around for new subpackage, remove dot at end + of Summary tags, add post/postun ldconfig for libs and + debuginfod-client, remove default defattr(-,root,root) for file + lists, order binaries by name. + 2019-11-25 Mark Wielaard * elfutils.spec.in: Add BuildRequires curl. diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index aa57b436..46779340 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -5,42 +5,35 @@ Version: @PACKAGE_VERSION@ Release: 1 URL: http://elfutils.org/ License: GPLv3+ and (GPLv2+ or LGPLv3+) and GFDL -Group: Development/Tools Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 -Obsoletes: libelf libelf-devel + Requires: elfutils-libelf = %{version}-%{release} -Requires: glibc >= 2.7 -Requires: libstdc++ -Requires: default-yama-scope -%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20 -Recommends: elfutils-debuginfod-client -%else +Requires: elfutils-libs = %{version}-%{release} +# Can be a Recommends if rpm supports that Requires: elfutils-debuginfod-client -%endif -# ExcludeArch: xxx +BuildRequires: gcc +# For libstdc++ demangle support +BuildRequires: gcc-c++ -BuildRoot: %{_tmppath}/%{name}-root -BuildRequires: gcc >= 4.1.2-33 -BuildRequires: glibc >= 2.7 -BuildRequires: bison >= 1.875 -BuildRequires: flex >= 2.5.4a -BuildRequires: bzip2 -BuildRequires: m4 BuildRequires: gettext -BuildRequires: pkgconfig(zlib) -%if 0%{?rhel} == 7 +BuildRequires: bison +BuildRequires: flex + +# Compression support +BuildRequires: zlib-devel BuildRequires: bzip2-devel -%else -BuildRequires: pkgconfig(bzip2) -%endif -BuildRequires: pkgconfig(liblzma) -BuildRequires: gcc-c++ +BuildRequires: xz-devel + +# For debuginfod BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 BuildRequires: pkgconfig(libcurl) >= 7.29.0 BuildRequires: pkgconfig(sqlite3) >= 3.7.17 BuildRequires: pkgconfig(libarchive) >= 3.1.2 -# for the run-debuginfod-find.sh test case in %check for /usr/sbin/ss + +# For tests need to bunzip2 test files. +BuildRequires: bzip2 +# For the run-debuginfod-find.sh test case in %check for /usr/sbin/ss BuildRequires: iproute BuildRequires: curl @@ -48,22 +41,38 @@ BuildRequires: curl %define _programprefix eu- %description - Elfutils is a collection of utilities, including stack (to show backtraces), nm (for listing symbols from object files), size (for listing the section sizes of an object or archive file), strip (for discarding symbols), readelf (to see the raw ELF file structures), elflint (to check for well-formed ELF files) and elfcompress (to compress or decompress ELF sections). -Also included are helper libraries which implement DWARF, ELF, -and machine-specific ELF handling and process introspection. + +%package libs +Summary: Libraries to handle compiled objects +License: GPLv2+ or LGPLv3+ +Requires: elfutils-libelf = %{version}-%{release} +Requires: default-yama-scope +# Can be a Recommends if rpm supports that +Requires: elfutils-debuginfod-client + +%description libs +The elfutils-libs package contains libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. These +libraries are used by the programs in the elfutils package. The +elfutils-devel package enables building other programs using these +libraries. %package devel -Summary: Development libraries to handle compiled objects. -Group: Development/Tools -License: (GPLv2+ or LGPLv3+) and GFDL -Requires: elfutils = %{version}-%{release} +Summary: Development libraries to handle compiled objects +License: GPLv2+ or LGPLv3+ +Requires: elfutils-libs = %{version}-%{release} Requires: elfutils-libelf-devel = %{version}-%{release} +%if 0%{?rhel} >= 8 || 0%{?fedora} >= 20 +Recommends: elfutils-debuginfod-client-devel +%else +Requires: elfutils-debuginfod-client-devel +%endif %description devel The elfutils-devel package contains the libraries to create @@ -72,18 +81,17 @@ to the DWARF debugging information. libasm provides a programmable assembler interface. %package devel-static -Summary: Static archives to handle compiled objects. -Group: Development/Tools +Summary: Static archives to handle compiled objects License: GPLv2+ or LGPLv3+ Requires: elfutils-devel = %{version}-%{release} +Requires: elfutils-libelf-devel-static = %{version}-%{release} %description devel-static The elfutils-devel-static archive contains the static archives with the code the handle compiled objects. %package libelf -Summary: Library to read and write ELF files. -Group: Development/Tools +Summary: Library to read and write ELF files License: GPLv2+ or LGPLv3+ %description libelf @@ -94,7 +102,6 @@ elfutils package use it also to generate new ELF files. %package libelf-devel Summary: Development support for libelf -Group: Development/Tools License: GPLv2+ or LGPLv3+ Requires: elfutils-libelf = %{version}-%{release} Conflicts: libelf-devel @@ -107,7 +114,6 @@ different sections of an ELF file. %package libelf-devel-static Summary: Static archive of libelf -Group: Development/Tools License: GPLv2+ or LGPLv3+ Requires: elfutils-libelf-devel = %{version}-%{release} Conflicts: libelf-devel @@ -118,7 +124,6 @@ for libelf. %package default-yama-scope Summary: Default yama attach scope sysctl setting -Group: Development/Tools License: GPLv2+ or LGPLv3+ Provides: default-yama-scope BuildArch: noarch @@ -133,22 +138,23 @@ interprocess services, communication and introspection profiling) of processes. %package debuginfod-client -Summary: Libraries and command-line frontend for HTTP ELF/DWARF file server addressed by build-id. +Summary: Library and command line client for build-id HTTP ELF/DWARF server License: GPLv3+ and (GPLv2+ or LGPLv3+) %package debuginfod-client-devel -Summary: Libraries and headers to build debuginfod client applications. +Summary: Libraries and headers to build debuginfod client applications License: GPLv2+ or LGPLv3+ %package debuginfod -Summary: HTTP ELF/DWARF file server addressed by build-id. +Summary: HTTP ELF/DWARF file server addressed by build-id License: GPLv3+ BuildRequires: systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -Requires: shadow-utils -Requires: /usr/bin/rpm2cpio +Requires(pre): shadow-utils +# For /usr/bin/cpio2rpm +Requires: rpm %description debuginfod-client The elfutils-debuginfod-client package contains shared libraries @@ -172,7 +178,7 @@ such servers to download those files on demand. %build %configure --program-prefix=%{_programprefix} --enable-debuginfod -make +make -s %{?_smp_mflags} %install rm -rf ${RPM_BUILD_ROOT} @@ -197,51 +203,52 @@ mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite %check -make check - -%clean -rm -rf ${RPM_BUILD_ROOT} - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +make -s %{?_smp_mflags} check +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig %post libelf -p /sbin/ldconfig - %postun libelf -p /sbin/ldconfig +%post debuginfod-client -p /sbin/ldconfig +%postun debuginfod-client -p /sbin/ldconfig %post default-yama-scope +# Due to circular dependencies might not be installed yet, so double check. +# (systemd -> elfutils-libs -> default-yama-scope -> systemd) +if [ -x /usr/lib/systemd/systemd-sysctl ] ; then %sysctl_apply 10-default-yama-scope.conf +fi %files -%defattr(-,root,root) %license COPYING COPYING-GPLV2 COPYING-LGPLV3 doc/COPYING-GFDL %doc README TODO CONTRIBUTING +%{_bindir}/eu-addr2line +%{_bindir}/eu-ar +%{_bindir}/eu-elfclassify +%{_bindir}/eu-elfcmp +%{_bindir}/eu-elfcompress %{_bindir}/eu-elflint +%{_bindir}/eu-findtextrel +%{_bindir}/eu-make-debug-archive %{_bindir}/eu-nm +%{_bindir}/eu-objdump +%{_bindir}/eu-ranlib %{_bindir}/eu-readelf %{_bindir}/eu-size %{_bindir}/eu-stack -%{_bindir}/eu-strip -%{_bindir}/eu-findtextrel -%{_bindir}/eu-addr2line -%{_bindir}/eu-elfclassify -%{_bindir}/eu-elfcmp -%{_bindir}/eu-ranlib %{_bindir}/eu-strings -%{_bindir}/eu-objdump -%{_bindir}/eu-ar +%{_bindir}/eu-strip %{_bindir}/eu-unstrip -%{_bindir}/eu-make-debug-archive -%{_bindir}/eu-elfcompress +%{_mandir}/man1/eu-*.1* + +%files libs +%license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libasm-%{version}.so %{_libdir}/libdw-%{version}.so %{_libdir}/libasm.so.* %{_libdir}/libdw.so.* -%{_mandir}/man1/eu-*.1* %files devel -%defattr(-,root,root) %{_includedir}/dwarf.h %dir %{_includedir}/elfutils %{_includedir}/elfutils/elf-knowledge.h @@ -260,17 +267,15 @@ rm -rf ${RPM_BUILD_ROOT} #%{_libdir}/libasm.a %files libelf -%defattr(-,root,root) +%license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libelf-%{version}.so %{_libdir}/libelf.so.* %{_datadir}/locale/*/LC_MESSAGES/elfutils.mo %files libelf-devel -%defattr(-,root,root) %{_includedir}/libelf.h %{_includedir}/gelf.h %{_includedir}/nlist.h -%{_includedir}/elfutils/version.h %{_libdir}/libelf.so %{_libdir}/pkgconfig/libelf.pc %{_mandir}/man3/elf_*.3* -- cgit v1.2.3