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
56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Tue, 19 May 2015 13:24:34 +0200
|
|
Subject: [PATCH] remove files-attr-not-set check
|
|
|
|
%defattr(-,root,root) is default since rpm 4.4, released > 10
|
|
years go so it's about time to remove that check
|
|
---
|
|
SpecCheck.py | 13 -------------
|
|
1 file changed, 13 deletions(-)
|
|
|
|
diff --git a/SpecCheck.py b/SpecCheck.py
|
|
index 5149dc3..e00c0a8 100644
|
|
--- a/SpecCheck.py
|
|
+++ b/SpecCheck.py
|
|
@@ -64,7 +64,6 @@ biarch_package_regex = re.compile(DEFAULT_BIARCH_PACKAGES)
|
|
hardcoded_lib_path_exceptions_regex = re.compile(Config.getOption('HardcodedLibPathExceptions', DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONS))
|
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
|
libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
|
|
-comment_or_empty_regex = re.compile('^\s*(#|$)')
|
|
defattr_regex = re.compile('^\s*%defattr\\b')
|
|
attr_regex = re.compile('^\s*%attr\\b')
|
|
suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)')
|
|
@@ -179,7 +178,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
|
patch_fuzz_override = False
|
|
indent_spaces = 0
|
|
indent_tabs = 0
|
|
- files_has_defattr = False
|
|
section = {}
|
|
# None == main package
|
|
current_package = None
|
|
@@ -231,9 +229,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
|
|
|
if section_marker:
|
|
|
|
- if current_section == 'files':
|
|
- files_has_defattr = False
|
|
-
|
|
if not is_lib_pkg and lib_package_regex.search(line):
|
|
is_lib_pkg = True
|
|
|
|
@@ -471,14 +466,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
|
|
|
if current_section == 'files':
|
|
|
|
- if not comment_or_empty_regex.search(line) and not \
|
|
- (ifarch_regex.search(line) or if_regex.search(line) or
|
|
- endif_regex.search(line)):
|
|
- if defattr_regex.search(line):
|
|
- files_has_defattr = True
|
|
- elif not (files_has_defattr or attr_regex.search(line)):
|
|
- printWarning(pkg, 'files-attr-not-set')
|
|
-
|
|
# TODO: check scriptlets for these too?
|
|
if package_noarch.get(current_package) or \
|
|
(current_package not in package_noarch and
|