2011-04-21 12:12:02 +02:00
|
|
|
Index: SourceCheck.py
|
|
|
|
===================================================================
|
|
|
|
--- SourceCheck.py.orig
|
2008-04-17 04:52:37 +02:00
|
|
|
+++ SourceCheck.py
|
2011-04-21 12:12:02 +02:00
|
|
|
@@ -17,7 +17,7 @@ import Config
|
2008-04-17 04:52:37 +02:00
|
|
|
|
2009-08-21 18:19:06 +02:00
|
|
|
DEFAULT_VALID_SRC_PERMS = (0644, 0755)
|
2008-04-17 04:52:37 +02:00
|
|
|
|
2009-08-21 18:19:06 +02:00
|
|
|
-source_regex = re.compile('\\.(tar|patch|tgz|diff)$')
|
2010-04-05 18:53:54 +02:00
|
|
|
+source_regex = re.compile('\\.(tar|tar\.gz|patch|tgz|diff)$')
|
|
|
|
compress_ext = Config.getOption("CompressExtension", "bz2")
|
2009-08-21 18:19:06 +02:00
|
|
|
valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS)
|
2008-04-17 04:52:37 +02:00
|
|
|
|
2011-04-21 12:12:02 +02:00
|
|
|
@@ -41,7 +41,7 @@ class SourceCheck(AbstractCheck.Abstract
|
2008-04-17 04:52:37 +02:00
|
|
|
else:
|
2009-08-21 18:19:06 +02:00
|
|
|
spec_file = fname
|
2010-10-14 14:32:03 +02:00
|
|
|
elif source_regex.search(fname) and compress_ext and \
|
|
|
|
- not fname.endswith(compress_ext):
|
|
|
|
+ not fname.endswith(compress_ext) and pkgfile.size > 120*1024:
|
|
|
|
printWarning(pkg, 'source-or-patch-not-compressed',
|
|
|
|
compress_ext, fname)
|
|
|
|
perm = pkgfile.mode & 07777
|
2011-04-21 12:12:02 +02:00
|
|
|
@@ -58,8 +58,10 @@ all your RPM information.''',
|
2008-04-17 04:52:37 +02:00
|
|
|
|
2010-04-05 18:53:54 +02:00
|
|
|
'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),
|
2008-04-17 04:52:37 +02:00
|
|
|
|
2010-04-05 18:53:54 +02:00
|
|
|
'strange-permission',
|
|
|
|
'''A file that you listed to include in your package has strange
|