Name: rpmlint Version: 2.5.0 Release: 1%{?dist} Summary: Tool for checking common errors in RPM packages License: GPL-2.0-or-later URL: https://github.com/rpm-software-management/rpmlint Source0: %{url}/archive/%{version}/rpmlint-%{version}.tar.gz # Taken from https://github.com/rpm-software-management/rpmlint/tree/main/configs/Fedora Source1: fedora.toml Source3: scoring.toml Source4: users-groups.toml Source5: warn-on-functions.toml # https://bugzilla.redhat.com/2132936 # https://github.com/rpm-software-management/rpmlint/pull/943 #Patch0: https://github.com/rpm-software-management/rpmlint/commit/393cde4e.patch#/0001-fix-broken-regex-for-no-manual-page-for-binary-check.patch # https://bugzilla.redhat.com/2175241 #Patch1: https://github.com/rpm-software-management/rpmlint/commit/7d707f7f.patch#/0001-TagsCheck-handle-license-exception-in-grouping.patch #Patch2: https://github.com/rpm-software-management/rpmlint/commit/48aa148b.patch#/0001-TagsCheck-restore-space-exclusion-to-license_excepti.patch #Patch3: https://github.com/rpm-software-management/rpmlint/commit/65abdbd3.patch#/0002-TagsCheck-handle-license-exception-in-first-item-of-.patch # rpm-4.19.0 api fixes # https://github.com/rpm-software-management/rpmlint/pull/1066 #Patch4: 0001-DocCheck-adjust-for-rpm-4.19.0-API-changes.patch #Patch5: 0002-rpmdiff-adjust-for-rpm-4.19.0-API-changes.patch ## Tried building with all or some of the patches, but they all failed so I commented them out for the time being BuildArch: noarch # use git to apply patches; it handles binary diffs BuildRequires: git-core BuildRequires: python3-devel BuildRequires: hunspell-cs BuildRequires: hunspell-en-US BuildRequires: python3-pytest BuildRequires: python3-pytest-xdist BuildRequires: python3dist(pybeam) BuildRequires: python3dist(python-magic) BuildRequires: python3dist(pyxdg) BuildRequires: python3dist(tomli-w) BuildRequires: python3dist(zstandard) BuildRequires: appstream-util BuildRequires: desktop-file-utils BuildRequires: pyproject-rpm-macros Requires: dash Requires: checkbashisms Requires: rpm-build Requires: appstream-util Requires: desktop-file-utils %description rpmlint is a tool for checking common errors in RPM packages. Binary and source packages as well as spec files can be checked. %prep %autosetup -Sgit # Replace python-magic dep with file-magic (rhbz#1899279) sed -i 's/python-magic/file-magic/g' setup.py # Don't lint the code or measure coverage in %%check # On RHEL, also avoid xdist by disabling parallelism sed -i -e 's/ --cov=rpmlint//' -e 's/ --flake8//' %{?rhel:-e 's/ -n auto//'} setup.cfg # Avoid warnings about pytest.mark.no_cover marker sed -i '/^@pytest.mark.no_cover/d' test/test_lint.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{name} mkdir -p %{buildroot}%{_sysconfdir}/xdg/rpmlint/ %files -f %{pyproject_files} %doc README.md %dir %{_sysconfdir}/xdg/rpmlint %{_bindir}/rpmdiff %{_bindir}/rpmlint