From Fedora Project Wiki

Revision as of 16:30, 28 January 2019 by Kparal (talk | contribs) (add unexpanded macros to common issues)

What is rpmlint?

Rpmlint performs many different checks regarding RPM package sanity. Task-rpmlint is a Taskotron wrapper around that tool that executes it on every new Koji build and shows the results in Bodhi.

How does rpmlint task work?

Rpmlint task downloads all RPMs (source and binary) that your package consists of and runs rpmlint on them.

Common issues

Unexpanded macros

If you package uses an RPM macro which is not installed by default (but it is instead provided by some dependency of your package), you might see errors like this:

emacs-json-snatcher.src: E: specfile-error warning: line 13: Possible unexpanded macro in: Requires:       emacs(bin) >= %{_emacs_version}

The rpmlint task doesn't install your package dependencies when checking it, and therefore such a macro will probably not be expanded. In this case, your best solution is probably to whitelist this error.

Whitelisting errors

You can whitelist errors that you believe don't apply to your package. task-rpmlint uses the same rpmlint config file as used by fedpkg lint, which is named <source_package_name>.rpmlintrc. If there's such a file in your distgit repository (example), it will be used when rpmlint is executed as part of task-rpmlint.

To test the config file locally, you can use

rpmlint --file <source_package_name>.rpmlintrc <rpms>

or

fedpkg lint

Getting Help

If you have generic rpmlint-related questions, it's best to ask on devel list or fedora-devel IRC channel.

If you have troubles with task-rpmlint, please contact us.