diff options
author | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2023-05-15 17:10:10 +0500 |
---|---|---|
committer | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2023-05-15 17:10:10 +0500 |
commit | 99d2f61efc07bfe22c06810200b1a35f736207b2 (patch) | |
tree | 4dab066b9eec710df1834eb345d2f4241fa60395 /sys-cluster | |
parent | dev-python/python-telegram-bot: add 20.3 (diff) | |
download | guru-99d2f61efc07bfe22c06810200b1a35f736207b2.tar.gz guru-99d2f61efc07bfe22c06810200b1a35f736207b2.tar.bz2 guru-99d2f61efc07bfe22c06810200b1a35f736207b2.zip |
sys-cluster/pcs: treeclean broken pkg
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/pcs/Manifest | 2 | ||||
-rw-r--r-- | sys-cluster/pcs/files/openrc-0.10.8.patch | 429 | ||||
-rw-r--r-- | sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch | 504 | ||||
-rw-r--r-- | sys-cluster/pcs/files/pcs-0.11.initd | 35 | ||||
-rw-r--r-- | sys-cluster/pcs/files/pcsd-0.11.initd | 27 | ||||
-rw-r--r-- | sys-cluster/pcs/files/pcsd-daemon.initd | 27 | ||||
-rw-r--r-- | sys-cluster/pcs/files/pcsd-daemon.service.patch | 19 | ||||
-rw-r--r-- | sys-cluster/pcs/files/pcsd.initd | 35 | ||||
-rw-r--r-- | sys-cluster/pcs/files/remove-ruby-bundle-path.patch | 11 | ||||
-rw-r--r-- | sys-cluster/pcs/files/remove_bashism.patch | 35 | ||||
-rw-r--r-- | sys-cluster/pcs/metadata.xml | 16 | ||||
-rw-r--r-- | sys-cluster/pcs/pcs-0.10.8-r3.ebuild | 119 | ||||
-rw-r--r-- | sys-cluster/pcs/pcs-0.11.2.ebuild | 113 |
13 files changed, 0 insertions, 1372 deletions
diff --git a/sys-cluster/pcs/Manifest b/sys-cluster/pcs/Manifest deleted file mode 100644 index 3b8504e14..000000000 --- a/sys-cluster/pcs/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST pcs-0.10.8.tar.gz 1852902 BLAKE2B ef023ca27c2dbd1d765e1d68f67a55c79f57b1dbc7d571b8f21e1c30f8a8510b1148459a0e683c682fb969c7635ef726c8e227b995d1a35dfd27894f40bdaa26 SHA512 8b9ba62279431e481d062e804d24480d2a274d2f4897a82149df6116ff3df2394d97a3ee77a6dee4c563d915bab0142124a8942524fcc4e894912086e865353c -DIST pcs-0.11.2.tar.gz 1412048 BLAKE2B f94459516f3ad29061a80b3fbeb228eef687c7cbb181bd0af219e410d53b7618eb029a52d4cab8599511455183ecbc01e64ef3d5735350834bccf51b51aa291c SHA512 ee610a7626de8c6abeffc23943fd95250c8550bbff946cffed8f18748bb862694f7cbc384127e0f062f121f3c31b8197b4b5d4eb150c3efcb8045809e54c0bf5 diff --git a/sys-cluster/pcs/files/openrc-0.10.8.patch b/sys-cluster/pcs/files/openrc-0.10.8.patch deleted file mode 100644 index 905d700c3..000000000 --- a/sys-cluster/pcs/files/openrc-0.10.8.patch +++ /dev/null @@ -1,429 +0,0 @@ ---- a/pcs/lib/external.py -+++ b/pcs/lib/external.py -@@ -13,8 +13,8 @@ - from pcs.lib.errors import LibraryError - - --_chkconfig = settings.chkconfig_binary --_service = settings.service_binary -+_rc_config = settings.rc_config_binary -+_rc_service = settings.rc_service_binary - _systemctl = settings.systemctl_binary - - -@@ -192,7 +192,7 @@ - [_systemctl, "disable", _get_service_name(service, instance)] - ) - else: -- stdout, stderr, retval = runner.run([_chkconfig, service, "off"]) -+ stdout, stderr, retval = runner.run([_rc_config, 'delete', service, "default"]) - if retval != 0: - raise DisableServiceError( - service, join_multilines([stderr, stdout]), instance -@@ -214,7 +214,7 @@ - [_systemctl, "enable", _get_service_name(service, instance)] - ) - else: -- stdout, stderr, retval = runner.run([_chkconfig, service, "on"]) -+ stdout, stderr, retval = runner.run([_rc_config, 'add', service, "default"]) - if retval != 0: - raise EnableServiceError( - service, join_multilines([stderr, stdout]), instance -@@ -234,7 +234,7 @@ - [_systemctl, "start", _get_service_name(service, instance)] - ) - else: -- stdout, stderr, retval = runner.run([_service, service, "start"]) -+ stdout, stderr, retval = runner.run([_rc_service, service, "start"]) - if retval != 0: - raise StartServiceError( - service, join_multilines([stderr, stdout]), instance -@@ -254,7 +254,7 @@ - [_systemctl, "stop", _get_service_name(service, instance)] - ) - else: -- stdout, stderr, retval = runner.run([_service, service, "stop"]) -+ stdout, stderr, retval = runner.run([_rc_service, service, "stop"]) - if retval != 0: - raise StopServiceError( - service, join_multilines([stderr, stdout]), instance -@@ -295,8 +295,12 @@ - [_systemctl, "is-enabled", _get_service_name(service, instance)] - ) - else: -- dummy_stdout, dummy_stderr, retval = runner.run([_chkconfig, service]) -- -+ stdout, dummy_stderr, dummy_retval = runner.run([_rc_config, 'list', 'default']) -+ retval = 1 -+ for line in stdout.splitlines(): -+ line = line.split(' ')[0] -+ if service == line: -+ retval = 0 - return retval == 0 - - -@@ -316,7 +320,7 @@ - ) - else: - dummy_stdout, dummy_stderr, retval = runner.run( -- [_service, service, "status"] -+ [_rc_service, service, "status"] - ) - - return retval == 0 -@@ -344,8 +348,7 @@ - """ - if is_systemctl(): - return [] -- -- stdout, dummy_stderr, return_code = runner.run([_chkconfig]) -+ stdout, dummy_stderr, return_code = runner.run([_rc_config, "list"]) - if return_code != 0: - return [] - ---- a/pcs/settings_default.py -+++ b/pcs/settings_default.py -@@ -1,8 +1,8 @@ - import os.path - - systemctl_binary = "/bin/systemctl" --chkconfig_binary = "/sbin/chkconfig" --service_binary = "/sbin/service" -+rc_config_binary = "/usr/bin/rc-config" -+rc_service_binary = "/sbin/rc-service" - pacemaker_binaries = "/usr/sbin/" - crm_resource_binary = os.path.join(pacemaker_binaries, "crm_resource") - corosync_binaries = "/usr/sbin/" -@@ -41,7 +41,7 @@ - crm_mon_schema = "/usr/share/pacemaker/crm_mon.rng" - agent_metadata_schema = "/usr/share/resource-agents/ra-api-1.dtd" - pcsd_var_location = "/var/lib/pcsd/" --pcsd_ruby_socket = "/run/pcsd-ruby.socket" -+pcsd_ruby_socket = "/run/pcsd-daemon.socket" - pcsd_cert_location = os.path.join(pcsd_var_location, "pcsd.crt") - pcsd_key_location = os.path.join(pcsd_var_location, "pcsd.key") - pcsd_known_hosts_location = os.path.join(pcsd_var_location, "known-hosts") -@@ -59,7 +59,7 @@ - pacemaker_gname = "haclient" - sbd_binary = "/usr/sbin/sbd" - sbd_watchdog_default = "/dev/watchdog" --sbd_config = "/etc/sysconfig/sbd" -+sbd_config = "/etc/default/sbd" - # this limit is also mentioned in docs, change there as well - sbd_max_device_num = 3 - # message types are also mentioned in docs, change there as well ---- a/pcs/settings.py.debian -+++ b/pcs/settings.py.debian -@@ -1,10 +1,10 @@ - from pcs.settings_default import * --service_binary = "/usr/sbin/service" -+rc-service_binary = "/sbin/rc-service" - corosync_log_file = "/var/log/corosync/corosync.log" --pacemaker_schedulerd = "/usr/lib/pacemaker/pacemaker-schedulerd" --pacemaker_controld = "/usr/lib/pacemaker/pacemaker-controld" --pacemaker_based = "/usr/lib/pacemaker/pacemaker-based" --pacemaker_fenced = "/usr/lib/pacemaker/pacemaker-fenced" -+pacemaker_schedulerd = "/usr/libexec/pacemaker/pacemaker-schedulerd" -+pacemaker_controld = "/usr/libexec/pacemaker/pacemaker-controld" -+pacemaker_based = "/usr/libexec/pacemaker/pacemaker-based" -+pacemaker_fenced = "/usr/libexec/pacemaker/pacemaker-fenced" - pcsd_exec_location = "/usr/share/pcsd/" - pcsd_gem_path = None - pcsd_config = "/etc/default/pcsd" ---- a/pcs/utils.py -+++ b/pcs/utils.py -@@ -2187,7 +2187,7 @@ - ) - else: - stdout, stderr, retval = cmd_runner().run( -- [settings.service_binary, service, "start"] -+ [settings.rc_service_binary, service, "start"] - ) - return join_multilines([stderr, stdout]), retval - -@@ -2202,7 +2202,7 @@ - ) - else: - stdout, stderr, retval = cmd_runner().run( -- [settings.service_binary, service, "stop"] -+ [settings.rc_service_binary, service, "stop"] - ) - return join_multilines([stderr, stdout]), retval - ---- a/pcsd/pcs.rb -+++ b/pcsd/pcs.rb -@@ -1708,11 +1708,22 @@ - def is_service_enabled?(service) - if ISSYSTEMCTL - cmd = ['systemctl', 'is-enabled', "#{service}.service"] -+ _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) -+ return (retcode == 0) - else -- cmd = ['chkconfig', service] -+ cmd = ['rc-config', 'list', 'default'] -+ stdout, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) -+ if retcode != 0 -+ return false -+ end -+ stdout.each { |line| -+ line = line.split(' ') -+ if line[0] == service -+ return true -+ end -+ } -+ return false - end -- _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) -- return (retcode == 0) - end - - def is_service_running?(service) -@@ -1722,7 +1733,7 @@ - # encoding/decoding errors. We are not interested in the lines anyway. - cmd = ['systemctl', 'status', '--lines=0', "#{service}.service"] - else -- cmd = ['service', service, 'status'] -+ cmd = ['rc-service', service, 'status'] - end - _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) - return (retcode == 0) -@@ -1775,7 +1786,8 @@ - class ServiceInstalledCheckerChkconfig < ServiceInstalledChecker - protected - def run_command -- return run_cmd(PCSAuth.getSuperuserAuth(), 'chkconfig') -+ cmd = ['rc-config', 'list'] -+ return run_cmd(PCSAuth.getSuperuserAuth(), *cmd) - end - - def contains_line_service?(line, service) -@@ -1802,7 +1814,7 @@ - cmd = ['systemctl', 'enable', "#{service}.service"] - else - # fails when the service is not installed -- cmd = ['chkconfig', service, 'on'] -+ cmd = ['rc-config', 'add', service, 'default'] - end - _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) - return (retcode == 0) -@@ -1817,7 +1829,7 @@ - if ISSYSTEMCTL - cmd = ['systemctl', 'disable', "#{service}.service"] - else -- cmd = ['chkconfig', service, 'off'] -+ cmd = ['rc-config', 'delete', service, 'default'] - end - _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) - return (retcode == 0) -@@ -1827,7 +1839,7 @@ - if ISSYSTEMCTL - cmd = ['systemctl', 'start', "#{service}.service"] - else -- cmd = ['service', service, 'start'] -+ cmd = ['rc-service', service, 'start'] - end - _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) - return (retcode == 0) -@@ -1840,7 +1852,7 @@ - if ISSYSTEMCTL - cmd = ['systemctl', 'stop', "#{service}.service"] - else -- cmd = ['service', service, 'stop'] -+ cmd = ['rc-service', service, 'stop'] - end - _, _, retcode = run_cmd(PCSAuth.getSuperuserAuth(), *cmd) - return (retcode == 0) ---- a/pcsd/settings.rb -+++ b/pcsd/settings.rb -@@ -3,7 +3,7 @@ - PCSD_EXEC_LOCATION = '/usr/lib/pcsd/' - PCSD_VAR_LOCATION = '/var/lib/pcsd/' - PCSD_DEFAULT_PORT = 2224 --PCSD_RUBY_SOCKET = '/run/pcsd-ruby.socket' -+PCSD_RUBY_SOCKET = '/run/pcsd-daemon.socket' - - CRT_FILE = PCSD_VAR_LOCATION + 'pcsd.crt' - KEY_FILE = PCSD_VAR_LOCATION + 'pcsd.key' ---- a/pcsd/settings.rb.debian -+++ b/pcsd/settings.rb.debian -@@ -3,7 +3,7 @@ - PCSD_EXEC_LOCATION = '/usr/share/pcsd/' - PCSD_VAR_LOCATION = '/var/lib/pcsd/' - PCSD_DEFAULT_PORT = 2224 --PCSD_RUBY_SOCKET = '/run/pcsd-ruby.socket' -+PCSD_RUBY_SOCKET = '/run/pcsd-daemon.socket' - - CRT_FILE = PCSD_VAR_LOCATION + 'pcsd.crt' - KEY_FILE = PCSD_VAR_LOCATION + 'pcsd.key' ---- a/pcs_test/tier0/lib/test_external.py -+++ b/pcs_test/tier0/lib/test_external.py -@@ -16,8 +16,8 @@ - import pcs.lib.external as lib - - --_chkconfig = settings.chkconfig_binary --_service = settings.service_binary -+_rc_config = settings.rc_config_binary -+_rc_service = settings.rc_service_binary - _systemctl = settings.systemctl_binary - - -@@ -415,7 +415,7 @@ - self.mock_runner, self.service, None - ) - self.mock_runner.run.assert_called_once_with( -- [_chkconfig, self.service, "off"] -+ [_rc_config, "delete", self.service, "default"] - ) - - def test_not_systemctl_failed(self, mock_is_installed, mock_systemctl): -@@ -430,7 +430,7 @@ - self.mock_runner, self.service, None - ) - self.mock_runner.run.assert_called_once_with( -- [_chkconfig, self.service, "off"] -+ [_rc_config, "delete", self.service, "default"] - ) - - def test_systemctl_not_installed(self, mock_is_installed, mock_systemctl): -@@ -480,7 +480,7 @@ - self.mock_runner, self.service, instance - ) - self.mock_runner.run.assert_called_once_with( -- [_chkconfig, self.service, "off"] -+ [_rc_config, "delete", self.service, "default"] - ) - - -@@ -514,7 +514,7 @@ - self.mock_runner.run.return_value = ("", "", 0) - lib.enable_service(self.mock_runner, self.service) - self.mock_runner.run.assert_called_once_with( -- [_chkconfig, self.service, "on"] -+ [_rc_config, "add", self.service, "default"] - ) - - def test_not_systemctl_failed(self, mock_systemctl): -@@ -525,7 +525,7 @@ - lambda: lib.enable_service(self.mock_runner, self.service), - ) - self.mock_runner.run.assert_called_once_with( -- [_chkconfig, self.service, "on"] -+ [_rc_config, "add", self.service, "default"] - ) - - def test_instance_systemctl(self, mock_systemctl): -@@ -545,7 +545,7 @@ - self.mock_runner.run.return_value = ("", "", 0) - lib.enable_service(self.mock_runner, self.service, instance="test") - self.mock_runner.run.assert_called_once_with( -- [_chkconfig, self.service, "on"] -+ [_rc_config, "add", self.service, "default"] - ) - - -@@ -579,7 +579,7 @@ - self.mock_runner.run.return_value = ("Starting...", "", 0) - lib.start_service(self.mock_runner, self.service) - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "start"] -+ [_rc_service, self.service, "start"] - ) - - def test_not_systemctl_failed(self, mock_systemctl): -@@ -590,7 +590,7 @@ - lambda: lib.start_service(self.mock_runner, self.service), - ) - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "start"] -+ [_rc_service, self.service, "start"] - ) - - def test_instance_systemctl(self, mock_systemctl): -@@ -610,7 +610,7 @@ - self.mock_runner.run.return_value = ("Starting...", "", 0) - lib.start_service(self.mock_runner, self.service, instance="test") - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "start"] -+ [_rc_service, self.service, "start"] - ) - - -@@ -644,7 +644,7 @@ - self.mock_runner.run.return_value = ("Stopping...", "", 0) - lib.stop_service(self.mock_runner, self.service) - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "stop"] -+ [_rc_service, self.service, "stop"] - ) - - def test_not_systemctl_failed(self, mock_systemctl): -@@ -655,7 +655,7 @@ - lambda: lib.stop_service(self.mock_runner, self.service), - ) - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "stop"] -+ [_rc_service, self.service, "stop"] - ) - - def test_instance_systemctl(self, mock_systemctl): -@@ -671,7 +671,7 @@ - self.mock_runner.run.return_value = ("Stopping...", "", 0) - lib.stop_service(self.mock_runner, self.service, instance="test") - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "stop"] -+ [_rc_service, self.service, "stop"] - ) - - -@@ -734,13 +734,13 @@ - mock_systemctl.return_value = False - self.mock_runner.run.return_value = ("", "", 0) - self.assertTrue(lib.is_service_enabled(self.mock_runner, self.service)) -- self.mock_runner.run.assert_called_once_with([_chkconfig, self.service]) -+ self.mock_runner.run.assert_called_once_with([_rc_config, self.service]) - - def test_not_systemctl_disabled(self, mock_systemctl): - mock_systemctl.return_value = False - self.mock_runner.run.return_value = ("", "", 3) - self.assertFalse(lib.is_service_enabled(self.mock_runner, self.service)) -- self.mock_runner.run.assert_called_once_with([_chkconfig, self.service]) -+ self.mock_runner.run.assert_called_once_with([_rc_config, self.service]) - - - @mock.patch("pcs.lib.external.is_systemctl") -@@ -770,7 +770,7 @@ - self.mock_runner.run.return_value = ("is running", "", 0) - self.assertTrue(lib.is_service_running(self.mock_runner, self.service)) - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "status"] -+ [_rc_service, self.service, "status"] - ) - - def test_not_systemctl_not_running(self, mock_systemctl): -@@ -778,7 +778,7 @@ - self.mock_runner.run.return_value = ("is stopped", "", 3) - self.assertFalse(lib.is_service_running(self.mock_runner, self.service)) - self.mock_runner.run.assert_called_once_with( -- [_service, self.service, "status"] -+ [_rc_service, self.service, "status"] - ) - - -@@ -942,14 +942,14 @@ - ["pcsd", "sbd", "pacemaker"], - ) - self.assertEqual(mock_is_systemctl.call_count, 1) -- self.mock_runner.run.assert_called_once_with([_chkconfig]) -+ self.mock_runner.run.assert_called_once_with([_rc_config]) - - def test_failed(self, mock_is_systemctl): - mock_is_systemctl.return_value = False - self.mock_runner.run.return_value = ("stdout", "failed", 1) - self.assertEqual(lib.get_non_systemd_services(self.mock_runner), []) - self.assertEqual(mock_is_systemctl.call_count, 1) -- self.mock_runner.run.assert_called_once_with([_chkconfig]) -+ self.mock_runner.run.assert_called_once_with([_rc_config]) - - def test_systemd(self, mock_is_systemctl): - mock_is_systemctl.return_value = True diff --git a/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch b/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch deleted file mode 100644 index 142eca091..000000000 --- a/sys-cluster/pcs/files/pcs-0.11-gentoo-support.patch +++ /dev/null @@ -1,504 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -89,17 +89,17 @@ - ]) - - # check for systemd --PKG_CHECK_MODULES([systemd], [systemd]) --PCS_PKG_CHECK_VAR([SYSTEMD_UNIT_DIR_TMP], [systemd], [systemdsystemunitdir], [/usr/lib/systemd/system]) --if test "${prefix}" != "/usr"; then -- SYSTEMD_UNIT_DIR="${prefix}/$SYSTEMD_UNIT_DIR_TMP" --else -- SYSTEMD_UNIT_DIR="$SYSTEMD_UNIT_DIR_TMP" --fi --AC_SUBST([SYSTEMD_UNIT_DIR]) --PCS_PKG_CHECK_VAR([SYSTEMD_UNIT_PATH], [systemd], [systemdsystemunitpath], -- [/etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system]) --AC_SUBST([SYSTEMD_UNIT_PATH]) -+#PKG_CHECK_MODULES([systemd], [systemd]) -+#PCS_PKG_CHECK_VAR([SYSTEMD_UNIT_DIR_TMP], [systemd], [systemdsystemunitdir], [/usr/lib/systemd/system]) -+#if test "${prefix}" != "/usr"; then -+# SYSTEMD_UNIT_DIR="${prefix}/$SYSTEMD_UNIT_DIR_TMP" -+#else -+# SYSTEMD_UNIT_DIR="$SYSTEMD_UNIT_DIR_TMP" -+#fi -+#AC_SUBST([SYSTEMD_UNIT_DIR]) -+#PCS_PKG_CHECK_VAR([SYSTEMD_UNIT_PATH], [systemd], [systemdsystemunitpath], -+# [/etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system]) -+#AC_SUBST([SYSTEMD_UNIT_PATH]) - - # check for ruby - AC_PATH_PROG([RUBY], [ruby]) -@@ -217,6 +217,15 @@ - DISTROEXT=fedora - break - ;; -+ gentoo) -+ FOUND_DISTRO=1 -+ CONFIGDIR="$sysconfdir/default" -+ PCSLIBDIR="$prefix/share" -+ PCMKDAEMONDIR="$prefix/libexec/pacemaker" -+ COROSYNCLOGDIR="$localstatedir/log/corosync" -+ DISTROEXT=gentoo -+ break -+ ;; - esac - done - -@@ -396,9 +405,9 @@ - fi - AC_PATH_PROG([SYSTEMCTL], [systemctl]) - if test "x$SYSTEMCTL" = "x"; then -- AC_PATH_PROG([SERVICE], [service]) -+ AC_PATH_PROG([SERVICE], [rc-service]) - if test "x$SERVICE" = "x"; then -- AC_MSG_ERROR([Unable to find systemctl or service in $PATH]) -+ AC_MSG_ERROR([Unable to find systemctl or rc-service in $PATH]) - fi - fi - ---- a/pcs/common/services/drivers/__init__.py -+++ b/pcs/common/services/drivers/__init__.py -@@ -1,2 +1,3 @@ - from .systemd import SystemdDriver - from .sysvinit_rhel import SysVInitRhelDriver -+from .openrc_gentoo import OpenRCGentooDriver ---- a/pcs/common/services/drivers/openrc_gentoo.py -+++ b/pcs/common/services/drivers/openrc_gentoo.py -@@ -0,0 +1,87 @@ -+import os.path -+from typing import ( -+ List, -+ Optional, -+) -+ -+from .. import errors -+from ..interfaces import ( -+ ExecutorInterface, -+ ServiceManagerInterface, -+) -+ -+ -+class OpenRCGentooDriver(ServiceManagerInterface): -+ def __init__( -+ self, executor: ExecutorInterface, rc_service_bin: str, rc_config_bin: str -+ ): -+ """ -+ executor -- external commands used by this class are executed using -+ this object -+ rc_service_bin -- path to an executable used for starting and stopping -+ services and to check if a service is running -+ rc_config_bin -- path to an executable used for enabling, disabling and -+ listing available service and to check if service is enabled -+ """ -+ self._executor = executor -+ self._rc_config_bin = rc_config_bin -+ self._rc_service_bin = rc_service_bin -+ self._available_services: List[str] = [] -+ -+ def start(self, service: str, instance: Optional[str] = None) -> None: -+ result = self._executor.run([self._rc_service_bin, service, "start"]) -+ if result.retval != 0: -+ raise errors.StartServiceError(service, result.joined_output) -+ -+ def stop(self, service: str, instance: Optional[str] = None) -> None: -+ result = self._executor.run([self._rc_service_bin, service, "stop"]) -+ if result.retval != 0: -+ raise errors.StopServiceError(service, result.joined_output) -+ -+ def enable(self, service: str, instance: Optional[str] = None) -> None: -+ result = self._executor.run([self._rc_config_bin, "add", service, "default"]) -+ if result.retval != 0: -+ raise errors.EnableServiceError(service, result.joined_output) -+ -+ def disable(self, service: str, instance: Optional[str] = None) -> None: -+ if not self.is_installed(service): -+ return -+ result = self._executor.run([self._rc_config_bin, "delete", service, "default"]) -+ if result.retval != 0: -+ raise errors.DisableServiceError(service, result.joined_output) -+ -+ def is_enabled(self, service: str, instance: Optional[str] = None) -> bool: -+ if not self._available_services: -+ self._available_services = self._get_available_services() -+ return ( service in self._available_services ) -+ -+ def is_running(self, service: str, instance: Optional[str] = None) -> bool: -+ result = self._executor.run([self._rc_service_bin, service, "status"]).stdout -+ return( result == " * status: started" ) -+ -+ def is_installed(self, service: str) -> bool: -+ return service in self.get_available_services() -+ -+ def get_available_services(self) -> List[str]: -+ if not self._available_services: -+ self._available_services = self._get_available_services() -+ return self._available_services -+ -+ def _get_available_services(self) -> List[str]: -+ result = self._executor.run([self._rc_config_bin]) -+ if result.retval != 0: -+ return [] -+ -+ service_list = [] -+ # skip first string that say 'Init scripts to be started by runlevel default' -+ for service in result.stdout.splitlines()[1:]: -+ service = service.strip() -+ if service: -+ service_list.append(service) -+ return service_list -+ -+ def is_current_system_supported(self) -> bool: -+ return all( -+ os.path.isfile(binary) -+ for binary in (self._rc_service_bin, self._rc_config_bin) -+ ) ---- a/pcs/lib/services.py -+++ b/pcs/lib/services.py -@@ -84,6 +84,9 @@ - services.drivers.SysVInitRhelDriver( - executor, settings.service_binary, settings.chkconfig_binary - ), -+ service.drivers.OpenRCGentooDriver( -+ executor, settings.rc_config_binary, settings.rc_service_binary -+ ), - ] - - for driver in drivers: ---- a/pcs/Makefile.am -+++ b/pcs/Makefile.am -@@ -131,6 +131,7 @@ - common/services/drivers/__init__.py \ - common/services/drivers/systemd.py \ - common/services/drivers/sysvinit_rhel.py \ -+ common/services/drivers/openrc_gentoo.py \ - common/services_dto.py \ - common/services/errors.py \ - common/services/__init__.py \ ---- a/pcs/settings.py.in -+++ b/pcs/settings.py.in -@@ -4,6 +4,8 @@ - systemd_unit_path = "@SYSTEMD_UNIT_PATH@".split(":") - chkconfig_binary = "/sbin/chkconfig" - service_binary = "@SERVICE@" -+rc_config_binary = "/usr/bin/rc-config" -+rc_service_binary = "/sbin/rc-service" - # Used only in utils.py in deprecated funcion - pacemaker_binaries = "@PCMKEXECPREFIX@/sbin" - corosync_binaries = "@COROEXECPREFIX@/sbin" -@@ -52,8 +54,8 @@ - cibadmin = "@PCMKEXECPREFIX@/sbin/cibadmin" - crm_mon_schema = "@PCMK_SCHEMA_DIR@/crm_mon.rng" - pacemaker_api_result_schema = "@PCMK_SCHEMA_DIR@/api/api-result.rng" --pcsd_var_location = "@LOCALSTATEDIR@/lib/pcsd" --pcsd_ruby_socket = "@LOCALSTATEDIR@/run/pcsd-ruby.socket" -+pcsd_var_location = "/var/lib/pcsd" -+pcsd_ruby_socket = "/var/run/pcsd.socket" - pcsd_cert_location = os.path.join(pcsd_var_location, "pcsd.crt") - pcsd_key_location = os.path.join(pcsd_var_location, "pcsd.key") - pcsd_known_hosts_location = os.path.join(pcsd_var_location, "known-hosts") -@@ -63,7 +65,7 @@ - ) - pcsd_dr_config_location = os.path.join(pcsd_var_location, "disaster-recovery") - pcsd_exec_location = "@LIB_DIR@/pcsd" --pcsd_log_location = "@LOCALSTATEDIR@/log/pcsd/pcsd.log" -+pcsd_log_location = "/var/log/pcsd/pcsd.log" - pcsd_default_port = 2224 - pcsd_config = "@CONF_DIR@/pcsd" - cib_dir = "@PCMK_CIB_DIR@" ---- a/pcsd/logrotate/pcsd.in -+++ b/pcsd/logrotate/pcsd.in -@@ -1,4 +1,4 @@ --@localstatedir@/log/pcsd/*.log { -+/var/log/pcsd/*.log { - rotate 5 - weekly - missingok ---- a/pcsd/Makefile.am -+++ b/pcsd/Makefile.am -@@ -80,8 +80,8 @@ - cp -rp ../${PCSD_BUNDLED_DIR_ROOT_LOCAL}/* $(DESTDIR)${GEM_HOME} - rm -rf $(DESTDIR)${GEM_HOME}/cache - endif -- $(MKDIR_P) -m 0700 $(DESTDIR)$(localstatedir)/log/pcsd -- $(MKDIR_P) -m 0700 $(DESTDIR)$(localstatedir)/lib/pcsd -+ $(MKDIR_P) -m 0700 $(DESTDIR)/var/log/pcsd -+ $(MKDIR_P) -m 0700 $(DESTDIR)/var/lib/pcsd - - uninstall-local: - rm -rf $(DESTDIR)/$(sysconfdir)/pam.d/pcsd -@@ -89,5 +89,5 @@ - if INSTALL_EMBEDDED_GEMS - rm -rf $(DESTDIR)/${GEM_HOME} - endif -- rmdir $(DESTDIR)/$(localstatedir)/log/pcsd 2>/dev/null || : -- rmdir $(DESTDIR)/$(localstatedir)/lib/pcsd 2>/dev/null || : -+ rmdir $(DESTDIR)/var/log/pcsd 2>/dev/null || : -+ rmdir $(DESTDIR)/var/lib/pcsd 2>/dev/null || : ---- a/pcsd/pam/pcsd.gentoo -+++ b/pcsd/pam/pcsd.gentoo -@@ -0,0 +1,5 @@ -+#%PAM-1.0 -+auth include system-auth -+account include system-auth -+password include system-auth -+session include system-auth ---- a/pcsd/settings.rb.in -+++ b/pcsd/settings.rb.in -@@ -2,9 +2,9 @@ - PCS_EXEC = '@SBINDIR@/pcs' - PCS_INTERNAL_EXEC = '@LIB_DIR@/pcs/pcs_internal' - PCSD_EXEC_LOCATION = '@LIB_DIR@/pcsd' --PCSD_VAR_LOCATION = '@LOCALSTATEDIR@/lib/pcsd' -+PCSD_VAR_LOCATION = '/var/lib/pcsd' - PCSD_DEFAULT_PORT = 2224 --PCSD_RUBY_SOCKET = '@LOCALSTATEDIR@/run/pcsd-ruby.socket' -+PCSD_RUBY_SOCKET = '/var/run/pcsd.socket' - - CRT_FILE = File.join(PCSD_VAR_LOCATION, 'pcsd.crt') - KEY_FILE = File.join(PCSD_VAR_LOCATION, 'pcsd.key') ---- a/pcs_test/Makefile.am -+++ b/pcs_test/Makefile.am -@@ -101,6 +101,7 @@ - tier0/common/services/drivers/__init__.py \ - tier0/common/services/drivers/test_systemd.py \ - tier0/common/services/drivers/test_sysvinit_rhel.py \ -+ tier0/common/services/drivers/test_openrc_gentoo.py \ - tier0/common/services/__init__.py \ - tier0/common/test_file.py \ - tier0/common/test_host.py \ ---- a/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py -+++ b/pcs_test/tier0/common/services/drivers/test_openrc_gentoo.py -@@ -0,0 +1,232 @@ -+from unittest import mock, TestCase -+ -+ -+from pcs.common.services import errors -+from pcs.common.services.drivers import OpenRCGentooDriver -+from pcs.common.services.interfaces import ExecutorInterface -+from pcs.common.services.types import ExecutorResult -+ -+ -+class Base(TestCase): -+ def setUp(self): -+ self.mock_executor = mock.MagicMock(spec_set=ExecutorInterface) -+ self.service = "service_name" -+ self.instance = "instance_name" -+ self.rc_service_bin = "rc_service_bin" -+ self.rc_config_bin = "rc_config_bin" -+ self.driver = OpenRCGentooDriver( -+ self.mock_executor, self.rc_service_bin, self.rc_config_bin -+ ) -+ -+ -+class BaseTestMixin: -+ subcmd = None -+ exception = None -+ executable = None -+ driver_callback = staticmethod(lambda: None) -+ -+ def test_success(self): -+ self.mock_executor.run.return_value = ExecutorResult(0, "", "") -+ self.driver_callback(self.service) -+ self.mock_executor.run.assert_called_once_with( -+ [self.executable, self.service, self.subcmd] -+ ) -+ -+ def test_instance_success(self): -+ self.mock_executor.run.return_value = ExecutorResult(0, "", "") -+ self.driver_callback(self.service, self.instance) -+ self.mock_executor.run.assert_called_once_with( -+ [self.executable, self.service, self.subcmd] -+ ) -+ -+ def test_failure(self): -+ result = ExecutorResult(1, "stdout", "stderr") -+ self.mock_executor.run.return_value = result -+ with self.assertRaises(self.exception) as cm: -+ self.driver_callback(self.service) -+ -+ self.assertEqual(cm.exception.service, self.service) -+ self.assertEqual(cm.exception.message, result.joined_output) -+ self.assertIsNone(cm.exception.instance) -+ self.mock_executor.run.assert_called_once_with( -+ [self.executable, self.service, self.subcmd] -+ ) -+ -+ def test_instace_failure(self): -+ result = ExecutorResult(1, "stdout", "stderr") -+ self.mock_executor.run.return_value = result -+ with self.assertRaises(self.exception) as cm: -+ self.driver_callback(self.service, self.instance) -+ -+ self.assertEqual(cm.exception.service, self.service) -+ self.assertEqual(cm.exception.message, result.joined_output) -+ self.assertIsNone(cm.exception.instance) -+ self.mock_executor.run.assert_called_once_with( -+ [self.executable, self.service, self.subcmd] -+ ) -+ -+ -+class StartTest(Base, BaseTestMixin): -+ subcmd = "start" -+ exception = errors.StartServiceError -+ -+ def setUp(self): -+ super().setUp() -+ self.driver_callback = self.driver.start -+ self.executable = self.rc_service_bin -+ -+ -+class StopTest(Base, BaseTestMixin): -+ subcmd = "stop" -+ exception = errors.StopServiceError -+ -+ def setUp(self): -+ super().setUp() -+ self.driver_callback = self.driver.stop -+ self.executable = self.service_bin -+ -+ -+class EnableTest(Base, BaseTestMixin): -+ subcmd = "on" -+ exception = errors.EnableServiceError -+ -+ def setUp(self): -+ super().setUp() -+ self.driver_callback = self.driver.enable -+ self.executable = self.rc_config_bin -+ -+ -+class DisableTest(Base, BaseTestMixin): -+ subcmd = "off" -+ exception = errors.DisableServiceError -+ -+ def setUp(self): -+ super().setUp() -+ # pylint: disable=protected-access -+ self.driver._available_services = [self.service] -+ self.driver_callback = self.driver.disable -+ self.executable = self.rc_config_bin -+ -+ def test_not_intalled(self): -+ # pylint: disable=protected-access -+ self.driver._available_services = [f"not_{self.service}"] -+ self.driver_callback(self.service) -+ self.mock_executor.run.assert_not_called() -+ -+ -+class IsEnabledTest(Base): -+ def test_enabled(self): -+ self.mock_executor.run.return_value = ExecutorResult(0, "", "") -+ self.assertTrue(self.driver.is_enabled(self.service)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_config_bin, self.service] -+ ) -+ -+ def test_instance_enabled(self): -+ self.mock_executor.run.return_value = ExecutorResult(0, "", "") -+ self.assertTrue(self.driver.is_enabled(self.service, self.instance)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_config_bin, self.service] -+ ) -+ -+ def test_disabled(self): -+ self.mock_executor.run.return_value = ExecutorResult(3, "", "") -+ self.assertFalse(self.driver.is_enabled(self.service)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_config_bin, self.service] -+ ) -+ -+ def test_failure(self): -+ self.mock_executor.run.return_value = ExecutorResult(1, "", "") -+ self.assertFalse(self.driver.is_enabled(self.service)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_config_bin, self.service] -+ ) -+ -+ -+class IsRunningTest(Base): -+ def test_running(self): -+ self.mock_executor.run.return_value = ExecutorResult( -+ 0, " * status: started", "" -+ ) -+ self.assertTrue(self.driver.is_running(self.service)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_service_bin, self.service, "status"] -+ ) -+ -+ def test_instance_running(self): -+ self.mock_executor.run.return_value = ExecutorResult( -+ 0, " * status: started", "" -+ ) -+ self.assertTrue(self.driver.is_running(self.service, self.instance)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_service_bin, self.service, "status"] -+ ) -+ -+ def test_not_running(self): -+ self.mock_executor.run.return_value = ExecutorResult( -+ 0, " * status: stopped", "" -+ ) -+ self.assertFalse(self.driver.is_running(self.service)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_service_bin, self.service, "status"] -+ ) -+ -+ def test_failure(self): -+ self.mock_executor.run.return_value = ExecutorResult(1, "", "error") -+ self.assertFalse(self.driver.is_running(self.service)) -+ self.mock_executor.run.assert_called_once_with( -+ [self.rc_service_bin, self.service, "status"] -+ ) -+ -+ -+class IsInstalledTest(Base): -+ def test_installed(self): -+ output = ( -+ "Init scripts to be started by runlevel default\n" -+ " service1\n" -+ " abc\n" -+ " xyz\n" -+ f" {self.service}\n" -+ ) -+ self.mock_executor.run.return_value = ExecutorResult(0, output, "") -+ self.assertTrue(self.driver.is_installed(self.service)) -+ # Intentionally called twice to make sure that unit files listing is -+ # done only once -+ self.assertTrue(self.driver.is_installed(self.service)) -+ self.mock_executor.run.assert_called_once_with([self.rc_config_bin]) -+ -+ def test_not_installed(self): -+ output = ( -+ "Init scripts to be started by runlevel default\n" -+ " service1\n" -+ " abc\n" -+ " xyz\n" -+ ) -+ self.mock_executor.run.return_value = ExecutorResult(0, output, "") -+ self.assertFalse(self.driver.is_installed(self.service)) -+ # Intentionally called twice to make sure that unit files listing is -+ # done only once -+ self.assertFalse(self.driver.is_installed(self.service)) -+ self.mock_executor.run.assert_called_once_with([self.rc_config_bin]) -+ -+ -+class GetAvailableServicesTest(Base): -+ def test_success(self): -+ output = ( -+ "Init scripts to be started by runlevel default\n" -+ " service1\n" -+ " abc\n" -+ " xyz\n" -+ ) -+ self.mock_executor.run.return_value = ExecutorResult(0, output, "") -+ self.assertEqual( -+ self.driver.get_available_services(), -+ ["service1", "abc", "xyz"], -+ ) -+ self.mock_executor.run.assert_called_once_with([self.rc_config_bin]) -+ -+ def test_failure(self): -+ self.mock_executor.run.return_value = ExecutorResult(1, "", "error") -+ self.assertEqual(self.driver.get_available_services(), []) -+ self.mock_executor.run.assert_called_once_with([self.rc_config_bin]) diff --git a/sys-cluster/pcs/files/pcs-0.11.initd b/sys-cluster/pcs/files/pcs-0.11.initd deleted file mode 100644 index 38aa0c9d6..000000000 --- a/sys-cluster/pcs/files/pcs-0.11.initd +++ /dev/null @@ -1,35 +0,0 @@ -#!/sbin/openrc-run -# Copyright 2019-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -name="pcs" -description="Pacemaker & Corosync configuration daemon" -command=/usr/sbin/pcs -command_args="${pcsd_args}" - -PIDFILE=/var/run/$name.pid - -# load defaults -if [ -f /etc/default/pcsd ]; then . /etc/default/pcsd; fi - -depend() { - need net pcsd - use syslog -} - -start() { - nc=0 - ebegin "Starting $description" - - mkdir -p /var/run - - start-stop-daemon --start -q --exec $command $command_args \ - --pidfile "${PIDFILE}" --make-pidfile --background - eend $? -} - -stop() { - ebegin "Stopping $description" - start-stop-daemon --stop -q --pidfile "${PIDFILE}" - eend $? -} diff --git a/sys-cluster/pcs/files/pcsd-0.11.initd b/sys-cluster/pcs/files/pcsd-0.11.initd deleted file mode 100644 index da144d8e0..000000000 --- a/sys-cluster/pcs/files/pcsd-0.11.initd +++ /dev/null @@ -1,27 +0,0 @@ -#!/sbin/openrc-run -# Copyright 2019-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -name="pcsd" -description="PCS GUI and remote configuration interface (Ruby)" -command=/usr/sbin/pcsd -command_args="${pcsd_args}" - -PIDFILE=/var/run/$name.pid - -start() { - nc=0 - ebegin "Starting $description" - - mkdir -p /var/run - - start-stop-daemon --start -q --exec $command $command_args \ - --pidfile "${PIDFILE}" --make-pidfile --background - eend $? -} - -stop() { - ebegin "Stopping $description" - start-stop-daemon --stop -q --pidfile "${PIDFILE}" - eend $? -} diff --git a/sys-cluster/pcs/files/pcsd-daemon.initd b/sys-cluster/pcs/files/pcsd-daemon.initd deleted file mode 100644 index 1e93f85c1..000000000 --- a/sys-cluster/pcs/files/pcsd-daemon.initd +++ /dev/null @@ -1,27 +0,0 @@ -#!/sbin/openrc-run -# Copyright 2019-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -name="pcsd-daemon" -description="PCS GUI and remote configuration interface (Ruby)" -command=/usr/lib/pcsd/pcsd -command_args="${pcsd_args}" - -PIDFILE=/var/run/$name.pid - -start() { - nc=0 - ebegin "Starting $description" - - mkdir -p /var/run - - start-stop-daemon --start -q --exec $command $command_args \ - --pidfile "${PIDFILE}" --make-pidfile --background - eend $? -} - -stop() { - ebegin "Stopping $description" - start-stop-daemon --stop -q --pidfile "${PIDFILE}" - eend $? -} diff --git a/sys-cluster/pcs/files/pcsd-daemon.service.patch b/sys-cluster/pcs/files/pcsd-daemon.service.patch deleted file mode 100644 index 98f27716d..000000000 --- a/sys-cluster/pcs/files/pcsd-daemon.service.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/pcsd/pcsd-ruby.service -+++ b/pcsd/pcsd-ruby.service -@@ -5,13 +5,12 @@ - Requires=network-online.target - After=network-online.target - # Stop the service automatically if nothing that depends on it is running --StopWhenUnneeded=true --# When stopping or restarting pcsd, stop or restart pcsd-ruby as well -+StopWhenUnneeded=false -+# When stopping or restarting pcsd, stop or restart pcsd-daemon as well - PartOf=pcsd.service - - [Service] --EnvironmentFile=/etc/sysconfig/pcsd --Environment=GEM_HOME=/usr/lib/pcsd/vendor/bundle/ruby -+EnvironmentFile=/etc/default/pcsd - # This file holds the selinux context - ExecStart=/usr/lib/pcsd/pcsd - Type=notify diff --git a/sys-cluster/pcs/files/pcsd.initd b/sys-cluster/pcs/files/pcsd.initd deleted file mode 100644 index 9f3010baf..000000000 --- a/sys-cluster/pcs/files/pcsd.initd +++ /dev/null @@ -1,35 +0,0 @@ -#!/sbin/openrc-run -# Copyright 2019-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -name="pcsd" -description="Pacemaker & Corosync configuration daemon" -command=/usr/sbin/pcsd -command_args="${pcsd_args}" - -PIDFILE=/var/run/$name.pid - -# load defaults -if [ -f /etc/default/pcsd ]; then source /etc/default/pcsd; fi - -depend() { - need net pcsd-daemon - use syslog -} - -start() { - nc=0 - ebegin "Starting $description" - - mkdir -p /var/run - - start-stop-daemon --start -q --exec $command $command_args \ - --pidfile "${PIDFILE}" --make-pidfile --background - eend $? -} - -stop() { - ebegin "Stopping $description" - start-stop-daemon --stop -q --pidfile "${PIDFILE}" - eend $? -} diff --git a/sys-cluster/pcs/files/remove-ruby-bundle-path.patch b/sys-cluster/pcs/files/remove-ruby-bundle-path.patch deleted file mode 100644 index bf54e59f0..000000000 --- a/sys-cluster/pcs/files/remove-ruby-bundle-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pcs/settings_default.py -+++ b/pcs/settings_default.py -@@ -81,7 +81,7 @@ - ]) - # Set pcsd_gem_path to None if there are no bundled ruby gems and the path does - # not exists. --pcsd_gem_path = "vendor/bundle/ruby" -+pcsd_gem_path = "" - ruby_executable = "/usr/bin/ruby" - - gui_session_lifetime_seconds = 60 * 60 diff --git a/sys-cluster/pcs/files/remove_bashism.patch b/sys-cluster/pcs/files/remove_bashism.patch deleted file mode 100644 index cfed6026c..000000000 --- a/sys-cluster/pcs/files/remove_bashism.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 73e90ae7f31600ff9c0edf0aed3cace9cd8c8a35 Mon Sep 17 00:00:00 2001 -From: Alessandro Barbieri <lssndrbarbieri@gmail.com> -Date: Thu, 7 Apr 2022 17:02:55 +0200 -Subject: [PATCH] remove bashisms - -`==` is not POSIX ---- a/m4/ac_compare_versions.m4 -+++ b/m4/ac_compare_versions.m4 -@@ -6,7 +6,7 @@ dnl op can be: - dnl - dnl lt or < - dnl le or <= --dnl eq or == -+dnl eq or = - dnl ge or >= - dnl gt or > - dnl -@@ -20,7 +20,7 @@ AC_DEFUN([AC_COMPARE_VERSIONS],[ - verA="$1" - op="$2" - verB="$3" -- if test "x$verA" == "x" || test "x$verB" == "x" || test "x$op" == x; then -+ if test "x$verA" = "x" || test "x$verB" = "x" || test "x$op" = x; then - AC_MSG_ERROR([ac_compare_versions: Missing parameters]) - fi - case "$op" in -@@ -36,7 +36,7 @@ AC_DEFUN([AC_COMPARE_VERSIONS],[ - result=true - fi - ;; -- "eq"|"==") -+ "eq"|"=") - if test "$verB" = "$verA"; then - result=true - fi diff --git a/sys-cluster/pcs/metadata.xml b/sys-cluster/pcs/metadata.xml deleted file mode 100644 index f24619a8b..000000000 --- a/sys-cluster/pcs/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>andrea.postiglione@gmail.com</email> - <name>Andrea Postiglione</name> - </maintainer> - <longdescription lang="en"> - Pcs is a Corosync and Pacemaker configuration tool. It permits users to easily view, modify and - create Pacemaker based clusters. Pcs contains pcsd, a pcs daemon, which operates as a remote server - for pcs and provides a web UI. - </longdescription> - <upstream> - <remote-id type="github">ClusterLabs/pcs</remote-id> - </upstream> -</pkgmetadata> diff --git a/sys-cluster/pcs/pcs-0.10.8-r3.ebuild b/sys-cluster/pcs/pcs-0.10.8-r3.ebuild deleted file mode 100644 index f673bd28a..000000000 --- a/sys-cluster/pcs/pcs-0.10.8-r3.ebuild +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 2019-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_10 ) -USE_RUBY="ruby26 ruby27" - -inherit python-single-r1 ruby-ng systemd - -DESCRIPTION="Pacemaker/Corosync Configuration System" -HOMEPAGE="https://github.com/ClusterLabs/pcs" -SRC_URI="https://github.com/ClusterLabs/pcs/archive/v${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/all/${P}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" -IUSE="systemd" - -DEPEND=" - dev-libs/libffi - media-libs/fontconfig -" -RDEPEND=" - ${DEPEND} - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/distro[${PYTHON_USEDEP}] - dev-python/dacite[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pycurl[${PYTHON_USEDEP}] - dev-python/pyopenssl[${PYTHON_USEDEP}] - dev-python/pyparsing[${PYTHON_USEDEP}] - dev-python/python-dateutil[${PYTHON_USEDEP}] - >=dev-python/tornado-6.0[${PYTHON_USEDEP}] - <dev-python/tornado-7.0[${PYTHON_USEDEP}] - ') - dev-libs/openssl - >=sys-cluster/corosync-3.0 - >=sys-cluster/pacemaker-2.0.0 - <sys-cluster/pacemaker-2.1.0 - sys-libs/pam - sys-process/psmisc -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -PATCHES=( - "${FILESDIR}/remove-ruby-bundle-path.patch" - "${FILESDIR}/openrc-${PV}.patch" - "${FILESDIR}/pcsd-daemon.service.patch" -) - -ruby_add_rdepend " - dev-ruby/backports - dev-ruby/bundler - dev-ruby/ethon - dev-ruby/highline - dev-ruby/json - dev-ruby/multi_json - dev-ruby/open4 - dev-ruby/rack - dev-ruby/rack-protection - dev-ruby/rack-test - dev-ruby/rubygems - dev-ruby/sinatra - dev-ruby/thor - dev-ruby/tilt - www-servers/thin -" - -src_compile() { - return -} - -src_install() { - python-single-r1_pkg_setup - # pre-create directory that is needed by 'make install' - dodir "/usr/lib/pcs" - # install files using 'make install' - - local makeopts=( - SYSTEMCTL_OVERRIDE=$(use systemd) - DESTDIR="${D}" - CONF_DIR="/etc/default/" - PREFIX="${EPREFIX}/usr/" - BUILD_GEMS=false - BUNDLE_INSTALL_PYAGENTX=false - BUNDLE_TO_INSTALL=false - ) - emake install "${makeopts[@]}" - - # mark log directories to be kept - keepdir /var/log/pcsd - keepdir /var/lib/pcsd - - # symlink the /usr/lib/pcs/pcs to /usr/sbin/pcs for pcsd - dosym ../../sbin/pcs "${EPREFIX}/usr/lib/pcs/pcs" - - # use Debian style systemd unit (with config in /etc/default/pcsd) - if use systemd ; then - systemd_newunit "${S}/pcsd/pcsd.service.debian" "pcsd.service" - systemd_newunit "${S}/pcsd/pcsd-ruby.service" "pcsd-daemon.service" - fi - # Remove Bundled systemd service - rm "${D}"/usr/lib/systemd/system/pcsd-ruby.service || die - rm "${D}"/usr/lib/systemd/system/pcsd.service || die - - # custom service file for openRC - newinitd "${FILESDIR}/pcsd.initd" pcsd - newinitd "${FILESDIR}/pcsd-daemon.initd" pcsd-daemon - - # move config files to right places - we use debian-style /etc/default - cp -a "${S}/pcs/settings.py.debian" "${D}/usr/lib/pcs/settings.py" || die - cp -a "${S}/pcsd/settings.rb.debian" "${D}/usr/lib/pcsd/settings.rb" || die - - python_optimize -} diff --git a/sys-cluster/pcs/pcs-0.11.2.ebuild b/sys-cluster/pcs/pcs-0.11.2.ebuild deleted file mode 100644 index 82bd5e8fb..000000000 --- a/sys-cluster/pcs/pcs-0.11.2.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_10 ) -USE_RUBY="ruby27" - -inherit autotools systemd python-single-r1 ruby-ng - -DESCRIPTION="Pacemaker/Corosync Configuration System" -HOMEPAGE="https://github.com/ClusterLabs/pcs" -SRC_URI="https://github.com/ClusterLabs/pcs/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/all/${P}" - -LICENSE="GPL-2" -KEYWORDS="~amd64" -SLOT=0 - -DEPEND=" - dev-libs/libffi - sys-apps/coreutils -" -RDEPEND=" - ${DEPEND} - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/dacite[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pycurl[${PYTHON_USEDEP}] - dev-python/pyparsing[${PYTHON_USEDEP}] - dev-python/python-dateutil[${PYTHON_USEDEP}] - >=dev-python/tornado-6.0[${PYTHON_USEDEP}] - <dev-python/tornado-7.0[${PYTHON_USEDEP}] - dev-python/pyagentx[${PYTHON_USEDEP}] - dev-python/cryptography[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/setuptools-scm[${PYTHON_USEDEP}] - dev-python/pip[${PYTHON_USEDEP}] - dev-python/python-dateutil[${PYTHON_USEDEP}] - dev-python/pyopenssl[${PYTHON_USEDEP}] - ') - >=sys-cluster/corosync-3.0 - >=sys-cluster/pacemaker-2.1.0 - sys-libs/pam - sys-process/psmisc -" - -ruby_add_rdepend " - dev-ruby/bundler - dev-ruby/rubygems - dev-ruby/backports - dev-ruby/power_assert - dev-ruby/daemons - dev-ruby/ethon - dev-ruby/eventmachine - dev-ruby/json - dev-ruby/mustermann - dev-ruby/open4 - dev-ruby/rack - dev-ruby/rack-protection - dev-ruby/rack-test - dev-ruby/sinatra - dev-ruby/test-unit - dev-ruby/webrick - www-servers/thin -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -PATCHES=" - ${FILESDIR}/pcs-0.11-gentoo-support.patch - ${FILESDIR}/remove_bashism.patch -" - -src_prepare() { - default - eautoreconf -} - -src_configure() { - econf -} - -src_compile() { - return -} - -src_install() { - python-single-r1_pkg_setup - - local makeopts=( - DESTDIR="${ED}" - ) - - emake install "${makeopts[@]}" - - # mark log directories to be kept - keepdir /var/log/pcsd - keepdir /var/lib/pcsd - - #fix statedir - sed -i "${D}/usr/share/pcsd/pcsd" -e 's/\/var\/lib\/lib\//\/var\/lib\//g' || die - - # custom service file for openRC - newinitd "${FILESDIR}/pcs-0.11.initd" pcs - newinitd "${FILESDIR}/pcsd-0.11.initd" pcsd - - systemd_newunit "${S}/pcsd/pcsd.service.in" "pcs.service" - systemd_newunit "${S}/pcsd/pcsd-ruby.service.in" "pcsd.service" - - python_optimize -} |