public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/pcs] rawhide: pcs-0.12.3-2
Date: Wed, 23 Sep 2026 13:25:48 GMT	[thread overview]
Message-ID: <179016994849.1.75108668322991570.rpms-pcs-7bd79575368c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pcs
            Branch : rawhide
            Commit : 7bd79575368c4d857d865bf647a181d421c01b83
            Author : Michal Pospíšil <mpospisi@redhat.com>
            Date   : 2026-09-23T14:00:26+02:00
            Stats  : +163/-3 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/pcs/c/7bd79575368c4d857d865bf647a181d421c01b83?branch=rawhide

            Log:
            pcs-0.12.3-2

- Adjusted requirements for version of rubygem childprocess based on testing
- Fix compatibility with rubygem json > 3.0.0

During testing of previous version, I noticed that on Fedora 45 and 46,
cluster status is unreliable in the web ui. This was caused by pcsd
threads hanging in the background, possibly due to interaction of
rubygem curb and new Ruby as the failures don't seem to happen on Fedora
43 and 44. See https://bugzilla.redhat.com/show_bug.cgi?id=2536998 for
more info.

---
diff --git a/pcs.spec b/pcs.spec
index bfaafa6..bc4ce50 100644
--- a/pcs.spec
+++ b/pcs.spec
@@ -1,6 +1,6 @@
 Name: pcs
 Version: 0.12.3
