Backport upstream patch for rubygem-json 2.6.3 error message format change
This commit is contained in:
parent
09490deee9
commit
b937466e5b
@ -0,0 +1,37 @@
|
|||||||
|
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)
|
7
pcs.spec
7
pcs.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pcs
|
Name: pcs
|
||||||
Version: 0.11.3
|
Version: 0.11.3
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
|
||||||
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
|
||||||
# GPLv2: pcs
|
# GPLv2: pcs
|
||||||
@ -50,6 +50,8 @@ Source101: https://github.com/ClusterLabs/pcs-web-ui/releases/download/%{ui_comm
|
|||||||
# pcs patches: <= 200
|
# pcs patches: <= 200
|
||||||
# Patch0: name.patch
|
# Patch0: name.patch
|
||||||
Patch0: bz2123389-01-fix-ruby-socket-permissions.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
|
# ui patches: >200
|
||||||
# Patch201: name.patch
|
# Patch201: name.patch
|
||||||
@ -423,6 +425,9 @@ run_all_tests
|
|||||||
%license pyagentx_LICENSE.txt
|
%license pyagentx_LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
||||||
|
|
||||||
* Wed Sep 07 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-4
|
* Wed Sep 07 2022 Miroslav Lisik <mlisik@redhat.com> - 0.11.3-4
|
||||||
- Fixed ruby socket permissions
|
- Fixed ruby socket permissions
|
||||||
- Resolves: rhbz#2123389
|
- Resolves: rhbz#2123389
|
||||||
|
Loading…
Reference in New Issue
Block a user