Accepting request 738852 from Base:System
OBS-URL: https://build.opensuse.org/request/show/738852 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=694
This commit is contained in:
parent
8634d90845
commit
192888ea35
58
rpm415-workaround.diff
Normal file
58
rpm415-workaround.diff
Normal file
@ -0,0 +1,58 @@
|
||||
Ugly workaround for RPM 4.14 vs 4.15 python3 bindings incompatibility
|
||||
|
||||
Upstream commits:
|
||||
a310a79f81f2b2dd3a31a101562e67915476a751
|
||||
8fd904b53c028dded0b308ee95f1a5ff998584fd
|
||||
|
||||
diff --git a/rpmlint/Pkg.py b/rpmlint/Pkg.py
|
||||
index 8d01f30..1b25771 100644
|
||||
--- rpmlint-rpmlint-1.11.orig/Pkg.py
|
||||
+++ rpmlint-rpmlint-1.11/Pkg.py
|
||||
@@ -143,8 +143,17 @@ def is_utf8(fname):
|
||||
|
||||
|
||||
def is_utf8_bytestr(s):
|
||||
+ """Returns True whether the given text is UTF-8.
|
||||
+ Due to changes in rpm, needs to handle both bytes and unicode."""
|
||||
try:
|
||||
- s.decode('UTF-8')
|
||||
+ if hasattr(s, 'decode'):
|
||||
+ s.decode('utf-8')
|
||||
+ elif hasattr(s, 'encode'):
|
||||
+ s.encode('utf-8')
|
||||
+ else:
|
||||
+ unexpected = type(s).__name__
|
||||
+ raise TypeError(
|
||||
+ 'Expected str/unicode/bytes, not {}'.format(unexpected))
|
||||
except UnicodeError:
|
||||
return False
|
||||
return True
|
||||
--- rpmlint-rpmlint-1.11.orig/PostCheck.py
|
||||
+++ rpmlint-rpmlint-1.11/PostCheck.py
|
||||
@@ -70,6 +70,8 @@ def incorrect_perl_script(prog, perlscri
|
||||
def check_syntax_script(prog, commandline, script):
|
||||
if not script:
|
||||
return False
|
||||
+ if isinstance(script, str):
|
||||
+ script = script.encode('utf-8')
|
||||
# TODO: test that "prog" is available/executable
|
||||
tmpfd, tmpname = tempfile.mkstemp(prefix='rpmlint.')
|
||||
tmpfile = os.fdopen(tmpfd, 'wb')
|
||||
--- rpmlint-rpmlint-1.11.orig/rpmlint-checks-master/CheckFilelist.py
|
||||
+++ rpmlint-rpmlint-1.11/rpmlint-checks-master/CheckFilelist.py
|
||||
@@ -425,8 +425,13 @@ class FilelistCheck(AbstractCheck.Abstra
|
||||
invalidfhs = set()
|
||||
invalidopt = set()
|
||||
|
||||
- isSUSE = (pkg.header[RPMTAG_VENDOR] and
|
||||
- b'SUSE' in pkg.header[RPMTAG_VENDOR])
|
||||
+ isSUSE = False
|
||||
+ if pkg.header[RPMTAG_VENDOR]:
|
||||
+ vendor = pkg.header[RPMTAG_VENDOR]
|
||||
+ if isinstance(vendor, str):
|
||||
+ isSUSE = 'SUSE' in vendor
|
||||
+ else:
|
||||
+ isSUSE = b'SUSE' in vendor
|
||||
|
||||
# the checks here only warn about a directory once rather
|
||||
# than reporting potentially hundreds of files individually
|
@ -12,7 +12,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
# icecream 0
|
||||
|
||||
|
@ -3,6 +3,12 @@ Tue Oct 15 07:12:22 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
|
||||
|
||||
- filter install-info warnings. Handled by file triggers now (boo#1152169)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 7 12:01:22 CEST 2019 - mls@suse.de
|
||||
|
||||
- backport rpm415 workaround from upstream
|
||||
new patch: rpm415-workaround.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 30 08:15:38 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ Patch63: fix-diag-sortorder.diff
|
||||
Patch72: rpmlint-slpp-NUM-NUM.patch
|
||||
Patch77: suse-rpmlint-all-pie.patch
|
||||
Patch78: add-check-for-a-non-zero-.text-segment-in-.a-archive.patch
|
||||
Patch79: rpm415-workaround.diff
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: obs-service-format_spec_file
|
||||
BuildRequires: python3-flake8
|
||||
|
Loading…
Reference in New Issue
Block a user