CentOS 8: Upgrade rabbitmq-server to 3.8.2
1.Upgrade rabbitmq-server to el8 version 2.Delete patches which I added ever 0002-upgrade_new_official_way_get_stack_trace.patch rabbitmq-server-0007-upgrade_new_official_way_to_get_stacktrace.patch These patch I add aims at fix the build issue of get stacktrace and with upgrading to el8 version, build issue of get_stacktrace no longer reproduce. so we could delete them. Story: 2006729 Task: 37674 Change-Id: Icb8cd521107262fd5f663ec9c3c1ac5559c0513a Signed-off-by: Long Li <lilong-neu@neusoft.com>
This commit is contained in:
parent
c6a37f41a1
commit
78fc57eef8
1
centos_srpms_3rdparties.lst
Normal file
1
centos_srpms_3rdparties.lst
Normal file
@ -0,0 +1 @@
|
||||
rabbitmq-server-3.8.2-3.el8.src.rpm#https://cbs.centos.org/kojifiles/packages/rabbitmq-server/3.8.2/3.el8/src/rabbitmq-server-3.8.2-3.el8.src.rpm
|
@ -4,4 +4,3 @@ python-osc-lib-1.7.0-1.el7.src.rpm
|
||||
python-oslo-messaging-5.30.6-1.el7.src.rpm
|
||||
python-os-vif-1.9.1-1.el7.src.rpm
|
||||
python-wsme-0.9.2-1.el7.src.rpm
|
||||
rabbitmq-server-3.6.5-1.el7.src.rpm
|
||||
|
@ -1,2 +1,2 @@
|
||||
TIS_PATCH_VER=7
|
||||
TIS_PATCH_VER=1
|
||||
BUILD_IS_SLOW=3
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 9eb2a001b8f80d1a66d4ec78d882d7d6cb4dff51 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Tue, 24 Jan 2017 12:16:38 -0500
|
||||
Subject: [PATCH 1/2]: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/rabbitmq-server.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletions(-)
|
||||
|
||||
diff --git a/SPECS/rabbitmq-server.spec b/SPECS/rabbitmq-server.spec
|
||||
index 3a7d940..435f427 100644
|
||||
--- a/SPECS/rabbitmq-server.spec
|
||||
+++ b/SPECS/rabbitmq-server.spec
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name: rabbitmq-server
|
||||
Version: 3.6.5
|
||||
-Release: 1%{?dist}
|
||||
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
|
||||
License: MPLv1.1
|
||||
Group: Development/Libraries
|
||||
Source0: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.xz
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 9eb2a001b8f80d1a66d4ec78d882d7d6cb4dff51 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Tue, 24 Jan 2017 12:16:38 -0500
|
||||
Subject: [PATCH 1/2] WRS: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||
---
|
||||
SPECS/rabbitmq-server.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/rabbitmq-server.spec b/SPECS/rabbitmq-server.spec
|
||||
index db01723..7b879ed 100644
|
||||
--- a/SPECS/rabbitmq-server.spec
|
||||
+++ b/SPECS/rabbitmq-server.spec
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
Name: rabbitmq-server
|
||||
Version: 3.8.2
|
||||
-Release: 3%{?dist}
|
||||
+Release: 3.el8%{?_tis_dist}.%{tis_patch_ver}
|
||||
License: MPLv1.1
|
||||
Source0: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz
|
||||
Source1: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz.asc
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,34 @@
|
||||
From cc25d3100a677e0c69a11975fd30ce72937ad575 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Tue, 24 Jan 2017 12:16:38 -0500
|
||||
Subject: [PATCH 2/2]: Allow-rabbitmqctl-to-run-as-root-and-set-root-home.patch
|
||||
|
||||
---
|
||||
SPECS/rabbitmq-server.spec | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/SPECS/rabbitmq-server.spec b/SPECS/rabbitmq-server.spec
|
||||
index 7b879ed..9b7148c 100644
|
||||
--- a/SPECS/rabbitmq-server.spec
|
||||
+++ b/SPECS/rabbitmq-server.spec
|
||||
@@ -25,6 +25,8 @@ Patch201: rabbitmq-server-release-0001-Don-t-use-templates.patch
|
||||
Patch202: rabbitmq-server-release-0002-Revert-Use-template-in-rabbitmq-script-wrapper-for-R.patch
|
||||
Patch301: rabbitmq-amqp1.0-common-0001-force-python3.patch
|
||||
|
||||
+Patch1001: Allow-rabbitmqctl-to-run-as-root-and-set-root-home.patch
|
||||
+
|
||||
URL: https://www.rabbitmq.com/
|
||||
BuildRequires: elixir
|
||||
BuildRequires: erlang >= %{erlang_minver}
|
||||
@@ -83,6 +85,8 @@ cd deps/amqp10_common
|
||||
%patch301 -p1
|
||||
cd ../..
|
||||
|
||||
+%patch1001 -p1
|
||||
+
|
||||
# We have to remove it until common_test subpackage lands RHOS
|
||||
rm -f \
|
||||
deps/amqp_client/src/rabbit_ct_client_helpers.erl \
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,41 +0,0 @@
|
||||
From e7c67702c374d330ca99cf25ff09902228ce1924 Mon Sep 17 00:00:00 2001
|
||||
From: Long Li <lilong-neu@neusoft.com>
|
||||
Date: Fri, 15 Nov 2019 16:39:58 +0800
|
||||
Subject: [PATCH] upgrade_new_official_way_get_stack_trace
|
||||
|
||||
---
|
||||
SPECS/rabbitmq-server.spec | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/rabbitmq-server.spec b/SPECS/rabbitmq-server.spec
|
||||
index 3a7d940..47e7748 100644
|
||||
--- a/SPECS/rabbitmq-server.spec
|
||||
+++ b/SPECS/rabbitmq-server.spec
|
||||
@@ -22,12 +22,15 @@ Patch3: rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch
|
||||
Patch4: rabbitmq-server-0004-Allow-guest-login-from-non-loopback-connections.patch
|
||||
Patch5: rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch
|
||||
Patch6: rabbitmq-server-0006-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch
|
||||
+
|
||||
+Patch7: rabbitmq-server-0007-upgrade_new_official_way_to_get_stacktrace.patch
|
||||
+
|
||||
Patch101: rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch
|
||||
Patch102: rabbitmq-common-0002-Use-proto_dist-from-command-line.patch
|
||||
|
||||
URL: http://www.rabbitmq.com/
|
||||
BuildArch: noarch
|
||||
-BuildRequires: erlang >= %{erlang_minver}, python-simplejson, xmlto, libxslt, python, zip
|
||||
+BuildRequires: erlang >= %{erlang_minver}, python3-simplejson, xmlto, libxslt, python3, zip
|
||||
BuildRequires: rsync
|
||||
BuildRequires: systemd
|
||||
Requires: logrotate
|
||||
@@ -63,6 +66,7 @@ scalable implementation of an AMQP broker.
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
+%patch7 -p1
|
||||
|
||||
cd deps/rabbit_common
|
||||
%patch101 -p1
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From cc25d3100a677e0c69a11975fd30ce72937ad575 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Tue, 24 Jan 2017 12:16:38 -0500
|
||||
Subject: [PATCH 2/2]: Allow-rabbitmqctl-to-run-as-root-and-set-root-home.patch
|
||||
|
||||
---
|
||||
SOURCES/rabbitmq-script-wrapper | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SOURCES/rabbitmq-script-wrapper b/SOURCES/rabbitmq-script-wrapper
|
||||
index 3d2fc49..d039b23 100644
|
||||
--- a/SOURCES/rabbitmq-script-wrapper
|
||||
+++ b/SOURCES/rabbitmq-script-wrapper
|
||||
@@ -42,7 +42,8 @@ elif [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ; then
|
||||
fi
|
||||
exec /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
|
||||
elif [ `id -u` = 0 ] ; then
|
||||
- su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}"
|
||||
+ export HOME=${HOME:-/root}
|
||||
+ /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}"
|
||||
else
|
||||
/usr/lib/rabbitmq/bin/${SCRIPT}
|
||||
echo
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,3 +1,2 @@
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
||||
Allow-rabbitmqctl-to-run-as-root-and-set-root-home.patch
|
||||
0002-upgrade_new_official_way_get_stack_trace.patch
|
||||
0001-Update-package-versioning.patch
|
||||
0002-spec-include-patches.patch
|
||||
|
@ -0,0 +1,26 @@
|
||||
From cc25d3100a677e0c69a11975fd30ce72937ad575 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Tue, 24 Jan 2017 12:16:38 -0500
|
||||
Subject: [PATCH 2/2]: Allow rabbitmqctl to run as root and set root home
|
||||
|
||||
---
|
||||
scripts/rabbitmq-script-wrapper | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/rabbitmq-script-wrapper b/scripts/rabbitmq-script-wrapper
|
||||
index 4acba9d..fe082e4 100644
|
||||
--- a/scripts/rabbitmq-script-wrapper
|
||||
+++ b/scripts/rabbitmq-script-wrapper
|
||||
@@ -107,7 +107,8 @@ exec_script_as_root() {
|
||||
fi
|
||||
elif [ -x /bin/su ]
|
||||
then
|
||||
- exec /bin/su -s /bin/sh rabbitmq -- "/usr/lib/rabbitmq/bin/$SCRIPT" "$@"
|
||||
+ export HOME=${HOME:-/root}
|
||||
+ exec /bin/sh -- "/usr/lib/rabbitmq/bin/$SCRIPT" "$@"
|
||||
else
|
||||
echo "Please ensure /bin/su or /sbin/runuser exists and can be executed by $USER." 1>&2
|
||||
exit 1
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,112 +0,0 @@
|
||||
From d8fcee5dbe9c64288e7be806b147d1b09c085926 Mon Sep 17 00:00:00 2001
|
||||
From: Long Li <lilong-neu@neusoft.com>
|
||||
Date: Fri, 15 Nov 2019 16:29:36 +0800
|
||||
Subject: rabbitmq-server-0007-upgrade_new_official_way_to_get_stacktrace.patch
|
||||
|
||||
Signed-off-by: Long Li <lilong-neu@neusoft.com>
|
||||
---
|
||||
src/delegate.erl | 4 ++--
|
||||
src/rabbit.erl | 4 ++--
|
||||
src/rabbit_error_logger_file_h.erl | 4 ++--
|
||||
src/rabbit_node_monitor.erl | 4 ++--
|
||||
src/rabbit_upgrade_functions.erl | 1 +
|
||||
src/vm_memory_monitor.erl | 4 ++--
|
||||
6 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/delegate.erl b/src/delegate.erl
|
||||
index 778137c..fcc670a 100644
|
||||
--- a/src/delegate.erl
|
||||
+++ b/src/delegate.erl
|
||||
@@ -197,8 +197,8 @@ safe_invoke(Pids, FunOrMFA) when is_list(Pids) ->
|
||||
safe_invoke(Pid, FunOrMFA) when is_pid(Pid) ->
|
||||
try
|
||||
{ok, Pid, apply1(FunOrMFA, Pid)}
|
||||
- catch Class:Reason ->
|
||||
- {error, Pid, {Class, Reason, erlang:get_stacktrace()}}
|
||||
+ catch Class:Reason:Stacktrace ->
|
||||
+ {error, Pid, {Class, Reason, Stacktrace}}
|
||||
end.
|
||||
|
||||
apply1({M, F, A}, Arg) -> apply(M, F, [Arg | A]);
|
||||
diff --git a/src/rabbit.erl b/src/rabbit.erl
|
||||
index f9e8231..a551e63 100644
|
||||
--- a/src/rabbit.erl
|
||||
+++ b/src/rabbit.erl
|
||||
@@ -298,8 +298,8 @@ start_it(StartFun) ->
|
||||
catch
|
||||
throw:{could_not_start, _App, _Reason} = Err ->
|
||||
boot_error(Err, not_available);
|
||||
- _:Reason ->
|
||||
- boot_error(Reason, erlang:get_stacktrace())
|
||||
+ _:Reason:Stacktrace ->
|
||||
+ boot_error(Reason, Stacktrace)
|
||||
after
|
||||
unlink(Marker),
|
||||
Marker ! stop,
|
||||
diff --git a/src/rabbit_error_logger_file_h.erl b/src/rabbit_error_logger_file_h.erl
|
||||
index 930aead..fe04008 100644
|
||||
--- a/src/rabbit_error_logger_file_h.erl
|
||||
+++ b/src/rabbit_error_logger_file_h.erl
|
||||
@@ -120,11 +120,11 @@ safe_handle_event(HandleEvent, Event, State) ->
|
||||
try
|
||||
HandleEvent(Event, State)
|
||||
catch
|
||||
- _:Error ->
|
||||
+ _:Error:Stacktrace ->
|
||||
io:format(
|
||||
"Error in log handler~n====================~n"
|
||||
"Event: ~P~nError: ~P~nStack trace: ~p~n~n",
|
||||
- [Event, 30, Error, 30, erlang:get_stacktrace()]),
|
||||
+ [Event, 30, Error, 30, Stacktrace]),
|
||||
{ok, State}
|
||||
end.
|
||||
|
||||
diff --git a/src/rabbit_node_monitor.erl b/src/rabbit_node_monitor.erl
|
||||
index 0322aac..7c5ed81 100644
|
||||
--- a/src/rabbit_node_monitor.erl
|
||||
+++ b/src/rabbit_node_monitor.erl
|
||||
@@ -709,10 +709,10 @@ register_outside_app_process(Fun, WaitForExistingProcess) ->
|
||||
do_run_outside_app_fun(Fun) ->
|
||||
try
|
||||
Fun()
|
||||
- catch _:E ->
|
||||
+ catch _:E:Stacktrace ->
|
||||
rabbit_log:error(
|
||||
"rabbit_outside_app_process:~n~p~n~p~n",
|
||||
- [E, erlang:get_stacktrace()])
|
||||
+ [E, Stacktrace])
|
||||
end.
|
||||
|
||||
wait_for_cluster_recovery(Condition) ->
|
||||
diff --git a/src/rabbit_upgrade_functions.erl b/src/rabbit_upgrade_functions.erl
|
||||
index 67c2a84..5b944c5 100644
|
||||
--- a/src/rabbit_upgrade_functions.erl
|
||||
+++ b/src/rabbit_upgrade_functions.erl
|
||||
@@ -19,6 +19,7 @@
|
||||
%% If you are tempted to add include("rabbit.hrl"). here, don't. Using record
|
||||
%% defs here leads to pain later.
|
||||
|
||||
+-compile(nowarn_export_all).
|
||||
-compile([export_all]).
|
||||
|
||||
-rabbit_upgrade({remove_user_scope, mnesia, []}).
|
||||
diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl
|
||||
index 6b04368..1aa2ffa 100644
|
||||
--- a/src/vm_memory_monitor.erl
|
||||
+++ b/src/vm_memory_monitor.erl
|
||||
@@ -81,10 +81,10 @@
|
||||
get_total_memory() ->
|
||||
try
|
||||
get_total_memory(os:type())
|
||||
- catch _:Error ->
|
||||
+ catch _:Error:Stacktrace ->
|
||||
rabbit_log:warning(
|
||||
"Failed to get total system memory: ~n~p~n~p~n",
|
||||
- [Error, erlang:get_stacktrace()]),
|
||||
+ [Error, Stacktrace]),
|
||||
unknown
|
||||
end.
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1 +1 @@
|
||||
mirror:Source/rabbitmq-server-3.6.5-1.el7.src.rpm
|
||||
mirror:Source/rabbitmq-server-3.8.2-3.el8.src.rpm
|
||||
|
Loading…
x
Reference in New Issue
Block a user