import rpmlint-1.10-13.2.el8
This commit is contained in:
parent
a38e940006
commit
ccb3ff0fbf
25
SOURCES/rpmlint-1.10-fix_test.patch
Normal file
25
SOURCES/rpmlint-1.10-fix_test.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -up rpmlint-rpmlint-1.10/test.sh.fix_test rpmlint-rpmlint-1.10/test.sh
|
||||
--- rpmlint-rpmlint-1.10/test.sh.fix_test 2017-09-05 08:40:05.000000000 +0200
|
||||
+++ rpmlint-rpmlint-1.10/test.sh 2019-06-13 12:05:03.663871888 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
export PYTHONPATH=$(pwd)/tools:$(pwd)
|
||||
export TESTPATH="$(pwd)/test/"
|
||||
-: ${PYTHON:=python} ${PYTEST:=py.test} ${FLAKE8:=flake8}
|
||||
+: ${PYTHON:=/usr/libexec/platform-python} ${PYTEST:=py.test-3} ${FLAKE8:=flake8}
|
||||
: ${PYTHONWARNINGS:=all}
|
||||
export PYTHONWARNINGS
|
||||
|
||||
@@ -40,9 +40,9 @@ $PYTEST -v || exit $?
|
||||
|
||||
unset PYTHONWARNINGS
|
||||
|
||||
-echo "$FLAKE8 tests"
|
||||
-$FLAKE8 --version
|
||||
-$FLAKE8 . ./rpmdiff ./rpmlint || exit $?
|
||||
+#echo "$FLAKE8 tests"
|
||||
+#$FLAKE8 --version
|
||||
+#$FLAKE8 . ./rpmdiff ./rpmlint || exit $?
|
||||
|
||||
echo "man page tests"
|
||||
if man --help 2>&1 | grep -q -- --warnings; then
|
12
SOURCES/rpmlint-1.10-no_python2.patch
Normal file
12
SOURCES/rpmlint-1.10-no_python2.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up rpmlint-rpmlint-1.10/TagsCheck.py.no_python2 rpmlint-rpmlint-1.10/TagsCheck.py
|
||||
--- rpmlint-rpmlint-1.10/TagsCheck.py.no_python2 2019-06-13 11:13:28.506567431 +0200
|
||||
+++ rpmlint-rpmlint-1.10/TagsCheck.py 2019-06-13 11:47:12.230644658 +0200
|
||||
@@ -433,7 +433,7 @@ oldest_changelog_timestamp = calendar.ti
|
||||
|
||||
private_so_paths = set()
|
||||
for path in ('%perl_archlib', '%perl_vendorarch', '%perl_sitearch',
|
||||
- '%python_sitearch', '%python2_sitearch', '%python3_sitearch',
|
||||
+ '%python3_sitearch',
|
||||
'%ruby_sitearch', '%php_extdir'):
|
||||
epath = rpm.expandMacro(path)
|
||||
if epath and epath != path:
|
30
SOURCES/rpmlint-1.10-rpm_surrogate_escaped_utf8.patch
Normal file
30
SOURCES/rpmlint-1.10-rpm_surrogate_escaped_utf8.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -up rpmlint-rpmlint-1.10/Pkg.py.rpm_surrogate_escaped_utf8 rpmlint-rpmlint-1.10/Pkg.py
|
||||
--- rpmlint-rpmlint-1.10/Pkg.py.rpm_surrogate_escaped_utf8 2019-06-13 12:17:33.339937352 +0200
|
||||
+++ rpmlint-rpmlint-1.10/Pkg.py 2019-06-13 13:37:37.076702548 +0200
|
||||
@@ -164,12 +164,20 @@ def is_utf8(fname):
|
||||
|
||||
|
||||
def is_utf8_bytestr(s):
|
||||
- try:
|
||||
- s.decode('UTF-8')
|
||||
- except UnicodeError:
|
||||
- return False
|
||||
- return True
|
||||
-
|
||||
+ if isinstance(s, str):
|
||||
+ try:
|
||||
+ s.encode("utf8")
|
||||
+ except UnicodeEncodeError:
|
||||
+ return False
|
||||
+ else:
|
||||
+ return True
|
||||
+ else:
|
||||
+ try:
|
||||
+ s.decode('UTF-8')
|
||||
+ except UnicodeError:
|
||||
+ return False
|
||||
+ else:
|
||||
+ return True
|
||||
|
||||
def to_unicode(string):
|
||||
if string is None:
|
@ -30,7 +30,8 @@ setOption("ValidShells", (
|
||||
"/bin/bash",
|
||||
"/sbin/ldconfig",
|
||||
"/usr/bin/perl",
|
||||
"/usr/bin/python",
|
||||
"/usr/bin/python3",
|
||||
"/usr/libexec/platform-python",
|
||||
))
|
||||
|
||||
setOption("DanglingSymlinkExceptions", (
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
Name: rpmlint
|
||||
Version: 1.10
|
||||
Release: 13%{?dist}
|
||||
Release: 13.2%{?dist}
|
||||
Summary: Tool for checking common errors in RPM packages
|
||||
Group: Development/Tools
|
||||
License: GPLv2
|
||||
@ -36,10 +36,18 @@ Patch0: rpmlint-1.10-ignore-debuginfo-useless-provides.patch
|
||||
# https://github.com/rpm-software-management/rpmlint/commit/c1945e37e2989364c5caedc05aa429a5c2d39f4d
|
||||
# https://github.com/rpm-software-management/rpmlint/commit/f267bf1c60d067436b360c68d8e956876758b268
|
||||
Patch1: rpmlint-1.10-flake-cleanups.patch
|
||||
Patch2: rpmlint-1.10-no_python2.patch
|
||||
Patch3: rpmlint-1.10-fix_test.patch
|
||||
Patch4: rpmlint-1.10-rpm_surrogate_escaped_utf8.patch
|
||||
BuildArch: noarch
|
||||
%if %{with python3}
|
||||
%if 0%{?rhel} > 7
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: rpm-python3 >= 4.4.2.2
|
||||
%else
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: rpm-python3 >= 4.4.2.2
|
||||
%endif
|
||||
BuildRequires: python3-pytest
|
||||
#BuildRequires: python3-flake8-import-order
|
||||
%{?__python3:Requires: %{__python3}}
|
||||
@ -53,10 +61,7 @@ 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
|
||||
Requires: perl-interpreter
|
||||
%if ! 0%{?rhel}
|
||||
# python-magic and python-enchant are actually optional dependencies, but
|
||||
@ -88,6 +93,9 @@ and source packages as well as spec files can be checked.
|
||||
%setup -q -n %{name}-%{name}-%{version}
|
||||
%patch0 -p1 -b .debuginfo-useless-provides
|
||||
%patch1 -p1 -b .flake
|
||||
%patch2 -p1 -b .no_python2
|
||||
%patch3 -p1 -b .fix_test
|
||||
%patch4 -p1 -b .rpm_surrogate_escaped_utf8
|
||||
sed -i -e /MenuCheck/d Config.py
|
||||
cp -p config config.example
|
||||
install -pm 644 %{SOURCE3} config
|
||||
@ -109,9 +117,7 @@ pushd $RPM_BUILD_ROOT%{_bindir}
|
||||
ln -s rpmlint el4-rpmlint
|
||||
ln -s rpmlint el5-rpmlint
|
||||
popd
|
||||
%if 0%{?rhel}
|
||||
rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
@ -122,13 +128,7 @@ make check PYTHON=%{python} PYTEST=%{pytest} FLAKE8=%{flake8}
|
||||
%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}/el*-rpmlint
|
||||
%{_bindir}/rpmlint
|
||||
@ -137,6 +137,16 @@ make check PYTHON=%{python} PYTEST=%{pytest} FLAKE8=%{flake8}
|
||||
%{_mandir}/man1/rpmlint.1*
|
||||
|
||||
%changelog
|
||||
* Fri Jun 14 2019 Thomas Woerner <twoerner@redhat.com> - 1.10.13.2
|
||||
- Handle rpm change to return surrogate-escaped utf-8 python strings
|
||||
(RHBZ#1693712)
|
||||
|
||||
* Thu Jun 13 2019 Thomas Woerner <twoerner@redhat.com> - 1.10.13.1
|
||||
- Fix unit test: use platform-python, py.test-3, no flake8 (RHBZ#1576803)
|
||||
- Update of ValidShells (RHBZ#1633698)
|
||||
- Remove Python2 paths from TagsCheck.py (RHBZ#1633698)
|
||||
- Enable bash-competion scripts (RHBZ#1577890)
|
||||
|
||||
* Thu Sep 20 2018 Tomas Orsava <torsava@redhat.com> - 1.10-13
|
||||
- Require the Python interpreter directly instead of using the package name
|
||||
- Related: rhbz#1619153
|
||||
|
Loading…
Reference in New Issue
Block a user