From 94de76b499fe97b781c07a1d472b1761de7a4c74 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 9 Jun 2021 13:53:48 +0200 Subject: [PATCH] Initial debugedit import. Resolves: #1957744 New RHEL9 package: debugedit - Tools for debuginfo creation --- .gitignore | 3 ++ debugedit.spec | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 3 ++ 3 files changed, 97 insertions(+) create mode 100644 debugedit.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..c3398f9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +/debugedit-0.2.tar.xz +/debugedit-0.2.tar.xz.sig +/gpgkey-5C1D1AA44BE649DE760A.gpg diff --git a/debugedit.spec b/debugedit.spec new file mode 100644 index 0000000..245622b --- /dev/null +++ b/debugedit.spec @@ -0,0 +1,91 @@ +Name: debugedit +Version: 0.2 +Release: 1%{?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 +Source1: https://sourceware.org/pub/debugedit/%{version}/%{name}-%{version}.tar.xz.sig +Source2: gpgkey-5C1D1AA44BE649DE760A.gpg + +BuildRequires: make gcc +BuildRequires: pkgconfig(libelf) +BuildRequires: pkgconfig(libdw) + +BuildRequires: gnupg2 + +# 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 + +%global _hardened_build 1 + +%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. + +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. + +%prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup + +%build +%configure +%make_build + +%install +%make_install + +%check +# The testsuite should be zero fail. +# It uses its own CFLAGS and LDFLAGS settings. +sed -i 's/^\(C\|LD\)FLAGS=.*/\1FLAGS=""/' tests/atlocal +make check %{?_smp_mflags} + +%files +%license COPYING COPYING3 COPYING.LIB +%doc README +%{_bindir}/debugedit +%{_bindir}/sepdebugcrcfix +%{_bindir}/find-debuginfo.sh +%{_mandir}/man1/debugedit.1* +%{_mandir}/man1/sepdebugcrcfix.1* +%{_mandir}/man1/find-debuginfo.sh.1* + +%changelog +* Wed May 5 2021 Mark Wielaard - 0.2-1 +- Update to upstream 0.2 pre-release. Adds documentation. + +* Wed Apr 28 2021 Mark Wielaard - 0.1-5 +- Add dist to Release. Use file dependency for /usr/bin/gdb-add-index. + +* Tue Apr 27 2021 Mark Wielaard - 0.1-4 +- Use numbered Sources and https. + +* Mon Apr 26 2021 Mark Wielaard - 0.1-3 +- Fix some rpmlint issues, add comments, add license and doc, + gpg verification, use pkgconfig BuildRequires, enable _hardened_build + +* Mon Mar 29 2021 Panu Matilainen +- Add pile of missing runtime utility dependencies + +* Tue Mar 23 2021 Panu Matilainen +- Initial packaging diff --git a/sources b/sources new file mode 100644 index 0000000..9fd62fe --- /dev/null +++ b/sources @@ -0,0 +1,3 @@ +SHA512 (debugedit-0.2.tar.xz) = c277c23ab8fcf7925bb81f83f34c9f1cc93015f5aedcd28b4f5774de11a80d3c012a11efb728dc3d9dfd9eb01283408368914f6462c24fe8c9ada848d2e4ec3d +SHA512 (debugedit-0.2.tar.xz.sig) = 13ea6758c8a64174da26c4abdb74bcdf6745e90bd3fa121f8175f63908e44697f9f36f950d059a8cb3a89d5369aee68a52782d0c4b76cf44f2616dfc7ac19e18 +SHA512 (gpgkey-5C1D1AA44BE649DE760A.gpg) = dc44ed3e38f54c3e57a4d83fa8b48ce2a8694802dd6bbf057cf432958f88ace9b585ee36a59ba98444e76c9aef0e998b9108a3807f97ebd6ba62303b41ab4690