Commit Graph

3408 Commits

Author SHA1 Message Date
Daniel Garcia Moreno 4e88e427bf Add python-module-def check to SpecCheck
This patch adds a new warning when detecting the use of python_module
macro definition in the spec file.

It's included by default in python-rpm-macros so every modern distro
should have this module defined.

This macro was added by py2pack by default in new packages, but now it's
removed:
https://github.com/openSUSE/py2pack/pull/166
2022-10-25 12:21:45 +02:00
Martin Liška 08df0b01b6
Merge pull request #953 from hroncok/abi3
Update the Python module regex to also match stable ABI names
2022-10-24 13:45:29 +02:00
Miro Hrončok db36e020c0 Update the Python module regex to also match stable ABI names
Python stable ABI extension modules have filenames with the .ai3.so suffix, e.g.:

    python3-tpm2-pytss.x86_64: W: undefined-non-weak-symbol /usr/lib64/python3.11/site-packages/tpm2_pytss/_libtpm2_pytss.abi3.so ...
2022-10-24 13:29:45 +02:00
Martin Liska c7cbe2ba3d update checkout action to v3 2022-10-19 12:16:53 +02:00
Martin Liška a2e103c516
Merge pull request #952 from marxin/use-pyupgrade
Use pyupgrade
2022-10-19 12:04:19 +02:00
Martin Liska 3147115cfa add pyupgrade to CI 2022-10-19 11:59:18 +02:00
Martin Liska 57b5f4bfc8 format with pyupgrade --py38-plus 2022-10-19 11:58:36 +02:00
Martin Liška 459d92f05c
Merge pull request #951 from danigm/refactor-filescheck
FilesCheck: Split big check method
2022-10-18 13:48:24 +02:00
Daniel Garcia Moreno 52b224ed0a FilesCheck: Split big check method
This patch makes the code a bit more readable, breaking the big check
method in a serie of methods in the FilesCheck class.

See #225
2022-10-18 13:42:14 +02:00
Martin Liška 10f02e8405
Merge pull request #950 from danigm/simplify-speccheck
SpecCheck: Split big line by line for-loop in methods
2022-10-18 09:27:38 +02:00
Daniel Garcia Moreno b850738ad7 SpecCheck: Split big line by line for-loop in methods
This patch makes the code a bit more readable, breaking the big for-loop
that check the spec file line by line in a series of methods in the
SpecCheck class.

With this change it's easier to extend the line-by-line check with
small functions and the if-else-if-... complexity is reduced a bit.

See #225
2022-10-18 09:23:56 +02:00
Martin Liška df3e31b3c8
Merge pull request #949 from tmzullinger/rpmdiff-help-take-2
rpmdiff: clarify help text on -i/-e options
2022-10-14 19:02:50 +02:00
Todd Zullinger 815bf07639 rpmdiff: clarify help text on -i/-e options
The epilog added in f551541a (rpmdiff: improve help for multiple values
with -i/-e options, 2022-10-04) mentions multiple values for the -i/-e
options.  However, the issue is present regardless of the number of
values.  Remove the reference to multiple values to simplify the help
text.
2022-10-14 12:40:27 -04:00
Martin Liška 09017d3f48
Merge pull request #943 from marxin/fix-no-manual-page-for-binary
fix broken regex for no-manual-page-for-binary check
2022-10-08 10:16:44 +02:00
Martin Liska 393cde4e70 fix broken regex for no-manual-page-for-binary check
It was a regression since 718e1eb9e6.

Fixes: #918.
2022-10-08 10:12:54 +02:00
Martin Liška 95f3da040a
Merge pull request #941 from tmzullinger/rpmdiff-help
rpmdiff: improve help for multiple values with -i/-e options
2022-10-05 09:47:14 +02:00
Todd Zullinger f551541a71 rpmdiff: improve help for multiple values with -i/-e options
When using multiple values with the -i or -e options, rpmlint-2.x
is incompatible with earlier releases.  Moreover, the behavior is not
immediately obvious to users¹.

To help alleviate this slightly, add an epilog to the parser which
explains how to pass multiple options to -i/-e options using either '--'
to separate the values from the following positional arguments or lists
the options _after_ the positional arguments.

This isn't really a fix for the poor behavior we get from argparse
relative to what older releases had with getopt, but maybe it's enough
until folks get used to how the options must be handled in 2.x releases.

