forked from pool/rpmlint
773aa7d652
Copy from Base:System/rpmlint based on submit request 19018 from user lnussel OBS-URL: https://build.opensuse.org/request/show/19018 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=44
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
Index: SourceCheck.py
|
|
===================================================================
|
|
--- SourceCheck.py.orig
|
|
+++ SourceCheck.py
|
|
@@ -17,7 +17,7 @@ import Config
|
|
|
|
DEFAULT_VALID_SRC_PERMS = (0644, 0755)
|
|
|
|
-source_regex = re.compile('\\.(tar|patch|tgz|diff)$')
|
|
+source_regex = re.compile('\\.(tar|patch|tar\.gz|tgz|diff)$')
|
|
use_bzip2 = Config.getOption('UseBzip2', 1)
|
|
valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS)
|
|
|
|
@@ -40,7 +40,7 @@ class SourceCheck(AbstractCheck.Abstract
|
|
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 @@ all your RPM information.''',
|
|
|
|
'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-gzipped',
|
|
'''A source archive or file in your package is not gzipped (doesn't
|