Auto sync2gitlab import of pcs-0.10.14-5.el8.src.rpm

This commit is contained in:
CentOS Sources 2022-10-12 10:10:22 +00:00
parent 7476408582
commit 49115dc394
26 changed files with 2803 additions and 25 deletions

1
.gitignore vendored
View File

@ -35,3 +35,4 @@
/json-2.6.2.gem
/ruby2_keywords-0.0.5.gem
/thin-1.8.1.gem
/pcs-0.10.14.tar.gz

BIN
backports-3.23.0.gem Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,126 @@
From d6258ba9643b4d7528ceff65d433024104942a4c Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 14 Jul 2022 16:46:05 +0200
Subject: [PATCH 2/4] make booth ticket mode value case insensitive
---
pcs/lib/booth/config_validators.py | 10 ++++++++
pcs/lib/commands/booth.py | 14 +++++++++---
pcs_test/tier0/lib/commands/test_booth.py | 28 ++++++++++++++++-------
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/pcs/lib/booth/config_validators.py b/pcs/lib/booth/config_validators.py
index 99badc46..6c4a4ddc 100644
--- a/pcs/lib/booth/config_validators.py
+++ b/pcs/lib/booth/config_validators.py
@@ -100,6 +100,16 @@ def remove_ticket(conf_facade, ticket_name):
return []
+def ticket_options_normalization() -> validate.TypeNormalizeFunc:
+ return validate.option_value_normalization(
+ {
+ "mode": (
+ lambda value: value.lower() if isinstance(value, str) else value
+ )
+ }
+ )
+
+
def validate_ticket_name(ticket_name: str) -> reports.ReportItemList:
if not __TICKET_NAME_RE.search(ticket_name):
return [
diff --git a/pcs/lib/commands/booth.py b/pcs/lib/commands/booth.py
index e7891fbe..fc1454ce 100644
--- a/pcs/lib/commands/booth.py
+++ b/pcs/lib/commands/booth.py
@@ -23,7 +23,10 @@ from pcs.common.reports.item import (
)
from pcs.common.services.errors import ManageServiceError
from pcs.common.str_tools import join_multilines
-from pcs.lib import tools
+from pcs.lib import (
+ tools,
+ validate,
+)
from pcs.lib.booth import (
config_files,
config_validators,
@@ -329,17 +332,22 @@ def config_ticket_add(
booth_env = env.get_booth_env(instance_name)
try:
booth_conf = booth_env.config.read_to_facade()
+ options_pairs = validate.values_to_pairs(
+ options, config_validators.ticket_options_normalization()
+ )
report_processor.report_list(
config_validators.add_ticket(
booth_conf,
ticket_name,
- options,
+ options_pairs,
allow_unknown_options=allow_unknown_options,
)
)
if report_processor.has_errors:
raise LibraryError()
- booth_conf.add_ticket(ticket_name, options)
+ booth_conf.add_ticket(
+ ticket_name, validate.pairs_to_values(options_pairs)
+ )
booth_env.config.write_facade(booth_conf, can_overwrite=True)
except RawFileError as e:
report_processor.report(raw_file_error_report(e))
diff --git a/pcs_test/tier0/lib/commands/test_booth.py b/pcs_test/tier0/lib/commands/test_booth.py
index 2b20a199..12b169c2 100644
--- a/pcs_test/tier0/lib/commands/test_booth.py
+++ b/pcs_test/tier0/lib/commands/test_booth.py
@@ -1194,7 +1194,7 @@ class ConfigTicketAdd(TestCase, FixtureMixin):
},
)
- def test_success_ticket_options(self):
+ def assert_success_ticket_options(self, options_command, options_config):
self.config.raw_file.read(
file_type_codes.BOOTH_CONFIG,
self.fixture_cfg_path(),
@@ -1203,17 +1203,29 @@ class ConfigTicketAdd(TestCase, FixtureMixin):
self.config.raw_file.write(
file_type_codes.BOOTH_CONFIG,
self.fixture_cfg_path(),
- self.fixture_cfg_content(
- ticket_list=[
- ["ticketA", [("retries", "10"), ("timeout", "20")]]
- ]
- ),
+ self.fixture_cfg_content(ticket_list=[["ticketA", options_config]]),
can_overwrite=True,
)
commands.config_ticket_add(
- self.env_assist.get_env(),
- "ticketA",
+ self.env_assist.get_env(), "ticketA", options_command
+ )
+
+ def test_success_ticket_options(self):
+ self.assert_success_ticket_options(
{"timeout": "20", "retries": "10"},
+ [("retries", "10"), ("timeout", "20")],
+ )
+
+ def test_success_ticket_options_mode(self):
+ self.assert_success_ticket_options(
+ {"timeout": "20", "retries": "10", "mode": "manual"},
+ [("mode", "manual"), ("retries", "10"), ("timeout", "20")],
+ )
+
+ def test_success_ticket_options_mode_case_insensitive(self):
+ self.assert_success_ticket_options(
+ {"timeout": "20", "retries": "10", "mode": "MaNuAl"},
+ [("mode", "manual"), ("retries", "10"), ("timeout", "20")],
)
def test_ticket_already_exists(self):
--
2.35.3

View File

@ -0,0 +1,46 @@
From 7e44b3cd51a3a5079d0d42d91a3445f3b8ae9d17 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Fri, 15 Jul 2022 15:55:57 +0200
Subject: [PATCH 3/4] booth sync: check whether /etc/booth exists
---
pcsd/pcsd_file.rb | 6 +-----
pcsd/remote.rb | 4 ++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pcsd/pcsd_file.rb b/pcsd/pcsd_file.rb
index d82b55d2..394db59a 100644
--- a/pcsd/pcsd_file.rb
+++ b/pcsd/pcsd_file.rb
@@ -112,12 +112,8 @@ module PcsdFile
end
end
- def dir()
- return BOOTH_CONFIG_DIR
- end
-
def full_file_name()
- @full_file_name ||= File.join(self.dir, @file[:name])
+ @full_file_name ||= File.join(BOOTH_CONFIG_DIR, @file[:name])
end
end
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index 9bf96db9..b7bee7e6 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2622,6 +2622,10 @@ def booth_set_config(params, request, auth_user)
check_permissions(auth_user, Permissions::WRITE)
data = check_request_data_for_json(params, auth_user)
+ if not File.directory?(BOOTH_CONFIG_DIR)
+ raise "Configuration directory for booth '/etc/booth' is missing. Is booth installed?"
+ end
+
PcsdExchangeFormat::validate_item_map_is_Hash('files', data)
PcsdExchangeFormat::validate_item_is_Hash('file', :config, data[:config])
if data[:authfile]
--
2.35.3

View File

@ -0,0 +1,25 @@
From c00b5851a01361bd809a803ab88ff90d584d60e7 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 4 Aug 2022 15:05:41 +0200
Subject: [PATCH 1/2] fix pcs quorum device remove
---
pcsd/remote.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index b7bee7e6..74151190 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2519,7 +2519,7 @@ def qdevice_net_client_destroy(param, request, auth_user)
end
stdout, stderr, retval = run_cmd(
auth_user,
- PCS, '--' 'qdevice', 'net-client', 'destroy'
+ PCS, '--', 'qdevice', 'net-client', 'destroy'
)
if retval != 0
return [400, stderr.join('')]
--
2.37.1

View File

@ -0,0 +1,46 @@
From 667f7bb5c6221037f40dd44bc89527e478ad7f7e Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Wed, 10 Aug 2022 14:47:53 +0200
Subject: [PATCH 1/2] fix ruby socket permissions
---
pcsd/rserver.rb | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/pcsd/rserver.rb b/pcsd/rserver.rb
index c37f9df4..a54509fe 100644
--- a/pcsd/rserver.rb
+++ b/pcsd/rserver.rb
@@ -7,6 +7,29 @@ require 'thin'
require 'settings.rb'
+# Replace Thin::Backends::UnixServer:connect
+# The only change is 'File.umask(0o777)' instead of 'File.umask(0)' to properly
+# set python-ruby socket permissions
+module Thin
+ module Backends
+ class UnixServer < Base
+ def connect
+ at_exit { remove_socket_file } # In case it crashes
+ old_umask = File.umask(0o077)
+ begin
+ EventMachine.start_unix_domain_server(@socket, UnixConnection, &method(:initialize_connection))
+ # HACK EventMachine.start_unix_domain_server doesn't return the connection signature
+ # so we have to go in the internal stuff to find it.
+ @signature = EventMachine.instance_eval{@acceptors.keys.first}
+ ensure
+ File.umask(old_umask)
+ end
+ end
+ end
+ end
+end
+
+
def pack_response(response)
return [200, {}, [response.to_json.to_str]]
end
--
2.37.2

View File

@ -0,0 +1,25 @@
From ef08dbdc4f1fbf86cee3842eec5de32da5468609 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Thu, 11 Aug 2022 16:06:29 +0200
Subject: [PATCH 1/2] fix enable sbd from webui
---
pcsd/remote.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
index 74151190..a8aff853 100644
--- a/pcsd/remote.rb
+++ b/pcsd/remote.rb
@@ -2412,7 +2412,7 @@ def remote_enable_sbd(params, request, auth_user)
end
_, stderr, retcode = run_cmd(
- auth_user, PCS, *flags, '--' 'stonith', 'sbd', 'enable', *arg_list
+ auth_user, PCS, *flags, '--', 'stonith', 'sbd', 'enable', *arg_list
)
if retcode != 0
--
2.37.1

BIN
daemons-1.4.1.gem Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
From 21c9158e5ffd981914d4db1277c9047f33c0042e Mon Sep 17 00:00:00 2001
From 96e5fd66c022e6ac7803c391598423b8940c46c3 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 20 Nov 2018 15:03:56 +0100
Subject: [PATCH] do not support cluster setup with udp(u) transport
Subject: [PATCH 2/2] do not support cluster setup with udp(u) transport
---
pcs/pcs.8.in | 2 ++
@ -49,5 +49,5 @@ index 2f26e831..a7702ac4 100644
#csetup-transport-options.knet .without-knet
{
--
2.35.3
2.37.2

BIN
ethon-0.15.0.gem Normal file

Binary file not shown.

BIN
eventmachine-1.2.7.gem Normal file

Binary file not shown.

BIN
ffi-1.15.5.gem Normal file

Binary file not shown.

BIN
json-2.6.2.gem Normal file

Binary file not shown.

BIN
mustermann-1.1.1.gem Normal file

Binary file not shown.

BIN
open4-1.3.4-1.gem Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.10.13
Release: 1%{?dist}
Version: 0.10.14
Release: 5%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
@ -19,8 +19,8 @@ Summary: Pacemaker Configuration System
#building only for architectures with pacemaker and corosync available
ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
# %%global version_or_commit %%{version}
%global version_or_commit %{version}.48-15d27
%global version_or_commit %{version}
# %%global version_or_commit %%{version}.48-15d27
%global pcs_source_name %{name}-%{version_or_commit}
@ -44,7 +44,7 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
%global version_rubygem_json 2.6.2
%global version_rubygem_mustermann 1.1.1
%global version_rubygem_open4 1.3.4
%global version_rubygem_rack 2.2.3
%global version_rubygem_rack 2.2.3.1
%global version_rubygem_rack_protection 2.2.0
%global version_rubygem_rack_test 1.1.0
%global version_rubygem_rexml 3.2.5
@ -118,6 +118,12 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_modu
# pcs patches: <= 200
# Patch1: bzNUMBER-01-name.patch
Patch1: bz1786964-01-code-formatting.patch
Patch2: bz1786964-02-make-booth-ticket-mode-value-case-insensitive.patch
Patch3: bz1791670-01-booth-sync-check-whether-etc-booth-exists.patch
Patch4: bz2115326-01-fix-pcs-quorum-device-remove.patch
Patch5: bz2117650-01-fix-enable-sbd-from-webui.patch
Patch6: bz2116838-01-fix-ruby-socket-permissions.patch
# Downstream patches do not come from upstream. They adapt pcs for specific
# RHEL needs.
@ -316,6 +322,12 @@ update_times_patch(){
%autosetup -S git -n %{pcs_source_name} -N
%autopatch -p1 -M 200
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH3}
update_times_patch %{PATCH4}
update_times_patch %{PATCH5}
update_times_patch %{PATCH6}
update_times_patch %{PATCH101}
cp -f %SOURCE1 %{pcsd_public_dir}/images
@ -565,6 +577,28 @@ remove_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Mon Sep 05 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-5
- Fixed ruby socket permissions
- Resolves: rhbz#2116838
* Wed Aug 17 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-4
- Fixed enable sbd from webui
- Resolves: rhbz#2117650
* Mon Aug 08 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-3
- Fixed `pcs quorum device remove`
- Resolves: rhbz#2115326
* Thu Jul 28 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-2
- Fixed booth ticket mode value case insensitive
- Fixed booth sync check whether /etc/booth exists
- Resolves: rhbz#1786964 rhbz#1791670
* Fri Jun 24 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.14-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated bundled rubygems: rack
- Resolves: rhbz#2059500 rhbz#2096787 rhbz#2097383 rhbz#2097391 rhbz#2097392 rhbz#2097393
* Tue May 24 2022 Miroslav Lisik <mlisik@redhat.com> - 0.10.13-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui

BIN
rack-2.2.3.1.gem Normal file

Binary file not shown.

BIN
rack-protection-2.2.0.gem Normal file

Binary file not shown.

BIN
rack-test-1.1.0.gem Normal file

Binary file not shown.

BIN
rexml-3.2.5.gem Normal file

Binary file not shown.

BIN
ruby2_keywords-0.0.5.gem Normal file

Binary file not shown.

BIN
sinatra-2.2.0.gem Normal file

Binary file not shown.

18
sources
View File

@ -1,25 +1,9 @@
SHA512 (HAM-logo.png) = bf4f865c5c9c3b3f91354411f68e4295bb80e69e4cbcb720652bde9ad726dc0aa2610b5ab3c8f17857caac30192f9a226009436cf6ffc0f62651146512bf92d2
SHA512 (backports-3.23.0.gem) = b6d721a2925a932e451437938e01c6e3f4ac08bafac975063963f7866e17015abfeb6862face89cbd08caf479db75eb085f540263ba251a87c6acc7611ba6d40
SHA512 (dacite-1.6.0.tar.gz) = 034255f095589d309fe5805413d8b148f430cd20a0de305b7954083b530d516da1d8f3f00ebb5264a8cfb77f2b2a76f1e2d863e78bd191f1d85021c5553815da
SHA512 (daemons-1.4.1.gem) = c057a7cbafc16f9daa073ce9fd5680f5f978826554073f4e77f2b284aee73567253d471224109d060193572f313e5eaa1509a2113a1564c1508969f658c045c5
SHA512 (dataclasses-0.8.tar.gz) = 3369f5a9b1243f0af9e05dcfa8534801137ab05c62416360e6d36eee2df23b828f4a0d777aad706b7eb16ee71b879390abf4e402def2930f4fc4ccb41a6bbd88
SHA512 (ethon-0.15.0.gem) = 6e04c70e105fb95f1e0ff62e1d6ae009bb7b39a60d85ec9e43b10c016f33f679620ded253089a738e0cef5010e9023d1093dd92b1caacdde8f6a745cbae2b5b5
SHA512 (eventmachine-1.2.7.gem) = fdbcf9fc933e2414e70f8f48153e9ba6ed7a0029cdf49cdcb4ab72ab26683e727a36c099f017f20681f9c361179461743e501278ca9bd5612e693e26867cc516
SHA512 (ffi-1.15.5.gem) = 074df34edffc7038ab08199350a97b32280d61ea15dd85d459b008bd3363ec5403b4e533621c8e460e5288f01fec944bff9b149851b819e85bab75ad2362227c
SHA512 (json-2.6.2.gem) = 4b0ac453d16436747ec6fe9ec777e7de84c78f0993d443f5ad0ca201e795b6ded4e2883aba52560676467736fe7f7e18bddb3dfc4be941a2b08fddaa79988530
SHA512 (mustermann-1.1.1.gem) = 55d5fd9b8309e0b806b2fb0af409fbc71b958b8f91116991439f2c66b1f71f17647a61020b0349a86132e7d3da383121719ea330538abb8f3c8bef5fbff0b747
SHA512 (open4-1.3.4-1.gem) = 838a18efcd093d55d9589ff9d5c11054618abef863224c2d9b31445dc735218c2f96d954040e2d3f8d5aab0140e54b627fcc4a1b01c17e59267402a2abdd8efb
SHA512 (pcs-0.10.13.48-15d27.tar.gz) = 1187f7d3128fbfd833a791fa34b730650fabf7652a718ffe81bbe2c823cc1a0986e78778a8633a457e0e1b81a3fbb24c1d45708030e3e03b27a2492d3360a7e5
SHA512 (pcs-0.10.14.tar.gz) = bf61ebfcee1c22536f8dd59aa4dda902040eeb6b47c0ece5025d37bbbd4846e40c599bcf4de88d54b2f4ddbeebb9967a36c2403b99f9874b6e53bf9ebb8d94c5
SHA512 (pcs-web-ui-0.1.13.tar.gz) = e8ccb07467f0c5d959f8ba1d541615836e9c88dc5793b3dfd1bee14cf96c4107a90251026f26e5dd0cf3d9ceb285c4da4b25dd77f3f0971e0d2c7d15899bce88
SHA512 (pcs-web-ui-node-modules-0.1.13.tar.xz) = 5e56644d6a4444856e5b15d0717aad9f12249bf365af50a0509fe29c0945fc94b8b26cb1a71231836dcc6c310ba91f1921086012ade073ed6c05715e6ca44983
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (python-dateutil-2.8.1.tar.gz) = 337000216e0f8ce32d6363768444144183ab9268f69082f20858f2b3322b1c449e53b2f2b5dcb3645be22294659ce7838f74ace2fd7a7c4f2adc6cf806a9fa2c
SHA512 (rack-2.2.3.gem) = aabda2ac4aeea6b119c5d570a6c36b5c114f879cc73678a6f385b71f2191501a86adc3bed6f0e0bacfc1e4c48c2374714588669ede898053dc7719899bf71635
SHA512 (rack-protection-2.2.0.gem) = 06d6c2026e3e93131a2405bbaa8a514ddde48607979828b9fc41309dbdfff2b7c8cac48a6981e76b5dda554f0cbdc7c6ff5f44b8925fce1cb9b7de0a16380ca4
SHA512 (rack-test-1.1.0.gem) = 16e291fa5a88b6866e8057b4bf1aae4ffe17dd9b0300c1ee36632c5b21ff2075cb4356f6f78437dd84ea76047a5d3abe3dda087a2c154f5e5712e62d7e57fdc9
SHA512 (rexml-3.2.5.gem) = 1e3838d4a5befa76137fb8fea6a20195490645aa2b1c5d14d1eeca6c093d7f64eb405f07fd07b00fcafa9606dc78f9f0a488012338f81414623feb6e8cb83931
SHA512 (ruby2_keywords-0.0.5.gem) = f6b9078b111e68c0017e0025ecdccb976c7a32f35c1a8adf9fd879db0c91f89eb9bd799f9527a846e28056f2a5fbf0f3610cda9538570288c493613c35c83a6f
SHA512 (sinatra-2.2.0.gem) = 4cd5da37b6c7f03bff7f66d99e07b55aea0dfeda54782fdf38b36fad43147745a3040d7c7aaf4bcb3cd86c6aad7308113c0f86e453488cd4e5d8eac00b04fce1
SHA512 (thin-1.8.1.gem) = c200ea03b7876b2a17b5875557fa967b8d01db20cc401811f314f3285f8249b8793e4709b7bc033a9c5813b9a51e3093c55f717b4a98b8fda171aa82813b7419
SHA512 (tilt-2.0.10.gem) = d2e0e1976da24ea4d8581d29a3ac2c0772c2e42f1cd04c48f1e3c1745a14d7cd319f14cead3e5341ec0f6c07aa216b50c29ad96984a85a9757ff9f7cc89b80df
SHA512 (tornado-6.1.0.tar.gz) = bd161a1c30f40f983d608297bca113735cb4baad255de71302a5b4d35be8c02afbc9820728efa912e62e1cbbfad8f92360261a69e0c8759f9e6cb477fbca31c7

BIN
thin-1.8.1.gem Normal file

Binary file not shown.

BIN
tilt-2.0.10.gem Normal file

Binary file not shown.