diff --git a/0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch b/0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch new file mode 100644 index 0000000..5a014ad --- /dev/null +++ b/0001-Extend-scm_regex-to-capture-more-SCM-system-files.patch @@ -0,0 +1,47 @@ +From 1d70b641e5f755de72b0fa0059d4979a79f9553c Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Thu, 28 Sep 2017 22:16:30 +0200 +Subject: [PATCH] Extend scm_regex to capture more SCM system files + +Also add unit test coverage for it. +--- + FilesCheck.py | 4 +++- + test/test_files.py | 10 ++++++++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/FilesCheck.py b/FilesCheck.py +index a7724de3..87965bc4 100644 +--- a/FilesCheck.py ++++ b/FilesCheck.py +@@ -201,7 +201,9 @@ ldconfig_regex = re.compile(r'^[^#]*ldconfig', re.MULTILINE) + depmod_regex = re.compile(r'^[^#]*depmod', re.MULTILINE) + install_info_regex = re.compile(r'^[^#]*install-info', re.MULTILINE) + perl_temp_file_regex = re.compile(r'.*perl.*/(\.packlist|perllocal\.pod)$') +-scm_regex = re.compile(r'/CVS/[^/]+$|/\.(bzr|cvs|git|hg)ignore$|/\.hgtags$|/\.(bzr|git|hg|svn)/|/(\.arch-ids|{arch})/') ++scm_regex = re.compile( ++ r'/(?:RCS|CVS)/[^/]+$|/\.(?:bzr|cvs|git|hg|svn)ignore$|' ++ r',v$|/\.hgtags$|/\.(?:bzr|git|hg|svn)/|/(?:\.arch-ids|{arch})/') + games_path_regex = re.compile(r'^/usr(/lib(64)?)?/games/') + games_group_regex = re.compile(Config.getOption('RpmGamesGroups', DEFAULT_GAMES_GROUPS)) + dangling_exceptions = Config.getOption('DanglingSymlinkExceptions', DEFAULT_DANGLING_EXCEPTIONS) +diff --git a/test/test_files.py b/test/test_files.py +index 469a2278..f26c0c30 100644 +--- a/test/test_files.py ++++ b/test/test_files.py +@@ -52,3 +52,13 @@ def test_script_interpreter(): + assert se(b"#! /usr/bin/perl -wT \n") == ("/usr/bin/perl", "-wT") + assert se(b"#!/usr/bin/env python3 foo") == ("/usr/bin/env", "python3 foo") + assert se(b"# something here\n#!not a shebang") == (None, "") ++ ++ ++def test_scm_regex(): ++ from FilesCheck import scm_regex ++ ++ assert scm_regex.search('/foo/CVS/bar') ++ assert scm_regex.search('/foo/RCS/bar') ++ assert scm_regex.search('/bar/foo,v') ++ assert scm_regex.search('bar/.svnignore') ++ assert scm_regex.search('bar/.git/refs') +-- +2.42.0.windows.2 + diff --git a/rpmlint.spec b/rpmlint.spec index 571c846..8fd4838 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -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-Extend-scm_regex-to-capture-more-SCM-system-files.patch BuildArch: noarch @@ -63,6 +64,9 @@ install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/rpmlint/config %{_mandir}/man1/* %changelog +* Tue Nov 14 2023 liubo - 1.10-21 +- Extend scm_regex to capture more SCM system files + * Tue Oct 17 2023 liubo - 1.10-20 - AppDataCheck: Pass --nonet to appstream-util if NetworkEnabled is False