forked from pool/rpmlint
Ludwig Nussel
912bea2445
- rpmlint 1.8 update * python 3 fixes * Add support for file triggers * Mechanism to black list certain C calls * new error: non-devel-file-in-devel-package * appdata check configurable * project moved to github * Patches dropped: avoid-mismatched-libregex.diff filename-non-utf8-exception.diff fix-ghost-file-handling.diff save-content-to-an-array.diff fix-TmpFilesCheck-pattern-match.diff move-ghost-file-check-to-TmpFilesCh.diff OBS-URL: https://build.opensuse.org/request/show/346358 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=353
45 lines
1.9 KiB
Diff
45 lines
1.9 KiB
Diff
From: Some One <nobody@opensuse.org>
|
|
Date: Thu, 9 Apr 2015 14:55:40 +0200
|
|
Subject: [PATCH] invalid-filerequires.diff
|
|
|
|
===================================================================
|
|
---
|
|
TagsCheck.py | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/TagsCheck.py b/TagsCheck.py
|
|
index 9856f9e..8071f1d 100644
|
|
--- a/TagsCheck.py
|
|
+++ b/TagsCheck.py
|
|
@@ -422,6 +422,7 @@ invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECA
|
|
# () are here for grouping purpose in the regexp
|
|
forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
|
|
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
|
+valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
|
use_epoch = Config.getOption('UseEpoch', False)
|
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
|
max_line_len = Config.getOption('MaxLineLength', 79)
|
|
@@ -602,6 +603,9 @@ class TagsCheck(AbstractCheck.AbstractCheck):
|
|
if d[0].startswith('/usr/local/'):
|
|
printError(pkg, 'invalid-dependency', d[0])
|
|
|
|
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
|
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
|
+
|
|
if is_source:
|
|
if lib_devel_number_regex.search(d[0]):
|
|
printError(pkg, 'invalid-build-requires', d[0])
|
|
@@ -1122,6 +1126,12 @@ unneeded explicit Requires: tags.''',
|
|
'''This package provides 2 times the same capacity. It should only provide it
|
|
once.''',
|
|
|
|
+'invalid-filepath-dependency',
|
|
+'''A package has a file or path based dependency that is not resolveable for
|
|
+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.''',
|
|
|