Bug 1967821

Summary: "fedpkg lint" dies with rpmlint-2.0.0: rpmlint: error: unrecognized arguments: -f
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: high Docs Contact:
Priority: high    
Version: 35CC: cqi, dennis, gbcox, hdegoede, jkeating, lsedlar, mattdm, onosek, otto.liljalaakso, s
Target Milestone: ---Keywords: Regression
Target Release: ---Flags: gbcox: fedora_prioritized_bug?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpkg-1.64-1.fc36 rpkg-1.64-2.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-07 23:42:10 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: 1961618    
Bug Blocks:    

Description Petr Pisar 2021-06-04 06:14:05 UTC
After upgrading rpmlint from 1.11-17.fc35.noarch to 2.0.0-1.fc35.noarch "fedpkg lint" fails to execute "rpmlint -f $PACKAGE.rpmlint". An example for rawhide branch of rpms/perl-Object-Pad:

$ fedpkg lint
usage: rpmlint [-h] [-V] [-c CONFIG] [-e EXPLAIN [EXPLAIN ...]] [-r RPMLINTRC] [-v] [-p] [-i INSTALLED [INSTALLED ...]] [-t] [-T]
               [-s | -P]
               [rpmfile ...]
rpmlint: error: unrecognized arguments: -f
Could not execute lint: Failed to execute command.

Comment 1 Petr Pisar 2021-06-04 06:17:23 UTC
Tested with python3-rpkg-1.62-4.fc35.noarch.

Comment 2 Matthew Miller 2021-06-04 14:38:39 UTC
FWIW -f was:

	[-f|--file <user config file to use instead of ~/.config/rpmlint]


Looks like that's now -c for CONFIG (which was "check").

Comment 3 Petr Pisar 2021-06-07 11:30:27 UTC
According to <https://github.com/rpm-software-management/rpmlint/#configuration> and my tests, it's --rpmlintrc.

Comment 4 Ben Cotton 2021-08-10 13:05:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 5 Hans de Goede 2021-12-17 14:25:52 UTC
Fedora 35 has been released for a while now and this is still happening, can we get this fixed please?

Comment 6 Gerald Cox 2021-12-21 20:03:24 UTC
This actually started happening in F34.

[gbcox@charon picard]$ fedpkg lint
usage: rpmlint [-h] [-V] [-c CONFIG] [-e EXPLAIN [EXPLAIN ...]] [-r RPMLINTRC] [-v] [-p]
               [-i INSTALLED [INSTALLED ...]] [-t] [-T] [-s | -P]
               [rpmfile ...]
rpmlint: error: unrecognized arguments: -f
Could not execute lint: Failed to execute command.

Has the lint function of fedpkg been deprecated?  If so, we should revise the documentation to remove that step.

Comment 7 Gerald Cox 2022-01-02 22:20:44 UTC
Nominating for prioritized bug.

Comment 8 Ondřej Nosek 2022-01-10 03:55:11 UTC
I prepared a fix for this here:
https://pagure.io/rpkg/pull-request/600#
It behaves well on Fedora 34. On Fedora 35 it shows some warnings. But it might be a wrong configuration of my system. What do you think? Is this result OK? 


on Fedora 34:
fedpkg internally executes: "rpmlint -f /repo/perl-Object-Pad/perl-Object-Pad.rpmlintrc /repo/perl-Object-Pad/perl-Object-Pad.spec"

onosek@d4620add20ff:/repo/perl-Object-Pad(rawhide)$ PYTHONPATH=/src/rpkg fedpkg lint
No srpm found
No rpm found
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

---------------------------------------------------------------------------------------------------

on Fedora 35:
fedpkg internally executes: "rpmlint -r /repo/perl-Object-Pad/perl-Object-Pad.rpmlintrc /repo/perl-Object-Pad/perl-Object-Pad.spec"

onosek@847e647d4b94:/repo/perl-Object-Pad(rawhide)$ PYTHONPATH=/src/rpkg fedpkg -d lint
No srpm found
No rpm found
=========================================================================== 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
rpmlintrc: [PosixPath('/repo/perl-Object-Pad/perl-Object-Pad.rpmlintrc')]
checks: 32, packages: 1

