forked from pool/rpmlint
Accepting request 36612 from Base:System
Copy from Base:System/rpmlint based on submit request 36612 from user dirkmueller OBS-URL: https://build.opensuse.org/request/show/36612 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=55
This commit is contained in:
parent
7ace52c994
commit
698597df8c
@ -18,7 +18,10 @@ import stat
|
|||||||
class BuildRootCheck(AbstractCheck.AbstractFilesCheck):
|
class BuildRootCheck(AbstractCheck.AbstractFilesCheck):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
AbstractCheck.AbstractFilesCheck.__init__(self, "CheckBuildRoot", ".*")
|
AbstractCheck.AbstractFilesCheck.__init__(self, "CheckBuildRoot", ".*")
|
||||||
self.build_root_re = re.compile('/var/tmp/[\w\!-\.]{1,60}-build/')
|
t = rpm.expandMacro('%buildroot')
|
||||||
|
for m in ('name', 'version', 'release'):
|
||||||
|
t = t.replace("%%{%s}" % (m), "[\w\!-\.]{1,20}")
|
||||||
|
self.build_root_re = re.compile(t)
|
||||||
|
|
||||||
def check_file(self, pkg, filename):
|
def check_file(self, pkg, filename):
|
||||||
if filename.startswith('/usr/lib/debug') or pkg.isSource():
|
if filename.startswith('/usr/lib/debug') or pkg.isSource():
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
Index: Pkg.py
|
--- Pkg.py
|
||||||
===================================================================
|
|
||||||
--- Pkg.py.orig
|
|
||||||
+++ Pkg.py
|
+++ Pkg.py
|
||||||
@@ -307,6 +307,10 @@ class Pkg:
|
@@ -328,6 +328,10 @@
|
||||||
self._missingok_files = None
|
self._missingok_files = None
|
||||||
self._files = None
|
self._files = None
|
||||||
self._requires = None
|
self._requires = None
|
||||||
@ -13,7 +11,7 @@ Index: Pkg.py
|
|||||||
self._req_names = -1
|
self._req_names = -1
|
||||||
|
|
||||||
if header:
|
if header:
|
||||||
@@ -513,6 +517,22 @@ class Pkg:
|
@@ -553,6 +557,22 @@
|
||||||
self._gatherDepInfo()
|
self._gatherDepInfo()
|
||||||
return self._requires
|
return self._requires
|
||||||
|
|
||||||
@ -36,30 +34,29 @@ Index: Pkg.py
|
|||||||
def prereq(self):
|
def prereq(self):
|
||||||
self._gatherDepInfo()
|
self._gatherDepInfo()
|
||||||
return self._prereq
|
return self._prereq
|
||||||
@@ -542,7 +562,8 @@ class Pkg:
|
@@ -586,7 +606,7 @@
|
||||||
return self._provides
|
|
||||||
|
|
||||||
# internal function to gather dependency info used by the above ones
|
# internal function to gather dependency info used by the above ones
|
||||||
- def _gather_aux(self, header, list, nametag, versiontag, flagstag, prereq = None):
|
def _gather_aux(self, header, list, nametag, versiontag, flagstag,
|
||||||
+ def _gather_aux(self, header, list, nametag, versiontag, flagstag,
|
- prereq = None):
|
||||||
+ prereq = None, strong_only = False, weak_only = False):
|
+ prereq = None, strong_only = False, weak_only = False):
|
||||||
names = header[nametag]
|
names = header[nametag]
|
||||||
versions = header[versiontag]
|
versions = header[versiontag]
|
||||||
flags = header[flagstag]
|
flags = header[flagstag]
|
||||||
@@ -551,7 +572,11 @@ class Pkg:
|
@@ -596,7 +616,11 @@
|
||||||
for loop in range(len(versions)):
|
|
||||||
if prereq is not None and flags[loop] & PREREQ_FLAG:
|
if prereq is not None and flags[loop] & PREREQ_FLAG:
|
||||||
prereq.append((names[loop], versions[loop], flags[loop] & (~PREREQ_FLAG)))
|
prereq.append((names[loop], versions[loop],
|
||||||
|
flags[loop] & (~PREREQ_FLAG)))
|
||||||
- else:
|
- else:
|
||||||
+ elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG:
|
+ elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG:
|
||||||
+ list.append((names[loop], versions[loop], flags[loop] & (~rpm.RPMSENSE_STRONG)))
|
+ list.append((names[loop], versions[loop], flags[loop] & (~rpm.RPMSENSE_STRONG)))
|
||||||
+ elif weak_only and not (flags[loop] & rpm.RPMSENSE_STRONG):
|
+ elif weak_only and not (flags[loop] & rpm.RPMSENSE_STRONG):
|
||||||
+ list.append((names[loop], versions[loop], flags[loop]))
|
+ list.append((names[loop], versions[loop], flags[loop]))
|
||||||
+ elif not (weak_only or strong_only):
|
+ elif not (weak_only or strong_only):
|
||||||
list.append((names[loop], versions[loop], flags[loop]))
|
list.append((names[loop], versions[loop], flags[loop]))
|
||||||
|
|
||||||
def _gatherDepInfo(self):
|
def _gatherDepInfo(self):
|
||||||
@@ -561,6 +586,10 @@ class Pkg:
|
@@ -606,6 +630,10 @@
|
||||||
self._provides = []
|
self._provides = []
|
||||||
self._conflicts = []
|
self._conflicts = []
|
||||||
self._obsoletes = []
|
self._obsoletes = []
|
||||||
@ -70,7 +67,7 @@ Index: Pkg.py
|
|||||||
|
|
||||||
self._gather_aux(self.header, self._requires,
|
self._gather_aux(self.header, self._requires,
|
||||||
rpm.RPMTAG_REQUIRENAME,
|
rpm.RPMTAG_REQUIRENAME,
|
||||||
@@ -579,6 +608,27 @@ class Pkg:
|
@@ -624,6 +652,27 @@
|
||||||
rpm.RPMTAG_OBSOLETENAME,
|
rpm.RPMTAG_OBSOLETENAME,
|
||||||
rpm.RPMTAG_OBSOLETEVERSION,
|
rpm.RPMTAG_OBSOLETEVERSION,
|
||||||
rpm.RPMTAG_OBSOLETEFLAGS)
|
rpm.RPMTAG_OBSOLETEFLAGS)
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
Index: SpecCheck.py
|
--- SpecCheck.py
|
||||||
===================================================================
|
|
||||||
--- SpecCheck.py.orig
|
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -57,7 +57,10 @@ suse_version_regex = re.compile('%suse_v
|
@@ -59,7 +59,10 @@
|
||||||
section_regexs = dict(
|
section_regexs = dict(
|
||||||
([x, re.compile('^%' + x + '(?:\s|$)')]
|
([x, re.compile('^%' + x + '(?:\s|$)')]
|
||||||
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
||||||
@ -14,7 +12,7 @@ Index: SpecCheck.py
|
|||||||
|
|
||||||
# Only check for /lib, /usr/lib, /usr/X11R6/lib
|
# Only check for /lib, /usr/lib, /usr/X11R6/lib
|
||||||
# TODO: better handling of X libraries and modules.
|
# TODO: better handling of X libraries and modules.
|
||||||
@@ -257,7 +260,9 @@ class SpecCheck(AbstractCheck.AbstractCh
|
@@ -264,7 +267,9 @@
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -23,5 +21,5 @@ Index: SpecCheck.py
|
|||||||
+ 'trigger', 'triggerin', 'triggerprein', 'triggerun', 'triggerpostun',
|
+ 'trigger', 'triggerin', 'triggerprein', 'triggerun', 'triggerpostun',
|
||||||
+ 'pretrans', 'posttrans'):
|
+ 'pretrans', 'posttrans'):
|
||||||
if contains_buildroot(line):
|
if contains_buildroot(line):
|
||||||
printWarning(pkg, 'rpm-buildroot-usage', '%' + current_section, line[:-1].strip())
|
printWarning(pkg, 'rpm-buildroot-usage',
|
||||||
|
'%' + current_section, line[:-1].strip())
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
--- TagsCheck.py
|
--- TagsCheck.py
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -616,6 +616,9 @@
|
@@ -660,6 +660,9 @@
|
||||||
if not pkg[rpm.RPMTAG_DESCRIPTION]:
|
if not description:
|
||||||
printError(pkg, 'no-description-tag')
|
printError(pkg, 'no-description-tag')
|
||||||
else:
|
else:
|
||||||
+ if len(pkg[rpm.RPMTAG_DESCRIPTION].partition('Authors:')[0])-4 < len(pkg[rpm.RPMTAG_SUMMARY]):
|
+ if len(pkg[rpm.RPMTAG_DESCRIPTION].partition('Authors:')[0])-4 < len(pkg[rpm.RPMTAG_SUMMARY]):
|
||||||
+ printWarning(pkg, 'description-shorter-than-summary')
|
+ printWarning(pkg, 'description-shorter-than-summary')
|
||||||
+
|
+
|
||||||
for lang in pkg[rpm.RPMTAG_HEADERI18NTABLE]:
|
if not pkg[rpm.RPMTAG_HEADERI18NTABLE]:
|
||||||
self.check_description(pkg, lang)
|
self._unexpanded_macros(pkg, '%description', description)
|
||||||
res = AbstractCheck.macro_regex.search(pkg[rpm.RPMTAG_DESCRIPTION])
|
else:
|
||||||
@@ -881,6 +884,10 @@
|
@@ -928,6 +931,10 @@
|
||||||
'''The major number of the library isn't included in the package's name.
|
'''The major number of the library isn't included in the package's name.
|
||||||
''',
|
''',
|
||||||
|
|
||||||
+'description-shorter-than-summary',
|
+'description-shorter-than-summary',
|
||||||
+'''The package description is shorter than the summary. be a bit more
|
+'''The package description should be longer than the summary. be a bit more
|
||||||
+verbose, please.''',
|
+verbose, please.''',
|
||||||
+
|
+
|
||||||
'no-provides',
|
'no-provides',
|
||||||
'''Your library package doesn't provide the -devel name without the major version
|
'''Your library package doesn't provide the -devel name without the major
|
||||||
included.''',
|
version included.''',
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
--- MenuXDGCheck.py
|
|
||||||
+++ MenuXDGCheck.py
|
|
||||||
@@ -21,8 +21,12 @@
|
|
||||||
|
|
||||||
def check_file(self, pkg, filename):
|
|
||||||
f = pkg.dirName() + filename
|
|
||||||
- if getstatusoutput(('desktop-file-validate', f), True)[0]:
|
|
||||||
- printError(pkg, 'invalid-desktopfile', filename)
|
|
||||||
+ st = getstatusoutput(('desktop-file-validate', f), True)
|
|
||||||
+ if st[0]:
|
|
||||||
+ if st[1].find('error:') != -1:
|
|
||||||
+ printError(pkg, 'invalid-desktopfile', filename, st[1].split('error: ')[1])
|
|
||||||
+ else:
|
|
||||||
+ printError(pkg, 'invalid-desktopfile', filename)
|
|
||||||
if not is_utf8(f):
|
|
||||||
printError(pkg, 'non-utf8-desktopfile', filename)
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
--- Makefile
|
|
||||||
+++ Makefile
|
|
||||||
@@ -40,7 +40,7 @@
|
|
||||||
|
|
||||||
install:
|
|
||||||
-mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(ETCDIR)/$(PACKAGE) $(DESTDIR)$(ETCDIR)/bash_completion.d $(DESTDIR)$(MANDIR)/man1
|
|
||||||
- cp -p *.py *.pyc *.pyo $(DESTDIR)$(LIBDIR)
|
|
||||||
+ cp -p *.py *.py[co] $(DESTDIR)$(LIBDIR)
|
|
||||||
sed -e 's/@VERSION@/$(VERSION)/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py
|
|
||||||
cp -p rpmlint rpmdiff $(DESTDIR)$(BINDIR)
|
|
||||||
cp -p config $(DESTDIR)$(ETCDIR)/$(PACKAGE)
|
|
@ -1,10 +1,24 @@
|
|||||||
--- BinariesCheck.py
|
package ProtocolReader;
|
||||||
+++ BinariesCheck.py
|
i
|
||||||
@@ -165,6 +165,7 @@
|
|
||||||
is_elf = string.find(i[1], 'ELF') != -1
|
require Exportei path
|
||||||
is_ar = string.find(i[1], 'current ar archive') != -1
|
Da/work/built/patchinfo/a8074a35e4528cffdfb08bd7c9969012/protocol-autotest"))Da/work/built/patchinfo/a8074a35e4528cffdfb08bd7c9969012/protocol-autotest"));;
|
||||||
is_ocaml_native = string.find(i[1], 'Objective caml native') != -1
|
@ISA = qw(Exporter);
|
||||||
+ is_shell = string.find(i[1], "shell script") != -1
|
@EXPORT = qw(new read);
|
||||||
|
is_ar =
|
||||||
|
|
||||||
|
rpath
|
||||||
|
|
||||||
|
asdfdff
|
||||||
|
|
||||||
|
ead_one_protocol("fc46dcae41fa022273d4dfd752880372/protocol") to
|
||||||
|
|
||||||
|
:x
|
||||||
|
|
||||||
|
sub new { bless {} } string.find(i[1], 'current ar archive') != -1
|
||||||
|
is_ocaml_native = string.find(i[1], 'ObjABXML::ABXML::patchprotocolnative') != -1
|
||||||
|
print Dumper(a+ is_shell = string.find(i[1], "shell script") != -)1
|
||||||
|
|
||||||
is_binary = is_elf or is_ar or is_ocaml_native
|
is_binary = is_elf or is_ar or is_ocaml_native
|
||||||
|
|
||||||
if is_binary:
|
if is_binary:
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
|
--- Filter.py
|
||||||
|
+++ Filter.py
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
if len(last_reason):
|
||||||
|
printDescriptions(last_reason)
|
||||||
|
last_reason = reason
|
||||||
|
- __print(diag)
|
||||||
|
+ __print(diag[:-1])
|
||||||
|
if Config.info and len(last_reason):
|
||||||
|
printDescriptions(last_reason)
|
||||||
|
_diagnostic = list()
|
||||||
--- rpmlint.py
|
--- rpmlint.py
|
||||||
+++ rpmlint.py
|
+++ rpmlint.py
|
||||||
@@ -190,7 +190,7 @@
|
@@ -201,7 +201,7 @@
|
||||||
% (packages_checked, specfiles_checked,
|
% (packages_checked, specfiles_checked,
|
||||||
printed_messages["E"], printed_messages["W"])
|
printed_messages["E"], printed_messages["W"])
|
||||||
|
|
||||||
@ -9,14 +20,3 @@
|
|||||||
sys.exit(64)
|
sys.exit(64)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
--- Filter.py
|
|
||||||
+++ Filter.py
|
|
||||||
@@ -96,7 +96,7 @@
|
|
||||||
if len(last_reason):
|
|
||||||
printDescriptions(last_reason)
|
|
||||||
last_reason = reason
|
|
||||||
- Pkg.rlprint(diag)
|
|
||||||
+ Pkg.rlprint(diag[:-1])
|
|
||||||
if Config.info and len(last_reason):
|
|
||||||
printDescriptions(last_reason)
|
|
||||||
_diagnostic = list()
|
|
||||||
|
@ -1,13 +1,22 @@
|
|||||||
--- TagsCheck.py
|
--- TagsCheck.py
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -626,7 +626,9 @@
|
@@ -653,6 +653,8 @@
|
||||||
|
self._unexpanded_macros(pkg, 'Group', group)
|
||||||
if not group:
|
if not group:
|
||||||
printError(pkg, 'no-group-tag')
|
printError(pkg, 'no-group-tag')
|
||||||
else:
|
+ elif pkg.name.find('-devel') != -1 and not group.startswith('Development/'):
|
||||||
- if VALID_GROUPS and group not in VALID_GROUPS:
|
+ printWarning(pkg, 'devel-package-with-non-devel-group', group)
|
||||||
+ if pkg.name.find('-devel') != -1 and not group.startswith('Development/'):
|
elif VALID_GROUPS and group not in VALID_GROUPS:
|
||||||
+ printWarning(pkg, 'devel-package-with-non-devel-group', group)
|
printWarning(pkg, 'non-standard-group', group)
|
||||||
+ elif VALID_GROUPS and group not in VALID_GROUPS:
|
|
||||||
printWarning(pkg, 'non-standard-group', group)
|
@@ -949,6 +951,10 @@
|
||||||
else:
|
'''There is no Group tag in your package. You have to specify a valid group
|
||||||
res = AbstractCheck.macro_regex.search(group)
|
in your spec file using the Group tag.''',
|
||||||
|
|
||||||
|
+'devel-package-with-non-devel-group',
|
||||||
|
+'''The package ends with -devel but does not have a RPM group starting with
|
||||||
|
+Development/''',
|
||||||
|
+
|
||||||
|
'non-standard-group',
|
||||||
|
'''The value of the Group tag in the package is not valid. Valid groups are:
|
||||||
|
"%s".''' % '", "'.join(VALID_GROUPS),
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6acfd50bae5302d321a2b41c139d3cc39376ad5d81a3aa8a8ccfb0dd633cda2b
|
|
||||||
size 95746
|
|
3
rpmlint-0.95.tar.bz2
Normal file
3
rpmlint-0.95.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1b8fdc18e6b98768197b5b9adee1316fa65073ed0372d47191f33636e93dde27
|
||||||
|
size 100631
|
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 25 22:45:09 CET 2010 - dmueller@suse.de
|
||||||
|
|
||||||
|
- fix buildroot detection (bnc#584952)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 19 15:39:57 CET 2010 - dmueller@suse.de
|
||||||
|
|
||||||
|
- update to 0.95:
|
||||||
|
* Skip ghost files in files checks, https://bugzilla.redhat.com/570086
|
||||||
|
* Work around Python's ASCII non-TTY stdout and our non-ASCII output.
|
||||||
|
* Omit spell check warnings for capitalized words that do not start a sentence.
|
||||||
|
* Wrap bunch of long lines, tune comments and info messages.
|
||||||
|
* Require rpm-python >= 4.4.2.2 for expandMacro() in r1729.
|
||||||
|
* do not execute check if the network test are marked as disabled, and simplify the logic
|
||||||
|
* do not expand the format of the filename format, (patch from Per Oyvind Karlsten )
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Feb 27 12:00:20 CET 2010 - dmueller@suse.de
|
||||||
|
|
||||||
|
- update to 0.94:
|
||||||
|
- rpm 4.8.0 support
|
||||||
|
- better python bytecode checks
|
||||||
|
- improved LSB/taglist
|
||||||
|
- various fixes/patches upstreamed
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 25 14:20:42 UTC 2010 - lnussel@suse.de
|
Thu Feb 25 14:20:42 UTC 2010 - lnussel@suse.de
|
||||||
|
|
||||||
|
13
rpmlint.spec
13
rpmlint.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package rpmlint (Version 0.92)
|
# spec file for package rpmlint (Version 0.95)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -22,8 +22,8 @@
|
|||||||
Name: rpmlint
|
Name: rpmlint
|
||||||
BuildRequires: rpm-python
|
BuildRequires: rpm-python
|
||||||
Summary: Rpm correctness checker
|
Summary: Rpm correctness checker
|
||||||
Version: 0.92
|
Version: 0.95
|
||||||
Release: 4
|
Release: 1
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: config
|
Source1: config
|
||||||
Source1001: config.in
|
Source1001: config.in
|
||||||
@ -79,7 +79,6 @@ Patch23: buildroot-doc.diff
|
|||||||
# bogus, fails with aaa_base. disabled
|
# bogus, fails with aaa_base. disabled
|
||||||
Patch24: sysv5-init-checks.diff
|
Patch24: sysv5-init-checks.diff
|
||||||
Patch26: ignore-non-readable-in-etc.diff
|
Patch26: ignore-non-readable-in-etc.diff
|
||||||
Patch27: detailed-desktop-file-check.diff
|
|
||||||
Patch29: rpmgroup-checks.diff
|
Patch29: rpmgroup-checks.diff
|
||||||
Patch30: devel-provide-is-devel-package.diff
|
Patch30: devel-provide-is-devel-package.diff
|
||||||
# what's the reason behind that one?
|
# what's the reason behind that one?
|
||||||
@ -111,7 +110,6 @@ Patch69: useless-requires-doc.diff
|
|||||||
Patch71: suse-binary-info-compile-opts.diff
|
Patch71: suse-binary-info-compile-opts.diff
|
||||||
Patch72: version-control-internal-file.diff
|
Patch72: version-control-internal-file.diff
|
||||||
Patch73: avoid-mismatched-libregex.diff
|
Patch73: avoid-mismatched-libregex.diff
|
||||||
Patch74: fix-pyc-install.diff
|
|
||||||
%py_requires
|
%py_requires
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -131,7 +129,8 @@ Authors:
|
|||||||
%patch2
|
%patch2
|
||||||
%patch3
|
%patch3
|
||||||
%patch4
|
%patch4
|
||||||
%patch5
|
# needs rediff
|
||||||
|
#%patch5
|
||||||
%patch6
|
%patch6
|
||||||
%patch7
|
%patch7
|
||||||
%patch8
|
%patch8
|
||||||
@ -151,7 +150,6 @@ Authors:
|
|||||||
# bogus, fails with aaa_base. disabled
|
# bogus, fails with aaa_base. disabled
|
||||||
#patch24
|
#patch24
|
||||||
#%patch26
|
#%patch26
|
||||||
%patch27
|
|
||||||
%patch29
|
%patch29
|
||||||
%patch30
|
%patch30
|
||||||
#%patch31
|
#%patch31
|
||||||
@ -182,7 +180,6 @@ Authors:
|
|||||||
#%patch71
|
#%patch71
|
||||||
%patch72
|
%patch72
|
||||||
%patch73
|
%patch73
|
||||||
%patch74
|
|
||||||
cp -p %{SOURCE1} .
|
cp -p %{SOURCE1} .
|
||||||
cp -p %{SOURCE2} .
|
cp -p %{SOURCE2} .
|
||||||
cp -p %{SOURCE3} .
|
cp -p %{SOURCE3} .
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
Index: FilesCheck.py
|
--- FilesCheck.py
|
||||||
===================================================================
|
|
||||||
--- FilesCheck.py.orig
|
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -1162,7 +1162,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -818,7 +818,7 @@
|
||||||
interpreter = None
|
interpreter = None
|
||||||
if res:
|
if res:
|
||||||
interpreter = res.group(1)
|
interpreter = res.group(1)
|
||||||
- if not interpreter_regex.search(interpreter):
|
- if not interpreter_regex.search(interpreter):
|
||||||
+ if mode & 0111 != 0 and not interpreter_regex.search(interpreter):
|
+ if mode & 0111 != 0 and not interpreter_regex.search(interpreter):
|
||||||
printError(pkg, 'wrong-script-interpreter', f, interpreter)
|
printError(pkg, 'wrong-script-interpreter',
|
||||||
elif not nonexec_file and not (lib_path_regex.search(f) and f.endswith('.la')):
|
f, interpreter)
|
||||||
printError(pkg, 'script-without-shebang', f)
|
elif not nonexec_file and not \
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
Index: FilesCheck.py
|
--- FilesCheck.py
|
||||||
===================================================================
|
|
||||||
--- FilesCheck.py.orig
|
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -683,7 +683,7 @@ manifest_perl_regex = re.compile('^/usr/
|
@@ -212,7 +212,7 @@
|
||||||
shebang_regex = re.compile('^#!\s*(\S*)')
|
shebang_regex = re.compile('^#!\s*(\S*)')
|
||||||
interpreter_regex = re.compile('^/(usr/)?(s?bin|games|libexec(/.+)?|(lib(64)?|share)/.+)/[^/]+$')
|
interpreter_regex = re.compile('^/(usr/)?(s?bin|games|libexec(/.+)?|(lib(64)?|share)/.+)/[^/]+$')
|
||||||
script_regex = re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/')
|
script_regex = re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/')
|
||||||
-sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d)/')
|
-sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d)/')
|
||||||
+sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d|/sbin/conf.d)/')
|
+sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d|/sbin/conf.d)/')
|
||||||
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||||
skipdocs_regex = re.compile(Config.getOption('SkipDocsRegexp', '\.(?:rtf|x?html?|ml[ily]?)$'), re.IGNORECASE)
|
skipdocs_regex = re.compile(Config.getOption('SkipDocsRegexp', '\.(?:rtf|x?html?|svg|ml[ily]?)$'), re.IGNORECASE)
|
||||||
meta_package_regex = re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-'))
|
meta_package_regex = re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-'))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- SpecCheck.py
|
--- SpecCheck.py
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -407,6 +407,10 @@
|
@@ -421,6 +421,10 @@
|
||||||
printWarning(pkg, 'comparison-operator-in-deptoken',
|
printWarning(pkg, 'comparison-operator-in-deptoken',
|
||||||
conf)
|
conf)
|
||||||
|
|
||||||
@ -9,9 +9,9 @@
|
|||||||
+ printWarning(pkg, 'deprecated-use-of-%run_ldconfig')
|
+ printWarning(pkg, 'deprecated-use-of-%run_ldconfig')
|
||||||
+
|
+
|
||||||
if current_section == 'changelog':
|
if current_section == 'changelog':
|
||||||
res = AbstractCheck.macro_regex.search(line)
|
for match in AbstractCheck.macro_regex.findall(line):
|
||||||
if res and len(res.group(1)) % 2:
|
res = re.match('%+', match)
|
||||||
@@ -627,6 +631,14 @@
|
@@ -684,6 +688,14 @@
|
||||||
'''Make check or other automated regression test should be run in %check, as
|
'''Make check or other automated regression test should be run in %check, as
|
||||||
they can be disabled with a rpm macro for short circuiting purposes.''',
|
they can be disabled with a rpm macro for short circuiting purposes.''',
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
def dir_base(path):
|
def dir_base(path):
|
||||||
res = path_regex.search(path)
|
res = path_regex.search(path)
|
||||||
@@ -233,7 +234,7 @@
|
@@ -238,7 +239,7 @@
|
||||||
printError(pkg, 'arch-independent-package-contains-binary-or-object', fname)
|
fname)
|
||||||
else:
|
else:
|
||||||
# in /usr/share ?
|
# in /usr/share ?
|
||||||
- if fname.startswith('/usr/share/'):
|
- if fname.startswith('/usr/share/'):
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
Index: MenuXDGCheck.py
|
--- MenuXDGCheck.py
|
||||||
===================================================================
|
|
||||||
--- MenuXDGCheck.py.orig
|
|
||||||
+++ MenuXDGCheck.py
|
+++ MenuXDGCheck.py
|
||||||
@@ -17,7 +17,8 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
@@ -18,7 +18,7 @@
|
||||||
# desktop file need to be in $XDG_DATA_DIRS
|
|
||||||
# $ echo $XDG_DATA_DIRS/applications
|
# $ echo $XDG_DATA_DIRS/applications
|
||||||
# /var/lib/menu-xdg:/usr/share
|
# /var/lib/menu-xdg:/usr/share
|
||||||
- AbstractCheck.AbstractFilesCheck.__init__(self, "MenuXDGCheck", "/usr/share/applications/.*\.desktop$")
|
AbstractCheck.AbstractFilesCheck.__init__(
|
||||||
+ AbstractCheck.AbstractFilesCheck.__init__(self, "MenuXDGCheck",
|
- self, "MenuXDGCheck", "/usr/share/applications/.*\.desktop$")
|
||||||
+ "(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
+ self, "MenuXDGCheck", "(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
||||||
|
|
||||||
def check_file(self, pkg, filename):
|
def check_file(self, pkg, filename):
|
||||||
f = pkg.dirName() + filename
|
f = pkg.dirName() + filename
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -674,7 +674,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -739,7 +739,7 @@
|
||||||
printWarning(pkg, 'no-url-tag')
|
printWarning(pkg, 'no-url-tag')
|
||||||
|
|
||||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||||
- prov_names = [x[0] for x in pkg.provides()]
|
- prov_names = [x[0] for x in pkg.provides()]
|
||||||
|
Loading…
Reference in New Issue
Block a user