-Release: 1%{?dist}
+Release: 2%{?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
@@ -74,6 +74,7 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_vers
 # Patch1: name.patch
 Patch1: show-info-page-instead-of-webui.patch
 Patch2: swap-rubygem-ethon-for-curb.patch
+Patch3: rbgem-json-3.0.0-compat.patch
 
 # ui patches: >200
 # Patch201: name-web-ui.patch
@@ -115,7 +116,8 @@ BuildRequires: (python3-wheel if python3-setuptools < 71)
 BuildRequires: ruby >= 2.5.0
 BuildRequires: ruby-devel
 BuildRequires: rubygem(backports)
-BuildRequires: rubygem(childprocess)
+# See https://bugzilla.redhat.com/show_bug.cgi?id=2536998
+BuildRequires: rubygem(childprocess) >= 5.0.0
 BuildRequires: rubygem(curb)
 BuildRequires: rubygem(json)
 BuildRequires: rubygem(logger)
@@ -168,7 +170,7 @@ Requires: python3-tornado
 # ruby and gems for pcsd
 Requires: ruby >= 3.3.0
 Requires: rubygem(backports)
-Requires: rubygem(childprocess)
+Requires: rubygem(childprocess) >= 5.0.0
 Requires: rubygem(curb)
 Requires: rubygem(json)
 Requires: rubygem(logger)
@@ -547,6 +549,10 @@ fi
 
 
 %changelog
+* Mon Sep 21 2026 Michal Pospíšil <mpospisi@redhat.com> - 0.12.3-2
+- Adjusted requirements for version of rubygem childprocess based on testing
+- Fix compatibility with rubygem json > 3.0.0
+
 * Fri Sep 11 2026 Michal Pospíšil <mpospisi@redhat.com> - 0.12.3-1
 - Rebased pcs to the newest major version (see CHANGELOG.md)
 - Updated standalone web UI and HA Cluster Management Cockpit application to pcs-web-ui 0.1.25 (see CHANGELOG_WUI.md)

diff --git a/rbgem-json-3.0.0-compat.patch b/rbgem-json-3.0.0-compat.patch
new file mode 100644
index 0000000..f5e314d
--- /dev/null
+++ b/rbgem-json-3.0.0-compat.patch
@@ -0,0 +1,154 @@
+From 47c4145b3f3251459e51a8357fd31492f2ad1d7f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20Posp=C3=AD=C5=A1il?= <mpospisi@redhat.com>
+Date: Tue, 22 Sep 2026 20:48:07 +0200
+Subject: [PATCH] fix compatibility with rubygem json 3.0.0
+
+From rubygem JSON changelog [1]:
+All methods options are now either keyword arguments or checked like
+keyword arguments, meaning unknown options such as typos raise
+ArgumentError.
+
+[1] https://github.com/ruby/json/blob/master/CHANGES.md#2026-08-11-300rc1
+---
+ pcsd/pcs.rb                      |  4 ++--
+ pcsd/remote.rb                   |  2 +-
+ pcsd/test/test_cluster_entity.rb | 16 ++++++++--------
+ pcsd/test/test_pcs.rb            |  4 ++--
+ 4 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/pcsd/pcs.rb b/pcsd/pcs.rb
+index fcbf93ecf..4e50503c5 100644
+--- a/pcsd/pcs.rb
++++ b/pcsd/pcs.rb
+@@ -884,7 +884,7 @@ def cluster_status_from_nodes(auth_user, cluster_nodes, cluster_name)
+         :error_list => []
+       }
+       begin
+-        parsed_response = JSON.parse(response, {:symbolize_names => true})
++        parsed_response = JSON.parse(response, symbolize_names: true)
+         parsed_response[:pcsd_capabilities] ||= []
+         if parsed_response[:noresponse]
+           node_map[node][:node] = {}
+@@ -1387,7 +1387,7 @@ def run_pcs_internal(auth_user, cmd, data, request_timeout=nil)
+     )
+   end
+   begin
+-    parsed_output = JSON.parse(stdout.join("\n"), {:symbolize_names => true})
++    parsed_output = JSON.parse(stdout.join("\n"), symbolize_names: true)
+     if (
+       parsed_output.include?(:report_list) \
+       and \
+diff --git a/pcsd/remote.rb b/pcsd/remote.rb
+index 1e91afebe..71ad2ddf5 100644
+--- a/pcsd/remote.rb
++++ b/pcsd/remote.rb
+@@ -1423,7 +1423,7 @@ def check_request_data_for_json(params, auth_user)
+     raise PcsdRequestException.new("Missing required parameter 'data_json'")
+   end
+   begin
+-    return JSON.parse(params[:data_json], {:symbolize_names => true})
++    return JSON.parse(params[:data_json], symbolize_names: true)
+   rescue JSON::ParserError
+     raise PcsdRequestException.new('Invalid input data format')
+   end
+diff --git a/pcsd/test/test_cluster_entity.rb b/pcsd/test/test_cluster_entity.rb
+index 5dc2229af..502a9f9d8 100644
+--- a/pcsd/test/test_cluster_entity.rb
++++ b/pcsd/test/test_cluster_entity.rb
+@@ -955,7 +955,7 @@ module TestPrimitiveMixin
+       ],
+       "operations": []
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     # assert_equal_hashes(hash, obj.to_status('2'))
+     assert(hash == obj.to_status('2'))
+   end
+@@ -1001,7 +1001,7 @@ module TestPrimitiveMixin
+       ],
+       "operations": []
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     # assert_equal_hashes(hash, obj.to_status('2'))
+     assert(hash == obj.to_status('2'))
+   end
+@@ -1255,7 +1255,7 @@ module TestGroupMixin
+         }
+       ]
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     assert(hash == obj.to_status('2'))
+   end
+ end
+@@ -1618,7 +1618,7 @@ module TestCloneMixin
+         "operations": []
+       }
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     assert_equal(hash, obj.to_status('2'))
+   end
+ 
+@@ -1865,7 +1865,7 @@ module TestCloneMixin
+         ]
+       }
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     assert_equal(hash, obj.to_status('2'))
+   end
+ end
+@@ -2007,7 +2007,7 @@ module TestCloneFromPromotableElementMixin
+         "operations": []
+       }
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     assert_equal(hash, obj.to_status('2'))
+   end
+ end
+@@ -2336,7 +2336,7 @@ module TestCloneFromMasterElementMixin
+         "operations": []
+       }
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     assert_equal(hash, obj.to_status('2'))
+   end
+ 
+@@ -2582,7 +2582,7 @@ module TestCloneFromMasterElementMixin
+         ]
+       }
+     }'
+-    hash = JSON.parse(json, {:symbolize_names => true})
++    hash = JSON.parse(json, symbolize_names: true)
+     assert_equal(hash, obj.to_status('2'))
+   end
+ end
+diff --git a/pcsd/test/test_pcs.rb b/pcsd/test/test_pcs.rb
+index 48ec53637..87cc210ee 100644
+--- a/pcsd/test/test_pcs.rb
++++ b/pcsd/test/test_pcs.rb
+@@ -80,7 +80,7 @@ class TestGetNodesAttributes < Test::Unit::TestCase
+           "name": "test",
+           "value": "44"
+         }
+-      ]', {:symbolize_names => true})
++      ]', symbolize_names: true)
+     expected['node3'] = JSON.parse(
+       '[
+         {
+@@ -98,7 +98,7 @@ class TestGetNodesAttributes < Test::Unit::TestCase
+           "name": "test321",
+           "value": "321"
+         }
+-      ]', {:symbolize_names => true})
++      ]', symbolize_names: true)
+     assert_equal(expected, get_node_attributes(nil, cib_dom))
+   end
+ end
+-- 
+2.55.0
+

                 reply	other threads:[~2026-09-23 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179016994849.1.75108668322991570.rpms-pcs-7bd79575368c@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox