Run rpmlint in Actions to catch mistakes like one in 5558630f #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rpmlint is a bit peculiar. If I run it against spec from 5558630 it will warn about lack of spaces, but still consider it fine:
I can use
-s
,--strict
flag to turn all warnings into errors, but then we will get pipeline that always fail due to thatno-%build-section
.So in Actions I'm telling rpmlint to ignore
no-%build-section
, but consider everything else an error.rpmlint is Python program. I decided to use package from Ubuntu repositories, which generally lags behind upstream a bit (Ubuntu 24.04 has 2.5.0, upstream is now on 2.6.1). But upstream does not see very active development and releases no more than 2-3 times a year, so I don't think we are losing much. We can always switch to rpmlint from PyPI.
rpmlint warns that it runs different checks for spec files, source RPMs and binary RPMs; they recommend running the tool against all artifacts for greatest coverage. But our RPMs are built by packit, so we would have to ask packit to run rpmlint against them, and this is where I draw the line.