import rpmlint-1.11-19.el9

This commit is contained in:
CentOS Sources 2022-02-01 12:59:13 -05:00 committed by Stepan Oksanichenko
parent 2f672da453
commit 7ecd79f4b3
3 changed files with 52 additions and 19 deletions

View File

@ -0,0 +1,23 @@
diff -up rpmlint-rpmlint-1.11/test.sh.orig rpmlint-rpmlint-1.11/test.sh
--- rpmlint-rpmlint-1.11/test.sh.orig 2022-01-12 17:23:52.565790275 +0100
+++ rpmlint-rpmlint-1.11/test.sh 2022-01-12 17:24:02.043920708 +0100
@@ -2,7 +2,7 @@
export PYTHONPATH=$(pwd)/tools:$(pwd)
export TESTPATH="$(pwd)/test/"
-: ${PYTHON:=python} ${PYTEST:=py.test} ${FLAKE8:=flake8}
+: ${PYTHON:=python} ${PYTEST:=py.test}
: ${PYTHONWARNINGS:=all}
export PYTHONWARNINGS
@@ -40,10 +40,6 @@ $PYTEST -v || exit $?
unset PYTHONWARNINGS
-echo "$FLAKE8 tests"
-$FLAKE8 --version
-$FLAKE8 . ./rpmdiff ./rpmlint || exit $?
-
echo "man page tests"
if man --help 2>&1 | grep -q -- --warnings; then
tmpfile=$(mktemp) || exit 1

View File

@ -0,0 +1,13 @@
diff -up rpmlint-rpmlint-1.11/TagsCheck.py.orig rpmlint-rpmlint-1.11/TagsCheck.py
--- rpmlint-rpmlint-1.11/TagsCheck.py.orig 2022-01-11 16:49:18.424026182 +0100
+++ rpmlint-rpmlint-1.11/TagsCheck.py 2022-01-11 16:50:05.774665734 +0100
@@ -463,7 +463,8 @@ def spell_check(pkg, str, fmt, lang, ign
lang, filters=[enchant.tokenize.EmailFilter,
enchant.tokenize.URLFilter,
enchant.tokenize.WikiWordFilter])
- except enchant.DictNotFoundError:
+ except (enchant.errors.DefaultLanguageNotFoundError,
+ enchant.DictNotFoundError):
printInfo(pkg, 'enchant-dictionary-not-found', lang)
pass
_enchant_checkers[lang] = checker

View File

@ -15,12 +15,9 @@
%global pytest py.test
%endif
# linitng is flaky, so we fake it
%global flake8 true
Name: rpmlint
Version: 1.11
Release: 17%{?dist}
Release: 19%{?dist}
Summary: Tool for checking common errors in RPM packages
License: GPLv2
URL: https://github.com/rpm-software-management/rpmlint
@ -40,28 +37,27 @@ Patch213: rpmlint-1.11-libc-warnings.patch
# See https://fedoraproject.org/wiki/Changes/PythonMacroError
Patch214: rpmlint-1.11-no-python-macro.patch
# Downstream-only patches
Patch215: rpmlint-1.11-spellcheck-handle-missing-language-error.patch
Patch216: rpmlint-1.11-disable-flake8-self-test.patch
BuildArch: noarch
BuildRequires: make
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-rpm >= 4.4.2.2
BuildRequires: python3-pytest
#BuildRequires: python3-flake8-import-order
Requires: python3
Requires: python3-rpm >= 4.4.2.2
%else
BuildRequires: python >= 2.6
BuildRequires: rpm-python >= 4.4.2.2
BuildRequires: pytest
#BuildRequires: python2-flake8-import-order
Requires: python >= 2.6
Requires: rpm-python >= 4.4.2.2
%endif
BuildRequires: sed >= 3.95
%if ! 0%{?rhel}
# no bash-completion for RHEL
BuildRequires: bash-completion
%endif
# python-magic and python-enchant are actually optional dependencies, but
# they bring quite desirable features.
%if %{with python3}
@ -106,6 +102,8 @@ and source packages as well as spec files can be checked.
%patch212 -p1
%patch213 -p1
%patch214 -p1
%patch215 -p1
%patch216 -p1
sed -i 's|1.10|%{version}|g' Makefile
@ -130,9 +128,7 @@ make install DESTDIR=$RPM_BUILD_ROOT ETCDIR=%{_sysconfdir} MANDIR=%{_mandir} \
LIBDIR=%{_datadir}/rpmlint BINDIR=%{_bindir} PYTHON=%{python}
install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config
%if 0%{?rhel}
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/
%endif
%check
@ -144,20 +140,14 @@ sed -i 's/test_pyc_m/xxx_pyc_m/' test/test_files.py
sed -i 's/test_inconsistent_file_extension/xxx_inconsistent_file_extension/' test/test_sources.py
%endif
make check PYTHON=%{python} PYTEST=%{pytest} FLAKE8=%{flake8}
make check PYTHON=%{python} PYTEST=%{pytest}
%files
%license COPYING
%doc README.md config.example
%config(noreplace) %{_sysconfdir}/rpmlint/
%if 0%{?fedora}
%{_datadir}/bash-completion/
%else
%if ! 0%{?rhel}
%{_sysconfdir}/bash_completion.d/
%endif
%endif
%{_datadir}/bash-completion/completions/
%{_bindir}/rpmdiff
%{_bindir}/rpmlint
%{_datadir}/rpmlint/
@ -165,6 +155,13 @@ make check PYTHON=%{python} PYTEST=%{pytest} FLAKE8=%{flake8}
%{_mandir}/man1/rpmlint.1*
%changelog
* Wed Jan 12 2022 Michal Domonkos <mdomonko@redhat.com> - 1.11-19
- Disable flake8 self-test (#1929210)
* Mon Jan 10 2022 Michal Domonkos <mdomonko@redhat.com> - 1.11-18
- Enable bash-completion (#1999654)
- Handle missing language error during spellcheck (#1929210)
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.11-17
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688