2008-10-14 02:26:42 +02:00
|
|
|
#
|
2011-05-02 11:57:50 +02:00
|
|
|
# spec file for package elfutils
|
2008-10-14 02:26:42 +02:00
|
|
|
#
|
2021-02-16 22:35:09 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2008-10-14 02:26:42 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-06-24 11:44:45 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-10-14 02:26:42 +02:00
|
|
|
#
|
|
|
|
|
2012-03-15 19:50:54 +01:00
|
|
|
|
2008-10-14 02:26:42 +02:00
|
|
|
Name: elfutils
|
2021-02-16 22:35:09 +01:00
|
|
|
Version: 0.183
|
2011-12-01 16:53:06 +01:00
|
|
|
Release: 0
|
2017-08-21 07:40:43 +02:00
|
|
|
Summary: Higher-level library to access ELF files
|
2019-06-04 12:47:35 +02:00
|
|
|
License: GPL-3.0-or-later
|
2014-11-25 08:35:02 +01:00
|
|
|
Group: Development/Tools/Building
|
2019-09-03 10:59:25 +02:00
|
|
|
URL: https://sourceware.org/elfutils/
|
2017-05-30 12:38:49 +02:00
|
|
|
#Git-Clone: git://sourceware.org/git/elfutils
|
2013-03-26 16:42:03 +01:00
|
|
|
Source: https://fedorahosted.org/releases/e/l/%{name}/%{version}/%{name}-%{version}.tar.bz2
|
2011-04-28 16:06:03 +02:00
|
|
|
Source1: README-BEFORE-ADDING-PATCHES
|
2010-02-10 12:24:02 +01:00
|
|
|
Source2: baselibs.conf
|
2014-09-02 18:05:23 +02:00
|
|
|
Source3: %{name}.changes
|
2020-09-09 10:00:06 +02:00
|
|
|
Source4: https://fedorahosted.org/releases/e/l/%{name}/%{version}/%{name}-%{version}.tar.bz2.sig
|
2019-02-19 13:15:51 +01:00
|
|
|
Source5: %{name}.keyring
|
2020-12-03 18:39:20 +01:00
|
|
|
Source6: elfutils-rpmlintrc
|
2015-02-13 02:44:28 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2011-12-01 16:53:06 +01:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: libbz2-devel
|
|
|
|
BuildRequires: xz-devel
|
|
|
|
BuildRequires: zlib-devel
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%description
|
2017-08-21 07:40:43 +02:00
|
|
|
elfutils is a collection of utilities and libraries to read, create
|
|
|
|
and modify ELF binary files, find and handle DWARF debug data,
|
|
|
|
symbols, thread state and stacktraces for processes and core files.
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%package -n libasm1
|
|
|
|
Summary: A collection of utilities and DSOs to handle compiled objects
|
2014-11-25 08:35:02 +01:00
|
|
|
Group: System/Libraries
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%description -n libasm1
|
2017-08-21 07:40:43 +02:00
|
|
|
libasm contains the "asm" and "disasm" functions to assemble and
|
|
|
|
disassamble instructions. (There is only partial support for i686 and
|
|
|
|
BPF instructions.) This is part of the elfutils package.
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%package -n libasm-devel
|
|
|
|
Summary: A collection of utilities and DSOs to handle compiled objects
|
2014-11-25 08:35:02 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-05-31 10:51:10 +02:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libasm1 = %{version}
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%description -n libasm-devel
|
2017-08-21 07:40:43 +02:00
|
|
|
This package contains the headers and libraries needed to build
|
|
|
|
applications that require libasm.
|
|
|
|
|
2008-10-14 02:26:42 +02:00
|
|
|
%package -n libelf1
|
|
|
|
Summary: Library to read and write ELF files
|
2012-05-31 10:51:10 +02:00
|
|
|
Group: System/Libraries
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%description -n libelf1
|
2011-05-31 22:41:31 +02:00
|
|
|
This package provides a high-level library to read and write ELF files.
|
2017-08-21 07:40:43 +02:00
|
|
|
This is part of the elfutils package.
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%package -n libelf-devel
|
2017-08-21 07:40:43 +02:00
|
|
|
Summary: Development files for libelf
|
2008-10-14 02:26:42 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-05-31 10:51:10 +02:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libelf1 = %{version}
|
2008-10-14 02:26:42 +02:00
|
|
|
Conflicts: libelf0-devel
|
|
|
|
|
|
|
|
%description -n libelf-devel
|
2017-08-21 07:40:43 +02:00
|
|
|
This package contains the headers and libraries needed to build
|
|
|
|
applications that require libelf.
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%package -n libdw1
|
|
|
|
Summary: Library to access DWARF debugging information
|
2012-05-31 10:51:10 +02:00
|
|
|
Group: System/Libraries
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%description -n libdw1
|
2011-05-31 22:41:31 +02:00
|
|
|
This package provides a high-level library to access the DWARF debugging
|
2017-08-21 07:40:43 +02:00
|
|
|
information. This is part of the elfutils package.
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%package -n libdw-devel
|
2017-08-21 07:40:43 +02:00
|
|
|
Summary: Development files for libdw
|
2008-10-14 02:26:42 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-05-31 10:51:10 +02:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libdw1 = %{version}
|
2009-02-19 18:07:55 +01:00
|
|
|
Requires: libelf-devel = %{version}
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%description -n libdw-devel
|
2017-08-21 07:40:43 +02:00
|
|
|
This package contains the headers and libraries needed to build
|
|
|
|
applications that require libdw.
|
2008-10-14 02:26:42 +02:00
|
|
|
|
2020-12-03 18:39:20 +01:00
|
|
|
%package -n libdebuginfod1-dummy
|
|
|
|
Summary: Library for build-id HTTP ELF/DWARF server
|
|
|
|
Group: System/Libraries
|
|
|
|
Provides: libdebuginfod1 = %{version}
|
|
|
|
|
|
|
|
%description -n libdebuginfod1-dummy
|
|
|
|
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.
|
|
|
|
The package is dummy.
|
|
|
|
|
|
|
|
%package -n libdebuginfod-dummy-devel
|
|
|
|
Summary: Libraries and headers to build debuginfod client applications
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Provides: libdebuginfod-devel = %{version}
|
|
|
|
|
|
|
|
%description -n libdebuginfod-dummy-devel
|
|
|
|
The libdebuginfod-devel package contains the libraries
|
|
|
|
to create applications to use the debuginfod service.
|
|
|
|
The package is dummy.
|
|
|
|
|
|
|
|
%package -n debuginfod-dummy-client
|
|
|
|
Summary: Command line client for build-id HTTP ELF/DWARF server
|
|
|
|
Group: Development/Tools/Building
|
|
|
|
Provides: debuginfod-client = %{version}
|
|
|
|
|
|
|
|
%description -n debuginfod-dummy-client
|
|
|
|
The elfutils-debuginfod-client package contains a command-line frontend.
|
|
|
|
The package is dummy.
|
|
|
|
|
2015-01-07 20:43:35 +01:00
|
|
|
%lang_package
|
|
|
|
|
2008-10-14 02:26:42 +02:00
|
|
|
%prep
|
2020-06-17 08:56:07 +02:00
|
|
|
%autosetup -p1
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%build
|
2021-02-16 22:35:09 +01:00
|
|
|
%global _lto_cflags %{_lto_cflags} -flto-partition=none -Wno-error=stack-usage= -ffat-lto-objects
|
2011-05-25 02:25:57 +02:00
|
|
|
# Change DATE/TIME macros to use last change time of elfutils.changes
|
|
|
|
# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html
|
2011-05-25 02:21:47 +02:00
|
|
|
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" {} +
|
2015-02-13 02:44:28 +01:00
|
|
|
# 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
|
2017-04-03 08:47:31 +02:00
|
|
|
export CFLAGS="%optflags"
|
|
|
|
CFLAGS+=" -g" # make tests pass when user does not want debuginfo (boo#1031556)
|
2014-03-24 07:20:48 +01:00
|
|
|
%ifarch %sparc
|
|
|
|
# Small PIC model not sufficient
|
2017-04-03 08:47:31 +02:00
|
|
|
CFLAGS+=" -fPIC"
|
2014-03-24 07:20:48 +01:00
|
|
|
%endif
|
2015-02-13 02:44:28 +01:00
|
|
|
autoreconf -fi
|
2019-05-21 15:14:27 +02:00
|
|
|
# some patches create new test scripts, which are created 644 by default
|
|
|
|
chmod a+x tests/run*.sh
|
2020-12-03 18:39:20 +01:00
|
|
|
%configure --program-prefix=eu- --disable-debuginfod --enable-libdebuginfod=dummy
|
2019-08-15 11:39:39 +02:00
|
|
|
%make_build
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%install
|
2019-09-03 10:59:25 +02:00
|
|
|
%make_install
|
2008-10-14 02:26:42 +02:00
|
|
|
# remove unneeded files
|
2019-09-03 10:59:25 +02:00
|
|
|
rm -f %{buildroot}/%{_libdir}/*.la
|
2021-02-16 22:35:09 +01:00
|
|
|
rm -f %{buildroot}/%{_sysconfdir}/profile.d/debuginfod.*sh
|
|
|
|
rm -f %{buildroot}/%{_libdir}/pkgconfig/libdebuginfod.pc
|
2019-09-03 10:59:25 +02:00
|
|
|
ls -lR %{buildroot}/%{_libdir}/libelf*
|
2015-01-07 20:43:35 +01:00
|
|
|
%find_lang %{name}
|
2008-10-14 02:26:42 +02:00
|
|
|
|
2019-12-02 09:21:38 +01:00
|
|
|
%post -n libasm1 -p /sbin/ldconfig
|
2008-10-14 02:26:42 +02:00
|
|
|
%post -n libelf1 -p /sbin/ldconfig
|
|
|
|
%post -n libdw1 -p /sbin/ldconfig
|
2017-04-10 15:27:43 +02:00
|
|
|
%postun -n libasm1 -p /sbin/ldconfig
|
2008-10-14 02:26:42 +02:00
|
|
|
%postun -n libelf1 -p /sbin/ldconfig
|
|
|
|
%postun -n libdw1 -p /sbin/ldconfig
|
2020-12-03 18:39:20 +01:00
|
|
|
%post -n libdebuginfod1-dummy -p /sbin/ldconfig
|
|
|
|
%postun -n libdebuginfod1-dummy -p /sbin/ldconfig
|
2008-10-14 02:26:42 +02:00
|
|
|
|
2015-11-21 18:08:09 +01:00
|
|
|
%check
|
2019-11-15 08:52:19 +01:00
|
|
|
%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
|
2019-08-15 11:39:39 +02:00
|
|
|
%make_build check
|
2015-11-21 18:08:09 +01:00
|
|
|
|
2008-10-14 02:26:42 +02:00
|
|
|
%files
|
2018-02-26 12:11:50 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS ChangeLog NEWS NOTES README THANKS TODO
|
2019-12-02 09:21:38 +01:00
|
|
|
%{_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*
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%files -n libasm1
|
|
|
|
%{_libdir}/libasm.so.*
|
|
|
|
%{_libdir}/libasm-%{version}.so
|
|
|
|
|
|
|
|
%files -n libasm-devel
|
|
|
|
%{_libdir}/libasm.so
|
|
|
|
%{_libdir}/libasm.a
|
|
|
|
%dir %{_includedir}/elfutils
|
|
|
|
%{_includedir}/elfutils/libasm.h
|
|
|
|
|
|
|
|
%files -n libelf1
|
|
|
|
%{_libdir}/libelf.so.*
|
|
|
|
%{_libdir}/libelf-%{version}.so
|
|
|
|
|
|
|
|
%files -n libelf-devel
|
|
|
|
%{_libdir}/libelf.so
|
|
|
|
%{_libdir}/libelf.a
|
|
|
|
%{_includedir}/libelf.h
|
|
|
|
%{_includedir}/gelf.h
|
|
|
|
%{_includedir}/nlist.h
|
|
|
|
%dir %{_includedir}/elfutils
|
|
|
|
%{_includedir}/elfutils/elf-knowledge.h
|
2009-02-19 18:07:55 +01:00
|
|
|
%{_includedir}/elfutils/version.h
|
2016-06-27 16:38:55 +02:00
|
|
|
%{_libdir}/pkgconfig/libelf.pc
|
2019-12-02 09:21:38 +01:00
|
|
|
%{_mandir}/man3/elf_*.3*
|
2008-10-14 02:26:42 +02:00
|
|
|
|
|
|
|
%files -n libdw1
|
|
|
|
%{_libdir}/libdw.so.*
|
|
|
|
%{_libdir}/libdw-%{version}.so
|
|
|
|
|
|
|
|
%files -n libdw-devel
|
|
|
|
%{_libdir}/libdw.a
|
|
|
|
%{_libdir}/libdw.so
|
|
|
|
%{_includedir}/dwarf.h
|
|
|
|
%dir %{_includedir}/elfutils
|
|
|
|
%{_includedir}/elfutils/libdw.h
|
2015-01-07 20:43:35 +01:00
|
|
|
%{_includedir}/elfutils/libdwelf.h
|
2008-10-14 02:26:42 +02:00
|
|
|
%{_includedir}/elfutils/libdwfl.h
|
2015-09-12 20:41:06 +02:00
|
|
|
%{_includedir}/elfutils/known-dwarf.h
|
2016-06-27 16:38:55 +02:00
|
|
|
%{_libdir}/pkgconfig/libdw.pc
|
2008-10-14 02:26:42 +02:00
|
|
|
|
2020-12-03 18:39:20 +01:00
|
|
|
%files -n libdebuginfod1-dummy
|
|
|
|
%{_libdir}/libdebuginfod.so.*
|
|
|
|
%{_libdir}/libdebuginfod-%{version}.so
|
|
|
|
|
|
|
|
%files -n libdebuginfod-dummy-devel
|
|
|
|
%{_mandir}/man3/debuginfod_*.3*
|
|
|
|
%dir %{_includedir}/elfutils
|
|
|
|
%{_includedir}/elfutils/debuginfod.h
|
|
|
|
%{_libdir}/libdebuginfod.so
|
|
|
|
|
|
|
|
%files -n debuginfod-dummy-client
|
|
|
|
%{_bindir}/debuginfod-find
|
|
|
|
%{_mandir}/man1/debuginfod-find.1*
|
|
|
|
|
2015-01-07 20:43:35 +01:00
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
2008-10-14 02:26:42 +02:00
|
|
|
%changelog
|