diff --git a/elfutils.spec b/elfutils.spec index 6fcecd3887654dbb8efae07a443317980eb3ee71..b50645ebefa6039e58439e4201aa5bb07b40ebfd 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,14 +1,14 @@ # -*- rpm-spec from http://elfutils.org/ -*- Name: elfutils Version: 0.180 -Release: 2 +Release: 3 Summary: A collection of utilities and DSOs to handle ELF files and DWARF data URL: http://elfutils.org/ License: GPLv3+ and (GPLv2+ or LGPLv3+) Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 -Provides: elfutils-libelf elfutils-default-yama-scope default-yama-scope elfutils-libs -Obsoletes: elfutils-libelf elfutils-default-yama-scope elfutils-libs +Requires: elfutils-libelf = %{version}-%{release} +Requires: elfutils-libs = %{version}-%{release} Requires: glibc >= 2.7 libstdc++ BuildRoot: %{_tmppath}/%{name}-root @@ -24,7 +24,6 @@ BuildRequires: pkgconfig(libarchive) >= 3.1.2 %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), @@ -44,12 +43,26 @@ interprocess services, communication and introspection (like synchronisation, signaling, debugging, tracing and profiling) of processes. +%package libs +Summary: Libraries to handle compiled objects +License: GPLv2+ or LGPLv3+ +Requires: elfutils-libelf = %{version}-%{release} +Requires: default-yama-scope + +%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. License: GPLv2+ or LGPLv3+ -Provides: elfutils-libelf-devel elfutils-libelf-devel-static elfutils-devel-static -Obsoletes: elfutils-libelf-devel elfutils-libelf-devel-static elfutils-devel-static -Requires: elfutils = %{version}-%{release} +Provides: elfutils-libelf-devel-static elfutils-devel-static +Obsoletes: elfutils-libelf-devel-static elfutils-devel-static +Requires: elfutils-libs = %{version}-%{release} +Requires: elfutils-libelf-devel = %{version}-%{release} %description devel The elfutils-devel package contains the libraries to create @@ -60,11 +73,48 @@ assembler interface. libelf allows you to access the internals of the ELF object file format, so you can see the different sections of an ELF file. +%package libelf +Summary: Library to read and write ELF files +License: GPLv2+ or LGPLv3+ + +%description libelf +The elfutils-libelf package provides a DSO which allows reading and +writing ELF files on a high level. Third party programs depend on +this package to read internals of ELF files. The programs of the +elfutils package use it also to generate new ELF files. + +%package libelf-devel +Summary: Development support for libelf +License: GPLv2+ or LGPLv3+ +Requires: elfutils-libelf = %{version}-%{release} +Conflicts: libelf-devel + +%description libelf-devel +The elfutils-libelf-devel package contains the 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. + +%package default-yama-scope +Summary: Default yama attach scope sysctl setting +License: GPLv2+ or LGPLv3+ +Provides: default-yama-scope +BuildArch: noarch + +%description default-yama-scope +Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + %package help Summary: Help documents for elfutils %description help -This package contains help documents for eltutils +This package contains help documents for elfutils %package debuginfod-client Summary: Library and command line client for build-id HTTP ELF/DWARF server @@ -128,13 +178,17 @@ make -s %{?_smp_mflags} check %clean rm -rf ${RPM_BUILD_ROOT} -%post -/sbin/ldconfig +%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 +if [ -x /usr/lib/systemd/systemd-sysctl ] ; then %sysctl_apply 10-default-yama-scope.conf - -%postun -/sbin/ldconfig +fi %files %defattr(-,root,root) @@ -157,14 +211,13 @@ rm -rf ${RPM_BUILD_ROOT} %{_bindir}/eu-strings %{_bindir}/eu-strip %{_bindir}/eu-unstrip + +%files libs +%license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libasm-%{version}.so -%{_libdir}/libasm.so.* %{_libdir}/libdw-%{version}.so +%{_libdir}/libasm.so.* %{_libdir}/libdw.so.* -%{_libdir}/libelf-%{version}.so -%{_libdir}/libelf.so.* -%{_datadir}/locale/*/LC_MESSAGES/elfutils.mo -%{_sysctldir}/10-default-yama-scope.conf %files devel %defattr(-,root,root) @@ -177,18 +230,29 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/elfutils/libdwelf.h %{_includedir}/elfutils/libdwfl.h %{_includedir}/elfutils/version.h -%{_includedir}/gelf.h -%{_includedir}/libelf.h -%{_includedir}/nlist.h %{_libdir}/libasm.a %{_libdir}/libasm.so %{_libdir}/libdw.a %{_libdir}/libdw.so %{_libdir}/libelf.a -%{_libdir}/libelf.so %{_libdir}/pkgconfig/libdw.pc + +%files libelf +%license COPYING-GPLV2 COPYING-LGPLV3 +%{_libdir}/libelf-%{version}.so +%{_libdir}/libelf.so.* +%{_datadir}/locale/*/LC_MESSAGES/elfutils.mo + +%files libelf-devel +%{_includedir}/libelf.h +%{_includedir}/gelf.h +%{_includedir}/nlist.h +%{_libdir}/libelf.so %{_libdir}/pkgconfig/libelf.pc +%files default-yama-scope +%{_sysctldir}/10-default-yama-scope.conf + %files help %{_mandir}/man1/eu-*.1* %{_mandir}/man1/debuginfod-find.1* @@ -231,6 +295,10 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Thu Sep 16 2021 panxiaohe - 0.180-3 +- detach subpackages elfutils-libs, elfutils-libelf, + elfutils-libelf-devel, elfutils-default-yama-scope + * Sat Jun 5 2021 wangchen - 0.180-2 - add gcc-c++ to BuildRequires