SHA256
1
0
forked from pool/rpmlint

Accepting request 36946 from Base:System

Copy from Base:System/rpmlint based on submit request 36946 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/36946
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=56
This commit is contained in:
OBS User autobuild 2010-04-05 16:53:54 +00:00 committed by Git OBS Bridge
parent 698597df8c
commit fbe71d53ac
7 changed files with 51 additions and 37 deletions

1
config
View File

@ -167,6 +167,7 @@ addFilter(" binary-or-shlib-defines-rpath .*ORIGIN")
addFilter("libzypp.*shlib-policy-name-error.*libzypp")
# stuff that is currently too noisy, but might become relevant in the future
addFilter(" prereq-use")
addFilter(" file-not-utf8")
addFilter(" tag-not-utf8")
addFilter(" setup-not-quiet")

View File

@ -1,10 +0,0 @@
--- Config.py
+++ Config.py
@@ -22,7 +22,6 @@
"FHSCheck",
"SignatureCheck",
"I18NCheck",
- "MenuCheck",
"PostCheck",
"InitScriptCheck",
"SourceCheck",

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Apr 2 13:53:56 CEST 2010 - dmueller@suse.de
- rediff some suse specific patches
-------------------------------------------------------------------
Thu Mar 25 22:45:09 CET 2010 - dmueller@suse.de

View File

@ -23,7 +23,7 @@ Name: rpmlint
BuildRequires: rpm-python
Summary: Rpm correctness checker
Version: 0.95
Release: 1
Release: 2
Source0: %{name}-%{version}.tar.bz2
Source1: config
Source1001: config.in
@ -56,12 +56,12 @@ Requires: desktop-file-utils
Requires: python-magic
BuildArch: noarch
Patch0: rpmlint-suse.diff
Patch1: suse-checks.diff
Patch2: suse-version.diff
Patch3: disable-menu-check.diff
Patch3: suse-url-check.diff
Patch4: invalid-filerequires.diff
Patch5: suse-bzip-bigger-than-100k.diff
Patch6: suse-filesystem.diff
Patch7: suse-checks.diff
Patch8: suse-debuginfo.diff
Patch9: no-doc-for-lib.diff
Patch10: add-scoring-support.diff
@ -126,13 +126,12 @@ Authors:
%prep
%setup -q -n rpmlint-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
# needs rediff
#%patch5
%patch5
%patch6
%patch7
%patch8
%patch9
#%patch10

View File

@ -5,27 +5,29 @@
DEFAULT_VALID_SRC_PERMS = (0644, 0755)
-source_regex = re.compile('\\.(tar|patch|tgz|diff)$')
+source_regex = re.compile('\\.(tar|patch|tgz|tar\.gz|diff)$')
use_bzip2 = Config.getOption('UseBzip2', True)
+source_regex = re.compile('\\.(tar|tar\.gz|patch|tgz|diff)$')
compress_ext = Config.getOption("CompressExtension", "bz2")
valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS)
@@ -40,7 +40,7 @@
printError(pkg, 'multiple-specfiles', spec_file, fname)
else:
spec_file = fname
- elif source_regex.search(fname):
+ elif source_regex.search(fname) and pkgfile.size > 120*1024:
if use_bzip2:
if not fname.endswith('.bz2'):
printWarning(pkg, 'source-or-patch-not-bzipped', fname)
@@ -61,7 +61,9 @@
- elif source_regex.search(fname) and compress_ext:
+ elif source_regex.search(fname) and compress_ext and pkgfile.size > 120*1024:
if not fname.endswith(compress_ext):
printWarning(pkg, 'source-or-patch-not-compressed',
compress_ext, fname)
@@ -58,8 +58,10 @@
'source-or-patch-not-bzipped',
'''A source archive or file in your package is not bzipped (doesn't
-have the .bz2 extension). To bzip it, use bzip2.''',
+have the .bz2 extension). Files bigger than 100k should be bzip2'ed
++in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source
++tarball, use bznew''',
'source-or-patch-not-compressed',
'''A source archive or file in your package is not compressed using the %s
-compression method (doesn't have the %s extension).''' %
-(compress_ext, compress_ext),
+compression method (doesn't have the %s extension).
+Files bigger than 100k should be bzip2'ed
+in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source
+tarball, use bznew''' % (compress_ext, compress_ext),
'source-or-patch-not-gzipped',
'''A source archive or file in your package is not gzipped (doesn't
'strange-permission',
'''A file that you listed to include in your package has strange

View File

@ -1,12 +1,18 @@
Index: Config.py
===================================================================
--- Config.py.orig
--- Config.py
+++ Config.py
@@ -20,7 +20,6 @@ DEFAULT_CHECKS = ("DistributionCheck",
@@ -17,14 +17,13 @@
except ImportError:
__version__ = 'devel'
-DEFAULT_CHECKS = ("DistributionCheck",
+DEFAULT_CHECKS = (
"TagsCheck",
"BinariesCheck",
"ConfigCheck",
"FilesCheck",
"DocFilesCheck",
"FHSCheck",
- "SignatureCheck",
"I18NCheck",
"MenuCheck",
"PostCheck",
"InitScriptCheck",

11
suse-url-check.diff Normal file
View File

@ -0,0 +1,11 @@
--- TagsCheck.py
+++ TagsCheck.py
@@ -748,7 +748,7 @@
if url:
(scheme, netloc) = urlparse(url)[0:2]
if not scheme or not netloc or "." not in netloc or \
- scheme not in ('http', 'https', 'ftp') or \
+ scheme not in ('obs', 'http', 'https', 'ftp') or \
(Config.getOption('InvalidURL') and \
invalid_url_regex.search(url)):
printWarning(pkg, 'invalid-url', tag, url)