diff --git a/389-ds-base.spec b/389-ds-base.spec index 18f669acacde54925456f3e8a4f346eee1e68395..683bb780625a20200d33f52262d4b9a4a8427615 100644 --- a/389-ds-base.spec +++ b/389-ds-base.spec @@ -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 - 3.1.1-1 - Update to 3.1.1 * Security fix for CVE-2024-6237,CVE-2024-5953,CVE-2024-3657,CVE-2024-2199 diff --git a/remove-where-cockpit_present-is-called.patch b/remove-where-cockpit_present-is-called.patch new file mode 100644 index 0000000000000000000000000000000000000000..463e37cf81d632c8446164ff6b3e4047e43d8317 --- /dev/null +++ b/remove-where-cockpit_present-is-called.patch @@ -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 +