fix name cockpit_present is not defined.
Signed-off-by: cherry530 <707078654@qq.com>
This commit is contained in:
parent
652874b570
commit
1fd3cc3ed5
@ -6,7 +6,7 @@ ExcludeArch: i686
|
||||
Name: 389-ds-base
|
||||
Summary: Base 389 Directory Server
|
||||
Version: 3.1.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPLv3+
|
||||
URL: https://www.port389.org
|
||||
Source0: https://releases.pagure.org/389-ds-base/389-ds-base-%{version}.tar.bz2
|
||||
@ -15,6 +15,7 @@ Source2: 389-ds-base-devel.README
|
||||
|
||||
# Refer: https://github.com/389ds/389-ds-base/pull/5374
|
||||
Patch0: fix-dsidm-posixgroup-get_dn-fails-with-search_ext.patch
|
||||
Patch1: remove-where-cockpit_present-is-called.patch
|
||||
|
||||
BuildRequires: nspr-devel nss-devel >= 3.34 perl-generators openldap-devel libdb-devel cyrus-sasl-devel icu
|
||||
BuildRequires: libicu-devel pcre-devel cracklib-devel gcc-c++ net-snmp-devel lm_sensors-devel bzip2-devel
|
||||
@ -321,6 +322,9 @@ exit 0
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 25 2024 xu_ping <707078654@qq.com> - 3.1.1-2
|
||||
- fix name cockpit_present is not defined.
|
||||
|
||||
* Thu Aug 01 2024 yaoxin <yao_xin001@hoperun.com> - 3.1.1-1
|
||||
- Update to 3.1.1
|
||||
* Security fix for CVE-2024-6237,CVE-2024-5953,CVE-2024-3657,CVE-2024-2199
|
||||
|
||||
47
remove-where-cockpit_present-is-called.patch
Normal file
47
remove-where-cockpit_present-is-called.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From d1f5ab91be74f0c599e619d2ffbf5aa59d389e7c Mon Sep 17 00:00:00 2001
|
||||
From: cherry530 <707078654@qq.com>
|
||||
Date: Mon, 25 Nov 2024 15:38:27 +0800
|
||||
Subject: [PATCH] Remove where cockpit_present is called
|
||||
|
||||
Signed-off-by: cherry530 <707078654@qq.com>
|
||||
---
|
||||
src/lib389/lib389/cli_ctl/cockpit.py | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/src/lib389/lib389/cli_ctl/cockpit.py b/src/lib389/lib389/cli_ctl/cockpit.py
|
||||
index afc7247..13a3eae 100644
|
||||
--- a/src/lib389/lib389/cli_ctl/cockpit.py
|
||||
+++ b/src/lib389/lib389/cli_ctl/cockpit.py
|
||||
@@ -27,9 +27,6 @@ def open_firewall(inst, log, args):
|
||||
"""
|
||||
Open the firewall for Cockpit service
|
||||
"""
|
||||
- if not cockpit_present():
|
||||
- raise ValueError("The 'cockpit' package is not installed on this system")
|
||||
-
|
||||
OPEN_CMD = ['sudo', 'firewall-cmd', '--add-service=cockpit', '--permanent']
|
||||
if args.zone is not None:
|
||||
OPEN_CMD.append(f' --zone={args.zone}')
|
||||
@@ -43,9 +40,6 @@ def disable_cockpit(inst, log, args):
|
||||
"""
|
||||
Disable Cockpit socket
|
||||
"""
|
||||
- if not cockpit_present():
|
||||
- raise ValueError("The 'cockpit' package is not installed on this system")
|
||||
-
|
||||
DISABLE_CMD = ['sudo', 'systemctl', 'disable', '--now', 'cockpit.socket']
|
||||
try:
|
||||
subprocess.run(DISABLE_CMD)
|
||||
@@ -57,9 +51,6 @@ def close_firewall(inst, log, args):
|
||||
"""
|
||||
Close firewall for Cockpit service
|
||||
"""
|
||||
- if not cockpit_present():
|
||||
- raise ValueError("The 'cockpit' package is not installed on this system")
|
||||
-
|
||||
CLOSE_CMD = ['sudo', 'firewall-cmd', '--remove-service=cockpit', '--permanent']
|
||||
try:
|
||||
subprocess.run(CLOSE_CMD)
|
||||
--
|
||||
2.43.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user