Commit Graph

3408 Commits

Author SHA1 Message Date
Martin Liska a207829c58 Revert "disable opensuse-tumbleweed-aarch64 due to system crash"
This reverts commit 56429a8dbb.
2023-02-15 10:59:15 +01:00
Martin Liška 420513fb74
Merge pull request #1003 from marxin/stopwatch-for-libmagic
Add stopwatch counter for libmagic
2023-02-14 16:51:24 +01:00
Martin Liska d4b78d335f Add stopwatch counter for libmagic
We use the library for file type detection and sometimes it can
be quite slow.
2023-02-14 16:43:17 +01:00
Martin Liška 8c37604db0
Merge pull request #1002 from marxin/filter-by-title
Support filtering of warnings/errors based on title
2023-02-14 16:41:51 +01:00
Martin Liska 2cac8238bf Support filtering of warnings/errors based on title
There are package like glibc-locale.x86_64 where one can meet
thousands of warnings that are filtered eventually. Regex-based
filtering can be expensive and cross-directory-hard-link title-based
match can save 40% of rpmlint time.

Fixes: #989
2023-02-14 16:05:16 +01:00
Martin Liška 7a3f1c6b97
Merge pull request #992 from marxin/str.split
simplify str.split
2023-01-18 10:21:21 +01:00
Martin Liska 863df5a31f simplify str.split 2023-01-18 10:09:23 +01:00
Martin Liska 56429a8dbb disable opensuse-tumbleweed-aarch64 due to system crash
Related to #981.
2023-01-18 09:58:21 +01:00
Martin Liška f08e413b66
Merge pull request #990 from marxin/subprocess-modernize
use subprocess.run(..., text=True) instead of stdout.decode()
2023-01-12 16:54:01 +01:00
Martin Liska c2c525c35f use subprocess.run(..., text=True) instead of stdout.decode() 2023-01-12 16:46:19 +01:00
Martin Liska 37cdd05cf5 Print number of messages that are filtered out 2023-01-12 13:36:54 +01:00
Martin Liška b6ab275f17
Merge pull request #988 from marxin/speed-up-DuplicatesCheck
Speed up DuplicatesCheck by shorter messages
2023-01-12 13:01:08 +01:00
Martin Liska 2a40ea0e50 Speed up DuplicatesCheck by shorter messages
There can be packages that a files-duplicate warning being printed
for hundreds of files. Which is slow when it comes to evaluation
of error/warning filters by regular expressions.
2023-01-12 10:11:32 +01:00
Martin Liška 3f85ea2bad
Merge pull request #987 from marxin/simplify-magic-usage
magic: remove python2 support and simplify
2023-01-11 11:08:22 +01:00
Martin Liška f7473d03d7
Merge pull request #986 from marxin/py2-remove-part1
Remove Python 2 support in generate-isocodes.py
2023-01-11 11:07:43 +01:00
Martin Liska 2749bfc1cd magic: remove python2 support and simplify 2023-01-11 11:04:11 +01:00
Martin Liska a26b622bcf Remove Python 2 support in generate-isocodes.py
And re-run the script.
2023-01-11 10:51:24 +01:00
Martin Liska 6b88951106 Use badge for entire devel package in OBS. 2023-01-09 13:00:01 +01:00
Martin Liška b3460779fd
Merge pull request #984 from marxin/speed-up-ElfSectionInfo
speed up parsing of ElfSectionInfo
2023-01-06 15:56:18 +01:00
Martin Liska a05d7a8ef8 speed up parsing of ElfSectionInfo
We can have a file like:
./usr/lib64/gcc/rx-elf/13/no-fpu-libs/big-endian-data/no-strings/libstdc++.a

that contains 500K symbols where most of them are actually of
type == NOTYPE. Thus simplify the parser and save only functions.

Speeds up
./lint.py cross-rx-gcc13-13.0.0+git197769-0.x86_64.rpm
by 40 seconds to ~18 seconds.
2023-01-06 15:49:08 +01:00
Martin Liška 1056f04337
Merge pull request #983 from marxin/fix-no-binary-if-symlink
Relax no-binary and noarch-with-lib64 checks
2023-01-06 14:59:59 +01:00
Martin Liska e1f4ff0891 Relax no-binary and noarch-with-lib64 checks
Set `has_file_in_lib64` to True if a package contains a symlink
to a file in that location. It's very a common pattern for shared
libraries where foo-devel package provides only the symlink.

Fixes: #73
2023-01-06 09:55:53 +01:00
Martin Liška 1b2b958892
Merge pull request #982 from Pi-Cla/main
Update openSUSE's licenses.toml
2023-01-06 09:47:06 +01:00
Pi-Cla 6834dd0ea4 Update openSUSE's licenses.toml 2023-01-06 01:33:21 -07:00
Martin Liška a25df6ab94
Merge pull request #976 from bkmgit/patch-1
Franklin Street address is ok
2023-01-03 07:11:32 +01:00
Benson Muite 76b92bc138
Franklin Street address is ok
Franklin Street Address is used in:
 https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 
and is the current address listed at:
 https://www.fsf.org/about/contact/
