utils: fix invalid escape sequence

Resolves: https://issues.redhat.com/browse/RHEL-65759

Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
This commit is contained in:
Čestmír Kalina 2024-11-18 16:19:06 +01:00
parent c81a1df64e
commit d1c090502f
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- a/utils.py
+++ b/utils.py
@@ -126,7 +126,7 @@
print('This tool needs to run on Red Hat Enterprise Linux')
return None
for rel in release:
- if re.match("\d.\d+",rel):
+ if re.match(r"\d+.\d+",rel):
return rel
print('This tool needs to run on Red Hat Enterprise Linux')
return None

View File

@ -8,7 +8,7 @@
Name: ksc
Version: 1.12
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Kernel source code checker
Group: Development/Tools
AutoReqProv: no
@ -24,6 +24,7 @@ BuildRequires: python3-setuptools
Source0: https://github.com/RedHatOfficial/ksc/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Patch0: 0001-manpage.patch
Patch1: 0002-c9s-notifications.patch
Patch2: 0003-cs-fix-invalid-escape.patch
%description
A kernel module source code checker to find usage of select symbols
@ -35,6 +36,7 @@ A kernel module source code checker to find usage of select symbols
sed -i "15i packages=[]," setup.py
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%py3_build
@ -53,6 +55,9 @@ install -D ksc.1 %{buildroot}%{_mandir}/man1/ksc.1
%{python3_sitelib}/ksc-%{version}*.egg-info
%changelog
* Mon Nov 18 2024 Čestmír Kalina <ckalina@redhat.com> - 1.12-7
- Resolves: RHEL-65759
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - Packaging variables read or set by %forgemeta
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018