From 1d8cbb5168973c5a015d60cdbb10a4f90222af53f36ebf2200ffc30ea81e8e54 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 2 Dec 2019 08:21:38 +0000 Subject: [PATCH] Accepting request 752710 from home:marxin:branches:Base:System-new - Update to version 0.178: 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. - remove dwelf_elf_e_machine_string.patch. - remove unused libebl-plugins and libebl-devel subpackages - new subpackages debuginfod-client, debuginfod-client-devel and debuginfod added - main package binaries are explicitely listed and man pages for the binaries are included OBS-URL: https://build.opensuse.org/request/show/752710 OBS-URL: https://build.opensuse.org/package/show/Base:System/elfutils?expand=0&rev=140 --- baselibs.conf | 7 -- dwelf_elf_e_machine_string.patch | 12 --- elfutils-0.177.tar.bz2 | 3 - elfutils-0.177.tar.bz2.sig | Bin 310 -> 0 bytes elfutils-0.178.tar.bz2 | 3 + elfutils-0.178.tar.bz2.sig | Bin 0 -> 310 bytes elfutils.changes | 30 +++++++ elfutils.spec | 145 ++++++++++++++++++++++--------- 8 files changed, 136 insertions(+), 64 deletions(-) delete mode 100644 dwelf_elf_e_machine_string.patch delete mode 100644 elfutils-0.177.tar.bz2 delete mode 100644 elfutils-0.177.tar.bz2.sig create mode 100644 elfutils-0.178.tar.bz2 create mode 100644 elfutils-0.178.tar.bz2.sig diff --git a/baselibs.conf b/baselibs.conf index d1321ac..c943b01 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,11 +1,4 @@ libasm1 -libebl-plugins - obsoletes "libebl- < " - provides "libebl- = " - obsoletes "libebl1- < " - provides "libebl1- = " -libelf1 - requires "libebl-plugins- = " libdw1 libelf-devel requires -libelf- diff --git a/dwelf_elf_e_machine_string.patch b/dwelf_elf_e_machine_string.patch deleted file mode 100644 index ecb43aa..0000000 --- a/dwelf_elf_e_machine_string.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: elfutils-0.177/tests/dwelf_elf_e_machine_string.c -=================================================================== ---- elfutils-0.177.orig/tests/dwelf_elf_e_machine_string.c -+++ elfutils-0.177/tests/dwelf_elf_e_machine_string.c -@@ -40,6 +40,7 @@ main (int argc, char **argv) - int em; - const char *machine; - -+ errno = 0; - if (strncmp ("0x", argv[i], 2) == 0) - val = strtol (&argv[i][2], NULL, 16); - else diff --git a/elfutils-0.177.tar.bz2 b/elfutils-0.177.tar.bz2 deleted file mode 100644 index a5f14c6..0000000 --- a/elfutils-0.177.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e -size 8852413 diff --git a/elfutils-0.177.tar.bz2.sig b/elfutils-0.177.tar.bz2.sig deleted file mode 100644 index eb60628519473ed6b477eb6b4b60d18272e8dd801dbedfd25beaac9f3404cddc..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S}0W$;u0SEvc79j)@c8ZpHS&$HV4KLsPSL4jA*_wC-0$o$y#Q+Kk5d2r; z%&gg(c()A)|9UN_tiiEX9peM1fuliFEPh8|AxI>>Hq$y6rQRi1#$;6h66c4={~YwC znopU1M{S>0B}19{!Pss4&FyoRlFr;+2H))&{tQkcth`HmNT4FIuc~KpbjtAT>Pg|^ zIV|ObTiNClAE&C_PifrRG)J+-x{I!SAd11?kGA^J(jNR$mjS34C(|fEj+sR;l#cd? z*-^-PunsOBtN>LyZ}*0@NH7|LPATim8GvOQ9UQ0}s#uX%Bo=jgI=-U_)SKtveqxY_qwC&n8!O5d2r; z%&gg(cs{5H{y%(2hAYY99X_kqFz@9hqDkql2SgkkD_6F7L7_JKdRSo{PLx%6JHvpc z=Amkxkg|T1h2K|?;~>n%y&qEPYP`cQw{L5{nZwttQfrUf;06gMHzlRJ@lkrAawjOX zw+8_Rq%!(NODiH3chdh+gIN%>M8E$=aIw|GxWPtd=jrLmT>u>${5My=giw4P>h)!S z4o$RL>I7k;59Hnqgii){0_xxhXdXCeZx89&u#&E&M3nIBn7gu#ytHjfmouANqC}T) zJf5d{rxF34O~~~I$YABmSe}Me>Hp15`LzuR!@FQBk8S>%3}}Pccr8 + +- Update to version 0.178: + + 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. +- remove dwelf_elf_e_machine_string.patch. +- remove unused libebl-plugins and libebl-devel subpackages +- new subpackages debuginfod-client, debuginfod-client-devel and + debuginfod added +- main package binaries are explicitely listed and man pages + for the binaries are included + ------------------------------------------------------------------- Thu Nov 14 15:19:43 UTC 2019 - Andreas Schwab diff --git a/elfutils.spec b/elfutils.spec index 696f0c1..bcc0383 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ # # spec file for package elfutils # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: elfutils -Version: 0.177 +Version: 0.178 Release: 0 Summary: Higher-level library to access ELF files License: GPL-3.0-or-later @@ -31,15 +31,23 @@ Source1: README-BEFORE-ADDING-PATCHES Source2: baselibs.conf Source3: %{name}.changes Source5: %{name}.keyring -Patch1: dwelf_elf_e_machine_string.patch Patch2: cfi-fix.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: flex +BuildRequires: gcc-c++ BuildRequires: libbz2-devel BuildRequires: xz-devel BuildRequires: zlib-devel +# For debuginfod +BuildRequires: pkgconfig(libarchive) >= 3.1.2 +BuildRequires: pkgconfig(libcurl) >= 7.29.0 +BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 +BuildRequires: pkgconfig(sqlite3) >= 3.7.17 +# For the run-debuginfod-find.sh test case in %check for /usr/sbin/ss +BuildRequires: curl +BuildRequires: iproute %description elfutils is a collection of utilities and libraries to read, create @@ -65,33 +73,9 @@ Requires: libasm1 = %{version} This package contains the headers and libraries needed to build applications that require libasm. -%package -n libebl-plugins -Summary: Architecture backends for libebl -Group: System/Libraries -Provides: libebl = %{version}-%{release} -Obsoletes: libebl < %{version}-%{release} -Provides: libebl1 = %{version}-%{release} -Obsoletes: libebl1 < %{version}-%{release} - -%description -n libebl-plugins -This subpackage contains the plugins to read architecture-specific -debug info. This is part of the elfutils package. - -%package -n libebl-devel -Summary: Development files for libebl and for EBL plugins -Group: Development/Libraries/C and C++ -Requires: glibc-devel -Requires: libdw-devel = %{version} - -%description -n libebl-devel -This package contains the headers and libraries needed to build -applications that require libebl, or to build additional EBL -architecutre backend plugins. - %package -n libelf1 Summary: Library to read and write ELF files Group: System/Libraries -Requires: libebl-plugins = %{version} %description -n libelf1 This package provides a high-level library to read and write ELF files. @@ -127,11 +111,41 @@ Requires: libelf-devel = %{version} This package contains the headers and libraries needed to build applications that require libdw. +%package -n debuginfod-client +Summary: Library and command line client for build-id HTTP ELF/DWARF server +Group: Development/Tools/Building + +%description -n 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. + +%package -n debuginfod-client-devel +Summary: Libraries and headers to build debuginfod client applications +Group: Development/Libraries/C and C++ + +%description -n debuginfod-client-devel +The elfutils-debuginfod-client-devel package contains the libraries +to create applications to use the debuginfod service. + +%package -n debuginfod +Summary: HTTP ELF/DWARF file server addressed by build-id +Group: Development/Tools/Building +BuildRequires: pkgconfig(systemd) +%{?systemd_requires} + +%description -n 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. + %lang_package %prep %setup -q -%patch1 -p1 %patch2 -p1 %build @@ -165,17 +179,19 @@ rm -f %{buildroot}/%{_libdir}/*.la ls -lR %{buildroot}/%{_libdir}/libelf* %find_lang %{name} +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 + %post -n libasm1 -p /sbin/ldconfig - %post -n libelf1 -p /sbin/ldconfig - %post -n libdw1 -p /sbin/ldconfig - +%post -n debuginfod-client -p /sbin/ldconfig %postun -n libasm1 -p /sbin/ldconfig - %postun -n libelf1 -p /sbin/ldconfig - %postun -n libdw1 -p /sbin/ldconfig +%postun -n debuginfod-client -p /sbin/ldconfig %check %if 0%{?qemu_user_space_build} @@ -187,7 +203,24 @@ export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native %files %license COPYING %doc AUTHORS ChangeLog NEWS NOTES README THANKS TODO -%{_bindir}/* +%{_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-strings +%{_bindir}/eu-strip +%{_bindir}/eu-unstrip +%{_mandir}/man1/eu-*.1* %files -n libasm1 %{_libdir}/libasm.so.* @@ -199,14 +232,6 @@ export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native %dir %{_includedir}/elfutils %{_includedir}/elfutils/libasm.h -%files -n libebl-plugins -%{_libdir}/elfutils - -%files -n libebl-devel -%{_libdir}/libebl.a -%dir %{_includedir}/elfutils -%{_includedir}/elfutils/libebl.h - %files -n libelf1 %{_libdir}/libelf.so.* %{_libdir}/libelf-%{version}.so @@ -221,6 +246,7 @@ export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native %{_includedir}/elfutils/elf-knowledge.h %{_includedir}/elfutils/version.h %{_libdir}/pkgconfig/libelf.pc +%{_mandir}/man3/elf_*.3* %files -n libdw1 %{_libdir}/libdw.so.* @@ -239,4 +265,39 @@ export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native %files lang -f %{name}.lang +%files -n debuginfod-client +%{_libdir}/libdebuginfod-%{version}.so +%{_bindir}/debuginfod-find +%{_mandir}/man1/debuginfod-find.1* + +%files -n debuginfod-client-devel +%{_libdir}/pkgconfig/libdebuginfod.pc +%{_mandir}/man3/debuginfod_*.3* +%{_includedir}/elfutils/debuginfod.h +%{_libdir}/libdebuginfod.so* + +%files -n debuginfod +%{_bindir}/debuginfod +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/debuginfod +%{_unitdir}/debuginfod.service +%{_mandir}/man8/debuginfod.8* +%{_sysconfdir}/sysconfig/debuginfod + +%dir %attr(0700,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod +%verify(not md5 size mtime) %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite + +%pre -n debuginfod +getent group debuginfod >/dev/null || %{_sbindir}/groupadd -r debuginfod +getent passwd debuginfod >/dev/null || %{_sbindir}/useradd -r -g debuginfod -d /var/cache/debuginfod -s /bin/false -c "elfutils debuginfo server" debuginfod +%service_add_pre debuginfod.service + +%post -n debuginfod +%service_add_post debuginfod.service + +%preun -n debuginfod +%service_del_preun debuginfod.service + +%postun -n debuginfod +%service_del_postun debuginfod.service + %changelog