From 7b11fac9ffed45719d32ae3624d8764c2e638875837e33d8a5a20f1b2de8385c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 1 Oct 2017 12:06:10 +0000 Subject: [PATCH] fix-diag-sortorder.diff, drop-unicodedata-dep.diff, 0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=509 --- ...ript-interpreter-check-to-lower-fals.patch | 35 +++++++++++++++++++ rpmlint.changes | 3 +- rpmlint.spec | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch diff --git a/0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch b/0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch new file mode 100644 index 0000000..885edb3 --- /dev/null +++ b/0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch @@ -0,0 +1,35 @@ +From 3433a3cc77a05af3a7e0588899f61028b5546e64 Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Sun, 1 Oct 2017 14:00:26 +0200 +Subject: [PATCH] Tighten wrong-script-interpreter check to lower false + positives + +The check wasn't looking if the file is actually marked as +executable or in one of the known-scripts-only directories. Without +this patch, the check will fire on documentation examples that +just happen to be detected as script, but where the shebang +isn't actually captured by the find_requires rpm scripts. Omit +warning about those, as there are more likely legitimate reasons. +--- + FilesCheck.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/FilesCheck.py b/FilesCheck.py +index 1852b38..0b93e73 100644 +--- a/FilesCheck.py ++++ b/FilesCheck.py +@@ -848,7 +848,10 @@ class FilesCheck(AbstractCheck.AbstractCheck): + elif interpreter or mode_is_exec or script_regex.search(f): + if interpreter: + res = interpreter_regex.search(interpreter) +- if (res and res.group(1) == 'env') or not res: ++ is_wrong_interpreter = (not res or (res and ++ res.group(1) == 'env')) ++ if ((mode_is_exec or script_regex.search(f)) and ++ is_wrong_interpreter): + printError(pkg, 'wrong-script-interpreter', + f, interpreter, interpreter_args) + elif not nonexec_file and not \ +-- +2.14.1 + diff --git a/rpmlint.changes b/rpmlint.changes index 96bb73a..8510738 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -92,7 +92,8 @@ Thu Sep 28 10:40:08 UTC 2017 - dmueller@suse.com 0003-Tighten-lib_regex-to-avoid-false-positive-in-python-.patch, 0001-Execute-chroot-tests-also-on-x86-rpms.patch, ignore-readelf-ar-error.diff, remove-ghostfile-checks.diff, - fix-diag-sortorder.diff, drop-unicodedata-dep.diff + fix-diag-sortorder.diff, drop-unicodedata-dep.diff, + 0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch - drop config.in: unused - switch to python 3.x diff --git a/rpmlint.spec b/rpmlint.spec index 3dd8b49..46b1a31 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -77,6 +77,7 @@ Patch34: suse-check-optional-dependencies.diff Patch35: noarch-lib64.diff Patch36: suse-no-run-ldconfig.diff Patch37: description-check.diff +Patch38: 0001-Tighten-wrong-script-interpreter-check-to-lower-fals.patch Patch39: selfconflicts-provide.diff Patch40: no-badness-return.diff Patch41: suse-shlib-devel-dependency.diff