Commit Graph

12 Commits

Author SHA1 Message Date
Daniel García Moreno 50a33b41c6 lint: Reset all checks for each package
Some check classes keep state during checking and this cause problems
when checking several files with the same call.

This patch resets all the checks for each package to check. This is a
quick solution, maybe the best way to handle this is to reset the state
for each check in with a common method in the AbstractCheck, a common
way to handle and reset the state to avoid this problem in the future.

Fix https://github.com/rpm-software-management/rpmlint/issues/1161
2024-01-03 15:08:05 +01:00
Carl Smedstad 100bb8c3b9 Skip tests depending on dash & checkbashisms if not installed 2021-06-06 12:06:42 -04:00
Miroslav Suchý 66299c360c add initial Fedora config
I used openSUSE config as a start. Taken the config form rpmlint 1.11 from Fedora and
converted it to toml. Plus removed stuff which no longer exist or is too old.

Stuff which is commented should be discussed with Fedora community and either enabled
or removed.
2021-03-23 21:48:00 +01:00
Martin Liska c59a518f1f
Port Scoring for openSUSE.
I ported the 2 following configs:

https://build.opensuse.org/package/view_file/openSUSE:Factory/rpmlint-Factory/config?expand=1
https://build.opensuse.org/package/view_file/openSUSE:Factory/rpmlint-Factory/config.strict?expand=1

where I filtered out all checks that are currently not existing.
2020-11-03 10:21:10 +01:00
Martin Liska 31be0a59d8 opensuse config: Add test for Checks. 2020-10-29 08:34:03 +01:00
Martin Liska 3f8578cb49 Add pam-modules.toml configuration file. 2020-10-29 08:34:03 +01:00
Martin Liska d62a196194 Add dbus-services.toml configuration file. 2020-10-29 08:34:03 +01:00
Martin Liska 0d82aa0de5 Add users-groups.toml configuration file. 2020-10-29 08:34:03 +01:00
Martin Liska 8812c71b11 Add new configs/openSUSE/pie-executables.toml config file. 2020-10-29 08:34:03 +01:00
Martin Liska a2139a6546 Add licenses.toml config file.
The file is generated by generate-licenses-for-rpmlint.py script
from spec-cleaner project.
2020-10-29 08:34:03 +01:00
Kristyna Streitova a642af0305 Port openSUSE config file to toml
Note: This is a port of "config" file from openSUSE:Factory/rpmlint package (ported version timestamp - 2020-10-20 2:54 am)

Changes that were made:

[Checks]
Deleted - it's a default in the devel version of rpmlint
  - CheckBuildRoot -> BuildRootCheck
  - CheckPkgConfig -> PkgConfigCheck
  - DuplicatesCheck
  - CheckLogrotate -> LogrotateCheck
  - CheckIconSizes -> IconSizesCheck
  - CheckDBusPolicy -> DBusPolicyCheck
  - MixedFileOwnerships -> MixedOwnershipCheck
  - CheckUpdateAlternatives -> AlternativesCheck
  - CheckExecDocs -> DocCheck
  - CheckCommonFiles -> relevant checks ported to FilesCheck
  - CheckRCLinks -> relevant checks ported to SysVInitOnSystemdCheck

Enabled
  - BashismsCheck
  - CheckPAMModules -> PAMModulesCheck.py
  - TmpFilesCheck
  - CheckSysVinitOnSystemd  -> SysVInitOnSystemdCheck

Commented out for now - it's not ported yet
  - LibraryPolicyCheck -> SharedLibraryPolicyCheck
  - CheckSUIDPermissions
  - CheckDBUSServices
  - CheckCronJobs
  - CheckPolkitPrivs
  - CheckWorldWritable
  - CheckDeviceFiles

openSUSE only
  - BrandingPolicyCheck
  - CheckFilelist -> FilelistCheck.py
  - KMPPolicyCheck
  - CheckSystemdInstall -> SystemdInstallCheck.py

[Options]
Deleted - no longer exist
  - UseBzip2 = 0
  - UseUTF8 = 1

Renamed
  - PAMModules.WhiteList -> PAMModulesWhiteList

[Filters]
Deleted - no longer present
- '.*invalid-vendor.*'
- '.*invalid-distribution.*'
- 'non-devel-buildrequires*'
- '.*FSSTND-dir-in-var /var/adm/.*',
- ' non-remote_fs-dependency.*/boot',
- ' file-in-usr-marked-as-conffile',
- ' manpage-not-bzipped ',
- ' apache2-naming-policy-not-applied',
- ' no-%clean-section',
- 'update-desktop-files\.\S+: \w: untranslated-desktop-file',

Renamed
- suse-filelist-forbidden-* -> filelist-forbidden-*
2020-10-29 08:34:03 +01:00
Kristyna Streitova aeb25da708 Support loading a directory with config files
Add support for loading not only one configuration file but also
a directory with multiple *.toml configs with '-c' or '--config'
parameter.

Parametrize test_run_full_rpm and test_run_full_specs tests so they
will test multiple configuration files located in 'configs' directory.
2020-07-23 10:11:46 +02:00