Remove old unused patches
This commit is contained in:
parent
34b6470a88
commit
4b91cead2b
@ -1,21 +0,0 @@
|
||||
diff -up rpmlint-1.1/SpecCheck.py.404fix rpmlint-1.1/SpecCheck.py
|
||||
--- rpmlint-1.1/SpecCheck.py.404fix 2011-03-03 11:54:47.001854005 -0500
|
||||
+++ rpmlint-1.1/SpecCheck.py 2011-03-03 11:57:11.012854018 -0500
|
||||
@@ -542,14 +542,15 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||
tag = '%s%s' % (srctype, num)
|
||||
if scheme and netloc:
|
||||
info = self.check_url(pkg, tag, url)
|
||||
+ if not info or not hasattr(pkg, 'files'):
|
||||
+ continue
|
||||
clen = info.get("Content-Length")
|
||||
if clen is not None:
|
||||
clen = int(clen)
|
||||
cmd5 = info.get("Content-MD5")
|
||||
if cmd5 is not None:
|
||||
cmd5 = cmd5.lower()
|
||||
- if (clen is not None or cmd5 is not None) \
|
||||
- and hasattr(pkg, 'files'):
|
||||
+ if clen is not None or cmd5 is not None:
|
||||
# Not using path from urlparse results to match how
|
||||
# rpm itself parses the basename.
|
||||
pkgfile = pkg.files()[url.split("/")[-1]]
|
@ -1,21 +0,0 @@
|
||||
diff -up rpmlint-1.3/FilesCheck.py.ghostfix rpmlint-1.3/FilesCheck.py
|
||||
--- rpmlint-1.3/FilesCheck.py.ghostfix 2011-10-12 14:46:28.290703772 -0400
|
||||
+++ rpmlint-1.3/FilesCheck.py 2011-10-12 14:46:35.254619020 -0400
|
||||
@@ -748,7 +748,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
res = man_base_regex.search(f)
|
||||
if res:
|
||||
man_basenames.add(res.group(1))
|
||||
- if use_utf8:
|
||||
+ if use_utf8 and chunk:
|
||||
# TODO: better shell escaping or seq based invocation
|
||||
cmd = commands.getstatusoutput(
|
||||
'env LC_ALL=C %s "%s" | gtbl | '
|
||||
@@ -807,7 +807,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
fsf_wrong_address_regex.search(chunk):
|
||||
printError(pkg, 'incorrect-fsf-address', f)
|
||||
|
||||
- elif is_doc and compr_regex.search(f):
|
||||
+ elif is_doc and chunk and compr_regex.search(f):
|
||||
ff = compr_regex.sub('', f)
|
||||
if not skipdocs_regex.search(ff):
|
||||
# compressed docs, eg. info and man files etc
|
@ -1,14 +0,0 @@
|
||||
diff -up rpmlint-1.4/Filter.py.enc rpmlint-1.4/Filter.py
|
||||
--- rpmlint-1.4/Filter.py.enc 2012-01-23 09:56:03.861515705 -0800
|
||||
+++ rpmlint-1.4/Filter.py 2012-01-23 09:58:36.783740193 -0800
|
||||
@@ -29,7 +29,9 @@ if sys.stdout.isatty():
|
||||
print(s)
|
||||
else:
|
||||
def __print(s):
|
||||
- print(s.encode(locale.getpreferredencoding(), "replace"))
|
||||
+ if isinstance(s, unicode):
|
||||
+ s = s.encode(locale.getpreferredencoding(), "replace")
|
||||
+ print(s)
|
||||
|
||||
def printInfo(pkg, reason, *details):
|
||||
_print("I", pkg, reason, details)
|
@ -1,22 +0,0 @@
|
||||
diff -up rpmlint-1.4/BinariesCheck.py.luafix rpmlint-1.4/BinariesCheck.py
|
||||
--- rpmlint-1.4/BinariesCheck.py.luafix 2013-04-01 10:23:00.926765119 -0400
|
||||
+++ rpmlint-1.4/BinariesCheck.py 2013-04-01 10:25:05.553760664 -0400
|
||||
@@ -231,7 +231,8 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
is_elf = 'ELF' in pkgfile.magic
|
||||
is_ar = 'current ar archive' in pkgfile.magic
|
||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||
- is_binary = is_elf or is_ar or is_ocaml_native
|
||||
+ is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
|
||||
+ is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode
|
||||
|
||||
if not is_binary:
|
||||
if reference_regex.search(fname):
|
||||
@@ -269,7 +270,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
if pkg.arch == 'sparc' and sparc_regex.search(pkgfile.magic):
|
||||
printError(pkg, 'non-sparc32-binary', fname)
|
||||
|
||||
- if is_ocaml_native or fname.endswith('.o') or \
|
||||
+ if is_ocaml_native or is_lua_bytecode or fname.endswith('.o') or \
|
||||
fname.endswith('.static'):
|
||||
continue
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -up rpmlint-1.4/FilesCheck.py.py3 rpmlint-1.4/FilesCheck.py
|
||||
--- rpmlint-1.4/FilesCheck.py.py3 2012-08-14 15:28:27.143695431 -0400
|
||||
+++ rpmlint-1.4/FilesCheck.py 2012-08-14 15:28:45.125694788 -0400
|
||||
@@ -285,7 +285,7 @@ def peek(filename, pkg, length=1024):
|
||||
istext = float(len(t))/len(chunk) <= 0.30
|
||||
return (chunk, istext)
|
||||
|
||||
-# See Python/import.c (in the trunk and py3k branches) for a full list of
|
||||
+# See Python/import.c (in the default and 2.x branches) for a full list of
|
||||
# the values here.
|
||||
_python_magic_values = {
|
||||
'2.2': 60717,
|
||||
@@ -297,7 +297,7 @@ _python_magic_values = {
|
||||
'3.0': 3130,
|
||||
'3.1': 3150,
|
||||
'3.2': 3180,
|
||||
- '3.3': 3190,
|
||||
+ '3.3': 3230,
|
||||
}
|
||||
|
||||
def get_expected_pyc_magic(path):
|
@ -1,14 +0,0 @@
|
||||
diff -up rpmlint-1.4/FilesCheck.py.ruby-ri-files rpmlint-1.4/FilesCheck.py
|
||||
--- rpmlint-1.4/FilesCheck.py.ruby-ri-files 2012-09-06 15:39:40.348664465 -0400
|
||||
+++ rpmlint-1.4/FilesCheck.py 2012-09-06 15:40:16.231664959 -0400
|
||||
@@ -273,6 +273,10 @@ def peek(filename, pkg, length=1024):
|
||||
if not chunk: # Empty files are considered text
|
||||
return (chunk, True)
|
||||
|
||||
+ # RI files generated by RDoc are always binary
|
||||
+ if re.search(r'.*\/ri\/.*\.ri$', filename.lower()):
|
||||
+ return (chunk, False)
|
||||
+
|
||||
# PDF's are binary but often detected as text by the algorithm below
|
||||
if filename.lower().endswith('.pdf') and chunk.startswith('%PDF-'):
|
||||
return (chunk, False)
|
@ -1,12 +0,0 @@
|
||||
diff -up rpmlint-1.4/AbstractCheck.py.tighten-regexp rpmlint-1.4/AbstractCheck.py
|
||||
--- rpmlint-1.4/AbstractCheck.py.tighten-regexp 2012-09-06 15:38:03.122662962 -0400
|
||||
+++ rpmlint-1.4/AbstractCheck.py 2012-09-06 15:38:10.939663091 -0400
|
||||
@@ -16,7 +16,7 @@ from Filter import addDetails, printInfo
|
||||
import Config
|
||||
|
||||
# Note: do not add any capturing parentheses here
|
||||
-macro_regex = re.compile('%+[{(]?\w+[)}]?')
|
||||
+macro_regex = re.compile('%+[{(]?[a-zA-Z_]\w{2,}[)}]?')
|
||||
|
||||
class _HeadRequest(urllib2.Request):
|
||||
def get_method(self):
|
@ -1,31 +0,0 @@
|
||||
diff -up rpmlint-1.5/MenuXDGCheck.py.desktopfix rpmlint-1.5/MenuXDGCheck.py
|
||||
--- rpmlint-1.5/MenuXDGCheck.py.desktopfix 2013-10-09 19:33:21.067330420 -0400
|
||||
+++ rpmlint-1.5/MenuXDGCheck.py 2013-10-09 19:33:50.422330861 -0400
|
||||
@@ -41,14 +41,19 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||
|
||||
self.cfp.read(f)
|
||||
binary = self.cfp.get('Desktop Entry','Exec').split(' ',1)[0]
|
||||
- found = False
|
||||
- for i in STANDARD_BIN_DIRS:
|
||||
- if os.path.exists(root + i + binary):
|
||||
- # no need to check if the binary is +x, rpmlint does it
|
||||
- # in another place
|
||||
- found = True
|
||||
- if not found and binary:
|
||||
- printWarning(pkg, 'desktopfile-without-binary', filename, binary)
|
||||
+ if binary:
|
||||
+ if binary.startswith('/'):
|
||||
+ found = os.path.exists(root + binary)
|
||||
+ else:
|
||||
+ for i in STANDARD_BIN_DIRS:
|
||||
+ if os.path.exists(root + i + binary):
|
||||
+ # no need to check if the binary is +x, rpmlint does it
|
||||
+ # in another place
|
||||
+ found = True
|
||||
+ break
|
||||
+ if not found:
|
||||
+ printWarning(pkg, 'desktopfile-without-binary', filename,
|
||||
+ binary)
|
||||
|
||||
check = MenuXDGCheck()
|
||||
|
@ -1,50 +0,0 @@
|
||||
diff -up rpmlint-1.5/rpmlint.no-sys-argv-overload rpmlint-1.5/rpmlint
|
||||
--- rpmlint-1.5/rpmlint.no-sys-argv-overload 2013-11-11 10:27:05.579909238 -0500
|
||||
+++ rpmlint-1.5/rpmlint 2013-11-11 10:28:13.827740569 -0500
|
||||
@@ -235,7 +235,7 @@ def runChecks(pkg):
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
-sys.argv[0] = os.path.basename(sys.argv[0])
|
||||
+argv0 = os.path.basename(sys.argv[0])
|
||||
|
||||
# parse options
|
||||
try:
|
||||
@@ -256,8 +256,8 @@ try:
|
||||
'rawout=',
|
||||
])
|
||||
except getopt.GetoptError, e:
|
||||
- Pkg.warn("%s: %s" % (sys.argv[0], e))
|
||||
- usage(sys.argv[0])
|
||||
+ Pkg.warn("%s: %s" % (argv0, e))
|
||||
+ usage(argv0)
|
||||
sys.exit(1)
|
||||
|
||||
# process options
|
||||
@@ -276,7 +276,7 @@ configs = glob.glob('/etc/rpmlint/*confi
|
||||
configs.sort()
|
||||
|
||||
# Was rpmlint invoked as a prefixed variant?
|
||||
-m = re.match(r"(?P<prefix>[\w-]+)-rpmlint(\.py)?", sys.argv[0])
|
||||
+m = re.match(r"(?P<prefix>[\w-]+)-rpmlint(\.py)?", argv0)
|
||||
if m:
|
||||
# Okay, we're a prefixed variant. Look for the variant config.
|
||||
# If we find it, use it. If not, fallback to the default.
|
||||
@@ -310,7 +310,7 @@ for o in opt:
|
||||
# split by comma for deprecated backwards compatibility with < 1.2
|
||||
info_error.update(o[1].split(','))
|
||||
elif o[0] in ('-h', '--help'):
|
||||
- usage(sys.argv[0])
|
||||
+ usage(argv0)
|
||||
sys.exit(0)
|
||||
elif o[0] in ('-C', '--checkdir'):
|
||||
Config.addCheckDir(o[1])
|
||||
@@ -367,7 +367,7 @@ if info_error:
|
||||
|
||||
# if no argument print usage
|
||||
if not args:
|
||||
- usage(sys.argv[0])
|
||||
+ usage(argv0)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
@ -1,11 +0,0 @@
|
||||
diff -up rpmlint-1.5/MenuXDGCheck.py.fixunbound rpmlint-1.5/MenuXDGCheck.py
|
||||
--- rpmlint-1.5/MenuXDGCheck.py.fixunbound 2013-11-11 10:31:28.023362241 -0500
|
||||
+++ rpmlint-1.5/MenuXDGCheck.py 2013-11-11 10:32:00.253303519 -0500
|
||||
@@ -42,6 +42,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||
self.cfp.read(f)
|
||||
binary = self.cfp.get('Desktop Entry','Exec').split(' ',1)[0]
|
||||
if binary:
|
||||
+ found = False
|
||||
if binary.startswith('/'):
|
||||
found = os.path.exists(root + binary)
|
||||
else:
|
@ -1,12 +0,0 @@
|
||||
--- a/TagsCheck.py
|
||||
+++ b/TagsCheck.py
|
||||
@@ -464,6 +464,8 @@
|
||||
# squeeze whitespace to ease leading context check
|
||||
checker.set_text(re.sub(r'\s+', ' ', str))
|
||||
uppername = pkg.name.upper()
|
||||
+ if use_utf8:
|
||||
+ uppername = Pkg.to_utf8(uppername).decode('utf-8')
|
||||
upperparts = uppername.split('-')
|
||||
if lang.startswith('en'):
|
||||
ups = [x + "'S" for x in upperparts]
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up rpmlint-1.5/FilesCheck.py.py34 rpmlint-1.5/FilesCheck.py
|
||||
--- rpmlint-1.5/FilesCheck.py.py34 2014-05-29 14:22:53.063802675 -0400
|
||||
+++ rpmlint-1.5/FilesCheck.py 2014-05-29 14:23:07.577696983 -0400
|
||||
@@ -308,7 +308,7 @@ _python_magic_values = {
|
||||
'3.1': 3150,
|
||||
'3.2': 3180,
|
||||
'3.3': 3230,
|
||||
- '3.4': 3260,
|
||||
+ '3.4': 3310,
|
||||
}
|
||||
|
||||
def get_expected_pyc_magic(path):
|
@ -1,12 +0,0 @@
|
||||
diff -up rpmlint-rpmlint-1.8/TagsCheck.py.epathfix rpmlint-rpmlint-1.8/TagsCheck.py
|
||||
--- rpmlint-rpmlint-1.8/TagsCheck.py.epathfix 2015-11-30 13:59:57.338676145 -0500
|
||||
+++ rpmlint-rpmlint-1.8/TagsCheck.py 2015-11-30 14:00:08.181558438 -0500
|
||||
@@ -435,7 +435,7 @@ private_so_paths = set()
|
||||
for path in ('%perl_archlib', '%perl_vendorarch', '%perl_sitearch',
|
||||
'%python_sitearch', '%ruby_sitearch', '%php_extdir'):
|
||||
epath = rpm.expandMacro(path)
|
||||
- if epath != path:
|
||||
+ if epath and epath != path:
|
||||
private_so_paths.add(epath)
|
||||
private_so_paths.add(re.sub(r'/lib64(?=/|$)', '/lib', epath))
|
||||
private_so_paths.add(re.sub(r'/lib(?=/|$)', '/lib64', epath))
|
@ -1,35 +0,0 @@
|
||||
diff -up rpmlint-rpmlint-1.8/FilesCheck.py.py35 rpmlint-rpmlint-1.8/FilesCheck.py
|
||||
--- rpmlint-rpmlint-1.8/FilesCheck.py.py35 2015-11-30 14:04:42.008425141 -0500
|
||||
+++ rpmlint-rpmlint-1.8/FilesCheck.py 2015-11-30 14:06:31.960635048 -0500
|
||||
@@ -210,7 +210,7 @@ kernel_package_regex = re.compile('^kern
|
||||
normal_zero_length_regex = re.compile('^/etc/security/console\.apps/|/\.nosearch$|/__init__\.py$')
|
||||
perl_regex = re.compile('^/usr/lib/perl5/(?:vendor_perl/)?([0-9]+\.[0-9]+)\.([0-9]+)/')
|
||||
python_regex = re.compile('^/usr/lib(?:64)?/python([.0-9]+)/')
|
||||
-python_bytecode_regex_pep3147 = re.compile('^(.*)/__pycache__/(.*)\.(.*)(\.py[oc])$')
|
||||
+python_bytecode_regex_pep3147 = re.compile('^(.*)/__pycache__/(.*?)\.([^.]+)(\.opt-[12])?\.py[oc]$')
|
||||
python_bytecode_regex = re.compile('^(.*)(\.py[oc])$')
|
||||
python_default_version = Config.getOption('PythonDefaultVersion', None)
|
||||
perl_version_trick = Config.getOption('PerlVersionTrick', True)
|
||||
diff -up rpmlint-rpmlint-1.8/test/test_files.py.py35 rpmlint-rpmlint-1.8/test/test_files.py
|
||||
--- rpmlint-rpmlint-1.8/test/test_files.py.py35 2015-11-30 14:07:38.248158721 -0500
|
||||
+++ rpmlint-rpmlint-1.8/test/test_files.py 2015-11-30 14:07:32.263201728 -0500
|
||||
@@ -0,0 +1,19 @@
|
||||
+from FilesCheck import python_bytecode_to_script as pbts
|
||||
+
|
||||
+
|
||||
+class TestPythonBytecodeToScript(object):
|
||||
+
|
||||
+ def test_pep3147(self):
|
||||
+ assert pbts("/usr/lib64/python3.4/__pycache__/__phello__.foo.cpython-34.pyc") == "/usr/lib64/python3.4/__phello__.foo.py"
|
||||
+ assert pbts("/usr/lib64/python3.4/__pycache__/__phello__.foo.cpython-34.pyo") == "/usr/lib64/python3.4/__phello__.foo.py"
|
||||
+
|
||||
+ def test_py2(self):
|
||||
+ assert pbts("/usr/lib/python2.7/site-packages/_pytest/main.pyc") == "/usr/lib/python2.7/site-packages/_pytest/main.py"
|
||||
+ assert pbts("/usr/lib/python2.7/site-packages/_pytest/main.pyo") == "/usr/lib/python2.7/site-packages/_pytest/main.py"
|
||||
+
|
||||
+ def test_pep0488(self):
|
||||
+ assert pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.opt-1.pyc") == "/usr/lib/python3.5/site-packages/pytest.py"
|
||||
+ assert pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.opt-2.pyc") == "/usr/lib/python3.5/site-packages/pytest.py"
|
||||
+ assert pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.pyc") == "/usr/lib/python3.5/site-packages/pytest.py"
|
||||
+
|
||||
+# ex: ts=4 sw=4 et
|
Loading…
Reference in New Issue
Block a user