diff --git a/rpmlint.spec b/rpmlint.spec index a89ef11..51f9c38 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -3,7 +3,7 @@ Name: rpmlint Version: 2.4.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Tool for checking common errors in RPM packages License: GPL-2.0-or-later URL: https://github.com/rpm-software-management/rpmlint @@ -35,21 +35,29 @@ BuildRequires: git-core BuildRequires: python3-devel # tests %if %{with tests} +%if ! 0%{?rhel} BuildRequires: dash BuildRequires: devscripts-checkbashisms +%endif BuildRequires: hunspell-cs BuildRequires: hunspell-en-US BuildRequires: python3dist(pytest) +%if ! 0%{?rhel} BuildRequires: python3dist(pytest-xdist) +%endif BuildRequires: /usr/bin/appstream-util BuildRequires: /usr/bin/desktop-file-validate %endif +%if ! 0%{?rhel} Requires: dash Requires: devscripts-checkbashisms +%endif Requires: rpm-build Requires: /usr/bin/appstream-util Requires: /usr/bin/desktop-file-validate +%if 0%{?fedora} Requires: rpmlint-fedora-license-data +%endif %description rpmlint is a tool for checking common errors in RPM packages. Binary @@ -62,7 +70,8 @@ and source packages as well as spec files can be checked. sed -i 's/python-magic/file-magic/g' setup.py # Don't lint the code or measure coverage in %%check -sed -i -e 's/ --cov=rpmlint//' -e 's/ --flake8//' setup.cfg +# 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 @@ -78,7 +87,9 @@ sed -i '/^@pytest.mark.no_cover/d' test/test_lint.py %pyproject_save_files %{name} mkdir -p %{buildroot}%{_sysconfdir}/xdg/rpmlint/ +%if 0%{?fedora} cp -a %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/xdg/rpmlint/ +%endif %check %if %{with tests} @@ -88,11 +99,16 @@ cp -a %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/xdg %files -f %{pyproject_files} %doc README.md %dir %{_sysconfdir}/xdg/rpmlint +%if 0%{?fedora} %config(noreplace) %{_sysconfdir}/xdg/rpmlint/*.toml +%endif %{_bindir}/rpmdiff %{_bindir}/rpmlint %changelog +* Thu May 25 2023 Yaakov Selkowitz - 2.4.0-8 +- Limit deps and don't ship Fedora config in RHEL builds + * Thu May 25 2023 Todd Zullinger - 2.4.0-7 - adjust for rpm-4.19.0 API changes