From 728cc31dddd6149804a819f4e8f84da22fef375c Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Wed, 8 Jan 2025 10:14:24 -0800 Subject: [PATCH] gdb-add-index.patch: Use "command -v" instead of "which" Resolves: RHEL-73209 --- gdb-add-index.patch | 4 ++-- gdb.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) 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 54dc37b..63022a2 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: 3%{?dist} +Release: 4%{?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. @@ -1250,6 +1250,10 @@ fi %endif %changelog +* Wed Jan 9 2025 Keith Seitz - 14.2-4.el9 +- gdb-add-index.patch: Use "command -v" instead of "which". + (Keith Seitz, RHEL-73209) + * Fri May 31 2024 Guinevere Larsen - 14.2-1.el9 - Rebase to gdb-14.2 and update all bug references (Resolves: RHEL-39554)