!39 Better details for wrong-script-interpreter

From: @lb1107039128 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-12-27 08:42:38 +00:00 committed by Gitee
commit b4d78cf7de
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 5d29ab9886f3821af963f32c8f556d144e4a5999 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk@dmllr.de>
Date: Thu, 28 Sep 2017 22:28:30 +0200
Subject: [PATCH] Better details for wrong-script-interpreter
It seems it is not entirely obvious that the warning
can be surpressed by not marking files as executable
that are not actually supposed to be executed.
---
FilesCheck.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/FilesCheck.py b/FilesCheck.py
index 87965bc4..57de8fbf 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -1276,7 +1276,10 @@ executed.''',
'wrong-script-interpreter',
'''This script uses an interpreter which is either an inappropriate one
-or located in an inappropriate directory for packaged system software.''',
+or located in an inappropriate directory for packaged system software.
+Alternatively, if the file should not be executed, then ensure that
+it is not marked as executable.
+''',
'non-executable-script',
'''This text file contains a shebang or is located in a path dedicated for
--
2.42.0.windows.2

View File

@ -2,7 +2,7 @@
Name: rpmlint
Version: 1.10
Release: 20
Release: 21
Summary: Check the RPM package of tools for common errors
License: GPLv2
URL: https://github.com/rpm-software-management/rpmlint
@ -17,6 +17,7 @@ Patch0004: rpmlint-1.10-py37mtime.patch
Patch0005: rpmlint-1.10-py37magic.patch
Patch0006: rpmlint-1.10-ugly-workaroud-for-RPM-4.14-vs-4.15-python3-bindings-incompatibility.patch
Patch0007: 0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch
Patch0008: 0001-Better-details-for-wrong-script-interpreter.patch
BuildArch: noarch
@ -63,6 +64,9 @@ install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/rpmlint/config
%{_mandir}/man1/*
%changelog
* Wed Dec 27 2023 liubo <liubo1@xfusion.com> - 1.10-21
- Better details for wrong-script-interpreter
* Tue Oct 17 2023 liubo <liubo1@xfusion.com> - 1.10-20
- AppDataCheck: Pass --nonet to appstream-util if NetworkEnabled is False