diff --git a/drop-unicodedata-dep.diff b/drop-unicodedata-dep.diff new file mode 100644 index 0000000..760bc3c --- /dev/null +++ b/drop-unicodedata-dep.diff @@ -0,0 +1,31 @@ +diff --git a/SpecCheck.py b/SpecCheck.py +index 8cb85b3..45ad404 100644 +--- a/SpecCheck.py ++++ b/SpecCheck.py +@@ -9,7 +9,6 @@ + + import re + import sys +-import unicodedata + try: + from urlparse import urlparse + except ImportError: # Python 3 +@@ -106,7 +105,7 @@ filelist_regex = re.compile(r'\s+-f\s+\S+') + pkgname_regex = re.compile(r'\s+(?:-n\s+)?(\S+)') + tarball_regex = re.compile(r'\.(?:t(?:ar|[glx]z|bz2?)|zip)\b', re.IGNORECASE) + +-UNICODE_NBSP = unicodedata.lookup('NO-BREAK SPACE') ++UNICODE_NBSP = u'\xa0' + + + def unversioned(deps): +@@ -206,8 +205,7 @@ class SpecCheck(AbstractCheck.AbstractCheck): + if do_unicode: + line = unicode(line, "utf-8", "replace") # noqa false positive + +- char = line.find(nbsp) +- if char != -1: ++ if nbsp in line: + printWarning(pkg, "non-break-space", "line %s, char %d" % + (pkg.current_linenum, char)) + diff --git a/rpmlint.changes b/rpmlint.changes index 3970c5c..762cc71 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -91,7 +91,7 @@ Thu Sep 28 10:40:08 UTC 2017 - dmueller@suse.com 0003-Tighten-lib_regex-to-avoid-false-positive-in-python-.patch, 0001-Execute-chroot-tests-also-on-x86-rpms.patch, ignore-readelf-ar-error.diff, remove-ghostfile-checks.diff, - fix-diag-sortorder.diff + fix-diag-sortorder.diff, drop-unicodedata-dep.diff - drop config.in: unused - switch to python 3.x diff --git a/rpmlint.spec b/rpmlint.spec index 94eae3a..7efde78 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -97,6 +97,7 @@ Patch60: 0003-Tighten-lib_regex-to-avoid-false-positive-in-python-.patch Patch61: 0001-Execute-chroot-tests-also-on-x86-rpms.patch Patch62: ignore-readelf-ar-error.diff Patch63: fix-diag-sortorder.diff +Patch64: drop-unicodedata-dep.diff Patch70: rpmlint-all-pie.patch # BuildArch must at the end. is a bug: https://bugzilla.suse.com/show_bug.cgi?id=926766 BuildArch: noarch