From fbcdf596856cde2dd98dac7bbb26b4531c6c116c Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Apr 26 2024 01:56:11 +0000 Subject: Add a Requires for binutils and a Recommends for python3-rpm Also delete some librpm related cruft, all in furtherance of fixing RHBZ 2275274. --- diff --git a/gdb.spec b/gdb.spec index 80b8357..843f925 100644 --- a/gdb.spec +++ b/gdb.spec @@ -57,7 +57,7 @@ Version: 14.2 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 5%{?dist} +Release: 6%{?dist} License: GPL-3.0-or-later AND BSD-3-Clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later AND LGPL-2.0-or-later WITH GCC-exception-2.0 AND GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-2.0-or-later WITH GNU-compiler-exception # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -105,6 +105,10 @@ useful packages too. # gdb-add-index uses 'which', which is in its own package (BZ 2275274). Requires: which + +# gdb-add-index also uses 'readelf' and 'objcopy', both of which are +# in the binutils package. (BZ 2275274) +Requires: binutils %endif Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages @@ -149,38 +153,8 @@ Provides: bundled(md5-gcc) = %{snapsrc} Recommends: default-yama-scope %endif -%if 0%{?el6:1} -%global librpmver 1 -%else -# FIXME: %elif does not work. -%if 0%{?el7:1} -%global librpmver 3 -%else -%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 -%global librpmver 8 -%else -%global librpmver 7 -%endif -%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 -%global librpmver 9 -%endif -%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 -%global librpmver 10 -%endif -%endif -%endif -%if 0%{?__isa_bits} == 64 -%global librpmname librpm.so.%{librpmver}()(64bit) -%else -%global librpmname librpm.so.%{librpmver} -%endif -BuildRequires: rpm-libs%{buildisa} -%if 0%{?_with_buildisa:1} -BuildRequires: %{librpmname} -%endif -%if 0%{!?rhel:1} || 0%{?rhel} > 7 -Recommends: %{librpmname} -%endif +# rpm-suggestions.py needs to import rpm which is found in python3-rpm. +Recommends: python3-rpm %if 0%{?el6:1} || 0%{?el7:1} # GDB C++11 requires devtoolset gcc. @@ -592,8 +566,6 @@ rm -rf zlib texinfo %build rm -rf %{buildroot} -test -e %{_root_libdir}/librpm.so.%{librpmver} - %if 0%{?el6:1} # GDB C++11 requires devtoolset gcc. %{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} @@ -766,7 +738,6 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \ %if 0%{!?rhel:1} --with-xxhash \ %endif - --with-rpm=librpm.so.%{librpmver} \ --enable-unit-tests" # --htmldir and --pdfdir are not used as they are used from %{gdb_build}. @@ -1224,6 +1195,14 @@ fi %endif %changelog +* Thu Apr 25 2024 Kevin Buettner - 14.2-6 +- Further changes for fixing RHBZ 2275274: Add a + 'Requires: binutils' which is needed because gdb-add-index uses + readelf and objcopy. Also, delete librpm related stuff since + gdb/build-id.c no longer attempts to dlopen a librpm library. Add + 'Recommends python3-rpm' so that rpm-suggestions.py will find the + required python module. + * Tue Apr 23 2024 Kevin Buettner - 14.2-5 - Add "Requires: which" for RHBZ 2275274.