import CS ksc-1.12-4.git869a25c.el9
This commit is contained in:
parent
9e31306ccc
commit
819b2767de
57
SOURCES/0002-c9s-notifications.patch
Normal file
57
SOURCES/0002-c9s-notifications.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff --git a/ksc.py b/ksc.py
|
||||
index 4652dde..a6dc9f3 100755
|
||||
--- a/ksc.py
|
||||
+++ b/ksc.py
|
||||
@@ -631,12 +631,16 @@ class Ksc(object):
|
||||
|
||||
# Ignore undefined options in parser instead of throwing error
|
||||
class IOptParse(OptionParser):
|
||||
- def error(self, msg):
|
||||
- pass
|
||||
+ def _process_args(self, largs, rargs, values):
|
||||
+ while rargs:
|
||||
+ try:
|
||||
+ OptionParser._process_args(self,largs,rargs,values)
|
||||
+ except:
|
||||
+ pass
|
||||
|
||||
parser = IOptParse()
|
||||
- parser.add_option("-k", "--ko")
|
||||
- opts, _ = parser.parse_args(commands[0:])
|
||||
+ parser.add_option("-k", "--ko", action="append", dest="ko")
|
||||
+ opts, _ = parser.parse_args(commands)
|
||||
return opts.ko
|
||||
except Exception:
|
||||
return None
|
||||
diff --git a/utils.py b/utils.py
|
||||
index 8038076..b75e770 100644
|
||||
--- a/utils.py
|
||||
+++ b/utils.py
|
||||
@@ -377,8 +377,12 @@ def sendmail(filename, arch, mock, conf, releasename, module, subcomponent,
|
||||
return
|
||||
|
||||
body = f"Product: Red Hat Enterprise Linux {major}\n"
|
||||
- body += f"Release: Centos Stream\n"
|
||||
- body += f"Platform: {arch}\n"
|
||||
+ if releasename and len(releasename):
|
||||
+ body += f"Release: {releasename[0]}\n"
|
||||
+ if centos:
|
||||
+ body += "CentOS Stream: True\n"
|
||||
+ if arch:
|
||||
+ body += f"Platform: {arch}\n"
|
||||
|
||||
if 'group' in conf and conf['group'] != 'partner-group':
|
||||
body += f"Partner Group: {conf['group']}\n"
|
||||
@@ -387,7 +391,11 @@ def sendmail(filename, arch, mock, conf, releasename, module, subcomponent,
|
||||
body += f"Partner: {conf['partner']}\n"
|
||||
|
||||
body += "\n"
|
||||
- body += str(module) + "\n"
|
||||
+ if module:
|
||||
+ if type(module) is list:
|
||||
+ body += ", ".join(module) + "\n"
|
||||
+ else:
|
||||
+ body += str(module) + "\n"
|
||||
body += "\n"
|
||||
body += "---\n"
|
||||
body += "\n"
|
@ -8,7 +8,7 @@
|
||||
|
||||
Name: ksc
|
||||
Version: 1.12
|
||||
Release: 2%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Kernel source code checker
|
||||
Group: Development/Tools
|
||||
AutoReqProv: no
|
||||
@ -23,6 +23,7 @@ BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
Source0: https://github.com/RedHatOfficial/ksc/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
||||
Patch0: 0001-manpage.patch
|
||||
Patch1: 0002-c9s-notifications.patch
|
||||
|
||||
%description
|
||||
A kernel module source code checker to find usage of select symbols
|
||||
@ -30,6 +31,7 @@ A kernel module source code checker to find usage of select symbols
|
||||
%prep
|
||||
%forgesetup
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -48,6 +50,9 @@ install -D ksc.1 %{buildroot}%{_mandir}/man1/ksc.1
|
||||
%{python3_sitelib}/ksc-%{version}*.egg-info
|
||||
|
||||
%changelog
|
||||
* Mon Mar 06 2023 Čestmír Kalina <ckalina@redhat.com> - 1.12-3
|
||||
- Resolves: #2165820 - The email method always mark CentOS Stream as release
|
||||
|
||||
* Mon Jan 23 2023 Čestmír Kalina <ckalina@redhat.com> - 1.12-2
|
||||
- Resolves: #2066231 - add manpage docs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user