From cfe9d89a4574604cec6b5cc5ff017b6b0523304d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 5 Sep 2021 20:50:01 +0200 Subject: [PATCH] Ignore hidden-file-or-dir for .cargo-checksum.json --- 700.patch | 24 ++++++++++++++++++++++++ rpmlint.spec | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 700.patch diff --git a/700.patch b/700.patch new file mode 100644 index 0000000..6ca702a --- /dev/null +++ b/700.patch @@ -0,0 +1,24 @@ +From b03a6c261f9a85d3b29a8801dc9bf51661ee2b47 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Sun, 5 Sep 2021 20:40:22 +0200 +Subject: [PATCH] Skip .cargo-checksum.json files in `hidden-file-or-dir`. + +Fixes #699. +--- + rpmlint/checks/FilesCheck.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/rpmlint/checks/FilesCheck.py b/rpmlint/checks/FilesCheck.py +index d1f1e6ed..c2aa30b7 100644 +--- a/rpmlint/checks/FilesCheck.py ++++ b/rpmlint/checks/FilesCheck.py +@@ -540,7 +540,8 @@ def check(self, pkg): + self.output.add_info('E', pkg, 'version-control-internal-file', f) + elif f.endswith('/.htaccess'): + self.output.add_info('E', pkg, 'htaccess-file', f) +- elif hidden_file_regex.search(f) and not f.startswith('/etc/skel/') and not f.endswith('/.build-id'): ++ elif (hidden_file_regex.search(f) and not f.startswith('/etc/skel/') and ++ not f.endswith('/.build-id') and not f.endswith('/.cargo-checksum.json')): + self.output.add_info('W', pkg, 'hidden-file-or-dir', f) + elif manifest_perl_regex.search(f): + self.output.add_info('W', pkg, 'manifest-in-perl-module', f) diff --git a/rpmlint.spec b/rpmlint.spec index 3302099..81752e5 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -2,7 +2,7 @@ Name: rpmlint Version: 2.1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tool for checking common errors in RPM packages License: GPLv2 URL: https://github.com/rpm-software-management/rpmlint @@ -14,6 +14,8 @@ Source3: scoring.toml Source4: users-groups.toml Source5: warn-on-functions.toml Patch0: rpmlint-2.1.0-include-iso-639-2-collective-language-codes.patch +# Ignore hidden-file-or-dir for .cargo-checksum.json, merged upstream +Patch1: https://github.com/rpm-software-management/rpmlint/pull/700.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} @@ -41,6 +43,7 @@ and source packages as well as spec files can be checked. %prep %setup -q -n %{name}-%{version} %patch0 -p1 -b .iso-639-2 +%patch1 -p1 -b .700 # Don't lint the code or measure coverage in %%check sed -i -e 's/ --cov=rpmlint//' -e 's/ --flake8//' setup.cfg @@ -68,6 +71,9 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysc %{python3_sitelib}/rpmlint* %changelog +* Sun Sep 05 2021 Miro HronĨok - 2.1.0-3 +- Ignore hidden-file-or-dir for .cargo-checksum.json + * Tue Aug 17 2021 Tom Callaway - 2.1.0-2 - include iso-639-2 collective language codes in LANGUAGES