2017-09-28 13:35:09 +02:00
|
|
|
--- rpmlint-rpmlint-1.10.orig/TagsCheck.py
|
|
|
|
+++ rpmlint-rpmlint-1.10/TagsCheck.py
|
|
|
|
@@ -416,6 +416,7 @@ lib_devel_number_regex = re.compile(r'^l
|
2010-04-28 22:41:49 +02:00
|
|
|
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
2017-09-28 13:35:09 +02:00
|
|
|
lib_package_regex = re.compile(r'(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
|
|
|
leading_space_regex = re.compile(r'^\s+')
|
2017-09-30 10:27:35 +02:00
|
|
|
+pkg_config_regex = re.compile(r'^/usr/(?:lib\d*|share)/pkgconfig/')
|
2017-09-28 13:35:09 +02:00
|
|
|
license_regex = re.compile(r'\(([^)]+)\)|\s(?:and|or|AND|OR)\s')
|
|
|
|
invalid_version_regex = re.compile(r'([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
2010-04-28 22:41:49 +02:00
|
|
|
# () are here for grouping purpose in the regexp
|
2017-09-28 13:35:09 +02:00
|
|
|
@@ -635,10 +636,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
2010-04-26 23:35:02 +02:00
|
|
|
base = is_devel.group(1)
|
|
|
|
dep = None
|
|
|
|
has_so = False
|
|
|
|
+ has_pc = False
|
|
|
|
for fname in pkg.files():
|
|
|
|
if fname.endswith('.so'):
|
|
|
|
has_so = True
|
|
|
|
- break
|
2010-04-28 22:41:49 +02:00
|
|
|
+ if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
2010-04-26 23:35:02 +02:00
|
|
|
+ has_pc = True
|
|
|
|
if has_so:
|
|
|
|
base_or_libs = base + '/' + base + '-libs/lib' + base
|
|
|
|
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
2017-09-28 13:35:09 +02:00
|
|
|
@@ -675,6 +678,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
2010-04-26 23:35:02 +02:00
|
|
|
if prov not in (x[0] for x in pkg.provides()):
|
|
|
|
printWarning(pkg, 'no-provides', prov)
|
|
|
|
|
|
|
|
+ if has_pc:
|
|
|
|
+ found_pkg_config_dep = False
|
|
|
|
+ for p in (x[0] for x in pkg.provides()):
|
|
|
|
+ if (p.startswith("pkgconfig(")):
|
|
|
|
+ found_pkg_config_dep = True
|
|
|
|
+ break
|
|
|
|
+ if not found_pkg_config_dep:
|
|
|
|
+ printWarning(pkg, 'no-pkg-config-provides')
|
|
|
|
+
|
|
|
|
# List of words to ignore in spell check
|
2010-10-14 14:32:03 +02:00
|
|
|
ignored_words = set()
|
|
|
|
for pf in pkg.files():
|
2017-09-28 13:35:09 +02:00
|
|
|
@@ -1108,6 +1120,11 @@ once.''',
|
2010-04-26 23:35:02 +02:00
|
|
|
'no-url-tag',
|
2010-11-26 17:47:21 +01:00
|
|
|
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
2010-04-26 23:35:02 +02:00
|
|
|
|
|
|
|
+'no-pkg-config-provides',
|
2011-03-22 13:04:25 +01:00
|
|
|
+'''The package installs a .pc file but does not provide pkgconfig(..) provides.
|
2010-04-26 23:35:02 +02:00
|
|
|
+The most likely reason for that is that it was built without BuildRequires: pkg-config.
|
|
|
|
+Please double check your build dependencies.''',
|
|
|
|
+
|
|
|
|
'name-repeated-in-summary',
|
|
|
|
'''The name of the package is repeated in its summary. This is often redundant
|
|
|
|
information and looks silly in various programs' output. Make the summary
|