Tomáš Chvátal
a6494928eb
Enable Leap 15 builds again, should work
2020-03-30 21:11:29 +02:00
Tomáš Chvátal
c85028487c
Add test for SUSEisms that are not needed
...
Found when checking #371
Implements https://github.com/openSUSE/rpmlint-checks/pull/55/files#diff-736af2f9cac9ffa626fddbff2dc31c73
2020-03-30 19:25:19 +02:00
Neal Gompa
13c9e12b70
setuptools: Remove remaining import loop in the code
...
This change eliminates the final import loop that made it difficult
to install rpmlint from PyPI, as now we have no implicit self dependencies
that turns all our runtime dependencies into build-time dependencies.
2020-03-30 16:35:11 +02:00
Ondřej Súkup
dd16790f12
Use namedTuple for dependency info in Pkg
2020-03-30 10:25:18 +02:00
Tomáš Chvátal
8bd1af60b9
Fix typos
2020-03-25 14:26:48 +01:00
Tomáš Chvátal
3681444906
Mention pytest-xdist needed for testing
2020-03-25 09:12:13 -04:00
Werner Fink
af1cb70252
Do not try to open tmpfiles if marked as ghost
...
https://bugzilla.suse.com/show_bug.cgi?id=1166449
2020-03-22 13:23:12 -04:00
David Greaves
575ba73156
Add --info as an alias for --verbose to be back-compatible
...
Some software (notably the OBS) has --info hard-coded into the build process
6ba266cf56/build-recipe-spec (L271)
2020-03-18 15:11:32 +01:00
David Greaves
51ba4ea550
Use -v for --verbose and -V for --version
...
The old version of rpmlint used -v for verbose so this is better from a compatibility point-of-view
Additionally these are the traditional switches. See Eric Raymond's notes here:
http://catb.org/~esr/writings/taoup/html/ch10s05.html
2020-03-18 15:11:32 +01:00
Tomáš Chvátal
e49501af11
Remove binutils-devel binary #392
2020-03-14 17:11:11 +01:00
Tomáš Chvátal
10d41f0145
Remove cyrrus imapd and dovecot binaries #392
2020-03-14 17:11:11 +01:00
Tomáš Chvátal
5b6efb22a2
Do not use dovecot binary on filter test #392
2020-03-14 17:11:11 +01:00
Tomáš Chvátal
c99dfefd07
Replace ruby-libs binary #392
2020-03-14 17:11:11 +01:00
Tomáš Chvátal
d6548663d6
Remove autofs binary issue #392
...
It is not used directly by any current tests.
2020-03-14 17:11:11 +01:00
Neal Gompa
d4d1a63c1b
Change cron dependency check to require crontabs
...
In most distributions, the correct thing to do for packaging
cron jobs is to require 'crontabs', which provides merely the
cron job directory tree skeleton.
2020-03-14 06:59:51 -04:00
Martin Liska
d241d84a21
Add new {missing-mandatory,forbidden}-optflags checks ( #341 ).
...
The check is based on parsing of debug info and
-grecord-gcc-switches compiler option.
2020-03-14 06:36:57 -04:00
Neal Gompa
241acf9bcd
Check for debugsource subpackages by default
...
Fedora, openSUSE, Mageia, and most others have these, so it's a
reasonable default.
2020-03-14 11:34:11 +01:00
Neal Gompa
c124135ff3
Rename CheckForXinetd to XinetdDepCheck
...
This more accurately represents what the check contains
and follows the same naming convention as the rest of the
checks.
2020-03-14 11:32:28 +01:00
Neal Gompa
b592020f94
Move the rpmlint CLI logic into its own module file
...
Having the CLI processing logic in the init module file made it
get evaluated on every single rpmlint import. This is completely
unnecessary and causes an import loop in setuptools, introducing
dependencies where there should not be when trying to "build" the
rpmlint code with setuptools.
This should also speed up imports across the board in rpmlint, since
this code only needs to be evaluated once.
2020-02-17 10:00:00 -05:00
Markéta Calábková
9f0d0f8988
added tests from rpmlint-tests (rpm-software-management#156)
...
shlib3* were either missing or testing a missing check
2020-02-17 10:57:46 +01:00
Tomáš Chvátal
6b58fec571
Rather mark generated file as non-flake8 testable instead of having hand fixed version
2020-02-15 08:41:13 +01:00
Tomáš Chvátal
bbfffe76fd
Fixup previous change as we should just remove the condition, not the loop with errors.
2020-02-15 08:32:58 +01:00
Tomáš Chvátal
46c63422db
Remove compat for old rpms from SpecCheck
...
The opening error was fixed in rpm since 2011 based on the bug and
we can reduce bit the conditions as rpm < 4.8 is of no interest to
us anyway.
2020-02-14 15:00:38 -05:00
Tomáš Chvátal
1457b097c6
Remove NamingPolicyCheck
...
After reviewing the check the only really valid naming schemes
applicable are for ocaml and apache modules. The others are actively
misleading to namingspace on Fedora and openSUSE.
The ruby/php/python/... well most bindings are sometimes versioned
if multiversioning is needed and sometimes not, so these policies
are actively misleading.
The better soltuion is to use reviewer to properly request what
naming should be used for the package.
2020-02-14 14:59:16 -05:00
Tomáš Chvátal
ae58445810
Do not enable InitCheck by default
...
As it is now superseded by systemd services it will save
few cycles to not run this check on all packages.
2020-02-14 14:59:16 -05:00
Tomáš Chvátal
3a2e21c855
Move the bashismcheck to function
...
Later can be reused by PostCheck to validate scriptlets
2020-02-14 12:01:27 -05:00
Kristyna Streitova
081572136f
Remove FSSTND check
...
Remove _check_var_FSSTND_dir method as FSSTND is outdated and it
has been replaced by FHS.
2020-02-14 10:50:19 -05:00
Kristyna Streitova
80b673d352
Update lists of allowed dirs according to FHS
...
Rename usr_subdir to FHS_usr_subdirs and var_subdir to
FHS_var_subdirs. Update both lists to be in compliance with FHS 3.0.
2020-02-14 10:50:19 -05:00
Kristyna Streitova
0142282db8
Throw error messages in the functions
...
Throw error and warning messages in the particular methods, not
in the check_binary method. Now it's in compliance with the rest
of the checks.
Add docstrings and use better names for variables (we don't want
to have one-letter names).
2020-02-14 10:50:19 -05:00
Neal Gompa
7cc5563ead
Add dependency on RPM Python bindings
...
RPMLint heavily leverages the RPM Python bindings in order to function
properly. As those bindings are shipped with Python metadata, we can
and should declare the dependency properly.
2020-02-14 15:18:13 +01:00
Tomáš Chvátal
b8ca5f9cd3
Disable leap15 travis run as it will be borked for comming weeks still and it makes no sense to watch the fail.
2020-02-14 09:14:41 -05:00
Neal Gompa
45b5aacb61
Add option to only return error when badness threshold is exceeded
...
When rpmlint is configured for mandatory tests in package builds,
it is desirable to allow rpmlint to "pass" the build unless the
the badness threshold has been exceeded, even with errors.
This option permits this behavior for this circumstance.
2020-02-14 15:11:10 +01:00
Tomáš Chvátal
f0026c85a3
Enable AlternativesCheck by default
2020-02-14 14:15:44 +01:00
Tomáš Chvátal
62cb4fb1da
Rebase update-alternatives check to the new rpmlint
...
Use modularized approach for the calls
Add tests to validate output
Describe and specify what is really asked from this test
2020-02-14 14:15:44 +01:00
Dirk Mueller
c6f66fe6cc
update-alternative checks to match openSUSE policy bnc#826993
2020-02-14 14:15:44 +01:00
David Greaves
6338dd8c00
Fix --rpmlintrc "user specified rpmlintrc" check
...
The warning should be issued if *not* Path.exists()
2020-02-14 13:56:33 +01:00
Ondřej Súkup
d38fe33314
Move 'req_names' to Pkg attribute
2020-02-14 10:08:10 +01:00
Ondřej Súkup
af1ef113fb
Move 'Dependecies' to Pkg atributes
2020-02-14 10:08:10 +01:00
Ondřej Súkup
cb916051ea
Drop "API" for files and move all to Pkg attributes
2020-02-14 10:08:10 +01:00
Ondřej Súkup
cfa6b6ddd5
Fill 'Pkg.files' on init
2020-02-14 10:08:10 +01:00
Ondřej Súkup
3e40fbe111
Simplify 'is_source' and 'is_no_source'
2020-02-14 10:08:10 +01:00
Ondřej Súkup
8f7ece20eb
Move 'readlines' to helpers
2020-02-14 10:08:10 +01:00
Ondřej Súkup
e183a4714d
Move PkgFile to own module and use __slots__
2020-02-14 10:08:10 +01:00
Ondřej Súkup
515e1bb20d
Wrap open in context manager to correct close of file
2020-02-14 10:08:10 +01:00
Ondřej Súkup
4754410540
Move substitute_shell_vars to place of its usage
2020-02-14 10:08:10 +01:00
Markéta Calábková
3ad7a06879
there are currently no .desktop files in /opt or /etc/opt
2020-02-13 15:48:01 +01:00
Markéta Calábková
0b3add2728
refactored MenuXDGCheck (rpm-software-management#225)
2020-02-13 15:48:01 +01:00
Tomáš Chvátal
eb352739e5
Fix matching of no such file on older products
2020-02-13 11:51:53 +01:00
Markéta Calábková
eedf3415ff
indicate encoding error also on non-compressed files
2020-02-13 10:55:05 +01:00
Markéta Calábková
20d041a104
tests from rpmlint-tests for MenuXDG (rpm-software-management#156)
2020-02-13 10:55:05 +01:00