find-debuginfo: Fix skip_mini (".gnu_debugdata") handling

- Add 0001-find-debuginfo-Fix-skip_mini-.gnu_debugdata-handling.patch

Resolves: RHEL-71661
debugedit 5.1 regression with read-only exe/lib files and gdb-add-index error reporting [rhel9]
This commit is contained in:
Mark Wielaard 2025-04-15 18:53:17 +02:00
parent 625618827e
commit c3cf993cd3
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 64d61a5f7d0ed685880f5c4f4b91f967445ba3a9 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Thu, 16 Jan 2025 12:02:11 +0100
Subject: [PATCH] find-debuginfo: Fix skip_mini (".gnu_debugdata") handling
The conditional that tests $skip_mini for true/false was inadvertently
flipped, causing the add_minidebug() function to no longer run for the
otherwise eligible binary files.
Fixes: 971a74d79b48 ("find-debuginfo: Check files are writable before modifying them")
Reported-by: Michal Domonkos <mdomonko@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
scripts/find-debuginfo.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
index 4e4ef5a64005..f889e6d3b574 100755
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -550,7 +550,7 @@ do_file()
application/x-executable*) skip_mini=false ;;
application/x-pie-executable*) skip_mini=false ;;
esac
- if test "$skip_mini" = "true"; then
+ if test "$skip_mini" = "false"; then
if test "$f_writable" = "false"; then
chmod u+w "$f"
fi
--
2.47.1

View File

@ -1,6 +1,6 @@
Name: debugedit
Version: 5.0
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Tools for debuginfo creation
License: GPLv3+ and GPLv2+ and LGPLv2+
URL: https://sourceware.org/debugedit/
@ -46,6 +46,7 @@ Patch5: 0004-compress.patch
Patch6: 0005-writable.patch
patch7: 0001-debug_str_offsets-header-version-and-padding-are-2-b.patch
patch8: 0001-debugedit-Handle-unused-.debug_str_offsets-entries.patch
Patch9: 0001-find-debuginfo-Fix-skip_mini-.gnu_debugdata-handling.patch
%description
The debugedit project provides programs and scripts for creating
@ -89,6 +90,9 @@ make check %{?_smp_mflags}
%{_mandir}/man1/find-debuginfo.1*
%changelog
* Tue Apr 15 2025 Mark Wielaard <mjw@redhat.com> - 5.0-9
- Add 0001-find-debuginfo-Fix-skip_mini-.gnu_debugdata-handling.patch
* Fri Apr 11 2025 Mark Wielaard <mjw@redhat.com> - 5.0-8
- Add 0001-debug_str_offsets-header-version-and-padding-are-2-b.patch
- Add 0001-debugedit-Handle-unused-.debug_str_offsets-entries.patch