pcs-0.11.9-3.el9

- Rebased pcs to the latest sources (see CHANGELOG.md)
  Resolves: RHEL-35420, RHEL-76055, RHEL-76059, RHEL-76060, RHEL-76153, RHEL-76154, RHEL-76170, RHEL-76177, RHEL-82894
- Rebased pcs-web-ui to the latest sources
  Resolves: RHEL-76310, RHEL-76311, RHEL-76312, RHEL-79317, RHEL-85196, RHEL-85197, RHEL-85745
- The upstream version of pcs-web-ui can now be queried through RPM - see bundled(pcs-web-ui)
  Resolves: RHEL-86229
- Updated bundled rubygems: backports, childprocess, ffi, puma, rack, rack-protection, rack-session, rack-test, sinatra, tilt
  Resolves: RHEL-90151

- Removed BuildRequires: python >= 3.9 - correct python requirement is generated by rpm based on the system interpreter
- Added BuildRequires: libffi-devel - this is present in upstream, but was missing here
- Removed duplicate BuildRequire: python3-cryptography
- Added BuildRequires: corosync-qdevice-devel - this is a buildroot only package with pc file for corosync-qdevice, without it, autotools use default paths
- Disallowed installation of pcs 0.11 with Pacemaker 3 to prevent incorrect behavior
- Bundled rubygem logger - logger 1.5.0 is required by childprocess 5.1.0. Logger is a standard gem in Ruby 3.0 which is available in RHEL 9, but it only provides logger 1.4.3 failing this requirement. Thus newer logger needs to be bundled
- Simplified tarball versioning mechanism and added tarball-version macro to simplify pcs-web-ui version reporting. Pcs-web-ui reported version uses the new ui_tarball_version macro or ui_version macros depending on whether the first one exists
This commit is contained in:
Michal Pospíšil 2025-05-19 19:47:40 +02:00
parent 8567e883ff
commit b8d0759ba0
7 changed files with 93 additions and 573 deletions

15
.gitignore vendored
View File

@ -256,3 +256,18 @@
/pcs-web-ui-0.1.22.tar.gz
/pcs-web-ui-node-modules-0.1.22.tar.xz
/rack-3.1.10.gem
/backports-3.25.1.gem
/childprocess-5.1.0.gem
/ffi-1.17.2.gem
/puma-6.6.0.gem
/rack-3.1.14.gem
/rack-protection-4.1.1.gem
/rack-session-2.1.1.gem
/rack-test-2.2.0.gem
/sinatra-4.1.1.gem
/dacite-1.9.2.tar.gz
/pcs-web-ui-54730df523389a3c87abad7e47c44e30b33a2647.tar.gz
/pcs-web-ui-node-modules-0.1.22+62-5473.tar.xz
/tilt-2.6.0.gem
/pcs-dbb53b89e16735d4edf85248d02024bb6de53a55.tar.gz
/logger-1.7.0.gem

View File

@ -1,82 +0,0 @@
From e949ae0e2fc350ed1e74ce48b50ac812efd92f30 Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Mon, 20 Jan 2025 12:13:25 +0100
Subject: [PATCH] fix: filter clones by agent name in resource tree
---
.../src/app/view/cluster/resources/tree/filter.ts | 13 +++++++------
.../test/src/test/scenes/resources/tree.test.ts | 14 +++++++++++---
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/packages/app/src/app/view/cluster/resources/tree/filter.ts b/packages/app/src/app/view/cluster/resources/tree/filter.ts
index 118e6cc2..b047a094 100644
--- a/packages/app/src/app/view/cluster/resources/tree/filter.ts
+++ b/packages/app/src/app/view/cluster/resources/tree/filter.ts
@@ -1,4 +1,4 @@
-import {Resource} from "app/view/cluster/types";
+import type {FenceDevice, Resource} from "app/view/cluster/types";
type Group = Extract<Resource, {itemType: "group"}>;
type Clone = Extract<Resource, {itemType: "clone"}>;
@@ -14,13 +14,14 @@ const createResourceFilter = (filter: string) => {
const match = (searchable: string) =>
searchable.toLowerCase().includes(filter.toLowerCase());
+ const matchPrimitive = (primitive: Primitive | FenceDevice) =>
+ match(primitive.id) || match(primitive.agentName);
+
const filterPrimitive = (primitive: Primitive) =>
- match(primitive.id) || match(primitive.agentName) ? primitive : null;
+ matchPrimitive(primitive) ? primitive : null;
const filterGroup = (group: Group): Group | null => {
- const primitives = group.resources.filter(
- primitive => match(primitive.id) || match(primitive.agentName),
- );
+ const primitives = group.resources.filter(matchPrimitive);
return match(group.id) || primitives.length > 0
? {...group, resources: primitives}
: null;
@@ -34,7 +35,7 @@ const createResourceFilter = (filter: string) => {
: null;
}
- if (match(clone.member.id)) {
+ if (matchPrimitive(clone.member)) {
return clone;
}
diff --git a/packages/test/src/test/scenes/resources/tree.test.ts b/packages/test/src/test/scenes/resources/tree.test.ts
index f9b118f8..19190955 100644
--- a/packages/test/src/test/scenes/resources/tree.test.ts
+++ b/packages/test/src/test/scenes/resources/tree.test.ts
@@ -19,7 +19,15 @@ const resourceList = [
"Clone1",
cs.group("Group2", [cs.primitive("ResourceD"), cs.primitive("ResourceE")]),
),
- cs.clone("Clone2", cs.primitive("ResourceF")),
+ cs.clone(
+ "Clone2",
+ cs.primitive("ResourceF", {
+ agentname: "ocf:heartbeat:apache",
+ provider: "heartbeat",
+ class: "ocf",
+ type: "apache",
+ }),
+ ),
];
const primitiveItem = (id: string) =>
@@ -129,7 +137,7 @@ describe("Resource tree filter", () => {
await isAbsent(groupItem("Group2"));
await isAbsent(primitiveItem("ResourceD"));
await isAbsent(primitiveItem("ResourceE"));
- await isAbsent(cloneItem("Clone2"));
- await isAbsent(primitiveItem("ResourceF"));
+ await isVisible(cloneItem("Clone2"));
+ await isVisible(primitiveItem("ResourceF"));
});
});
--
2.48.1

