rpm/mrel: restore rpmlintrc and check srpm/rpms

Restore the various filter in rpmlintrc: they are useful to check srpm
and rpm files.

Update mrel to test to srpm and rpm files. Make a first test that
checks srpm and spec file. This test ignores the unused-rpmlintrc
warning, as it does not test rpm files. Then make a second test after
building the rpm files. This second test checks all files (spec, srpm
and rpms) to take into account any real unused-rpmlintrc issue.

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This commit is contained in:
Xavier Delaruelle
2025-08-03 15:10:05 +02:00
parent 5c40a9c586
commit 208a4d9d9c
3 changed files with 33 additions and 3 deletions

View File

@@ -1252,3 +1252,7 @@ value'
libb
koji
taskinfo
rpmlintrc
rpm
rpms
srpm

View File

@@ -277,8 +277,9 @@ file delete log-gz log-bz log-win $prevdistgz distfiles distfiles-win\
log-prev-gz distfiles-prev $prevdistwin log-prev-win distfiles-win-prev
# check generated RPM spec file
runcmd >@stdout rpmlint -r share/rpm/environment-modules.rpmlintrc\
share/rpm/environment-modules.spec
runcmd >@stdout rpmlint --ignore-unused-rpmlintrc --rpmlintrc\
share/rpm/environment-modules.rpmlintrc share/rpm/environment-modules.spec\
$srcrpm
quitorcont
@@ -298,13 +299,20 @@ runcmd 2>@$logfid git push --force $gh_test_remote $reltag
exec sudo --validate
runcmd 2>@$logfid rpmbuild --rebuild $srcrpm
foreach rpmpkg [glob $rpmdir/environment-modules-$rpmrelver.*.rpm] {
set rpmpkg_list [glob $rpmdir/environment-modules-$rpmrelver.*.rpm]
foreach rpmpkg $rpmpkg_list {
runcmd >@stdout rpm -qlp $rpmpkg | less -eFKRX
quitorcont
# check installation of built RPM
runcmd sudo rpm -ivh $rpmpkg
}
# check all RPM files (spec, srpm, rpms) all at once to check rpm files and
# see if rpmlint produces some unused-rpmlintrc warnings
runcmd >@stdout rpmlint --rpmlintrc share/rpm/environment-modules.rpmlintrc\
share/rpm/environment-modules.spec $srcrpm {*}$rpmpkg_list
quitorcont
# Phase 4: build, test, install from generated dists
# ---------------------------------------------------------

View File

@@ -1,2 +1,20 @@
# from the https://docs.fedoraproject.org/en-US/packaging-guidelines/:
# "If a package supersedes/replaces an existing package without being a
# sufficiently compatible replacement as defined above, use only the
# 'Obsoletes:' line."
addFilter("W: obsolete-not-provided environment-modules-compat")
# %ghost file mode false positive
addFilter("W: non-executable-in-bin /usr/bin/modulecmd 644")
# generic environment(modules) provides statement
addFilter("W: unversioned-explicit-provides environment\(modules\)")
# false positive spelling errors
addFilter("E: spelling-error \('modulefiles', '%description -l en_US modulefiles -> module files, module-files, modifies'\)")
addFilter("E: spelling-error \('modulefile', '%description -l en_US modulefile -> module file, module-file, doleful'\)")
addFilter("E: spelling-error \('ksh', '%description -l en_US ksh -> KS, Ks, ks'\)")
addFilter("E: spelling-error \('zsh', '%description -l en_US zsh -> Zs, sh, sch'\)")
addFilter("E: spelling-error \('csh', '%description -l en_US csh -> Cash, cash, cosh'\)")
addFilter("E: spelling-error \('tcsh', '%description -l en_US tcsh -> tosh, tush, Cash'\)")
addFilter("E: spelling-error \('perl', '%description -l en_US perl -> Perl, Pearl, Peel'\)")