From e5213ac8ac06a1b379c1bcc92f9b679a93794022 Mon Sep 17 00:00:00 2001 From: ZiyangZhang Date: Fri, 14 Apr 2023 16:55:56 +0800 Subject: [PATCH] Optimize spec file Signed-off-by: ZiyangZhang --- debugedit.spec | 90 +++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 56 deletions(-) diff --git a/debugedit.spec b/debugedit.spec index d3af134..d184024 100644 --- a/debugedit.spec +++ b/debugedit.spec @@ -1,61 +1,38 @@ -%define anolis_release 4 +%define anolis_release 5 +%global _hardened_build 1 +Summary: Tools for debuginfo creation Name: debugedit Version: 5.0 Release: %{anolis_release}%{?dist} -Summary: Tools for debuginfo creation + License: GPLv3+ and GPLv2+ and LGPLv2+ URL: https://sourceware.org/debugedit/ -Source0: https://sourceware.org/pub/debugedit/%{version}/%{name}-%{version}.tar.xz - -BuildRequires: make -BuildRequires: gcc -BuildRequires: pkgconfig(libelf) -BuildRequires: pkgconfig(libdw) -BuildRequires: help2man - -# For configure checking -j support -BuildRequires: dwz - -# For the testsuite. -BuildRequires: autoconf -BuildRequires: automake - -# The find-debuginfo.sh script has a couple of tools it needs at runtime. -# For strip_to_debug, eu-strip -Requires: elfutils -# For add_minidebug, readelf, awk, nm, sort, comm, objcopy, xz -Requires: binutils, gawk, coreutils, xz -# For find and xargs -Requires: findutils -# For do_file, gdb_add_index -# We only need gdb-add-index, so suggest gdb-minimal (full gdb is also ok) -Requires: /usr/bin/gdb-add-index -Suggests: gdb-minimal -# For run_job, sed -Requires: sed -# For dwz -Requires: dwz -# For append_uniq, grep -Requires: grep +Source0: https://sourceware.org/pub/%{name}/%{version}/%{name}-%{version}.tar.xz -%global _hardened_build 1 +Patch0001: 0001-use-READELF-not-readelf.patch +Patch0002: 0001-tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch +Patch0003: 0001-find-debuginfo-Pass-j-down-to-dwz.patch +Patch0004: 0002-configure.ac-Use-AC_LINK_IFELSE-for-gz-none-check.patch +Patch0005: 0003-configure.ac-Use-AC_LANG_PROGRAM-for-AC_LINK_IFELSE-.patch +Patch0006: 0004-scripts-find-debuginfo.in-Add-q-quiet.patch -Patch1: 0001-use-READELF-not-readelf.patch -Patch2: 0001-tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch -Patch3: 0001-find-debuginfo-Pass-j-down-to-dwz.patch -Patch4: 0002-configure.ac-Use-AC_LINK_IFELSE-for-gz-none-check.patch -Patch5: 0003-configure.ac-Use-AC_LANG_PROGRAM-for-AC_LINK_IFELSE-.patch -Patch6: 0004-scripts-find-debuginfo.in-Add-q-quiet.patch +BuildRequires: make, gcc > 12.0, help2man, dwz, autoconf, automake +BuildRequires: pkgconfig(libelf), pkgconfig(libdw) -%description -The debugedit project provides programs and scripts for creating -debuginfo and source file distributions, collect build-ids and rewrite -source paths in DWARF data for debugging, tracing and profiling. +Requires: elfutils, binutils, findutils, gawk, coreutils, xz +Requires: /usr/bin/gdb-add-index +Suggests: gdb-minimal +Requires: sed, dwz, grep -It is based on code originally from the rpm project plus libiberty and -binutils. It depends on the elfutils libelf and libdw libraries to -read and write ELF files, DWARF data and build-ids. +%description +%{name} is a tool used for debugging programs in Linux. It allows +developers to view and modify debugging information associated with +ELF (Executable Linkable Format) files. This tool enables developers +to track down software bugs by identifying and manipulating the source +code or binary files at runtime. %{name} provides a set of commands +that allow developers to analyze and manipulate the symbol table, source +files, and line number information in ELF files. %package doc Summary: Documentation files for %{name} @@ -69,32 +46,30 @@ The %{name}-doc package contains documentation files for %{name}. %autosetup -p1 %build -autoreconf -f -v -i +autoreconf -ivf %configure %make_build %install %make_install -# Temp symlink to make sure things don't break. + cd %{buildroot}%{_bindir} ln -s find-debuginfo find-debuginfo.sh - %generate_compatibility_deps %check -# The testsuite should be zero fail. %make_build check %files -%dir %{abidir} %license COPYING COPYING3 COPYING.LIB +%dir %{abidir} %{_bindir}/debugedit +%{abidir}/debugedit-option.list %{_bindir}/sepdebugcrcfix +%{abidir}/sepdebugcrcfix-option.list %{_bindir}/find-debuginfo -%{_bindir}/find-debuginfo.sh -%{abidir}/debugedit-option.list %{abidir}/find-debuginfo-option.list -%{abidir}/sepdebugcrcfix-option.list +%{_bindir}/find-debuginfo.sh %{_mandir}/man1/debugedit.1* %{_mandir}/man1/sepdebugcrcfix.1* %{_mandir}/man1/find-debuginfo.1* @@ -103,6 +78,9 @@ ln -s find-debuginfo find-debuginfo.sh %doc README %changelog +* Tue Apr 11 2023 Ziyang Zhang -5.0-5 +- Optimize spec file + * Sun Feb 26 2023 Funda Wang - 5.0-4 - Sync with upstream patches -- Gitee