View File

@ -1,154 +0,0 @@
From 618dbcf1f7be271f63f399befdde93ced6448a52 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Wed, 12 Feb 2025 14:00:26 +0100
Subject: [PATCH 1/2] fix restarting bundle instances
* fixes a regression introduced in ccffba735128ea4be62aa33e7319114d8b26a8b0
---
pcs/lib/commands/resource.py | 85 ++++++++++---------
.../lib/commands/resource/test_restart.py | 16 +---
2 files changed, 46 insertions(+), 55 deletions(-)
diff --git a/pcs/lib/commands/resource.py b/pcs/lib/commands/resource.py
index 719f8acd3..945e40759 100644
--- a/pcs/lib/commands/resource.py
+++ b/pcs/lib/commands/resource.py
@@ -2566,56 +2566,59 @@ def restart(
timeout -- abort if the command doesn't finish in this time (integer + unit)
"""
cib = env.get_cib()
+
+ # To be able to restart bundle instances, which are not to be found in CIB,
+ # do not fail if specified ID is not found in CIB. Pacemaker provides
+ # reasonable messages when the ID to be restarted is not a resource or
+ # doesn't exist. We only search for the resource in order to provide hints
+ # when the user attempts to restart bundle's or clone's inner resources.
+ resource_found = False
try:
resource_el = get_element_by_id(cib, resource_id)
- except ElementNotFound as e:
- env.report_processor.report(
- ReportItem.error(
- reports.messages.IdNotFound(
- resource_id, expected_types=["resource"]
- )
- )
- )
- raise LibraryError() from e
- if not resource.common.is_resource(resource_el):
- env.report_processor.report(
- ReportItem.error(
- reports.messages.IdBelongsToUnexpectedType(
- resource_id,
- expected_types=["resource"],
- current_type=resource_el.tag,
+ resource_found = True
+ except ElementNotFound:
+ pass
+
+ if resource_found:
+ if not resource.common.is_resource(resource_el):
+ env.report_processor.report(
+ ReportItem.error(
+ reports.messages.IdBelongsToUnexpectedType(
+ resource_id,
+ expected_types=["resource"],
+ current_type=resource_el.tag,
+ )
)
)
- )
- raise LibraryError()
+ raise LibraryError()
- parent_resource_el = resource.clone.get_parent_any_clone(resource_el)
- if parent_resource_el is None:
- parent_resource_el = resource.bundle.get_parent_bundle(resource_el)
- if parent_resource_el is not None:
- env.report_processor.report(
- reports.ReportItem.warning(
- reports.messages.ResourceRestartUsingParentRersource(
- str(resource_el.attrib["id"]),
- str(parent_resource_el.attrib["id"]),
+ parent_resource_el = resource.clone.get_parent_any_clone(resource_el)
+ if parent_resource_el is None:
+ parent_resource_el = resource.bundle.get_parent_bundle(resource_el)
+ if parent_resource_el is not None:
+ env.report_processor.report(
+ reports.ReportItem.warning(
+ reports.messages.ResourceRestartUsingParentRersource(
+ str(resource_el.attrib["id"]),
+ str(parent_resource_el.attrib["id"]),
+ )
)
)
- )
- resource_el = parent_resource_el
+ resource_el = parent_resource_el
- if node and not (
- resource.clone.is_any_clone(resource_el)
- or resource.bundle.is_bundle(resource_el)
- ):
- env.report_processor.report(
- reports.ReportItem.error(
- reports.messages.ResourceRestartNodeIsForMultiinstanceOnly(
- str(resource_el.attrib["id"]),
- resource_el.tag,
- node,
+ if node and not (
+ resource.clone.is_any_clone(resource_el)
+ or resource.bundle.is_bundle(resource_el)
+ ):
+ env.report_processor.report(
+ reports.ReportItem.error(
+ reports.messages.ResourceRestartNodeIsForMultiinstanceOnly(
+ str(resource_el.attrib["id"]),
+ resource_el.tag,
+ node,
+ )
)
)
- )
if timeout is not None:
env.report_processor.report_list(
@@ -2627,7 +2630,7 @@ def restart(
resource_restart(
env.cmd_runner(),
- str(resource_el.attrib["id"]),
+ str(resource_el.attrib["id"]) if resource_found else resource_id,
node=node,
timeout=timeout,
)
diff --git a/pcs_test/tier0/lib/commands/resource/test_restart.py b/pcs_test/tier0/lib/commands/resource/test_restart.py
index 9d61f5704..af5004b43 100644
--- a/pcs_test/tier0/lib/commands/resource/test_restart.py
+++ b/pcs_test/tier0/lib/commands/resource/test_restart.py
@@ -104,20 +104,8 @@ class ResourceRestart(TestCase):
)
def test_resource_not_found(self):
- self.env_assist.assert_raise_library_error(
- lambda: resource.restart(self.env_assist.get_env(), "RX")
- )
- self.env_assist.assert_reports(
- [
- fixture.error(
- reports.codes.ID_NOT_FOUND,
- id="RX",
- expected_types=["resource"],
- context_type="",
- context_id="",
- )
- ]
- )
+ self.config.runner.pcmk.resource_restart("RX")
+ resource.restart(self.env_assist.get_env(), "RX")
def test_not_a_resource(self):
self.env_assist.assert_raise_library_error(
--
2.48.1

View File

@ -1,280 +0,0 @@
From 196be7e21aeb9e1a656e94136f7f15139c56b6e1 Mon Sep 17 00:00:00 2001
From: Peter Romancik <promanci@redhat.com>
Date: Thu, 13 Feb 2025 11:03:20 +0100
Subject: [PATCH 2/2] fix deletion of misconfigured bundles
---
pcs/common/reports/codes.py | 3 +
pcs/common/reports/messages.py | 30 +++++++++
pcs/lib/cib/remove_elements.py | 59 +++++++++++------
.../tier0/common/reports/test_messages.py | 23 +++++++
pcs_test/tier0/lib/commands/test_cib.py | 66 +++++++++++++++++++
5 files changed, 162 insertions(+), 19 deletions(-)
diff --git a/pcs/common/reports/codes.py b/pcs/common/reports/codes.py
index 3f0e669b5..bcee00cd7 100644
--- a/pcs/common/reports/codes.py
+++ b/pcs/common/reports/codes.py
@@ -176,6 +176,9 @@ CLUSTER_UUID_ALREADY_SET = M("CLUSTER_UUID_ALREADY_SET")
CLUSTER_WILL_BE_DESTROYED = M("CLUSTER_WILL_BE_DESTROYED")
COMMAND_INVALID_PAYLOAD = M("COMMAND_INVALID_PAYLOAD")
COMMAND_UNKNOWN = M("COMMAND_UNKNOWN")
+CONFIGURED_RESOURCE_MISSING_IN_STATUS = M(
+ "CONFIGURED_RESOURCE_MISSING_IN_STATUS"
+)
LIVE_ENVIRONMENT_NOT_CONSISTENT = M("LIVE_ENVIRONMENT_NOT_CONSISTENT")
LIVE_ENVIRONMENT_REQUIRED = M("LIVE_ENVIRONMENT_REQUIRED")
LIVE_ENVIRONMENT_REQUIRED_FOR_LOCAL_NODE = M(
diff --git a/pcs/common/reports/messages.py b/pcs/common/reports/messages.py
index 0809c91d1..bfa4e9750 100644
--- a/pcs/common/reports/messages.py
+++ b/pcs/common/reports/messages.py
@@ -31,6 +31,7 @@ from pcs.common.resource_agent.dto import (
ResourceAgentNameDto,
get_resource_agent_full_name,
)
+from pcs.common.resource_status import ResourceState
from pcs.common.str_tools import (
format_list,
format_list_custom_last_separator,
@@ -6442,6 +6443,35 @@ class CannotStopResourcesBeforeDeleting(ReportItemMessage):
)
+@dataclass(frozen=True)
+class ConfiguredResourceMissingInStatus(ReportItemMessage):
+ """
+ Cannot check status of resource, because the resource is missing in cluster
+ status despite being configured in CIB. This happens for misconfigured
+ resources, e.g. bundle with primitive resource inside and no IP address
+ for the bundle specified.
+
+ resource_id -- id of the resource
+ checked_state -- expected state of the resource
+ """
+
+ resource_id: str
+ checked_state: Optional[ResourceState] = None
+ _code = codes.CONFIGURED_RESOURCE_MISSING_IN_STATUS
+
+ @property
+ def message(self) -> str:
+ return (
+ "Cannot check if the resource '{resource_id}' is in expected "
+ "state{state}, since the resource is missing in cluster status"
+ ).format(
+ resource_id=self.resource_id,
+ state=format_optional(
+ self.checked_state and self.checked_state.name.lower(), " ({})"
+ ),
+ )
+
+
@dataclass(frozen=True)
class ResourceBanPcmkError(ReportItemMessage):
"""
diff --git a/pcs/lib/cib/remove_elements.py b/pcs/lib/cib/remove_elements.py
index 093218dac..04fbe5bf2 100644
--- a/pcs/lib/cib/remove_elements.py
+++ b/pcs/lib/cib/remove_elements.py
@@ -259,17 +259,27 @@ def warn_resource_unmanaged(
report_list.extend(parser.get_warnings())
status = ResourcesStatusFacade.from_resources_status_dto(status_dto)
- report_list.extend(
- reports.ReportItem.warning(
- reports.messages.ResourceIsUnmanaged(resource_id)
- )
- for resource_id in resource_ids
- if status.is_state(
- resource_id,
- None,
- ResourceState.UNMANAGED,
- )
- )
+ for r_id in resource_ids:
+ if not status.exists(r_id, None):
+ # Pacemaker does not put misconfigured resources into cluster
+ # status and we are unable to check state of such resources.
+ # This happens for e.g. undle with primitive resource inside and
+ # no IP address for the bundle specified. We expect the resource
+ # to be stopped since it is misconfigured. Stopping it again
+ # even when it is unmanaged should not break anything.
+ report_list.append(
+ reports.ReportItem.debug(
+ reports.messages.ConfiguredResourceMissingInStatus(
+ r_id, ResourceState.UNMANAGED
+ )
+ )
+ )
+ elif status.is_state(r_id, None, ResourceState.UNMANAGED):
+ report_list.append(
+ reports.ReportItem.warning(
+ reports.messages.ResourceIsUnmanaged(r_id)
+ )
+ )
except NotImplementedError:
# TODO remove when issue with bundles in status is fixed
report_list.extend(
@@ -318,20 +328,31 @@ def ensure_resources_stopped(
report_list.extend(parser.get_warnings())
status = ResourcesStatusFacade.from_resources_status_dto(status_dto)
- not_stopped_ids = [
- resource_id
- for resource_id in resource_ids
- if not status.is_state(
- resource_id,
+ for r_id in resource_ids:
+ if not status.exists(r_id, None):
+ # Pacemaker does not put misconfigured resources into cluster
+ # status and we are unable to check state of such resources.
+ # This happens for e.g. undle with primitive resource inside and
+ # no IP address for the bundle specified. We expect the resource
+ # to be stopped since it is misconfigured.
+ report_list.append(
+ reports.ReportItem.debug(
+ reports.messages.ConfiguredResourceMissingInStatus(
+ r_id, ResourceState.STOPPED
+ )
+ )
+ )
+ elif not status.is_state(
+ r_id,
None,
ResourceState.STOPPED,
instances_quantifier=(
MoreChildrenQuantifierType.ALL
- if status.can_have_multiple_instances(resource_id)
+ if status.can_have_multiple_instances(r_id)
else None
),
- )
- ]
+ ):
+ not_stopped_ids.append(r_id)
except NotImplementedError:
# TODO remove when issue with bundles in status is fixed
not_stopped_ids = [
diff --git a/pcs_test/tier0/common/reports/test_messages.py b/pcs_test/tier0/common/reports/test_messages.py
index e9f47786d..305644449 100644
--- a/pcs_test/tier0/common/reports/test_messages.py
+++ b/pcs_test/tier0/common/reports/test_messages.py
@@ -11,6 +11,7 @@ from pcs.common.file import RawFileError
from pcs.common.reports import const
from pcs.common.reports import messages as reports
from pcs.common.resource_agent.dto import ResourceAgentNameDto
+from pcs.common.resource_status import ResourceState
from pcs.common.types import CibRuleExpressionType
# pylint: disable=too-many-lines
@@ -6075,3 +6076,25 @@ class GuestNodeRemovalIncomplete(NameBuildTest):
),
reports.GuestNodeRemovalIncomplete("guest-node"),
)
+
+
+class ConfiguredResourceMissingInStatus(NameBuildTest):
+ def test_only_resource_id(self):
+ self.assert_message_from_report(
+ (
+ "Cannot check if the resource 'id' is in expected state, "
+ "since the resource is missing in cluster status"
+ ),
+ reports.ConfiguredResourceMissingInStatus("id"),
+ )
+
+ def test_with_expected_state(self):
+ self.assert_message_from_report(
+ (
+ "Cannot check if the resource 'id' is in expected state "
+ "(stopped), since the resource is missing in cluster status"
+ ),
+ reports.ConfiguredResourceMissingInStatus(
+ "id", ResourceState.STOPPED
+ ),
+ )
diff --git a/pcs_test/tier0/lib/commands/test_cib.py b/pcs_test/tier0/lib/commands/test_cib.py
index 7c72fd047..a6d68ae36 100644
--- a/pcs_test/tier0/lib/commands/test_cib.py
+++ b/pcs_test/tier0/lib/commands/test_cib.py
@@ -5,6 +5,7 @@ from unittest import (
)
from pcs.common import reports
+from pcs.common.resource_status import ResourceState
from pcs.lib.commands import cib as lib
from pcs_test.tools import fixture
@@ -991,3 +992,68 @@ class RemoveElementsStopResources(TestCase, StopResourcesWaitMixin):
),
]
)
+
+ def test_skip_state_check_on_missing_from_status(self):
+ self.config.runner.cib.load(
+ resources="""
+ <resources>
+ <bundle id="test-bundle">
+ <podman image="localhost/pcmktest:test"/>
+ <primitive id="apa" class="ocf" type="apache" provider="heartbeat"/>
+ </bundle>
+ </resources>
+ """
+ )
+ self.fixture_stop_resources_wait_calls(
+ self.config.calls.get("runner.cib.load").stdout,
+ initial_state_modifiers={"resources": "<resources/>"},
+ after_disable_cib_modifiers={
+ "resources": """
+ <resources>
+ <bundle id="test-bundle">
+ <podman image="localhost/pcmktest:test"/>
+ <primitive id="apa" class="ocf" type="apache" provider="heartbeat">
+ <meta_attributes id="apa-meta_attributes">
+ <nvpair id="apa-meta_attributes-target-role" name="target-role" value="Stopped"/>
+ </meta_attributes>
+ </primitive>
+ </bundle>
+ </resources>
+ """
+ },
+ after_disable_state_modifiers={"resources": "<resources/>"},
+ )
+ self.fixture_push_cib_after_stopping(
+ resources="""
+ <resources>
+ <bundle id="test-bundle">
+ <podman image="localhost/pcmktest:test"/>
+ </bundle>
+ </resources>
+ """
+ )
+ lib.remove_elements(self.env_assist.get_env(), ["apa"])
+ self.env_assist.assert_reports(
+ [
+ fixture.info(
+ reports.codes.STOPPING_RESOURCES_BEFORE_DELETING,
+ resource_id_list=["apa"],
+ ),
+ fixture.debug(
+ reports.codes.CONFIGURED_RESOURCE_MISSING_IN_STATUS,
+ resource_id="apa",
+ checked_state=ResourceState.UNMANAGED,
+ ),
+ fixture.info(reports.codes.WAIT_FOR_IDLE_STARTED, timeout=0),
+ fixture.debug(
+ reports.codes.CONFIGURED_RESOURCE_MISSING_IN_STATUS,
+ resource_id="apa",
+ checked_state=ResourceState.STOPPED,
+ ),
+ fixture.info(
+ reports.codes.CIB_REMOVE_REFERENCES,
+ id_tag_map={"apa": "primitive", "test-bundle": "bundle"},
+ removing_references_from={"apa": {"test-bundle"}},
+ ),
+ ]
+ )
--
2.48.1

