Bug 2177302

Summary: backport b8ac71d9f882 ("scripts/find-debuginfo.in: Add -q|--quiet")
Product: Red Hat Enterprise Linux 9 Reporter: Prarit Bhargava <prarit>
Component: debugeditAssignee: Mark Wielaard <mjw>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: unspecified Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: unspecified    
Version: 9.3CC: jvaldez, mjw, wcohen
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: debugedit-5.0-4.el9 Doc Type: Enhancement
Doc Text:
.The `find-debuginfo` script in `debugedit` now supports the `-q` (`--quiet`) flag With this update, you can use the `find-debuginfo` script's `-q` (`--quiet`) flag in the `debugedit` utility to silence non-error output from the script.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:25:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2166383    
Bug Blocks:    

Description Prarit Bhargava 2023-03-10 18:47:28 UTC
Description of problem: find-debuginfo.sh outputs a single line for each binary which results in a massive amount of output in the build logs.  This can be up to 61% of the entire build log in the case of the kernel.

https://kojipkgs.fedoraproject.org//packages/kernel/6.2.0/0.rc5.20230123git2475bf0250de.38.fc38/data/logs/x86_64/build.log

commit b8ac71d9f882 adds a 'quiet' flag to suppress this output.  This makes viewing and interpreting logs much easier.


Version-Release number of selected component (if applicable):debugedit-5.0-3.el9 


How reproducible: 100%


Steps to Reproduce:
1. Look at a kernel log.
2. 
3.

Actual results: 
https://kojipkgs.fedoraproject.org//packages/kernel/6.2.0/0.rc5.20230123git2475bf0250de.38.fc38/data/logs/x86_64/build.log

Expected results: Less noise in the log.

This change has been made in Fedora (both in debugedit and the kernel).  The kernel MR is https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2357

Comment 1 Mark Wielaard 2023-03-13 10:46:11 UTC
This should be a small easy backport which has seen testing in fedora.
It does depend on rpmbuild actually using debugedit, which isn't the case yet.
See https://bugzilla.redhat.com/show_bug.cgi?id=2166383
(Setting risk to medium because of that, otherwise it would be low)

Comment 3 Mark Wielaard 2023-03-28 14:54:09 UTC
Note that even though this fix is now in debugedit-5.0-4.el9 if you want to use it in combination with rpmbuild you also need a fix for bug #2166383 (rpm-build should use debugedit package)

Comment 4 Martin Cermak 2023-04-18 15:16:46 UTC
Thanks Mark.  Indeed, my rhel9 system has both:

9 x86_64 # rpm -qf /usr/lib/rpm/find-debuginfo.sh
rpm-build-4.16.1.3-22.el9.x86_64
9 x86_64 # rpm -qf /usr/bin/find-debuginfo.sh
debugedit-5.0-4.el9.x86_64
9 x86_64 #

Ive identified make as a component requiring debugedit and tested with it (because kernel seems like a too big beast for the test).  The amount of excessive log entries in case of build of make isn't really huge.  In fact it is just one log entry.  But that's good enough to test this.  I've symlinked all the find-debuginfo{,.sh} files together and then did one make build with quiet=false and another one with quiet=true.  Rebuild of make-4.3-7.el9.src.rpm shows a build log difference like this:

---
> Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.qxIme6
1234a1235,1236
> extracting debug info from /root/rpmbuild/BUILDROOT/make-4.3-7.el9.x86_64/usr/bin/make
> original debug info size: 844kB, size after compression: 764kB
1245c1247
< Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.qkbH87
---

So, LGTM.  But care must be taken that rpm-build has its own version of the script and that's not patched yet as of now (bz2166383).

Comment 9 Prarit Bhargava 2023-08-14 18:08:37 UTC
*** Bug 2221236 has been marked as a duplicate of this bug. ***

Comment 13 errata-xmlrpc 2023-11-07 08:25:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (debugedit bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6357