From 87568dcb3344a38fa1bb7e982cab8aefd0dc7355 Mon Sep 17 00:00:00 2001 From: zhangruifang2020 Date: Fri, 10 Mar 2023 17:20:15 +0800 Subject: [PATCH] Archive the subpackage to the main package --- elfutils.spec | 107 +++++++++++--------------------------------------- 1 file changed, 24 insertions(+), 83 deletions(-) diff --git a/elfutils.spec b/elfutils.spec index 0cb416e..cba868e 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ # -*- rpm-spec from http://elfutils.org/ -*- Name: elfutils Version: 0.187 -Release: 10 +Release: 11 Summary: A collection of utilities and DSOs to handle ELF files and DWARF data URL: http://elfutils.org/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -13,8 +13,8 @@ Patch2: Fix-issue-of-moving-files-by-ar-or-br.patch Patch3: Get-instance-correctly-for-eu-ar-N-option.patch Patch4: elfutils-Add-sw64-architecture.patch -Requires: elfutils-libelf = %{version}-%{release} -Requires: elfutils-libs = %{version}-%{release} +Provides: elfutils-libelf elfutils-default-yama-scope default-yama-scope elfutils-libs +Obsoletes: elfutils-libelf < %{version}-%{release} elfutils-default-yama-scope < %{version}-%{release} elfutils-libs < %{version}-%{release} Requires: glibc >= 2.7 libstdc++ Recommends: elfutils-extra @@ -59,26 +59,12 @@ Requires: elfutils = %{version}-%{release} The extra package contains debug tools. readelf - to see the raw ELF file structures -%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-static elfutils-devel-static -Obsoletes: elfutils-libelf-devel-static < %{version}-%{release} elfutils-devel-static < %{version}-%{release} -Requires: elfutils-libs = %{version}-%{release} -Requires: elfutils-libelf-devel = %{version}-%{release} +Provides: elfutils-libelf-devel elfutils-libelf-devel-static elfutils-devel-static +Obsoletes: elfutils-libelf-devel < %{version}-%{release} elfutils-libelf-devel-static < %{version}-%{release} elfutils-devel-static < %{version}-%{release} +Requires: elfutils = %{version}-%{release} %description devel The elfutils-devel package contains the libraries to create @@ -89,43 +75,6 @@ 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 @@ -205,17 +154,13 @@ touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite %clean rm -rf ${RPM_BUILD_ROOT} -%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 +/sbin/ldconfig -%post default-yama-scope -if [ -x /usr/lib/systemd/systemd-sysctl ] ; then %sysctl_apply 10-default-yama-scope.conf -fi + +%postun +/sbin/ldconfig %files %defattr(-,root,root) @@ -235,13 +180,14 @@ fi %{_bindir}/eu-stack %{_bindir}/eu-strings %{_bindir}/eu-unstrip - -%files libs -%license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libasm-%{version}.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 extra %{_bindir}/eu-objdump @@ -259,29 +205,18 @@ fi %{_includedir}/elfutils/libdwelf.h %{_includedir}/elfutils/libdwfl.h %{_includedir}/elfutils/version.h +%{_includedir}/libelf.h +%{_includedir}/gelf.h +%{_includedir}/nlist.h %{_libdir}/libasm.a %{_libdir}/libasm.so %{_libdir}/libdw.a %{_libdir}/libdw.so %{_libdir}/libelf.a %{_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* @@ -326,6 +261,12 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Fri Mar 10 2023 zhangruifang - 0.187-11 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Archive the subpackage to the main package + * Mon Nov 14 2022 wuzx - 0.187-10 - Type:feature - CVE:NA -- Gitee