From 6faa80d27465705b8f1191da4eb324f2f0e71e7ddc1b21f0d9ee5125b86b70df Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 16 Oct 2017 09:00:07 +0000 Subject: [PATCH 1/5] - refresh 0001-Improve-XDG-Menu-checks-stability.patch (bsc#1063371) OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=534 --- 0001-Improve-XDG-Menu-checks-stability.patch | 38 +++++++++++++------- rpmlint.changes | 5 +++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/0001-Improve-XDG-Menu-checks-stability.patch b/0001-Improve-XDG-Menu-checks-stability.patch index b1305cd..3a71517 100644 --- a/0001-Improve-XDG-Menu-checks-stability.patch +++ b/0001-Improve-XDG-Menu-checks-stability.patch @@ -1,4 +1,4 @@ -From 3df5fd9507215cf70a1147ea631cf061475c7b34 Mon Sep 17 00:00:00 2001 +From e6594808fdf6c1fcb4175c523582ab7c358839f0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 29 Sep 2017 09:12:33 +0200 Subject: [PATCH] Improve XDG Menu checks stability @@ -7,8 +7,12 @@ Running RawConfigParser on untrusted input can cause a lot of exceptions. Handle them gracefully and raise appropriate rpmlint errors. Also separate the code a little and cleaning it up. --- - MenuXDGCheck.py | 76 ++++++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 53 insertions(+), 23 deletions(-) + MenuXDGCheck.py | 84 ++++++++++++++++++++++++++---------- + test/binary/menuxdg1-0-0.noarch.rpm | Bin 0 -> 6555 bytes + test/test_menuxdg.py | 17 ++++++++ + 3 files changed, 78 insertions(+), 23 deletions(-) + create mode 100644 test/binary/menuxdg1-0-0.noarch.rpm + create mode 100644 test/test_menuxdg.py Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py =================================================================== @@ -33,28 +37,36 @@ Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py class MenuXDGCheck(AbstractCheck.AbstractFilesCheck): -@@ -27,6 +27,43 @@ class MenuXDGCheck(AbstractCheck.Abstrac +@@ -27,6 +27,51 @@ class MenuXDGCheck(AbstractCheck.Abstrac AbstractCheck.AbstractFilesCheck.__init__( self, "MenuXDGCheck", r"(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$") + def parse_desktop_file(self, pkg, root, f, filename): + cfp = cfgparser.RawConfigParser() + try: -+ cfp.read(f) ++ with open(f) as inputf: ++ cfp.readfp(inputf, filename) + except cfgparser.DuplicateSectionError as e: + printError( + pkg, 'desktopfile-duplicate-section', filename, + '[%s]' % e.section) -+ except cfgparser.DuplicateOptionError as e: -+ printError( -+ pkg, 'desktopfile-duplicate-option', filename, -+ '[%s]/%s' % (e.section, e.option)) + except cfgparser.MissingSectionHeaderError: + printError( + pkg, 'desktopfile-missing-header', filename) -+ except (cfgparser.ParsingError, UnicodeDecodeError) as e: ++ except cfgparser.Error as e: ++ # Only in Python >= 3.2 ++ if (hasattr(cfgparser, 'DuplicateOptionError') and ++ isinstance(e, cfgparser.DuplicateOptionError)): ++ printError( ++ pkg, 'desktopfile-duplicate-option', filename, ++ '[%s]/%s' % (e.section, e.option)) ++ else: ++ printWarning( ++ pkg, 'invalid-desktopfile', filename, ++ e.message.partition(':')[0]) ++ except UnicodeDecodeError as e: + printWarning( -+ pkg, 'invalid-desktopfile', filename) ++ pkg, 'invalid-desktopfile', filename, 'No valid Unicode') + else: + binary = None + if cfp.has_option('Desktop Entry', 'Exec'): @@ -77,7 +89,7 @@ Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py def check_file(self, pkg, filename): root = pkg.dirName() f = root + filename -@@ -43,25 +80,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac +@@ -43,25 +88,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac if not is_utf8(f): printError(pkg, 'non-utf8-desktopfile', filename) @@ -104,7 +116,7 @@ Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py check = MenuXDGCheck() -@@ -76,4 +95,15 @@ addDetails( +@@ -76,4 +103,15 @@ addDetails( 'desktopfile-without-binary', '''the .desktop file is for a file not present in the package. You should check the requires or see if this is not a error''', diff --git a/rpmlint.changes b/rpmlint.changes index b892a27..7576d7c 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 16 08:58:07 UTC 2017 - dmueller@suse.com + +- refresh 0001-Improve-XDG-Menu-checks-stability.patch (bsc#1063371) + ------------------------------------------------------------------- Wed Oct 11 08:03:12 UTC 2017 - opensuse-packaging@opensuse.org From b261083052345aa3e1fbc2afdbc2f8ec15af2a5543e921bb296e5e2b5d8be4a9 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 21 Oct 2017 17:27:11 +0000 Subject: [PATCH 2/5] - add 0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=536 --- rpmlint.changes | 5 +++++ rpmlint.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/rpmlint.changes b/rpmlint.changes index 7576d7c..c3cbae3 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 21 17:26:57 UTC 2017 - dmueller@suse.com + +- add 0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch + ------------------------------------------------------------------- Mon Oct 16 08:58:07 UTC 2017 - dmueller@suse.com diff --git a/rpmlint.spec b/rpmlint.spec index 83f13ad..79f17e7 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -69,6 +69,7 @@ Patch48: suse-whitelist-opensuse.diff Patch49: extend-suse-conffiles-check.diff Patch50: compressed-backup-regex.diff Patch51: suse-speccheck-utf8.diff +Patch52: 0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch Patch53: suse-manpages-for-rc-scripts.diff Patch54: suse-ignore-specfile-errors.diff Patch55: invalid-filerequires.diff From 2d10624b45f1cc17cc0eabe8ce10b9f53425626be3850644b48551a5f91c4ab8 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 21 Oct 2017 17:28:53 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=537 --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index b092d1e..818e567 100644 --- a/config +++ b/config @@ -1360,7 +1360,7 @@ addFilter(' non-devel-buildrequires recode') # Too noisy, and usually not something downstream packagers can fix addFilter(' incorrect-fsf-address ') addFilter(' no-manual-page-for-binary ') -addFilter(' static-library-without-debuginfo /usr/lib(?:64)?/ghc-[\d\.]+/') +addFilter(r' static-library-without-debuginfo /usr/lib(?:64)?/ghc-[\d\.]+/') # the libre mess addFilter(r'libre(?:ssl|office|cad)[^\:]+: \w: shlib-policy-') From f60e9325b388b8cc2f8d82a44b94c115aa536cab509c81a51cd58891168c36c4 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 24 Oct 2017 08:31:45 +0000 Subject: [PATCH 4/5] Accepting request 536258 from home:krahmer:branches:devel:openSUSE:Factory:rpmlint - adding connman (bsc#1057697) OBS-URL: https://build.opensuse.org/request/show/536258 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=538 --- config | 7 ++++++- rpmlint.changes | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config b/config index 818e567..15af9b2 100644 --- a/config +++ b/config @@ -1022,7 +1022,12 @@ setOption("DBUSServices.WhiteList", ( "nm-l2tp-service.conf", # fwupd (bsc#932807) "org.freedesktop.fwupd.conf", - "org.freedesktop.fwupd.service" + "org.freedesktop.fwupd.service", + # connman (bsc#1057697) + "connman-nmcompat.conf", + "connman.conf", + "connman-vpn-dbus.conf", + "net.connman.vpn.service" )) setOption("PAMModules.WhiteList", ( diff --git a/rpmlint.changes b/rpmlint.changes index c3cbae3..bc38ec2 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 24 08:00:11 UTC 2017 - krahmer@suse.com + +- adding connman (bsc#1057697) + ------------------------------------------------------------------- Sat Oct 21 17:26:57 UTC 2017 - dmueller@suse.com From 72670212f75087e1ec610a020485c3fb197ed85891dbe980bd7d15061c14bcb5 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 24 Oct 2017 09:48:12 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=539 --- ...i-as-a-valid-versioned-python-depend.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch diff --git a/0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch b/0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch new file mode 100644 index 0000000..e5f5980 --- /dev/null +++ b/0001-Accept-python-abi-as-a-valid-versioned-python-depend.patch @@ -0,0 +1,33 @@ +From 534ce885e7a1529e0729dc0ae3ef75a64324583b Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Sat, 21 Oct 2017 19:24:09 +0200 +Subject: [PATCH] Accept python(abi) as a valid versioned python dependency + +On (open)SUSE the build environment properly generates a +requires python(abi) = x.y, so accept that to silence the warning. +--- + FilesCheck.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/FilesCheck.py b/FilesCheck.py +index abb3fa7..2ece474 100644 +--- a/FilesCheck.py ++++ b/FilesCheck.py +@@ -717,10 +717,10 @@ class FilesCheck(AbstractCheck.AbstractCheck): + + if not python_dep_error: + res = python_regex.search(f) +- if res and not (pkg.check_versioned_dep('python-base', +- res.group(1)) or +- pkg.check_versioned_dep('python', +- res.group(1))): ++ if (res and not ++ any((pkg.check_versioned_dep(dep, res.group(1)) ++ for dep in ( ++ 'python', 'python-base', 'python(abi)')))): + printError(pkg, 'no-dependency-on', 'python-base', + res.group(1)) + python_dep_error = True +-- +2.14.2 +