This partially addresses #940.

¹ https://bugzilla.redhat.com/1969534
2022-10-05 00:26:43 -04:00
Martin Liska 7f427752e7 Release 2.4.0. 2022-10-03 16:00:16 +02:00
Martin Liška 9efe21c32e
Merge pull request #936 from danigm/main
Add python-setup-test check to SpecCheck
2022-09-29 09:26:33 +02:00
Daniel Garcia Moreno c8b87d6863 Add python-setup-test check to SpecCheck
This patch adds a new warning when detecting the use of
"setup.py test" in the check section.

Fixes: #677.
2022-09-28 20:50:22 +02:00
Martin Liska bb301e0a87 no-library-dependency-on: consider %_isa dependencies
When checking for --requires in LibraryDependencyCheck
consider usage of %_isa like:

$ rpm -qp --requires nothing-devel-0-8.1.x86_64.rpm
...
libnothing0(x86-64) = 0

Fixes: #798.
2022-09-12 17:13:01 -04:00
Martin Liška f26659b047
Merge pull request #927 from tmzullinger/sync-fedora-users-groups
configs/Fedora: sync user/groups with setup-2.14.1
2022-09-07 16:23:28 +02:00
Todd Zullinger 0937c6af2a configs/Fedora: sync user/groups with setup-2.14.1
This removes 3 users/groups:

    * #systemd-journal-gateway
    * ergo
    * katello

