#5 [FEATURE] Allow taskotron to read a rpmlintrc from the srpm to suppress warnings or errors
Closed: Fixed 6 years ago Opened 8 years ago by asn.

Hello,

I maintain several very special library for testing purposes. rpmlint complains about several things in that libraries which are totally valid if it would be a normal shared library. As this is special I would like to suppress these messages with rpmlintrc filter:

I would like to create a <package-name>-rpmlintc file with filters for it like:

# This is a special library only for testing purposes. You cannot link this
# library. It is only inteded to be used with LD_PRELOAD. This package is
# the devel package.
#
# Learn more at http://cwrap.org
#
addFilter("devel-file-in-non-devel-package")
addFilter("shared-lib-calls-exit")

rpmlint normally reads $HOME/.rpmlintrc I don't know if you can pass it the rules in a different way.

[1] https://cwrap.org


Thanks for the feature request. A couple of things:

  • Do you think that the .rpmlintrc belongs in the srpm?
  • One of the features that we'll be adding in the not-so-distant future is a method for folks involved with a package to store tasks in a git repo. I wonder if that might be a better place to put the .rpmlintrc

On a side note, we should figure out if [[https://github.com/default-to-open/rpmgrill | rpmgrill]] supports rpmlint configurations - IIRC, they use rpmlint as part of their battery of tests.

I would put it to the same place as the spec file ...

Here's a feedback from Jason L Tibbitts III:

I can't actually log into phabricator to respond there, but really this needs to be with the spec file. I edit spec files in vim, with syntastic calling rpmlint to check syntax on the fly. Having a per-package rpmlintrc is the only reasonable way to handle this kind of thing; taskotron just needs to know how to get to it. I really wish more packagers did this, because sometimes rpmlint has so many complaints about a package that you have to wonder if anyone's actually run it against the package I'm viewing. Having taskotron do some spamming is a great start.

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/NPESMFLJXGYRGR4SCQZ5YRFXQERKPD6W/

Some interesting info here:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/ESSPQTVYU4CO63XXXRZJNPG2P5335TEF/#SQQKCDR7XAQCEBR27MFRRREEQIEOYWZT

Already implemented. You can supress test failures by a python code in a .rpmlint file in package's dist-git repository.
fedpkg(1) manual page, section "fedpkg lint".
I have no idea how tasktron works. fedpkg leverages rpmlint's -f option.

fedpkg uses a .rpmlint file in scm for its fedpkg lint command. There has been some criticism of using a hidden file for this, but it would be nice if taskotron and fedpkg used the same file. I suggest coordinating to pick a non-hidden filename in scm.

This is going to change to <srcpkgname>.rpmlintrc: https://pagure.io/rpkg/pull-request/293

Metadata Update from @lbrabec:
- Issue assigned to lbrabec

6 years ago

Lukas is going to implement this. Can somebody tell us of an example package that already contains such a config file in distgit?

Metadata Update from @kparal:
- Assignee reset

6 years ago

Metadata Update from @kparal:
- Issue assigned to lbrabec

6 years ago

Here's a list of some projects that actually do have some rpmlint config files included:

https://src.fedoraproject.org/rpms/erlang-cache_tab/
https://src.fedoraproject.org/rpms/erlang-epam/

We have an implementation for this in #16, but we'd like https://pagure.io/rpkg/pull-request/293 to get pushed first.

This got fixed in #16 (currently deployed to dev). Thanks, @lbrabec!

I also documented the whitelist functionality at:
https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint

Metadata Update from @kparal:
- Issue close_status updated to: Fixed

6 years ago

The docs say:

If there's such a file in your distgit repository, it will be used when calling rpmlint.

Is that actually true? I see no such note in rpmlint README or manpage. Or is it just about the taskotron rpmlint task? I find it confusing, hence I changed the wording. Please check and alter if required.

https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors

@churchyard Perhaps it should be "it will be used when calling fedpkg lint?

@churchyard It was meant when we execute it as part of the task-rpmlint. Thanks for clarifying edits.

This is now deployed to production.

Ha!

INFO:task-rpmlint.download:Trying to download python3.rpmlintrc ...
DEBUG:libtaskotron:Downloading: https://src.fedoraproject.org/cgit/rpms/python3.git/plain/python3.rpmlintrc?h=f29
ERROR:libtaskotron:Download failed for: https://src.fedoraproject.org/cgit/rpms/python3.git/plain/python3.rpmlintrc?h=f29
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/libtaskotron/file_utils.py", line 122, in download
    _download(url, dl_dest)
  File "/usr/lib/python2.7/site-packages/libtaskotron/file_utils.py", line 162, in _download
    r.raise_for_status()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not found for url: https://src.fedoraproject.org/cgit/rpms/python3.git/plain/python3.rpmlintrc?h=f29
WARNING:task-rpmlint.download:Failed to download python3.rpmlintrc: 404 Client Error: Not found for url: https://src.fedoraproject.org/cgit/rpms/python3.git/plain/python3.rpmlintrc?h=f29

Log in to comment on this ticket.

Metadata