forked from pool/rpmlint
Accepting request 578348 from devel:openSUSE:Factory:rpmlint
OBS-URL: https://build.opensuse.org/request/show/578348 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=287
This commit is contained in:
commit
d4ad25163b
35
0001-Always-import-XDG-desktop-files-as-utf8.patch
Normal file
35
0001-Always-import-XDG-desktop-files-as-utf8.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From e090267a175d2f2d52128c780108835f36d1ef1e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
|
Date: Sun, 18 Feb 2018 15:23:39 +0100
|
||||||
|
Subject: [PATCH] Always import XDG desktop files as utf8
|
||||||
|
|
||||||
|
Don't rely on them being entirely ASCII or the system
|
||||||
|
locale.
|
||||||
|
---
|
||||||
|
MenuXDGCheck.py | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/MenuXDGCheck.py b/MenuXDGCheck.py
|
||||||
|
index 66912ea..d4418a9 100644
|
||||||
|
--- a/MenuXDGCheck.py
|
||||||
|
+++ b/MenuXDGCheck.py
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
|
||||||
|
#
|
||||||
|
|
||||||
|
+import codecs
|
||||||
|
import os
|
||||||
|
try:
|
||||||
|
import ConfigParser as cfgparser
|
||||||
|
@@ -30,7 +31,7 @@ class MenuXDGCheck(AbstractCheck.AbstractFilesCheck):
|
||||||
|
def parse_desktop_file(self, pkg, root, f, filename):
|
||||||
|
cfp = cfgparser.RawConfigParser()
|
||||||
|
try:
|
||||||
|
- with open(f, 'rb') as inputf:
|
||||||
|
+ with codecs.open(f, encoding='utf-8') as inputf:
|
||||||
|
cfp.readfp(inputf, filename)
|
||||||
|
except cfgparser.DuplicateSectionError as e:
|
||||||
|
printError(
|
||||||
|
--
|
||||||
|
2.16.1
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From e6594808fdf6c1fcb4175c523582ab7c358839f0 Mon Sep 17 00:00:00 2001
|
From 8de78fa8b0cd9a2fe4156b841429ac8d55b39909 Mon Sep 17 00:00:00 2001
|
||||||
From: Dirk Mueller <dirk@dmllr.de>
|
From: Dirk Mueller <dirk@dmllr.de>
|
||||||
Date: Fri, 29 Sep 2017 09:12:33 +0200
|
Date: Fri, 29 Sep 2017 09:12:33 +0200
|
||||||
Subject: [PATCH] Improve XDG Menu checks stability
|
Subject: [PATCH] Improve XDG Menu checks stability
|
||||||
@ -18,33 +18,30 @@ Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- rpmlint-rpmlint-1.10.orig/MenuXDGCheck.py
|
--- rpmlint-rpmlint-1.10.orig/MenuXDGCheck.py
|
||||||
+++ rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
+++ rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
||||||
@@ -8,15 +8,15 @@
|
@@ -8,9 +8,9 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
try:
|
try:
|
||||||
- from ConfigParser import RawConfigParser
|
- from ConfigParser import RawConfigParser
|
||||||
+ import ConfigParser as cfgparser
|
-except:
|
||||||
except:
|
|
||||||
- from configparser import RawConfigParser
|
- from configparser import RawConfigParser
|
||||||
|
+ import ConfigParser as cfgparser
|
||||||
|
+except ImportError:
|
||||||
+ import configparser as cfgparser
|
+ import configparser as cfgparser
|
||||||
|
|
||||||
import AbstractCheck
|
import AbstractCheck
|
||||||
from Filter import addDetails, printError, printWarning
|
from Filter import addDetails, printError, printWarning
|
||||||
from Pkg import getstatusoutput, is_utf8
|
@@ -25,7 +25,52 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||||
|
# $ echo $XDG_DATA_DIRS/applications
|
||||||
-STANDARD_BIN_DIRS = ['/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/']
|
# /var/lib/menu-xdg:/usr/share
|
||||||
+STANDARD_BIN_DIRS = ('/bin', '/sbin', '/usr/bin', '/usr/sbin')
|
|
||||||
|
|
||||||
|
|
||||||
class MenuXDGCheck(AbstractCheck.AbstractFilesCheck):
|
|
||||||
@@ -27,6 +27,51 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
|
||||||
AbstractCheck.AbstractFilesCheck.__init__(
|
AbstractCheck.AbstractFilesCheck.__init__(
|
||||||
self, "MenuXDGCheck", r"(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
- self, "MenuXDGCheck", r"/usr/share/applications/.*\.desktop$")
|
||||||
|
+ self, "MenuXDGCheck", r'(?:/usr|/etc/opt|/opt/.*)/share/applications/.*\.desktop$')
|
||||||
|
+
|
||||||
+ def parse_desktop_file(self, pkg, root, f, filename):
|
+ def parse_desktop_file(self, pkg, root, f, filename):
|
||||||
+ cfp = cfgparser.RawConfigParser()
|
+ cfp = cfgparser.RawConfigParser()
|
||||||
+ try:
|
+ try:
|
||||||
+ with open(f) as inputf:
|
+ with open(f, 'rb') as inputf:
|
||||||
+ cfp.readfp(inputf, filename)
|
+ cfp.readfp(inputf, filename)
|
||||||
+ except cfgparser.DuplicateSectionError as e:
|
+ except cfgparser.DuplicateSectionError as e:
|
||||||
+ printError(
|
+ printError(
|
||||||
@ -85,10 +82,9 @@ Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
|||||||
+ if not found:
|
+ if not found:
|
||||||
+ printWarning(
|
+ printWarning(
|
||||||
+ pkg, 'desktopfile-without-binary', filename, binary)
|
+ pkg, 'desktopfile-without-binary', filename, binary)
|
||||||
+
|
|
||||||
def check_file(self, pkg, filename):
|
def check_file(self, pkg, filename):
|
||||||
root = pkg.dirName()
|
root = pkg.dirName()
|
||||||
f = root + filename
|
|
||||||
@@ -43,25 +88,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
@@ -43,25 +88,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||||
if not is_utf8(f):
|
if not is_utf8(f):
|
||||||
printError(pkg, 'non-utf8-desktopfile', filename)
|
printError(pkg, 'non-utf8-desktopfile', filename)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
<param name="url">https://github.com/openSUSE/rpmlint-tests.git</param>
|
||||||
<param name="changesrevision">8b163ac0aaf41e8424edbc4074a60f18e9cb9438</param></service><service name="tar_scm">
|
<param name="changesrevision">1142fccbca0a0f3f4bbb4be8f98e26904e9f45f5</param></service><service name="tar_scm">
|
||||||
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
<param name="url">https://github.com/openSUSE/rpmlint-checks.git</param>
|
||||||
<param name="changesrevision">19a2516ec526f44b39a88e1757fc4f9fa1f3b603</param></service></servicedata>
|
<param name="changesrevision">aecdbb0c5cee167387f7769a77148668e908a8d8</param></service></servicedata>
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:31ced77bac654f56787b2d941e7b821696c79116204ff5943e31f1bfa7956f40
|
oid sha256:673615c77f0afe748213b301d070b584cfbc2a45e60012e62714106cd5f00c69
|
||||||
size 23176
|
size 23192
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5ae84f26459605339a1dfa6511573e8d4837902517dd4c52bcd159fbc7780de6
|
|
||||||
size 10700
|
|
3
rpmlint-tests-84.87+git20180218.1142fcc.tar.xz
Normal file
3
rpmlint-tests-84.87+git20180218.1142fcc.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cdcd9bb53faf76a3c9aa049553324bc17f73d05f2e75cb7212763dc404d24b6e
|
||||||
|
size 11696
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Feb 18 14:56:22 UTC 2018 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 84.87+git20180218.1142fcc:
|
||||||
|
* Update polkit ref tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 08 13:49:46 UTC 2018 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 84.87+git20180202.3df4ae7:
|
||||||
|
* Add testcases for MenuXDGCheck.py
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 11 11:29:25 UTC 2017 - opensuse-packaging@opensuse.org
|
Wed Oct 11 11:29:25 UTC 2017 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ BuildRequires: rpmlint-Factory-strict
|
|||||||
BuildRequires: rpmlint-mini
|
BuildRequires: rpmlint-mini
|
||||||
|
|
||||||
Name: rpmlint-tests
|
Name: rpmlint-tests
|
||||||
Version: 84.87+git20171011.8b163ac
|
Version: 84.87+git20180218.1142fcc
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: rpmlint regression tests
|
Summary: rpmlint regression tests
|
||||||
License: SUSE-Public-Domain
|
License: SUSE-Public-Domain
|
||||||
|
@ -1,3 +1,49 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 20 12:52:18 UTC 2018 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Add one more deprecated license:
|
||||||
|
+ GPL-2.0-with-font-exception.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 20 05:37:21 UTC 2018 - coolo@suse.com
|
||||||
|
|
||||||
|
- allow more deprecated licenses to unbreak ring1+2
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Feb 18 14:26:09 UTC 2018 - dmueller@suse.com
|
||||||
|
|
||||||
|
- add 0001-Always-import-XDG-desktop-files-as-utf8.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 15 09:35:51 UTC 2018 - coolo@suse.com
|
||||||
|
|
||||||
|
- Allow some deprecated licenses that we would replace on commit
|
||||||
|
(SPDX 2->SPDX 3 conversion)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 08 13:52:13 UTC 2018 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update rpmlint-checks to version master:
|
||||||
|
* polkit: make untracked privileges also an error
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 08 13:49:48 UTC 2018 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update rpmlint-checks to version master:
|
||||||
|
* Support uppercase tag macros used by RPM 4.14
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 08 13:49:46 UTC 2018 - opensuse-packaging@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 84.87+git20180202.3df4ae7:
|
||||||
|
* Add testcases for MenuXDGCheck.py
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 23 11:05:10 UTC 2018 - dmueller@suse.com
|
||||||
|
|
||||||
|
- refresh for 0001-Improve-XDG-Menu-checks-stability.patch
|
||||||
|
remove xdg-paths-update.diff (merged into other patch)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 15 09:15:19 UTC 2018 - krahmer@suse.com
|
Mon Jan 15 09:15:19 UTC 2018 - krahmer@suse.com
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ Patch20: usr-arch.diff
|
|||||||
Patch23: suse-filter-more-verbose.diff
|
Patch23: suse-filter-more-verbose.diff
|
||||||
Patch24: docdata-examples.diff
|
Patch24: docdata-examples.diff
|
||||||
Patch25: yast-provides.diff
|
Patch25: yast-provides.diff
|
||||||
Patch26: xdg-paths-update.diff
|
|
||||||
Patch27: better-wrong-script.diff
|
Patch27: better-wrong-script.diff
|
||||||
Patch28: buildroot-doc.diff
|
Patch28: buildroot-doc.diff
|
||||||
Patch29: rpmgroup-checks.diff
|
Patch29: rpmgroup-checks.diff
|
||||||
@ -90,6 +89,7 @@ Patch70: rpmlint-all-pie.patch
|
|||||||
Patch71: 0001-Avoid-calling-close-on-undefined-fd-variable.patch
|
Patch71: 0001-Avoid-calling-close-on-undefined-fd-variable.patch
|
||||||
Patch72: rpmlint-slpp-NUM-NUM.patch
|
Patch72: rpmlint-slpp-NUM-NUM.patch
|
||||||
Patch73: 0001-Binariescheck-Check-for-chroot-chdir-on-ARM-PPC.patch
|
Patch73: 0001-Binariescheck-Check-for-chroot-chdir-on-ARM-PPC.patch
|
||||||
|
Patch74: 0001-Always-import-XDG-desktop-files-as-utf8.patch
|
||||||
BuildRequires: obs-service-format_spec_file
|
BuildRequires: obs-service-format_spec_file
|
||||||
BuildRequires: python3-flake8
|
BuildRequires: python3-flake8
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
@ -143,6 +143,12 @@ cp %{SOURCE12} licenses.config
|
|||||||
cut '-d ' -f1 %{_prefix}/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
|
cut '-d ' -f1 %{_prefix}/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
|
||||||
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
||||||
done
|
done
|
||||||
|
# add some deprecated licenses we allow for now
|
||||||
|
for l in AGPL-3.0 AGPL-3.0+ GFDL-1.1 GFDL-1.1+ GFDL-1.2 GFDL-1.2+ GFDL-1.3 GFDL-1.3+ GPL-3.0-with-GCC-exception \
|
||||||
|
GPL-2.0-with-classpath-exception GPL-2.0-with-font-exception SUSE-LGPL-2.1+-with-GCC-exception SUSE-NonFree \
|
||||||
|
GPL-1.0+ GPL-1.0 GPL-2.0+ GPL-2.0 GPL-3.0+ GPL-3.0 LGPL-2.0 LGPL-2.0+ LGPL-2.1+ LGPL-2.1 LGPL-3.0+ LGPL-3.0; do
|
||||||
|
sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
|
||||||
|
done
|
||||||
install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/
|
install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
From: Some One <nobody@opensuse.org>
|
|
||||||
Date: Thu, 9 Apr 2015 14:55:38 +0200
|
|
||||||
Subject: [PATCH] xdg-paths-update.diff
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
---
|
|
||||||
MenuXDGCheck.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
|
||||||
===================================================================
|
|
||||||
--- rpmlint-rpmlint-1.10.orig/MenuXDGCheck.py
|
|
||||||
+++ rpmlint-rpmlint-1.10/MenuXDGCheck.py
|
|
||||||
@@ -25,7 +25,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
|
||||||
# $ echo $XDG_DATA_DIRS/applications
|
|
||||||
# /var/lib/menu-xdg:/usr/share
|
|
||||||
AbstractCheck.AbstractFilesCheck.__init__(
|
|
||||||
- self, "MenuXDGCheck", r"/usr/share/applications/.*\.desktop$")
|
|
||||||
+ self, "MenuXDGCheck", r"(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
|
||||||
|
|
||||||
def check_file(self, pkg, filename):
|
|
||||||
root = pkg.dirName()
|
|
Loading…
Reference in New Issue
Block a user