Bug 2052451

Summary: rpmlint warns on non-stripped ELF files in debuginfo packages
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: rpkgAssignee: Ondřej Nosek <onosek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: cqi, extras-orphan, hdegoede, jkeating, j, lsedlar, mhroncok, nphilipp, onosek, otto.liljalaakso, spotrh, s, tmz, twoerner, vondruch, zbyszek
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpkg-1.65-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-06 23:08:43 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:

Description Petr Pisar 2022-02-09 10:08:04 UTC
I'm not sure whether this is a regression in rpmlint or fedpkg, but "fedpkg lint" now complains that debuginfo packages contain nonstripped ELF files. The message comes from rpmlint:

$ rpm -q rpmlint
rpmlint-2.2.0-3.fc36.noarch

$ rpmlint x86_64/miniz-debuginfo-2.2.0-4.fc37.x86_64.rpm 
======================================== rpmlint session starts =======================================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

miniz-debuginfo.x86_64: W: unstripped-binary-or-object /usr/lib/debug/usr/lib64/libminiz.so.0.2-2.2.0-4.fc37.x86_64.debug
miniz-debuginfo.x86_64: E: shared-library-without-dependency-information /usr/lib/debug/usr/lib64/libminiz.so.0.2-2.2.0-4.fc37.x86_64.debug
miniz-debuginfo.x86_64: W: no-documentation
miniz-debuginfo.x86_64: W: dangling-relative-symlink /usr/lib/debug/.build-id/99/4ed2f36d11bc50f1ffd58e90a85a167ba4ee3b ../../../.build-id/99/4ed2f36d11bc50f1ffd58e90a85a167ba4ee3b
========= 1 packages and 0 specfiles checked; 1 errors, 3 warnings, 1 badness; has taken 0.1 s ========

Comment 1 Vít Ondruch 2022-02-10 11:44:05 UTC
https://github.com/rpm-software-management/rpmlint/issues/780

Just FYI, I have complained about this upstream ^^. Nevertheless, the behavior certainly changed in comparison to rpmlint 1.x for better or worse.

Comment 2 Petr Pisar 2022-02-10 12:00:03 UTC
There is written that rpmlint should not be invoked on debuginfo packages. Then it's a regression in fedpkg. fedpkg should not pass the debugging packages to rpmlint. Reassigning to fedpkg (fedpkg-1.42-1.fc36.noarch).

Comment 3 Petr Pisar 2022-02-23 15:37:15 UTC
I was told the rpmlint invocation is implement in python3-rpkg-1.64-2.fc36.noarch.

Comment 4 Zbigniew Jędrzejewski-Szmek 2022-02-23 15:38:49 UTC
FWIW, I think it would be beneficial all around if rpmlint did the right thing out of the box.
E.g. I will often do something 'mock build; rpmlint /var/lib/mock/.../results/*.rpm'.
It's not just fedpkg, rpmlint is used in countless other places.

It is trivial to detect debuginfo packages: just look at the package name, and treat *-debuginfo
and *-debugsource a bit different. Pushing this out to individual consumers will just multiply
the work needed to handle this.

Comment 5 Zbigniew Jędrzejewski-Szmek 2022-02-23 15:39:47 UTC
... and obviously, once rpmlint becomes a bit smarter and e.g. wants to check -debuginfo
packages for something else, it'll need to be called for those packages too. So we'll be
undoing the workarounds in the callers to allow that.

Comment 6 Miro Hrončok 2022-02-23 18:19:31 UTC
If upstream would not agree with what Zbyszek says, maybe we can filter such problematic reports in https://src.fedoraproject.org/rpms/rpmlint/blob/rawhide/f/fedora.toml -- still one place.

Comment 7 Ondřej Nosek 2022-03-02 21:38:41 UTC
Hi, I understand that rpmlint developers are likely not planning to modify the 'debuginfo' filter. So it is still desired to have it implemented on fedpkg side. Should it be applied to all rpmlint versions? There is already logic in fedpkg, that calls rpmlint-2.0 with different arguments than old rpmlint.

And this is related to rpmlint's different arguments too:
https://bugzilla.redhat.com/show_bug.cgi?id=2016616

Comment 8 Fedora Update System 2022-09-06 23:07:29 UTC
FEDORA-2022-dd5443312c has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-dd5443312c

Comment 9 Fedora Update System 2022-09-06 23:08:43 UTC
FEDORA-2022-dd5443312c has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Petr Pisar 2022-09-07 08:30:46 UTC
Thanks. I confirm this issue is fixed now.