Rebased to latest upstream sources (see CHANGELOG.md)

- Updated pcs-web-ui
- Added rubygem dependency: childprocess
- Removed rubygem dependency: open4
This commit is contained in:
Michal Pospisil 2022-12-13 10:47:51 +01:00
parent b937466e5b
commit dc07da9166
6 changed files with 41 additions and 104 deletions

3
.gitignore vendored
View File

@ -100,3 +100,6 @@
/pcs-0.11.3.tar.gz
/pcs-web-ui-0.1.14.tar.gz
/pcs-web-ui-node-modules-0.1.14.tar.xz
/pcs-0.11.4.15-f7301.tar.gz
/pcs-web-ui-0.1.16.tar.gz
/pcs-web-ui-node-modules-0.1.16.tar.xz

View File

@ -1,37 +0,0 @@
From 72c611ee995f248d7dcf2eb081ca8543dde57c03 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Thu, 8 Dec 2022 22:47:59 +0900
Subject: [PATCH] pcsd ruby: adjust to json 2.6.3 error message change
json 2.6.3 now removes line number information from parser
error message.
Adjust regex pattern on pcs test code for ruby to support
this error format.
Fixes #606 .
---
pcsd/test/test_config.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pcsd/test/test_config.rb b/pcsd/test/test_config.rb
index 7aaf43498..a580b24fa 100644
--- a/pcsd/test/test_config.rb
+++ b/pcsd/test/test_config.rb
@@ -126,7 +126,7 @@ def test_parse_malformed()
assert_equal('error', $logger.log[0][0])
assert_match(
# the number is based on JSON gem version
- /Unable to parse pcs_settings file: \d+: unexpected token/,
+ /Unable to parse pcs_settings file: (\d+: )?unexpected token/,
$logger.log[0][1]
)
assert_equal(fixture_empty_config, cfg.text)
@@ -723,7 +723,7 @@ def test_parse_malformed()
assert_equal('error', $logger.log[0][0])
assert_match(
# the number is based on JSON gem version
- /Unable to parse known-hosts file: \d+: unexpected token/,
+ /Unable to parse known-hosts file: (\d+: )?unexpected token/,
$logger.log[0][1]
)
assert_empty_data(cfg)

View File

@ -1,46 +0,0 @@
From 7964f6b73275a9c7c37d0572639bd19330fdb5b5 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Wed, 10 Aug 2022 14:47:53 +0200
Subject: [PATCH] fix ruby socket permissions
---
pcsd/rserver.rb | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/pcsd/rserver.rb b/pcsd/rserver.rb
index e2c5e2a1..4fde639e 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.3

View File