perl-Object-Pad.spec: E: unused-rpmlintrc-filter "-tests\.noarch: W: no-documentation"
perl-Object-Pad.spec: E: unused-rpmlintrc-filter "E: useless-provides perl\(:Object_Pad_ABI\)"
perl-Object-Pad.spec: E: specfile-error LANGUAGE = (unset),
perl-Object-Pad.spec: E: specfile-error LC_ALL = "en_US.UTF-8",
perl-Object-Pad.spec: E: specfile-error LANG = "C.UTF-8"
perl-Object-Pad.spec: E: specfile-error are supported and installed on your system.
perl-Object-Pad.spec: E: specfile-error LANGUAGE = (unset),
perl-Object-Pad.spec: E: specfile-error LC_ALL = "en_US.UTF-8",
perl-Object-Pad.spec: E: specfile-error LANG = "C.UTF-8"
perl-Object-Pad.spec: E: specfile-error are supported and installed on your system.
=========================================== 0 packages and 1 specfiles checked; 10 errors, 0 warnings, 10 badness; has taken 0.1 s ===========================================
Could not execute lint: Failed to execute command.

Comment 9 Petr Pisar 2022-01-10 15:31:12 UTC
Calling rpmlint does not produce the locale warning on my system:

$ rpmlint -r perl-Object-Pad.rpmlintrc perl-Object-Pad.spec 
================================= 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
rpmlintrc: [PosixPath('perl-Object-Pad.rpmlintrc')]
checks: 32, packages: 1

perl-Object-Pad.spec: E: unused-rpmlintrc-filter "-tests\.noarch: W: no-documentation"
perl-Object-Pad.spec: E: unused-rpmlintrc-filter "E: useless-provides perl\(:Object_Pad_ABI\)"
== 0 packages and 1 specfiles checked; 2 errors, 0 warnings, 2 badness; has taken 0.2 s ==

I guess it's a warning from a perl program (executed when expanding the spec file). Try running "perl -e 1" to see the same warning.

Your machine seems having broken locale. You set LC_ALL=en_US.UTF-8, but your glibc does not support it (you are probably missing glibc-langpack-en RPM package).

Comment 10 Ondřej Nosek 2022-01-10 15:38:31 UTC
After installing "glibc-langpack-en" on my (docker) Fedora 35 system, my output looks like to yours.

Comment 11 Gerald Cox 2022-01-10 20:36:06 UTC
Can we get this pushed to the testing repository so more people can try it out and report?  
Thanks!

Comment 12 Ben Cotton 2022-01-12 17:33:47 UTC
In today's Prioritized Bugs meeting, we agreed to reject this as a Prioritized Bug as there's an easy workaround and a pending fix.
https://meetbot.fedoraproject.org/fedora-meeting-1/2022-01-12/fedora_prioritized_bugs_and_issues.2022-01-12-16.00.log.html#l-183

Comment 13 Gerald Cox 2022-01-25 18:19:27 UTC
Resetting prioritized flag.  This needs to be reconsidered. 
I'm not aware of any work around other than not using the
fedpkg lint command and issuing all the commands manually.

If a fix is available it shouldn't take a month to get 
it pushed to testing and then to stable.

This situation has been going on since June, 2021 and it
breaks the package maintenance workflow.  In the meantime, 
people get the error message and then just skip the lint 
check.

Comment 14 Fedora Update System 2022-02-07 23:39:38 UTC
FEDORA-2022-fdc9661b8e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fdc9661b8e

Comment 15 Fedora Update System 2022-02-07 23:42:10 UTC
FEDORA-2022-fdc9661b8e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Petr Pisar 2022-02-08 11:29:11 UTC
Thanks for the fix. Any plans for Fedora 35?

Comment 17 Fedora Update System 2022-02-09 01:39:02 UTC
FEDORA-2022-bdaa34ebc9 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-bdaa34ebc9

Comment 18 Fedora Update System 2022-02-13 01:15:37 UTC
FEDORA-2022-bdaa34ebc9 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Ondřej Nosek 2022-03-02 00:25:27 UTC
Already fixed/released. No additional info is needed.