2015-04-10 16:35:46 +02:00
|
|
|
From: Some One <nobody@opensuse.org>
|
|
|
|
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
|
|
|
Subject: [PATCH] invalid-filerequires.diff
|
|
|
|
|
2011-04-21 12:12:02 +02:00
|
|
|
===================================================================
|
2015-04-10 16:35:46 +02:00
|
|
|
---
|
|
|
|
TagsCheck.py | 10 ++++++++++
|
|
|
|
1 file changed, 10 insertions(+)
|
|
|
|
|
2019-01-13 15:33:18 +01:00
|
|
|
Index: rpmlint-rpmlint-1.11/TagsCheck.py
|
2017-09-28 13:35:09 +02:00
|
|
|
===================================================================
|
2019-01-13 15:33:18 +01:00
|
|
|
--- rpmlint-rpmlint-1.11.orig/TagsCheck.py
|
|
|
|
+++ rpmlint-rpmlint-1.11/TagsCheck.py
|
|
|
|
@@ -456,6 +456,7 @@ invalid_version_regex = re.compile(r'([0
|
2009-08-21 18:19:06 +02:00
|
|
|
# () are here for grouping purpose in the regexp
|
2017-09-28 13:35:09 +02:00
|
|
|
forbidden_words_regex = re.compile(r'(%s)' % Config.getOption('ForbiddenWords'), re.IGNORECASE)
|
2009-08-21 18:19:06 +02:00
|
|
|
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
2017-09-30 10:27:35 +02:00
|
|
|
+valid_filedep_regex = re.compile(r'(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
2009-09-16 18:41:21 +02:00
|
|
|
use_epoch = Config.getOption('UseEpoch', False)
|
2009-08-21 18:19:06 +02:00
|
|
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
2010-10-14 14:32:03 +02:00
|
|
|
max_line_len = Config.getOption('MaxLineLength', 79)
|
2019-01-13 15:33:18 +01:00
|
|
|
@@ -636,6 +637,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
2009-08-21 18:19:06 +02:00
|
|
|
if d[0].startswith('/usr/local/'):
|
|
|
|
printError(pkg, 'invalid-dependency', d[0])
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
|
|
|
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
|
|
|
+
|
2013-06-28 15:29:34 +02:00
|
|
|
if is_source:
|
|
|
|
if lib_devel_number_regex.search(d[0]):
|
|
|
|
printError(pkg, 'invalid-build-requires', d[0])
|
2019-01-13 15:33:18 +01:00
|
|
|
@@ -1166,6 +1170,12 @@ unneeded explicit Requires: tags.''',
|
2009-09-16 18:41:21 +02:00
|
|
|
'''This package provides 2 times the same capacity. It should only provide it
|
|
|
|
once.''',
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
+'invalid-filepath-dependency',
|
2009-08-21 18:19:06 +02:00
|
|
|
+'''A package has a file or path based dependency that is not resolveable for
|
2008-04-17 04:52:37 +02:00
|
|
|
+package solvers because it is not in the whitelist for path based dependencies
|
|
|
|
+and therefore not available in repository metadata. Please use a symbolic requires
|
|
|
|
+instead or require a file in bin or /etc.''',
|
|
|
|
+
|
|
|
|
'tag-not-utf8',
|
|
|
|
'''The character encoding of the value of this tag is not UTF-8.''',
|
|
|
|
|