@ -1,24 +1,24 @@
Name: pcs
Version: 0.11.3
Release: 5%{?dist}
Version: 0.11.4
Release: 1%{?dist}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
# GPL-2.0-only: pcs
# MIT: dacite, ember, handlebars, jquery, jquery-ui
# (GPLv2 or Ruby) and BSD: thin
# (GPL-2.0-only or Ruby) and BSD-2-Clause: thin
License: GPLv2 and MIT and (GPLv2 or Ruby) and BSD
License: GPL-2.0-only AND MIT AND (GPL-2.0-only OR Ruby) AND BSD-2-Clause
URL: https://github.com/ClusterLabs/pcs
Group: System Environment/Base
Summary: Pacemaker Configuration System
%global version_or_commit %{version}
# %%global version_or_commit %%{version}.210-9862
# %%global version_or_commit %%{version}
%global version_or_commit %{version}.15-f7301
%global pcs_source_name %{name}-%{version_or_commit}
# ui_commit can be determined by hash, tag or branch
%global ui_commit 0.1.14
%global ui_modules_version 0.1.14
%global ui_commit 0.1.16
%global ui_modules_version 0.1.16
%global ui_src_name pcs-web-ui-%{ui_commit}
%global pcs_snmp_pkg_name pcs-snmp
@ -49,9 +49,6 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_comm
# pcs patches: <= 200
# Patch0: name.patch
Patch0: bz2123389-01-fix-ruby-socket-permissions.patch
# https://github.com/ClusterLabs/pcs/pull/607
Patch1: 02-pr607-pcsd-ruby-adjust-to-json-2_6_3-error-message-change.patch
# ui patches: >200
# Patch201: name.patch
@ -81,6 +78,7 @@ BuildRequires: python3-distro
BuildRequires: ruby >= 2.5.0
BuildRequires: ruby-devel
BuildRequires: rubygem-backports
BuildRequires: rubygem-childprocess
BuildRequires: rubygem-daemons
BuildRequires: rubygem-ethon
BuildRequires: rubygem-eventmachine
@ -88,7 +86,6 @@ BuildRequires: rubygem-ffi
BuildRequires: rubygem-io-console
BuildRequires: rubygem-json
BuildRequires: rubygem-mustermann
BuildRequires: rubygem-open4
BuildRequires: rubygem-rack
BuildRequires: rubygem-rack-protection
BuildRequires: rubygem-rack-test
@ -134,13 +131,13 @@ Requires: python3-tornado
# ruby and gems for pcsd
Requires: ruby >= 2.5.0
Requires: rubygem-backports
Requires: rubygem-childprocess
Requires: rubygem-daemons
Requires: rubygem-ethon
Requires: rubygem-eventmachine
Requires: rubygem-ffi
Requires: rubygem-json
Requires: rubygem-mustermann
Requires: rubygem-open4
Requires: rubygem-rack
Requires: rubygem-rack-protection
Requires: rubygem-rack-test
@ -182,9 +179,9 @@ easily view, modify and create pacemaker based clusters.
Group: System Environment/Base
Summary: Pacemaker cluster SNMP agent
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# GPLv2: pcs
# GPL-2.0-only: pcs
# BSD-2-Clause: pyagentx
License: GPLv2 and BSD-2-Clause
License: GPL-2.0-only AND BSD-2-Clause
URL: https://github.com/ClusterLabs/pcs
# tar for unpacking pyagetx source tar ball
@ -251,7 +248,7 @@ update_times_patch(){
# patch pcs sources
%autosetup -S git -n %{pcs_source_name} -N
%autopatch -p1 -M 200
update_times_patch %{PATCH0}
# update_times_patch %%{PATCH0}
# prepare dirs/files necessary for building all bundles
# -----------------------------------------------------
@ -267,9 +264,15 @@ cp -f %SOURCE42 rpm/
%build
%define debug_package %{nil}
# Booth authfile fix support
%if 0%{?fedora} >= 37
%define booth_build_options --enable-booth-enable-authfile-unset
%elif 0%{?fedora} >= 35
%define booth_build_options --enable-booth-enable-authfile-set --enable-booth-enable-authfile-unset
%endif
./autogen.sh
%{configure} --enable-local-build --enable-use-local-cache-only --enable-individual-bundling PYTHON=%{__python3} ruby_CFLAGS="%{optflags}" ruby_LIBS="%{build_ldflags}"
%{configure} --enable-local-build --enable-use-local-cache-only --enable-individual-bundling %{booth_build_options} PYTHON=%{__python3} ruby_CFLAGS="%{optflags}" ruby_LIBS="%{build_ldflags}"
make all
# build pcs-web-ui
@ -425,6 +428,12 @@ run_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Mon Dec 12 2022 Michal Pospisil <mpospisi@redhat.com> - 0.11.4-1
- Rebased to latest upstream sources (see CHANGELOG.md)
- Updated pcs-web-ui
- Added dependency rubygem-childprocess
- Removed dependency rubygem-open4
* Mon Dec 12 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.11.3-5
- Backport upstream patch for rubygem-json 2.6.3 error message format change

8
rpminspect.yaml Normal file
View File

@ -0,0 +1,8 @@
xml:
# exclude ruby templates from checks
exclude_path: .*\.erb$
shellsyntax:
# exclude ruby templates from checks
ignore:
- /usr/lib*/pcsd/vendor/bundle/gems/thin*/lib/thin/controllers/*.erb

View File

@ -1,6 +1,6 @@
SHA512 (pyagentx-0.4.pcs.2.tar.gz) = d4194fec9a3e5fefe3793d49b7fec1feafef294c7e613a06046c2993daeefc5cb39d7c5b2b402ff83e49b2d976953f862264288c758c0be09d997b5323cc558a
SHA512 (dacite-1.6.0.tar.gz) = 034255f095589d309fe5805413d8b148f430cd20a0de305b7954083b530d516da1d8f3f00ebb5264a8cfb77f2b2a76f1e2d863e78bd191f1d85021c5553815da
SHA512 (thin-1.8.1.gem) = c200ea03b7876b2a17b5875557fa967b8d01db20cc401811f314f3285f8249b8793e4709b7bc033a9c5813b9a51e3093c55f717b4a98b8fda171aa82813b7419
SHA512 (pcs-0.11.3.tar.gz) = 5575a825976d668029eed007b7ddf8b3ad7f3eb6a510c56f4c1779c9228660f5141df761166e3dc307de14313be2045c8dd6e637432a7cab6da51163b8e41578
SHA512 (pcs-web-ui-0.1.14.tar.gz) = aaaef6dcdd2255a3d48b9b03984debb61a5f83761fa70e5e2ecaf5c99bc38328cb8fc4347f2115b155ebcc862823ac6f89ef573f011ffe1118cb389e3cbe5661
SHA512 (pcs-web-ui-node-modules-0.1.14.tar.xz) = 5042023409fb49fd0fee12d86794d410e3e28608e28e5bc419aa1cf98f17dd3668081821edbf4f6d660707d40697b3dbde697702c7039459325fb6a4171d5d93
SHA512 (pcs-0.11.4.15-f7301.tar.gz) = 14d0bacd9d1634d2ba21ae190a576792ea8143c09753c978dad9d195bdee22f13bad491306660e6f4a1156112324d6d5f45519bfb27ea384a8550fc84faecb4c
SHA512 (pcs-web-ui-0.1.16.tar.gz) = d0451df5fe8d1c3bd14df807f3eeae2e617c7498f52d3db67187553585fa019ba7fe7304e670f430943619f9bdca6b7c0f220d94c3b2423d8e75a1a374cde88c
SHA512 (pcs-web-ui-node-modules-0.1.16.tar.xz) = 2f94b49bdd7a01a01885cd2d48c5f8bc0338819a90851c404e951ea1aa343ab34f6dc0d4bf40a2cafd6c38bd766062f5577712b25761628e1772fae1e3a4c59f