Merge "Update puppet-rabbitmq to work for Rabbitmq 3.8.0+" into f/centos8

This commit is contained in:
Zuul 2021-04-16 21:24:24 +00:00 committed by Gerrit Code Review
commit bbafa3451b
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From eb94234c73d56dbacac46e274ffeca256d413ff1 Mon Sep 17 00:00:00 2001
From: Angie Wang <angie.wang@windriver.com>
Date: Sun, 11 Apr 2021 20:12:37 -0400
Subject: [PATCH] meta Extend version regex to work for RabbitMQ 3.8.0
Signed-off-by: Angie Wang <angie.wang@windriver.com>
---
SPECS/puppet-rabbitmq.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/puppet-rabbitmq.spec b/SPECS/puppet-rabbitmq.spec
index 7f3a412..5966a9e 100644
--- a/SPECS/puppet-rabbitmq.spec
+++ b/SPECS/puppet-rabbitmq.spec
@@ -26,6 +26,7 @@ Patch0002: 0002-Changed-cipher-specification-to-openssl-format.patch
Patch0003: 0003-Eliminate-Puppet-4-deprecation-warnings.patch
Patch0004: 0004-Partially-revert-upstream-commit-f7c3a4a637d59f3065d.patch
Patch0005: 0005-Remove-the-rabbitmq_nodename-fact.patch
+Patch0006: 0006-Extend-version-regex-to-work-for-RabbitMQ-3.8.0.patch
BuildArch: noarch
@@ -43,6 +44,7 @@ Installs, configures, and manages RabbitMQ.
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
+%patch0006 -p1
find . -type f -name ".*" -exec rm {} +
--
2.29.2

View File

@ -4,3 +4,4 @@
0004-Add-deprecation-patch-to-spec.patch 0004-Add-deprecation-patch-to-spec.patch
0005-metapatch-for-revert.patch 0005-metapatch-for-revert.patch
0006-metapatch-for-fact-removal.patch 0006-metapatch-for-fact-removal.patch
0007-meta-Extend-version-regex-to-work-for-RabbitMQ-3.8.0.patch

View File

@ -0,0 +1,26 @@
From f29309c7a9c5633f39e51c2e36f629eceb5ea2c2 Mon Sep 17 00:00:00 2001
From: Angie Wang <angie.wang@windriver.com>
Date: Sun, 11 Apr 2021 20:04:48 -0400
Subject: [PATCH] Extend version regex to work for RabbitMQ 3.8.0
Signed-off-by: Angie Wang <angie.wang@windriver.com>
---
lib/puppet/provider/rabbitmqctl.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/puppet/provider/rabbitmqctl.rb b/lib/puppet/provider/rabbitmqctl.rb
index c2476dc..16f18d9 100644
--- a/lib/puppet/provider/rabbitmqctl.rb
+++ b/lib/puppet/provider/rabbitmqctl.rb
@@ -4,7 +4,7 @@ class Puppet::Provider::Rabbitmqctl < Puppet::Provider
def self.rabbitmq_version
output = rabbitmqctl('-q', 'status')
- version = output.match(/\{rabbit,"RabbitMQ","([\d\.]+)"\}/)
+ version = output.match(%r{RabbitMQ.*?([\d\.]+)})
version[1] if version
end
--
2.29.2