The `#systemd-journal-gateway` entry was due to not excluding comment
lines in the current uidgid file.  It was removed upstream in a2b68d4
(remove uidgid reservation for systemd-journal-gateway (#1174304),
2014-12-18)¹.

The `ergo` entry was added in ab36f34e (Add ergo user and group,
2022-04-13)².  However, the Fedora ergo⁴ package is a "program for
large-scale self-consistent field calculations."  The ergo⁵ package
which was referenced in #842 is an IRC daemon written in Go, which is
not in Fedora.

The `katello` entry was removed upstream in 6563bed (Stop creating
katello user, 2021-06-16)³.

This was done with tools/generate-fedora-users-groups.py:

    tools/generate-fedora-users-groups.py >configs/Fedora/users-groups.toml

¹ https://pagure.io/setup/c/a2b68d4
² https://github.com/rpm-software-management/rpmlint/commit/ab36f34e
  https://github.com/rpm-software-management/rpmlint/pull/842
³ https://pagure.io/setup/c/6563bedhttps://src.fedoraproject.org/rpms/ergohttps://github.com/ergochat/ergo
2022-09-07 09:20:58 -04:00
Martin Liska 5f56d76f02 Fix a flake8 issue. 2022-09-07 08:35:57 +02:00
Martin Liška 25752920e2
Merge pull request #926 from tmzullinger/tools-generate-fedora-users-groups
improve tools/generate-fedora-users-groups
2022-09-07 08:35:14 +02:00
Todd Zullinger 9ca7ea58a3 tools/generate-fedora-users-groups: output in desired format
Update the script from 5ee8dc83 (extract script generating Fedora users
and groups to tools/, 2021-03-24) to produce output suitable for writing
directly to configs/Fedora/users-groups.toml.

Sort the user and group lists to provide more stable output.
2022-09-06 17:29:05 -04:00
Todd Zullinger 8c7dac634b tools/generate-fedora-users-groups: skip comment lines
The uidgid file in setup was changed to use '#' for comments in c2d8d46
(uidgid: simplify table format by properly commenting lines,
2022-05-30), released in 2.14.1.

Before then, a few stray comment lines were added in a2b68d4 (remove
uidgid reservation for systemd-journal-gateway (#1174304), 2014-12-18)
and 6563bed (Stop creating katello user, 2021-06-16), released in
setup-2.9.3 and setup-2.13.9, respectively.

Skip lines beginning with a comment marker when parsing the uidgid file.
2022-09-06 17:28:17 -04:00
Martin Liška 7d4cb90fff
Merge pull request #925 from marxin/special-case-etc-ld.so.conf.d
non-conffile-in-etc: skip for /etc/ld.so.conf.d/* files
2022-09-06 10:58:25 +02:00
Martin Liska a4813cd2a5 non-conffile-in-etc: skip for /etc/ld.so.conf.d/* files
Fixes: #924
2022-09-06 10:34:16 +02:00
Martin Liška caf28727e8
Merge pull request #923 from marxin/fix-fedora-postin-without-ldconfig
Update Fedora config
2022-09-05 15:55:27 +02:00
Martin Liska f721943914 Update Fedora config
Similarly to library-without-ldconfig-postin and library-without-ldconfig-postun,
add postin-without-ldconfig and postun-without-ldconfig to Filters.

Fixes: #922
2022-09-05 14:38:33 +02:00
Martin Liska bff66336c6 Ignore one bugbear error. 2022-09-02 16:02:49 +02:00
Martin Liska 45671ba84c fix _check_manpage crash
The crash happens for /usr/share/man/man8/public.8
(where we expect .gz compression extension).
2022-09-01 09:30:42 +02:00
Martin Liška 48c6bf2183
Merge pull request #921 from marxin/relax-bad-manual-page-folder
Relax bad-manual-page-folder
2022-08-31 11:43:32 +02:00
Martin Liska aab97490c1 Relax bad-manual-page-folder
Allow: folder name man<N> should contain files in the form *.<N>*.gz.

Fixes: #918.
2022-08-31 11:41:03 +02:00
Martin Liška 6fe4be934d
Merge pull request #919 from marxin/extend-manual-page-checks-v2
extend checks related to manual pages
2022-08-30 11:20:11 +02:00
Martin Liska 718e1eb9e6 extend checks related to manual pages
Fixes: #918
2022-08-29 09:11:48 +02:00
Martin Liška 8cdd92e9a8
Merge pull request #914 from marxin/revert-remove-fedora-rawhide
Revert "Temporarily remove fedora:rawhide as it has broken Python stack.
2022-08-26 20:34:04 +02:00
Martin Liska 8b2285ee1f Revert "Temporarily remove fedora:rawhide as it has broken Python stack."
This reverts commit 4f1f63617a.
2022-08-26 20:31:39 +02:00
Martin Liška f7b561c4c1
Merge pull request #920 from marxin/remove-pytest-flake8
Run flake8 directly as pytest-flake8 is broken.
2022-08-26 20:31:09 +02:00
Martin Liska 38b24d407b Run flake8 directly as pytest-flake8 is broken.
It's broken due to:
https://github.com/tholo/pytest-flake8/issues/87
2022-08-26 20:25:33 +02:00
Martin Liška 2cc6e7d59e
Merge pull request #917 from marxin/add-missing-hash-section-check-v2
add missing-hash-section check for HASH ELF sections
2022-08-26 08:40:08 +02:00
Martin Liska fdf47307d8 add missing-hash-section check for HASH ELF sections
System V requires that .hash sections is present in shared libraries
for dynamic symbol resolution. And we can emit warning when .gnu.hash
section is missing as it rapidly speeds up the symbol resolution.
2022-08-26 08:39:25 +02:00
Martin Liska f331927d26 Silent stdout and stderr for appstream-util command. 2022-08-25 14:52:48 +02:00
Martin Liška fbdbe72b3b
Merge pull request #913 from marxin/remove-fedora-rawhide
Temporarily remove fedora:rawhide as it has broken Python stack.
2022-08-09 13:38:36 +02:00
Martin Liska 4f1f63617a Temporarily remove fedora:rawhide as it has broken Python stack. 2022-08-09 13:29:15 +02:00
Martin Liška a77bf84da4
Merge pull request #912 from marxin/modify-binary-or-shlib-defines-rpath-format
Modify format of binary-or-shlib-defines-rpath
2022-08-08 21:02:50 +02:00
Martin Liska a76786ffae Modify format of binary-or-shlib-defines-rpath
Before:
E: binary-or-shlib-defines-rpath /usr/bin/remmina (RUNPATH: /usr)

After:
E: binary-or-shlib-defines-rpath /usr/bin/remmina (RUNPATH: $ORIGIN/../lib64:$ORIGIN/..)

Fixes: #911
2022-08-08 20:57:36 +02:00
Martin Liška d285f9d7d4
Merge pull request #906 from marxin/use-zypper
Revert "Revert "Use zypper for openSUSE.""
2022-07-27 13:20:17 +02:00
Martin Liska ad6d779b50 Do not use flake8-simplify for testers automatically. 2022-07-25 22:03:42 +02:00