Skip to content

Commit 208a4d9

Browse files
committed
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 <[email protected]>
1 parent 5c40a9c commit 208a4d9

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

.hunspell.en.dic

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,3 +1252,7 @@ value'
12521252
libb
12531253
koji
12541254
taskinfo
1255+
rpmlintrc
1256+
rpm
1257+
rpms
1258+
srpm

script/mrel

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ file delete log-gz log-bz log-win $prevdistgz distfiles distfiles-win\
277277
log-prev-gz distfiles-prev $prevdistwin log-prev-win distfiles-win-prev
278278

279279
# check generated RPM spec file
280-
runcmd >@stdout rpmlint -r share/rpm/environment-modules.rpmlintrc\
281-
share/rpm/environment-modules.spec
280+
runcmd >@stdout rpmlint --ignore-unused-rpmlintrc --rpmlintrc\
281+
share/rpm/environment-modules.rpmlintrc share/rpm/environment-modules.spec\
282+
$srcrpm
282283
quitorcont
283284

284285

@@ -298,13 +299,20 @@ runcmd 2>@$logfid git push --force $gh_test_remote $reltag
298299
exec sudo --validate
299300

300301
runcmd 2>@$logfid rpmbuild --rebuild $srcrpm
301-
foreach rpmpkg [glob $rpmdir/environment-modules-$rpmrelver.*.rpm] {
302+
set rpmpkg_list [glob $rpmdir/environment-modules-$rpmrelver.*.rpm]
303+
foreach rpmpkg $rpmpkg_list {
302304
runcmd >@stdout rpm -qlp $rpmpkg | less -eFKRX
303305
quitorcont
304306
# check installation of built RPM
305307
runcmd sudo rpm -ivh $rpmpkg
306308
}
307309

310+
# check all RPM files (spec, srpm, rpms) all at once to check rpm files and
311+
# see if rpmlint produces some unused-rpmlintrc warnings
312+
runcmd >@stdout rpmlint --rpmlintrc share/rpm/environment-modules.rpmlintrc\
313+
share/rpm/environment-modules.spec $srcrpm {*}$rpmpkg_list
314+
quitorcont
315+
308316

309317
# Phase 4: build, test, install from generated dists
310318
# ---------------------------------------------------------
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1+
# from the https://docs.fedoraproject.org/en-US/packaging-guidelines/:
2+
# "If a package supersedes/replaces an existing package without being a
3+
# sufficiently compatible replacement as defined above, use only the
4+
# 'Obsoletes:' line."
5+
addFilter("W: obsolete-not-provided environment-modules-compat")
6+
7+
# %ghost file mode false positive
8+
addFilter("W: non-executable-in-bin /usr/bin/modulecmd 644")
9+
110
# generic environment(modules) provides statement
211
addFilter("W: unversioned-explicit-provides environment\(modules\)")
12+
13+
# false positive spelling errors
14+
addFilter("E: spelling-error \('modulefiles', '%description -l en_US modulefiles -> module files, module-files, modifies'\)")
15+
addFilter("E: spelling-error \('modulefile', '%description -l en_US modulefile -> module file, module-file, doleful'\)")
16+
addFilter("E: spelling-error \('ksh', '%description -l en_US ksh -> KS, Ks, ks'\)")
17+
addFilter("E: spelling-error \('zsh', '%description -l en_US zsh -> Zs, sh, sch'\)")
18+
addFilter("E: spelling-error \('csh', '%description -l en_US csh -> Cash, cash, cosh'\)")
19+
addFilter("E: spelling-error \('tcsh', '%description -l en_US tcsh -> tosh, tush, Cash'\)")
20+
addFilter("E: spelling-error \('perl', '%description -l en_US perl -> Perl, Pearl, Peel'\)")

0 commit comments

Comments
 (0)