#
# Conditional build:
+%bcond_without debuginfod # debuginfod server and client
%bcond_without tests # do not perform tests
#
Summary: A collection of utilities and DSOs to handle compiled objects
Summary(pl.UTF-8): Zestaw narzędzi i bibliotek do obsługi skompilowanych obiektów
Name: elfutils
-Version: 0.173
+Version: 0.179
Release: 1
License: GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs)
Group: Development/Tools
Source0: https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: 35decb1ebfb90d565e4c411bee4185cc
+# Source0-md5: 8ee56b371b5a7ea081284c44e5164600
Patch0: %{name}-pl.po.patch
Patch1: %{name}-debian-manpages.patch
Patch2: %{name}-awk.patch
Patch3: %{name}-align.patch
Patch4: %{name}-paxflags.patch
Patch5: %{name}-sparc.patch
-Patch6: %{name}-maps.patch
+Patch6: x32.patch
URL: https://sourceware.org/elfutils/
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.11
BuildRequires: gcc >= 6:4.3
BuildRequires: gettext-tools
BuildRequires: glibc-devel >= 6:2.7
-BuildRequires: libstdc++-devel
+BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: perl-tools-pod
-BuildRequires: rpmbuild(macros) >= 1.315
+BuildRequires: rpmbuild(macros) >= 1.527
BuildRequires: sharutils
BuildRequires: xz-devel
BuildRequires: zlib-devel
# native test needs proc (for libdwfl -p PID to work)
BuildRequires: MOUNTED_PROC
%endif
+%if %{with debuginfod}
+BuildRequires: curl-devel >= 7.29.0
+BuildRequires: libarchive-devel >= 3.1.2
+BuildRequires: libmicrohttpd-devel >= 0.9.33
+BuildRequires: sqlite3-devel >= 3.7.17
+%endif
Requires: %{name}-libelf = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
The elfutils-devel package contains the development part of libraries
to create applications for handling compiled objects. libelf allows
you to access the internals of the ELF object file format, so you can
-see the different sections of an ELF file. libebl provides some
-higher-level ELF access functionality. libdwarf provides access to the
-DWARF debugging information. libasm provides a programmable assembler
-interface.
+see the different sections of an ELF file. libdw provides access to
+the DWARF debugging information. libasm provides a programmable
+assembler interface.
%description devel -l pl.UTF-8
Pakiet elfutils-devel zawiera część programistyczną bibliotek do
tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
-oglądanie różnych sekcji pliku ELF. libebl udostępnia funkcjonalność
-dostępu do plików ELF trochę wyższego poziomu. libdwarf pozwala na
-dostęp do informacji DWARF służących do odpluskwiania. libasm
-udostępnia programowalny interfejs asemblera.
+oglądanie różnych sekcji pliku ELF. libdw pozwala na dostęp do
+informacji DWARF służących do odpluskwiania. libasm udostępnia
+programowalny interfejs asemblera.
%package libelf
Summary: Library to read and write ELF files
The elfutils-static package contains the static libraries to create
applications for handling compiled objects. libelf allows you to
access the internals of the ELF object file format, so you can see the
-different sections of an ELF file. libebl provides some higher-level
-ELF access functionality. libdwarf provides access to the DWARF
+different sections of an ELF file. libdw provides access to the DWARF
debugging information. libasm provides a programmable assembler
interface.
Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
-różnych sekcji pliku ELF. libebl udostępnia funkcjonalność dostępu do
-plików ELF trochę wyższego poziomu. libdwarf pozwala na dostęp do
-informacji DWARF służących do odpluskwiania. libasm udostępnia
-programowalny interfejs asemblera.
+różnych sekcji pliku ELF. libdw pozwala na dostęp do informacji DWARF
+służących do odpluskwiania. libasm udostępnia programowalny interfejs
+asemblera.
+
+%package debuginfod
+Summary: debuginfod library, server and client
+Summary(pl.UTF-8): Biblioteka, serwer i klient debuginfod
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+%if %{with debuginfod}
+# for library
+Requires: curl-libs >= 7.29.0
+# the rest for server
+Requires: libarchive >= 3.1.2
+Requires: libmicrohttpd >= 0.9.33
+Requires: sqlite3 >= 3.7.17
+%endif
+
+%description debuginfod
+debuginfod library, server and client.
+
+%description debuginfod -l pl.UTF-8
+Biblioteka, serwer i klient debuginfod.
+
+%package debuginfod-devel
+Summary: Header file for debuginfod library
+Summary(pl.UTF-8): Plik nagłówkowy biblioteki debuginfod
+Group: Development/Libraries
+Requires: %{name}-debuginfod = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+
+%description debuginfod-devel
+Header file for debuginfod library.
+
+%description debuginfod-devel -l pl.UTF-8
+Plik nagłówkowy biblioteki debuginfod.
%prep
%setup -q
%{__sed} -i -e 's/run-backtrace-native-biarch.sh//' tests/Makefile.am
%endif
+# make sure this is not even tried on arch it has no chance to run
+%ifarch %{ix86}
+%{__sed} -i -e 's/run-disasm-x86-64.sh//' tests/Makefile.am
+%endif
+
%build
#%%{__gettextize}
%{__aclocal} -I m4
-%{__autoheader}
%{__autoconf}
+%{__autoheader}
%{__automake}
%configure \
--disable-silent-rules \
--disable-werror \
+ %{__enable_disable debuginfod} \
--program-prefix=%{programprefix}
# make check depends on test-nlist not stripped
%post libelf -p /sbin/ldconfig
%postun libelf -p /sbin/ldconfig
+%post debuginfod -p /sbin/ldconfig
+%postun debuginfod -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
%doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO
%attr(755,root,root) %ghost %{_libdir}/libasm.so.1
%attr(755,root,root) %{_libdir}/libdw-*.so
%attr(755,root,root) %ghost %{_libdir}/libdw.so.1
-%dir %{_libdir}/elfutils
-%attr(755,root,root) %{_libdir}/elfutils/lib*.so
%{_mandir}/man1/eu-*.1*
%files devel
%attr(755,root,root) %{_libdir}/libasm.so
%attr(755,root,root) %{_libdir}/libdw.so
%attr(755,root,root) %{_libdir}/libelf.so
-%{_libdir}/libebl.a
-%{_includedir}/elfutils
%{_includedir}/dwarf.h
%{_includedir}/gelf.h
%{_includedir}/libelf.h
%{_includedir}/nlist.h
+%dir %{_includedir}/elfutils
+%{_includedir}/elfutils/elf-knowledge.h
+%{_includedir}/elfutils/known-dwarf.h
+%{_includedir}/elfutils/libasm.h
+%{_includedir}/elfutils/libdw.h
+%{_includedir}/elfutils/libdwelf.h
+%{_includedir}/elfutils/libdwfl.h
+%{_includedir}/elfutils/version.h
%{_pkgconfigdir}/libdw.pc
%{_pkgconfigdir}/libelf.pc
+%{_mandir}/man3/elf_begin.3*
+%{_mandir}/man3/elf_clone.3*
+%{_mandir}/man3/elf_getdata.3*
+%{_mandir}/man3/elf_update.3*
%files libelf -f %{name}.lang
%defattr(644,root,root,755)
%{_libdir}/libasm.a
%{_libdir}/libdw.a
%{_libdir}/libelf.a
+
+%if %{with debuginfod}
+%files debuginfod
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdebuginfod-*.so
+%attr(755,root,root) %ghost %{_libdir}/libdebuginfod.so.1
+%attr(755,root,root) %{_bindir}/debuginfod
+%attr(755,root,root) %{_bindir}/debuginfod-find
+%{_mandir}/man1/debuginfod-find.1*
+%{_mandir}/man8/debuginfod.8*
+
+%files debuginfod-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdebuginfod.so
+%{_includedir}/elfutils/debuginfod.h
+%{_pkgconfigdir}/libdebuginfod.pc
+%{_mandir}/man3/debuginfod_*.3*
+%endif