Adjust regex to support rubygem-json-2.6.3 error

This commit is contained in:
bizhiyuan 2023-08-06 03:28:43 +08:00
parent 67e6d04f5e
commit 2703130a56
2 changed files with 39 additions and 2 deletions

View File

@ -0,0 +1,34 @@
From 92f0b7927577e190137a466ffeb4ae06c428efcd Mon Sep 17 00:00:00 2001
From: bizhiyuan <bizhiyuan@kylinos.cn>
Date: Sun, 6 Aug 2023 01:12:21 +0800
Subject: [PATCH] Adjust regex to support json2.6.3 error
---
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 7aaf434..a580b24 100644
--- a/pcsd/test/test_config.rb
+++ b/pcsd/test/test_config.rb
@@ -126,7 +126,7 @@ class TestConfig < Test::Unit::TestCase
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 @@ class TestCfgKnownHosts < Test::Unit::TestCase
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)
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: pcs
Version: 0.11.2
Release: 1
Release: 2
License: GPLv2 and BSD-2-Clause and ASL 2.0 and MIT
URL: https://github.com/ClusterLabs/pcs
Summary: Pacemaker Configuration System
@ -40,7 +40,7 @@ Patch0: simplify-ternar-expression.patch
Patch1: fix-backend-parameter-all-in-cluster-destroy.patch
Patch2: bz2093935-01-Python-3.11-related-fixes.patch
Patch3: Support-for-openEuler.patch
Patch4: Adjust-regex-to-support-json-2.6.3-error.patch
# git for patches
BuildRequires: git-core
BuildRequires: make
@ -403,6 +403,9 @@ run_all_tests
%license pyagentx_LICENSE.txt
%changelog
* Mon Aug 07 2023 bizhiyuan <bizhiyuan@kylinos.cn> - 0.11.2-2
- Adjust regex pattern for ruby to support json 2.6.3 build error
* Mon Feb 06 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 0.11.2-1
- Update package to version 0.11.2