View File

@ -1,4 +1,4 @@
From 071b189a3a72610361f8d31d2ebbb0b9083c872f Mon Sep 17 00:00:00 2001
From 3e3833b08fc197044975cfd8b673603dcb72c43e 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 in RHEL9
@ -9,7 +9,7 @@ Subject: [PATCH] do not support cluster setup with udp(u) transport in RHEL9
2 files changed, 3 insertions(+)
diff --git a/pcs/pcs.8.in b/pcs/pcs.8.in
index 63c40b78..f69a75b8 100644
index 14c1674a..ee71bb03 100644
--- a/pcs/pcs.8.in
+++ b/pcs/pcs.8.in
@@ -479,6 +479,8 @@ By default, encryption is enabled with cipher=aes256 and hash=sha256. To disable
@ -22,10 +22,10 @@ index 63c40b78..f69a75b8 100644
.br
Transport options are: ip_version, netmtu
diff --git a/pcs/usage.py b/pcs/usage.py
index a4af30d4..7c7fc7ea 100644
index 102deceb..4d63192d 100644
--- a/pcs/usage.py
+++ b/pcs/usage.py
@@ -1490,6 +1490,7 @@ Commands:
@@ -1498,6 +1498,7 @@ Commands:
hash=sha256. To disable encryption, set cipher=none and hash=none.
Transports udp and udpu:
@ -34,5 +34,5 @@ index a4af30d4..7c7fc7ea 100644
support traffic encryption nor compression.
Transport options are:
--
2.45.2
2.49.0

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.11.9
Release: 2%{?dist}
Release: 3%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPL-2.0-only: pcs
@ -19,11 +19,12 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
# To build an official pcs release, comment out branch_or_commit
# Use long commit hash or branch name to build an unreleased version
# %%global branch_or_commit 73c3ba7aec1e2abf2ef7c3d0ffddeeef7c7516d0
%global branch_or_commit dbb53b89e16735d4edf85248d02024bb6de53a55
%global version_or_commit %{version}
%if 0%{?branch_or_commit:1}
%global version_or_commit %{branch_or_commit}
%else
%global version_or_commit %{version}
%global tarball_version %{version}+%(echo %{branch_or_commit} | head -c 8)
%endif
%global pcs_source_name %{name}-%{version_or_commit}
@ -31,38 +32,41 @@ ExclusiveArch: i686 x86_64 s390x ppc64le aarch64
# Last tagged version, also used as fallback version for untagged tarballs
%global ui_version 0.1.22
# Use long commit hash or branch name to build an unreleased version
# %%global ui_branch_or_commit 34372d1268f065ed186546f55216aaa2d7e76b54
%global ui_branch_or_commit 54730df523389a3c87abad7e47c44e30b33a2647
%global ui_modules_version 0.1.22+62-5473
%global ui_version_or_commit %{ui_version}
%if 0%{?ui_branch_or_commit:1}
%global ui_version_or_commit %{ui_branch_or_commit}
%else
%global ui_version_or_commit %{ui_version}
%global ui_tarball_version %{ui_version}-%(echo %{ui_branch_or_commit} | head -c 8)
%endif
%global ui_src_name pcs-web-ui-%{ui_version_or_commit}
%global ui_modules_version 0.1.22
%global pcs_snmp_pkg_name pcs-snmp
%global pyagentx_version 0.4.pcs.2
%global dacite_version 1.8.1
%global version_rubygem_backports 3.25.0
%global dacite_version 1.9.2
%global version_rubygem_backports 3.25.1
%global version_rubygem_base64 0.2.0
%global version_rubygem_childprocess 5.0.0
%global version_rubygem_childprocess 5.1.0
%global version_rubygem_ethon 0.16.0
%global version_rubygem_ffi 1.17.0
%global version_rubygem_ffi 1.17.2
%global version_rubygem_logger 1.7.0
%global version_rubygem_mustermann 3.0.3
%global version_rubygem_nio4r 2.7.4
%global version_rubygem_puma 6.4.3
%global version_rubygem_rack 3.1.10
%global version_rubygem_rack_protection 4.0.0
%global version_rubygem_rack_session 2.0.0
%global version_rubygem_rack_test 2.1.0
%global version_rubygem_puma 6.6.0
%global version_rubygem_rack 3.1.14
%global version_rubygem_rack_protection 4.1.1
%global version_rubygem_rack_session 2.1.1
%global version_rubygem_rack_test 2.2.0
%global version_rubygem_rackup 2.2.1
%global version_rubygem_ruby2_keywords 0.0.5
%global version_rubygem_sinatra 4.0.0
%global version_rubygem_tilt 2.4.0
%global version_rubygem_sinatra 4.1.1
%global version_rubygem_tilt 2.6.0
%global required_pacemaker_version 2.1.0
%global min_compatible_pacemaker_version 2.1.0
%global first_incompatible_pacemaker_version 3.0.0
%global pcs_bundled_dir pcs_bundled
%global pcsd_public_dir pcsd/public
@ -103,6 +107,7 @@ Source93: https://rubygems.org/downloads/ruby2_keywords-%{version_rubygem_ruby2_
Source94: https://rubygems.org/downloads/base64-%{version_rubygem_base64}.gem
Source95: https://rubygems.org/downloads/rack-session-%{version_rubygem_rack_session}.gem
Source96: https://rubygems.org/downloads/rackup-%{version_rubygem_rackup}.gem
Source97: https://rubygems.org/downloads/logger-%{version_rubygem_logger}.gem
Source100: https://github.com/ClusterLabs/pcs-web-ui/archive/%{ui_version_or_commit}/%{ui_src_name}.tar.gz
Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_version_or_commit}/pcs-web-ui-node-modules-%{ui_modules_version}.tar.xz
@ -110,12 +115,9 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_vers
# pcs patches: <= 200
# Patch1: bzNUMBER-01-name.patch
Patch1: do-not-support-cluster-setup-with-udp-u-transport.patch
Patch2: RHEL-79055-fix-restarting-bundle-instances.patch
Patch3: RHEL-79160-fix-deletion-of-misconfigured-bundles.patch
# ui patches: >200
# Patch201: bzNUMBER-01-name.patch
Patch201: RHEL-78653-fix-filter-clones-by-agent-name-in-resource-tree.patch
# git for patches
@ -125,7 +127,6 @@ BuildRequires: coreutils
# find is used in Makefile and also somewhere else
BuildRequires: findutils
# python for pcs
BuildRequires: python3 >= 3.9
BuildRequires: python3-cryptography
BuildRequires: python3-dateutil >= 2.7.0
BuildRequires: python3-devel
@ -133,7 +134,6 @@ BuildRequires: python3-setuptools
BuildRequires: python3-pycurl
BuildRequires: python3-pip
BuildRequires: python3-pyparsing
BuildRequires: python3-cryptography
BuildRequires: python3-lxml
# for building bundled python packages
BuildRequires: python3-wheel
@ -143,6 +143,8 @@ BuildRequires: python3-tornado
# gcc for compiling custom rubygems
BuildRequires: gcc
BuildRequires: gcc-c++
# for rubygem ffi
BuildRequires: libffi-devel
# ruby and gems for pcsd
BuildRequires: ruby >= 2.5
BuildRequires: ruby-devel
@ -167,8 +169,10 @@ BuildRequires: npm
# cluster stack packages for pkg-config
BuildRequires: booth
BuildRequires: corosynclib-devel >= 3.0
# Buildroot only package, provides pkgconfig of corosync-qdevice for autotools
BuildRequires: corosync-qdevice-devel
BuildRequires: fence-agents-common
BuildRequires: pacemaker-libs-devel >= %{required_pacemaker_version}
BuildRequires: pacemaker-libs-devel >= %{min_compatible_pacemaker_version}, pacemaker-libs-devel < %{first_incompatible_pacemaker_version}
BuildRequires: resource-agents
BuildRequires: sbd
# for working with qdevice certificates (certutil) - used in configure.ac
@ -195,12 +199,12 @@ Requires: rubygem-rexml
# for killall
Requires: psmisc
# cluster stack and related packages
Requires: pcmk-cluster-manager >= %{required_pacemaker_version}
Suggests: pacemaker >= %{required_pacemaker_version}
Requires: pcmk-cluster-manager >= %{min_compatible_pacemaker_version}, pcmk-cluster-manager < %{first_incompatible_pacemaker_version}
Suggests: pacemaker >= %{min_compatible_pacemaker_version}, pacemaker < %{first_incompatible_pacemaker_version}
Requires: (corosync >= 3.0 if pacemaker)
# pcs enables corosync encryption by default so we require libknet1-plugins-all
Requires: (libknet1-plugins-all if corosync)
Requires: pacemaker-cli >= %{required_pacemaker_version}
Requires: pacemaker-cli >= %{min_compatible_pacemaker_version}, pacemaker-cli < %{first_incompatible_pacemaker_version}
# for post, preun and postun macros
Requires(post): systemd
Requires(preun): systemd
@ -221,6 +225,7 @@ Provides: bundled(base64) = %{version_rubygem_base64}
Provides: bundled(childprocess) = %{version_rubygem_childprocess}
Provides: bundled(ethon) = %{version_rubygem_ethon}
Provides: bundled(ffi) = %{version_rubygem_ffi}
Provides: bundled(logger) = %{version_rubygem_logger}
Provides: bundled(mustermann) = %{version_rubygem_mustermann}
Provides: bundled(nio4r) = %{version_rubygem_nio4r}
Provides: bundled(puma) = %{version_rubygem_puma}
@ -233,6 +238,9 @@ Provides: bundled(ruby2_keywords) = %{version_rubygem_ruby2_keywords}
Provides: bundled(sinatra) = %{version_rubygem_sinatra}
Provides: bundled(tilt) = %{version_rubygem_tilt}
Provides: bundled(pcs-web-ui) = %{!?ui_tarball_version:%{ui_version}}%{?ui_tarball_version}
%description
pcs is a corosync and pacemaker configuration tool. It permits users to
easily view, modify and create pacemaker based clusters.
@ -314,28 +322,24 @@ update_times_patch(){
# 3. then unpack node_modules into sources tree (-a 1).
%autosetup -T -b 100 -a 101 -N -n %{ui_src_name}
%autopatch -p1 -m 201
# update_times_patch %%{PATCH201}
update_times_patch %{PATCH201}
# patch pcs sources
%autosetup -S git -n %{pcs_source_name} -N
%autopatch -p1 -M 200
# update_times_patch %%{PATCH1}
update_times_patch %{PATCH1}
update_times_patch %{PATCH2}
update_times_patch %{PATCH3}
# generate .tarball-version if building from an untagged commit, not a released version
# autogen uses git-version-gen which uses .tarball-version for generating version number
%if "%{version}" != "%{version_or_commit}"
echo "%version+$(echo "%{version_or_commit}" | head -c 8)" > %{_builddir}/%{pcs_source_name}/.tarball-version
%if 0%{?tarball_version:1}
echo %{tarball_version} > %{_builddir}/%{pcs_source_name}/.tarball-version
%endif
%if "x%{?ui_branch_or_commit}" != "x"
echo "%{ui_version}+$(echo "%{ui_branch_or_commit}" | head -c 8)" > %{_builddir}/%{ui_src_name}/.tarball-version
%if 0%{?ui_tarball_version:1}
echo %{ui_tarball_version} > %{_builddir}/%{ui_src_name}/.tarball-version
%endif
# prepare dirs/files necessary for building all bundles
@ -359,6 +363,7 @@ cp -f %SOURCE93 %{rubygem_cache_dir}
cp -f %SOURCE94 %{rubygem_cache_dir}
cp -f %SOURCE95 %{rubygem_cache_dir}
cp -f %SOURCE96 %{rubygem_cache_dir}
cp -f %SOURCE97 %{rubygem_cache_dir}
# 2) prepare python bundles
@ -414,6 +419,8 @@ mv %{rubygem_bundle_dir}/gems/ethon-%{version_rubygem_ethon}/LICENSE ethon_LICEN
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/COPYING ffi_COPYING
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE ffi_LICENSE
mv %{rubygem_bundle_dir}/gems/ffi-%{version_rubygem_ffi}/LICENSE.SPECS ffi_LICENSE.SPECS
mv %{rubygem_bundle_dir}/gems/logger-%{version_rubygem_logger}/BSDL logger_BSDL
mv %{rubygem_bundle_dir}/gems/logger-%{version_rubygem_logger}/COPYING logger_COPYING
mv %{rubygem_bundle_dir}/gems/mustermann-%{version_rubygem_mustermann}/LICENSE mustermann_LICENSE
mv %{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/license.md nio4r_license.md
mv %{rubygem_bundle_dir}/gems/nio4r-%{version_rubygem_nio4r}/ext/libev/LICENSE nio4r_libev_LICENSE
@ -548,6 +555,8 @@ run_all_tests
%license ffi_COPYING
%license ffi_LICENSE
%license ffi_LICENSE.SPECS
%license logger_BSDL
%license logger_COPYING
%license mustermann_LICENSE
%license nio4r_license.md
%license nio4r_libev_LICENSE
@ -601,6 +610,17 @@ run_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Wed May 14 2025 Michal Pospisil <mpospisi@redhat.com> - 0.11.9-3
- Rebased pcs to the latest sources (see CHANGELOG.md)
Resolves: RHEL-35420, RHEL-76055, RHEL-76059, RHEL-76060, RHEL-76153, RHEL-76154, RHEL-76170, RHEL-76177, RHEL-82894
- Rebased pcs-web-ui to the latest sources
Resolves: RHEL-76310, RHEL-76311, RHEL-76312, RHEL-79317, RHEL-85196, RHEL-85197, RHEL-85745
- The upstream version of pcs-web-ui can now be queried through RPM - see bundled(pcs-web-ui)
Resolves: RHEL-86229
- Updated bundled rubygems: backports, childprocess, ffi, puma, rack, rack-protection, rack-session, rack-test, sinatra, tilt
Resolves: RHEL-90151
- Bundled rubygem logger
* Fri Feb 14 2025 Michal Pospisil <mpospisi@redhat.com> - 0.11.9-2
- Fixed restarting bundles
Resolves: RHEL-79055

29
sources
View File

@ -1,21 +1,22 @@
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (ruby2_keywords-0.0.5.gem) = f6b9078b111e68c0017e0025ecdccb976c7a32f35c1a8adf9fd879db0c91f89eb9bd799f9527a846e28056f2a5fbf0f3610cda9538570288c493613c35c83a6f
SHA512 (ethon-0.16.0.gem) = 3b31affcee0d5a5be05b5497d4a8d13515f8393f54579a3a9c8de49f78d3f065bb92659434b023f0a8bf8e0cccfbc94b617695b93c4d3f744cccd1eff2e68905
SHA512 (dacite-1.8.1.tar.gz) = 4b40c0bdcf5490bcc77de9e7f04b7267642bcfd41e4168607a5457f38abe3ad4b3041d8a23cb43af76de14eabee45f900ad5ddf7af8f70a2be4850bccc2d3af1
SHA512 (rack-test-2.1.0.gem) = e349ce61c3d787e0a772980db697e92212d4d9592ce33f55516d1f85fba55cbe666496c76392679b057786d6dab603d74b83e7bb773ab54940343e36dbf05d6f
SHA512 (backports-3.25.0.gem) = 47a2ffb83030cb317e85a4f72a1c4a76a90324b8928ac73e1aa3404a22136661e9ce718bfdd937fbe07b9e05a338fcbd717bb505fb1dd91cfee570bbff9e3f72
SHA512 (base64-0.2.0.gem) = ee5cdc30e73e625c15cb674cdd16a839ad44ffb0a27d1363f94491b48d95da37a2976c34f6f616b722a35750a067eb2245c4746d7d36f8e9a9ecee68ff5540fb
SHA512 (childprocess-5.0.0.gem) = 9ec340c86f4fd978b7a9925bcf90811ff3443f014469e4ff121e2c4758a4068823029ab413d1a57eb9de4a864435505b1edfa60a611709f2a5f99aaf08da422d
SHA512 (rack-protection-4.0.0.gem) = 5eb33e4829e5e0d320a14d169fd007111641e388f2b6e5f8de98d45dfd1e6705cdb4e1ce29524ebb6fb5afe14079b8e5370c9c389cb2befca4ca508da73165b3
SHA512 (rack-session-2.0.0.gem) = 827cd1acf20eb814adda7663f61755febd2e6acec6ee085dbc393b614a621f845dffa8f759e434055dbf029be370afeb921c8759c9e9e1fee17119830d9b2899
SHA512 (sinatra-4.0.0.gem) = 1eb8c6e8966461d3fa463b5c87e8bc3cd58243fc997a104671e252b866bb653dfc16d7b9f677e016ae91cb30998d72f8778eb2b2254ce27cf304944a6bfa8c05
SHA512 (ffi-1.17.0.gem) = 5cdaf19eaa499127607de7389f69b4927c7bd8a154a53071c53906050bc712b67c1fbc7b4b37fcf9a82fa6c79d705796032cd7ab61755646cfed0c2d279940a1
SHA512 (mustermann-3.0.3.gem) = d205985a5da83d83248899642ed359056b0cdb511e77d51309319c2f8d8b6c84040e9e1d3a56b7f83a0b26aed4b344f4df371b310e419c20170f0a486e89ba6f
SHA512 (nio4r-2.7.4.gem) = 6c8280484066ffc39e98b99dfaf5a69fe2a28cafb380924f448673fda8b69b5d97f8b75b8345b91d92f6186f0664e09bec8e1c7c19c070219b030f554824d2ac
SHA512 (puma-6.4.3.gem) = e8baf137c5164f11b8563561405fc4218210707bfb15d0f21118d4be0fd0d071050c46357337a9c6fdda7ce230f3ae09ebfe9976f0a7a0243824bda7871d7a18
SHA512 (rackup-2.2.1.gem) = e63c4dee6f1a677d507df0ae7bcebec88673e7a0a8d6621997949045db60801907038a148a0608f6e62864cb2ac056fca382f3438dc227b0fa7a3be52d56ea66
SHA512 (tilt-2.4.0.gem) = 8cf5036017f501da8843340a9c574ee647074782dcb27ee0aa906fb96ad1e66b90dfb80159aa4c5e7605490058c5ae478bd0fe09f17ae50a2697327d02c814cc
SHA512 (pcs-0.11.9.tar.gz) = efd0355a64a62a1aca12c38f5e5bc18c2daf768367383e83ab246d5e79c2dc40b407c507e8773f1c332dfc3d68c0299f8cd7287b81ce1d461b0c43aa92686b1e
SHA512 (pcs-web-ui-0.1.22.tar.gz) = cb97ffba625326ab3857b9c22b4400907177a5ea88769ae611cc9315758c1ceca7e16a1b92d43fc594911fcde6003d3beadb388c6bdd5c1bcc67d699c49c9b2c
SHA512 (pcs-web-ui-node-modules-0.1.22.tar.xz) = b1db7d8c04e942baf8a99f115cbda31a84f562c7deeee5f1371e5ddf5fb5e73ce084ede1f0da7083b2d0114228f58006599f1b9a29dd3a5202b3119e41f74d69
SHA512 (rack-3.1.10.gem) = 2da18867543b7c536e152cbb48a1680473b9b53c405f71c51c3263ae7d40435dfcc66b99caee0e14d901affa36bfcedb6fa5defe9ecbd2ce82687f71f8d2ef43
SHA512 (backports-3.25.1.gem) = a69f9b38d5f2b868a0823c3e2750b01e0d1a5c8b52c5e49a04de13fd0fd7262e881768f583c6545c4257bb12a20d6531d0a5132173ee629ee7464db2421dbbc4
SHA512 (childprocess-5.1.0.gem) = 487ee82e6e7cc1e81ed6740e3eb54e12e9d1065de92eda71f48039e377db8a827c647ce6c9314157ece577be52519bbe014aadcda4a7a748589fad7dbf19ae3a
SHA512 (ffi-1.17.2.gem) = 61fd30c546d9d4a695dd3954eba205cd6ddf36f2c67eb2f823591a6ece540d2d11fcc792704218d969d21bf7111e36bc54f40e5d9eeb1be4fdb06274a17bec13
SHA512 (puma-6.6.0.gem) = 3f6563fe0520249c8be911a726b1a1a02941c4336491b46716b132a0b5723f0ca4b2df16f1c9c2f2919e9343df929d1e2f620c3adab589c7013fe87fa41560fb
SHA512 (rack-3.1.14.gem) = eeff677686d6d5c3a1099a43d91b20da78ca82d3733af6c2a130afeea6ef238bf880e652003ef27eb24c9998db854e2504816efef51177d3ebede6fe8b0c3bd3
SHA512 (rack-protection-4.1.1.gem) = 0f5fd96d93eab654a7333fe75772b460e91b129da143df420f84ac259f2e24e3b1cf5a1892c1edd2dee3a2ed456cd025ae49dc961c7122a1852de3f15f77d1b1
SHA512 (rack-session-2.1.1.gem) = 2cb385879a6d5e67056303daee861e1a45d75571bf68a5339f9c23ba512aa29f4cc1473d60de6f8ed7c0a0ea2932ad83657e54686725346783a135352ce7a03c
SHA512 (rack-test-2.2.0.gem) = 9c758151d89d86f04a92ba20c43221c4346b8d23f62accb955e759f85910c0e179a5c2e1ff74f131f337afd6b6ae72c36f5d53f600649480769a29468e14f44a
SHA512 (sinatra-4.1.1.gem) = bf6c75a2f5e38cfb8442f481c491efb132dbf37a114e8ee35a4d24dd6f3b882f967a3c542cbafdcaf96242b39f5d78b77271adc562a2ee002b8790a73c99a7e9
SHA512 (tilt-2.6.0.gem) = 96aad6e3dfa542d0f11a4c96faa99c724723fe10029dae58f9662f9ef07198cf4d3ffea56899b7f88d8738a01effade00591318900364798fad9a41cd95397b2
SHA512 (dacite-1.9.2.tar.gz) = 69513bc1acd43e45a208ce4b4186072f92d9057a6a88c77d56f21405fbed7964d94fe4f6a37c99754a793caa2bd0584664dfab69169ef0d3564bb09d37769e59
SHA512 (pcs-web-ui-54730df523389a3c87abad7e47c44e30b33a2647.tar.gz) = a7f367f0198b668f50a2b3b4797b694c7258b921a5a100fdd5b7187ab1cdfa64381165102a9b621145350fef38e130fec000029a6d8ed41a0a2f997b13e41783
SHA512 (pcs-web-ui-node-modules-0.1.22+62-5473.tar.xz) = a1ef7ff16190597e061ee670064ba6056fa2ee5f67bbcc7b03ed462bae615052fbc52649c33dedc9fe532e2709c5b5c6cd6e1cfeda3acca3d3e244156c8364de
SHA512 (pcs-dbb53b89e16735d4edf85248d02024bb6de53a55.tar.gz) = ce956e99b4c0b4b83fa28a4d5b5a2b9e0574b2127ed0e955dfae67c57d73554f09628c5f549904bff3af257c8584ac6d76a26db7613722c219873e23540b2cf1
SHA512 (logger-1.7.0.gem) = 7327867c7a9f484fb370d68795f21edeaa6f5c0606d2eb55d42c9425ce20781256ca89f85349eafa53840ca20cc000508e8a7d46c4a3bbbcf64561c41db036a6