public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: 15.2-2 gdb-add-index.patch: Replace which with command -v
@ 2026-06-28  0:01 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2026-06-28  0:01 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : d6fc2037d7585fbd078796f254b1f813c6fd8334
            Author : Mark Wielaard <mjw@redhat.com>
            Date   : 2024-11-06T16:22:31+01:00
            Stats  : +8/-6 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/d6fc2037d7585fbd078796f254b1f813c6fd8334?branch=gdb-17.2-rebase-f44

            Log:
            15.2-2 gdb-add-index.patch: Replace which with command -v

The which command might not be installed. Use the posix command -v
instead to find needed binaries.

Remove which Requires from gdb.spec which was only there for
gdb-add-index.

Resolves: rhbz#2323513
gdb-add-index: Failed to find a useable GDB binary seems to kill rpm builds
https://bugzilla.redhat.com/show_bug.cgi?id=2323513

---
diff --git a/gdb-add-index.patch b/gdb-add-index.patch
index 5039172..52a3145 100644
--- a/gdb-add-index.patch
+++ b/gdb-add-index.patch
@@ -52,11 +52,11 @@ diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
 +# exit.
 +if test -z "$GDB"; then
 +    for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb; do
-+        if ! which "$possible_gdb" >/dev/null 2>&1; then
++        if ! command -v "$possible_gdb" >/dev/null 2>&1; then
 +            continue
 +        fi
 +
-+        possible_gdb=$(which "$possible_gdb")
++        possible_gdb=$(command -v "$possible_gdb")
 +
 +        if ! test -x "$possible_gdb"; then
 +            continue

diff --git a/gdb.spec b/gdb.spec
index 6d6cc51..3b554f5 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -45,7 +45,7 @@ Version: 15.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: 1%{?dist}
+Release: 2%{?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.
@@ -84,9 +84,6 @@ useful packages too.
 
 %package headless
 
-# 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
@@ -931,6 +928,11 @@ fi
 # endif scl
 
 %changelog
+* Wed Nov  6 2024 Mark Wielaard <mjw@fedoraproject.org> - 15.2-2
+- Resolves: rhbz#2323513
+  - gdb-add-index.patch: Replace which with command -v
+  - Remove which Requires which was only there for gdb-add-index
+
 * Tue Nov  5 2024 Guinevere Larsen <guinevere@redhat.com>
 - Remove gdb-simultaneous-step-resume-breakpoint.patch
   This test is covered by a combination of upstream tests already.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-28  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-28  0:01 [rpms/gdb] gdb-17.2-rebase-f44: 15.2-2 gdb-add-index.patch: Replace which with command -v Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox