From Fedora Project Wiki
(add example link for rpmlintrc)
(add unexpanded macros to common issues)
Line 4: Line 4:
= How does rpmlint task work? =
= How does rpmlint task work? =
Rpmlint task downloads all RPMs (source and binary) that your package consists of and runs <code>rpmlint</code> on them.
Rpmlint task downloads all RPMs (source and binary) that your package consists of and runs <code>rpmlint</code> 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 [https://pagure.io/taskotron/task-rpmlint/issue/21 this]:
<pre>
emacs-json-snatcher.src: E: specfile-error warning: line 13: Possible unexpanded macro in: Requires:      emacs(bin) >= %{_emacs_version}
</pre>
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|whitelist]] this error.


{{anchor|whitelist}}
{{anchor|whitelist}}
Line 16: Line 24:
fedpkg lint
fedpkg lint
</pre>
</pre>
(once [https://pagure.io/rpkg/pull-request/293 PR 293] is merged and released).


= Getting Help =
= Getting Help =

Revision as of 16:30, 28 January 2019

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.