2023-01-02 06:36:17 +03:00
Martin Liska 809d5fba81 Add OBS badge. 2022-12-22 11:15:55 +01:00
Martin Liška 9f0f8ce1ab
Merge pull request #973 from marxin/experiment-with-ruff
Start using new ruff linter.
2022-12-09 15:16:06 +01:00
Martin Liska 275060319c Start using new ruff linter. 2022-12-09 15:10:52 +01:00
Martin Liska 9d6cf1ea12 Remove for now LGTM badges as it will be closed. 2022-12-09 09:08:00 +01:00
Martin Liška 3c828527f0
Merge pull request #970 from jengelh/master
Remove shared-library-without-dependency and library-not-linked-against-libc
2022-12-01 12:09:45 +01:00
Jan Engelhardt cf619f717b Remove shared-library-without-dependency and library-not-linked-against-libc
Libraries that do not use any libc symbols are legit (e.g. libs with
just mathematical computations or lookup tables only). libc.so.6 (and
sometimes libgcc_s.so.1) used to be linked into all shared libraries
because gcc implicitly adds -lc -lgcc_s to *everything*. But ever
since distributions started using --as-needed, -lc/-lgcc_s too are
subject to being thrown at out at the linker stage.

References: #969
2022-12-01 11:28:34 +01:00
Martin Liška 3480eaa673
Merge pull request #968 from danigm/python-allow-tests-in-package
PythonCheck: Allow tests folder in python packages
2022-11-28 10:38:59 +01:00
Daniel Garcia Moreno 731065974a PythonCheck: Allow tests folder in python packages
Fix https://github.com/rpm-software-management/rpmlint/issues/965
2022-11-28 09:21:24 +01:00
Martin Liška 742749c0c0
Merge pull request #963 from marxin/action-exception
GitHub Action: remove --security-opt in action
2022-11-17 09:07:11 +01:00
Martin Liska 155d6bc5b3 GitHub Action: remove --security-opt in action 2022-11-17 08:55:17 +01:00
danigm ab5ba2f98f
PythonCheck: Do not allow tests folder in subpackages (#961)
See https://github.com/rpm-software-management/rpmlint/pull/955#discussion_r1022681043
2022-11-15 18:52:05 +01:00
danigm 3b98cb263a
Add python check (#955)
* Add PythonCheck (#423)

This adds a Python specific check that performs 2 tasks:

1) Verify the egg-info is folder (setuptools based) and not file based
   (distutils style)

2) Check for Python specific forbidden dirs and output various warnings and
   errors about them.

* PythonCheck: remove src-in-package check

* PythonCheck: extend test cases to /usr/lib64

* PythonCheck: ignore tests in -test{,s} packages.

* Update rpmlint/descriptions/PythonCheck.toml

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* PythonCheck: update to the latest codebase

* Rename test file to be able to use get_tested_package

* Improve PythonCheck error descrpitions

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* PythonCheck: juse endswith with tuple instead of or

* PythonCheck: Use pathlib.Path instead of os.path

* PythonCheck: recommend dist-info instead of egg-info

* PythonCheck: compile re at module level

* fixup! PythonCheck: Use pathlib.Path instead of os.path

* PythonCheck: Update test binary packages

These binary packages are generated from the following source spec:
https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint:tests/pythoncheck

* PythonCheck: Convert python-tests-in-package to Error

* PythonCheck: Do not warn on python modules named doc

* PythonCheck: Improve python-tests-in-package descriptions

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* PythonCheck: Improve python-doc-in-package descriptions

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* PythonCheck: Improve python-egg-info-distutils-style descriptions

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

Co-authored-by: Johannes Grassler <johannes.grassler@suse.com>
Co-authored-by: Johannes Grassler <jgr-github@btw23.de>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2022-11-15 14:06:52 +01:00
Martin Liska 52f85dfedd codeql: remove cron and use it only for some branches 2022-11-14 14:35:22 +01:00
Martin Liška 2d3393fce0
Merge pull request #960 from lgtm-migrator/codeql
Add CodeQL workflow for GitHub code scanning
2022-11-14 14:34:55 +01:00
Martin Liška 51f4cbd995
Merge pull request #959 from danigm/duplicate-small
Do not consider files-duplicate for SMALL files
2022-11-10 16:16:22 +01:00
Daniel Garcia Moreno cc9c25818c Set DuplicatesMinSize default value to 2
This patch set the DuplicatesMinSize to 2 bytes and also updates the
duplicates binary package to test this new functionality.

The sources of this package can be found here:
https://build.opensuse.org/request/show/1035083
2022-11-10 15:44:47 +01:00
LGTM Migrator 9fb3bebc0e
Add CodeQL workflow for GitHub code scanning 2022-11-10 14:15:31 +00:00
Martin Liska 8a2a6215cf dump_stats.py: add one more category for filtering 2022-11-10 14:43:39 +01:00
Daniel Garcia Moreno d2f0ce3281 Do not consider files-duplicate for SMALL files
Fix https://github.com/rpm-software-management/rpmlint/issues/833
2022-11-09 17:06:57 +01:00
Martin Liška d7900cd3df
Merge pull request #956 from marxin/remove-B023-exception
remove bugbear exception (B023)
2022-10-28 14:35:11 +02:00
Martin Liška d1f4307541
Merge pull request #957 from danigm/python-sitelib-glob
SpecCheck: Add python_sitelib glob check
2022-10-27 11:03:40 +02:00
Daniel Garcia Moreno 313da60e3b SpecCheck: Add python_sitelib glob check 2022-10-27 11:00:29 +02:00
Martin Liska 4d075a90d7 remove bugbear exception (B023)
Fixed with the latest release.
2022-10-27 09:29:52 +02:00
Martin Liška a2acb99e8a
Merge pull request #954 from danigm/python-module-check
Add python-module-def check to SpecCheck
2022-10-25 12:26:07 +02:00