SHA256
1
0
forked from pool/elfutils

Accepting request 772771 from Base:System

- Re-add libelf1 to baselibs.conf: we still generate a
  libelf-devel-32bit, which is only installable if libelf1-21bit
  also exists. (forwarded request 772628 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/772771
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/elfutils?expand=0&rev=78
This commit is contained in:
Dominique Leuenberger 2020-02-13 09:10:57 +00:00 committed by Git OBS Bridge
commit b1bd7db1d4
11 changed files with 378 additions and 65 deletions

View File

@ -1,12 +1,6 @@
libasm1
libebl-plugins
obsoletes "libebl-<targettype> < <version>"
provides "libebl-<targettype> = <version>"
obsoletes "libebl1-<targettype> < <version>"
provides "libebl1-<targettype> = <version>"
libelf1
requires "libebl-plugins-<targettype> = <version>"
libdw1
libelf1
libelf-devel
requires -libelf-<targettype>
requires "libelf1-<targettype> = <version>"

View File

@ -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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e
size 8852413

Binary file not shown.

3
elfutils-0.178.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31e7a00e96d4e9c4bda452e1f2cdac4daf8abd24f5e154dee232131899f3a0f2
size 9007557

BIN
elfutils-0.178.tar.bz2.sig Normal file

Binary file not shown.

View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Tue Feb 4 09:06:00 UTC 2020 - Martin Liška <mliska@suse.cz>
- Package debuginfod of elfutils for version 0.178.

200
elfutils-debuginfod.spec Normal file
View File

@ -0,0 +1,200 @@
#
# spec file for package elfutils-debuginfod
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: elfutils-debuginfod
Version: 0.178
Release: 0
Summary: debuginfod part of elfutils
License: GPL-3.0-or-later
Group: Development/Tools/Building
URL: https://sourceware.org/elfutils/
#Git-Clone: git://sourceware.org/git/elfutils
Source: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-%{version}.tar.bz2
Source1: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-%{version}.tar.bz2.sig
Source2: elfutils.changes
Source3: elfutils.keyring
Patch0: remove-run-large-elf-file.sh.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
Requires: debuginfod-client = %{version}
Requires: elfutils = %{version}
BuildRequires: pkgconfig(systemd)
Requires: sysconfig
Requires(post): %fillup_prereq
%{?systemd_requires}
%description
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.
%package -n libdebuginfod1
Summary: Library for build-id HTTP ELF/DWARF server
Group: System/Libraries
%description -n libdebuginfod1
The libdebuginfod1 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 libdebuginfod-devel
Summary: Libraries and headers to build debuginfod client applications
Group: Development/Libraries/C and C++
%description -n libdebuginfod-devel
The libdebuginfod-devel package contains the libraries
to create applications to use the debuginfod service.
%package -n debuginfod-client
Summary: Command line client for build-id HTTP ELF/DWARF server
Group: Development/Tools/Building
%description -n debuginfod-client
The elfutils-debuginfod-client package contains a command-line frontend.
%lang_package
%prep
%setup -q -n elfutils-%version
%patch0 -p1
%build
%define _lto_cflags %{nil}
# Change DATE/TIME macros to use last change time of elfutils.changes
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
# Set modversion used to verify dynamically loaded ebl backend matches to
# similarly predictable value [upstream default is hostname + date]
MODVERSION="suse-build `eval echo ${DATE} ${TIME}`"
sed --in-place "s/^MODVERSION=.*\$/MODVERSION=\"${MODVERSION}\"/" configure.ac
export CFLAGS="%optflags"
CFLAGS+=" -g" # make tests pass when user does not want debuginfo (boo#1031556)
%ifarch %sparc
# Small PIC model not sufficient
CFLAGS+=" -fPIC"
%endif
autoreconf -fi
# some patches create new test scripts, which are created 644 by default
chmod a+x tests/run*.sh
%configure --program-prefix=eu-
%make_build
%install
%make_install
# remove unneeded files
rm -f %{buildroot}/%{_libdir}/*.la
ls -lR %{buildroot}/%{_libdir}/libelf*
rm -f %{buildroot}/%{_bindir}/eu*
rm -f %{buildroot}/%{_libdir}/libasm*
rm -f %{buildroot}/%{_includedir}/elfutils/lib*.h
rm -f %{buildroot}/%{_includedir}/elfutils/elf-knowledge.h
rm -f %{buildroot}/%{_includedir}/elfutils/known-dwarf.h
rm -f %{buildroot}/%{_includedir}/elfutils/version.h
rm -f %{buildroot}/%{_libdir}/libelf*
rm -f %{buildroot}/%{_includedir}/libelf.h
rm -f %{buildroot}/%{_includedir}/gelf.h
rm -f %{buildroot}/%{_includedir}/nlist.h
rm -f %{buildroot}/%{_includedir}/dwarf.h
rm -f %{buildroot}/%{_libdir}/libdw*
rm -f %{buildroot}/%{_mandir}/man3/elf_*.3*
rm -f %{buildroot}/%{_mandir}/man1/eu-*.1*
rm -rf %{buildroot}/usr/share/locale/
rm -f %{buildroot}/%{_libdir}/pkgconfig/libdw.pc
rm -f %{buildroot}/%{_libdir}/pkgconfig/libelf.pc
install -Dm0644 config/debuginfod.service %{buildroot}%{_unitdir}/debuginfod.service
install -d -m 755 %{buildroot}%{_fillupdir}
cp config/debuginfod.sysconfig %{buildroot}%{_fillupdir}/sysconfig.debuginfod
mkdir -p %{buildroot}%{_localstatedir}/cache/debuginfod
touch %{buildroot}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite
%post -n libdebuginfod1 -p /sbin/ldconfig
%postun -n libdebuginfod1 -p /sbin/ldconfig
%check
%if 0%{?qemu_user_space_build}
# qemu-linux-user does not support ptrace and a few other process details
export XFAIL_TESTS="dwfl-proc-attach run-backtrace-dwarf.sh run-backtrace-native.sh run-deleted.sh"
%endif
%make_build check
%files
%license COPYING
%doc AUTHORS ChangeLog NEWS NOTES README THANKS TODO
%{_bindir}/debuginfod
%{_unitdir}/debuginfod.service
%{_mandir}/man8/debuginfod.8*
%{_fillupdir}/sysconfig.debuginfod
%dir %attr(0700,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod
%verify(not md5 size mtime) %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite
%files -n libdebuginfod1
%{_libdir}/libdebuginfod.so.*
%{_libdir}/libdebuginfod-%{version}.so
%files -n libdebuginfod-devel
%{_libdir}/pkgconfig/libdebuginfod.pc
%{_mandir}/man3/debuginfod_*.3*
%dir %{_includedir}/elfutils
%{_includedir}/elfutils/debuginfod.h
%{_libdir}/libdebuginfod.so
%files -n debuginfod-client
%{_bindir}/debuginfod-find
%{_mandir}/man1/debuginfod-find.1*
%pre
getent group debuginfod >/dev/null || %{_sbindir}/groupadd -r debuginfod
getent passwd debuginfod >/dev/null || %{_sbindir}/useradd -r -g debuginfod -d %{_localstatedir}/cache/debuginfod -s /bin/false -c "elfutils debuginfo server" debuginfod
%service_add_pre debuginfod.service
%post
%service_add_post debuginfod.service
%{fillup_only -n debuginfod}
%preun
%service_del_preun debuginfod.service
%postun
%service_del_postun debuginfod.service
%changelog

View File

@ -1,3 +1,80 @@
-------------------------------------------------------------------
Mon Feb 10 08:39:45 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Re-add libelf1 to baselibs.conf: we still generate a
libelf-devel-32bit, which is only installable if libelf1-21bit
also exists.
-------------------------------------------------------------------
Tue Feb 4 09:34:24 UTC 2020 - Martin Liška <mliska@suse.cz>
- Exclude debuginfod sub-packages and move them to elfutils-debuginfod.
-------------------------------------------------------------------
Thu Jan 23 09:09:10 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Avoid double-shipping libdebuginfo.so.1 in two different
subpackages. Fixup RPM group.
-------------------------------------------------------------------
Thu Jan 23 06:17:51 UTC 2020 - Martin Liška <mliska@suse.cz>
- Split libdebuginfod1 into libdebuginfod1 and debuginfod-client.
Add Requires for these packages.
-------------------------------------------------------------------
Mon Jan 20 11:01:42 UTC 2020 - Martin Liška <mliska@suse.cz>
- Rename debuginfod-client package to libdebuginfod1 in
order to fulfil SLPP violation.
-------------------------------------------------------------------
Wed Jan 8 10:46:15 UTC 2020 - Andreas Schwab <schwab@suse.de>
- Fix variable references in specfile
-------------------------------------------------------------------
Mon Dec 9 09:33:40 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use %fillupdir macros for proper sysconfig export.
-------------------------------------------------------------------
Fri Nov 29 16:01:36 UTC 2019 - Martin Liška <mliska@suse.cz>
- 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
-------------------------------------------------------------------
Wed Nov 27 10:07:05 UTC 2019 - Martin Liška <mliska@suse.cz>
- Add remove-run-large-elf-file.sh.patch in order to remove
running run-large-elf-file.sh (it hit OOM).
-------------------------------------------------------------------
Thu Nov 14 15:19:43 UTC 2019 - Andreas Schwab <schwab@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package elfutils
#
# Copyright (c) 2019 SUSE LLC.
# Copyright (c) 2020 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,8 +31,8 @@ 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
Patch3: remove-run-large-elf-file.sh.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
@ -65,33 +65,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.
@ -131,8 +107,8 @@ applications that require libdw.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%define _lto_cflags %{nil}
@ -155,7 +131,7 @@ CFLAGS+=" -fPIC"
autoreconf -fi
# some patches create new test scripts, which are created 644 by default
chmod a+x tests/run*.sh
%configure --program-prefix=eu-
%configure --program-prefix=eu- --disable-debuginfod
%make_build
%install
@ -163,18 +139,14 @@ chmod a+x tests/run*.sh
# remove unneeded files
rm -f %{buildroot}/%{_libdir}/*.la
ls -lR %{buildroot}/%{_libdir}/libelf*
rm %{buildroot}/%{_libdir}/pkgconfig/libdebuginfod.pc
%find_lang %{name}
%post -n libasm1 -p /sbin/ldconfig
%post -n libelf1 -p /sbin/ldconfig
%post -n libdw1 -p /sbin/ldconfig
%postun -n libasm1 -p /sbin/ldconfig
%postun -n libelf1 -p /sbin/ldconfig
%postun -n libdw1 -p /sbin/ldconfig
%check
@ -187,7 +159,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 +188,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 +202,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.*

View File

@ -0,0 +1,68 @@
From e2b5eedefa1ed6a713a08e683eaaa5ae004492c3 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 27 Nov 2019 10:30:58 +0100
Subject: [PATCH] Remove run-large-elf-file.sh test as it fails due to OOM.
---
tests/Makefile.am | 2 --
tests/Makefile.in | 10 +---------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2ff7dfc..7cdbafc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -84,7 +84,6 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
run-next-files.sh run-next-lines.sh \
run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
run-show-abbrev.sh run-line2addr.sh hash \
- run-large-elf-file.sh \
newscn run-strip-test.sh run-strip-test2.sh \
run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
@@ -427,7 +426,6 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
testfile-riscv64-core.bz2 \
run-reverse-sections.sh run-reverse-sections-self.sh \
run-copyadd-sections.sh run-copymany-sections.sh \
- run-large-elf-file.sh \
run-typeiter-many.sh run-strip-test-many.sh \
testfile-debug-rel-ppc64-g.o.bz2 \
testfile-debug-rel-ppc64-z.o.bz2 \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 258dd64..fe9641f 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -141,7 +141,7 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile$(EXEEXT) \
run-get-files.sh run-get-lines.sh run-next-files.sh \
run-next-lines.sh run-get-pubnames.sh run-get-aranges.sh \
run-allfcts.sh run-show-abbrev.sh run-line2addr.sh \
- hash$(EXEEXT) run-large-elf-file.sh newscn$(EXEEXT) \
+ hash$(EXEEXT) newscn$(EXEEXT) \
run-strip-test.sh run-strip-test2.sh run-strip-test3.sh \
run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
run-strip-test7.sh run-strip-test8.sh run-strip-test9.sh \
@@ -1423,7 +1423,6 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
testfile-riscv64-core.bz2 \
run-reverse-sections.sh run-reverse-sections-self.sh \
run-copyadd-sections.sh run-copymany-sections.sh \
- run-large-elf-file.sh \
run-typeiter-many.sh run-strip-test-many.sh \
testfile-debug-rel-ppc64-g.o.bz2 \
testfile-debug-rel-ppc64-z.o.bz2 \
@@ -2581,13 +2580,6 @@ hash.log: hash$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-run-large-elf-file.sh.log: run-large-elf-file.sh
- @p='run-large-elf-file.sh'; \
- b='run-large-elf-file.sh'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
newscn.log: newscn$(EXEEXT)
@p='newscn$(EXEEXT)'; \
b='newscn'; \
--
2.24.0