diff --git a/.gitignore b/.gitignore index e039fbc..21fa448 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ rabbitmq-server-1.8.0.tar.gz /rabbitmq-server-3.6.2.tar.xz /rabbitmq-server-3.6.3.tar.xz /rabbitmq-server-3.6.5.tar.xz +/rabbitmq-server-3.6.6.tar.xz diff --git a/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch b/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch deleted file mode 100644 index e6c6fe9..0000000 --- a/rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch +++ /dev/null @@ -1,388 +0,0 @@ -From: Alexey Lebedeff -Date: Wed, 9 Mar 2016 14:55:02 +0300 -Subject: [PATCH] Avoid RPC roundtrips while listing items - -- Emit info about particular items in parallel on every node, with - results delivered directly to a `rabbitmqctl` instance. -- `rabbit_control_misc:wait_for_info_messages/5` can wait for results of - more than one emitting map. -- Stop passing arround InfoItemKeys in - `rabbit_control_misc:wait_for_info_messages/5`, the same information - could be directly encoded in DisplayFun closure. -- Add `emit` to function names, to avoid confusion with regular ones - which return result directly. - -Part of https://github.com/rabbitmq/rabbitmq-server/pull/683 - -diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl -index 27b352a..e09e02c 100644 ---- a/src/rabbit_amqqueue.erl -+++ b/src/rabbit_amqqueue.erl -@@ -25,10 +25,10 @@ - check_exclusive_access/2, with_exclusive_access_or_die/3, - stat/1, deliver/2, requeue/3, ack/3, reject/4]). - -export([list/0, list/1, info_keys/0, info/1, info/2, info_all/1, info_all/2, -- info_all/6, info_local/1]). -+ emit_info_all/5, list_local/1, info_local/1]). - -export([list_down/1]). - -export([force_event_refresh/1, notify_policy_changed/1]). ---export([consumers/1, consumers_all/1, consumers_all/3, consumer_info_keys/0]). -+-export([consumers/1, consumers_all/1, emit_consumers_all/4, consumer_info_keys/0]). - -export([basic_get/4, basic_consume/10, basic_cancel/4, notify_decorators/1]). - -export([notify_sent/2, notify_sent_queue_down/1, resume/2]). - -export([notify_down_all/2, notify_down_all/3, activate_limit_all/2, credit/5]). -@@ -41,7 +41,8 @@ - - %% internal - -export([internal_declare/2, internal_delete/1, run_backing_queue/3, -- set_ram_duration_target/2, set_maximum_since_use/2]). -+ set_ram_duration_target/2, set_maximum_since_use/2, -+ emit_info_local/4, emit_info_down/4, emit_consumers_local/3]). - - -include("rabbit.hrl"). - -include_lib("stdlib/include/qlc.hrl"). -@@ -117,10 +118,6 @@ - -spec info_all(rabbit_types:vhost()) -> [rabbit_types:infos()]. - -spec info_all(rabbit_types:vhost(), rabbit_types:info_keys()) -> - [rabbit_types:infos()]. ---spec info_all -- (rabbit_types:vhost(), rabbit_types:info_keys(), boolean(), boolean(), -- reference(), pid()) -> -- 'ok'. - -spec force_event_refresh(reference()) -> 'ok'. - -spec notify_policy_changed(rabbit_types:amqqueue()) -> 'ok'. - -spec consumers(rabbit_types:amqqueue()) -> -@@ -130,7 +127,6 @@ - -spec consumers_all(rabbit_types:vhost()) -> - [{name(), pid(), rabbit_types:ctag(), boolean(), - non_neg_integer(), rabbit_framing:amqp_table()}]. ---spec consumers_all(rabbit_types:vhost(), reference(), pid()) -> 'ok'. - -spec stat(rabbit_types:amqqueue()) -> - {'ok', non_neg_integer(), non_neg_integer()}. - -spec delete_immediately(qpids()) -> 'ok'. -@@ -627,16 +623,18 @@ info_all(VHostPath, Items) -> - map(list(VHostPath), fun (Q) -> info(Q, Items) end) ++ - map(list_down(VHostPath), fun (Q) -> info_down(Q, Items, down) end). - --info_all(VHostPath, Items, NeedOnline, NeedOffline, Ref, AggregatorPid) -> -- NeedOnline andalso rabbit_control_misc:emitting_map_with_exit_handler( -- AggregatorPid, Ref, fun(Q) -> info(Q, Items) end, list(VHostPath), -- continue), -- NeedOffline andalso rabbit_control_misc:emitting_map_with_exit_handler( -- AggregatorPid, Ref, fun(Q) -> info_down(Q, Items, down) end, -- list_down(VHostPath), -- continue), -- %% Previous maps are incomplete, finalize emission -- rabbit_control_misc:emitting_map(AggregatorPid, Ref, fun(_) -> no_op end, []). -+emit_info_local(VHostPath, Items, Ref, AggregatorPid) -> -+ rabbit_control_misc:emitting_map_with_exit_handler( -+ AggregatorPid, Ref, fun(Q) -> info(Q, Items) end, list_local(VHostPath)). -+ -+emit_info_all(Nodes, VHostPath, Items, Ref, AggregatorPid) -> -+ Pids = [ spawn_link(Node, rabbit_amqqueue, emit_info_local, [VHostPath, Items, Ref, AggregatorPid]) || Node <- Nodes ], -+ rabbit_control_misc:await_emitters_termination(Pids). -+ -+emit_info_down(VHostPath, Items, Ref, AggregatorPid) -> -+ rabbit_control_misc:emitting_map_with_exit_handler( -+ AggregatorPid, Ref, fun(Q) -> info_down(Q, Items, down) end, -+ list_down(VHostPath)). - - info_local(VHostPath) -> - map(list_local(VHostPath), fun (Q) -> info(Q, [name]) end). -@@ -664,12 +662,17 @@ consumers_all(VHostPath) -> - map(list(VHostPath), - fun(Q) -> get_queue_consumer_info(Q, ConsumerInfoKeys) end)). - --consumers_all(VHostPath, Ref, AggregatorPid) -> -+emit_consumers_all(Nodes, VHostPath, Ref, AggregatorPid) -> -+ Pids = [ spawn_link(Node, rabbit_amqqueue, emit_consumers_local, [VHostPath, Ref, AggregatorPid]) || Node <- Nodes ], -+ rabbit_control_misc:await_emitters_termination(Pids), -+ ok. -+ -+emit_consumers_local(VHostPath, Ref, AggregatorPid) -> - ConsumerInfoKeys = consumer_info_keys(), - rabbit_control_misc:emitting_map( - AggregatorPid, Ref, - fun(Q) -> get_queue_consumer_info(Q, ConsumerInfoKeys) end, -- list(VHostPath)). -+ list_local(VHostPath)). - - get_queue_consumer_info(Q, ConsumerInfoKeys) -> - [lists:zip(ConsumerInfoKeys, -diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl -index ab7d38d..837a892 100644 ---- a/src/rabbit_channel.erl -+++ b/src/rabbit_channel.erl -@@ -56,7 +56,7 @@ - -export([send_command/2, deliver/4, deliver_reply/2, - send_credit_reply/2, send_drained/2]). - -export([list/0, info_keys/0, info/1, info/2, info_all/0, info_all/1, -- info_all/3, info_local/1]). -+ emit_info_all/4, info_local/1]). - -export([refresh_config_local/0, ready_for_close/1]). - -export([force_event_refresh/1]). - -@@ -64,7 +64,7 @@ - handle_info/2, handle_pre_hibernate/1, prioritise_call/4, - prioritise_cast/3, prioritise_info/3, format_message_queue/2]). - %% Internal ---export([list_local/0, deliver_reply_local/3]). -+-export([list_local/0, emit_info_local/3, deliver_reply_local/3]). - -export([get_vhost/1, get_user/1]). - - -record(ch, { -@@ -220,7 +220,6 @@ - -spec info(pid(), rabbit_types:info_keys()) -> rabbit_types:infos(). - -spec info_all() -> [rabbit_types:infos()]. - -spec info_all(rabbit_types:info_keys()) -> [rabbit_types:infos()]. ---spec info_all(rabbit_types:info_keys(), reference(), pid()) -> 'ok'. - -spec refresh_config_local() -> 'ok'. - -spec ready_for_close(pid()) -> 'ok'. - -spec force_event_refresh(reference()) -> 'ok'. -@@ -329,9 +328,16 @@ info_all(Items) -> - info_local(Items) -> - rabbit_misc:filter_exit_map(fun (C) -> info(C, Items) end, list_local()). - --info_all(Items, Ref, AggregatorPid) -> -+emit_info_all(Nodes, Items, Ref, AggregatorPid) -> -+ Pids = [ spawn_link(Node, rabbit_channel, emit_info_local, [Items, Ref, AggregatorPid]) || Node <- Nodes ], -+ rabbit_control_misc:await_emitters_termination(Pids). -+ -+emit_info_local(Items, Ref, AggregatorPid) -> -+ emit_info(list_local(), Items, Ref, AggregatorPid). -+ -+emit_info(PidList, InfoItems, Ref, AggregatorPid) -> - rabbit_control_misc:emitting_map_with_exit_handler( -- AggregatorPid, Ref, fun(C) -> info(C, Items) end, list()). -+ AggregatorPid, Ref, fun(C) -> info(C, InfoItems) end, PidList). - - refresh_config_local() -> - rabbit_misc:upmap( -diff --git a/src/rabbit_control_misc.erl b/src/rabbit_control_misc.erl -index 2e1f6cc..3b0c60b 100644 ---- a/src/rabbit_control_misc.erl -+++ b/src/rabbit_control_misc.erl -@@ -17,7 +17,8 @@ - -module(rabbit_control_misc). - - -export([emitting_map/4, emitting_map/5, emitting_map_with_exit_handler/4, -- emitting_map_with_exit_handler/5, wait_for_info_messages/5, -+ emitting_map_with_exit_handler/5, wait_for_info_messages/6, -+ spawn_emitter_caller/7, await_emitters_termination/1, - print_cmd_result/2]). - - -spec emitting_map(pid(), reference(), fun(), list()) -> 'ok'. -@@ -25,7 +26,14 @@ - -spec emitting_map_with_exit_handler - (pid(), reference(), fun(), list()) -> 'ok'. - -spec emitting_map_with_exit_handler -- (pid(), reference(), fun(), list(), atom()) -> 'ok'. -+ (pid(), reference(), fun(), list(), 'continue') -> 'ok'. -+ -+-type fold_fun() :: fun ((term(), term()) -> term()). -+ -+-spec wait_for_info_messages (pid(), reference(), fold_fun(), term(), timeout(), non_neg_integer()) -> {'ok', term()} | {'error', term()}. -+-spec spawn_emitter_caller (node(), module(), atom(), [term()], reference(), pid(), timeout()) -> 'ok'. -+-spec await_emitters_termination ([pid()]) -> 'ok'. -+ - -spec print_cmd_result(atom(), term()) -> 'ok'. - - emitting_map(AggregatorPid, Ref, Fun, List) -> -@@ -65,27 +73,108 @@ step_with_exit_handler(AggregatorPid, Ref, Fun, Item) -> - ok - end. - --wait_for_info_messages(Pid, Ref, ArgAtoms, DisplayFun, Timeout) -> -- _ = notify_if_timeout(Pid, Ref, Timeout), -- wait_for_info_messages(Ref, ArgAtoms, DisplayFun). -+%% Invokes RPC for async info collection in separate (but linked to -+%% the caller) process. Separate process waits for RPC to finish and -+%% in case of errors sends them in wait_for_info_messages/5-compatible -+%% form to aggregator process. Calling process is then expected to -+%% do blocking call of wait_for_info_messages/5. -+%% -+%% Remote function MUST use calls to emitting_map/4 (and other -+%% emitting_map's) to properly deliver requested information to an -+%% aggregator process. -+%% -+%% If for performance reasons several parallel emitting_map's need to -+%% be run, remote function MUST NOT return until all this -+%% emitting_map's are done. And during all this time remote RPC -+%% process MUST be linked to emitting -+%% processes. await_emitters_termination/1 helper can be used as a -+%% last statement of remote function to ensure this behaviour. -+spawn_emitter_caller(Node, Mod, Fun, Args, Ref, Pid, Timeout) -> -+ spawn_monitor( -+ fun () -> -+ case rpc_call_emitter(Node, Mod, Fun, Args, Ref, Pid, Timeout) of -+ {error, _} = Error -> -+ Pid ! {Ref, error, Error}; -+ {bad_argument, _} = Error -> -+ Pid ! {Ref, error, Error}; -+ {badrpc, _} = Error -> -+ Pid ! {Ref, error, Error}; -+ _ -> -+ ok -+ end -+ end), -+ ok. -+ -+rpc_call_emitter(Node, Mod, Fun, Args, Ref, Pid, Timeout) -> -+ rabbit_misc:rpc_call(Node, Mod, Fun, Args++[Ref, Pid], Timeout). -+ -+%% Agregator process expects correct numbers of explicits ACKs about -+%% finished emission process. While everything is linked, we still -+%% need somehow to wait for termination of all emitters before -+%% returning from RPC call - otherwise links will be just broken with -+%% reason 'normal' and we can miss some errors, and subsequentially -+%% hang. -+await_emitters_termination(Pids) -> -+ Monitors = [erlang:monitor(process, Pid) || Pid <- Pids], -+ collect_monitors(Monitors). - --wait_for_info_messages(Ref, InfoItemKeys, DisplayFun) when is_reference(Ref) -> -+collect_monitors([]) -> -+ ok; -+collect_monitors([Monitor|Rest]) -> - receive -- {Ref, finished} -> -- ok; -- {Ref, {timeout, T}} -> -+ {'DOWN', Monitor, _Pid, normal} -> -+ collect_monitors(Rest); -+ {'DOWN', Monitor, _Pid, noproc} -> -+ %% There is a link and a monitor to a process. Matching -+ %% this clause means that process has gracefully -+ %% terminated even before we've started monitoring. -+ collect_monitors(Rest); -+ {'DOWN', _, Pid, Reason} -> -+ exit({emitter_exit, Pid, Reason}) -+ end. -+ -+%% Wait for result of one or more calls to emitting_map-family -+%% functions. -+%% -+%% Number of expected acknowledgments is specified by ChunkCount -+%% argument. Most common usage will be with ChunkCount equals to -+%% number of live nodes, but it's not mandatory - thus more generic -+%% name of 'ChunkCount' was chosen. -+wait_for_info_messages(Pid, Ref, Fun, Acc0, Timeout, ChunkCount) -> -+ notify_if_timeout(Pid, Ref, Timeout), -+ wait_for_info_messages(Ref, Fun, Acc0, ChunkCount). -+ -+wait_for_info_messages(Ref, Fun, Acc0, ChunksLeft) -> -+ receive -+ {Ref, finished} when ChunksLeft =:= 1 -> -+ {ok, Acc0}; -+ {Ref, finished} -> -+ wait_for_info_messages(Ref, Fun, Acc0, ChunksLeft - 1); -+ {Ref, {timeout, T}} -> - exit({error, {timeout, (T / 1000)}}); -- {Ref, []} -> -- wait_for_info_messages(Ref, InfoItemKeys, DisplayFun); -- {Ref, Result, continue} -> -- DisplayFun(Result, InfoItemKeys), -- wait_for_info_messages(Ref, InfoItemKeys, DisplayFun); -- {error, Error} -> -- Error; -- _ -> -- wait_for_info_messages(Ref, InfoItemKeys, DisplayFun) -+ {Ref, []} -> -+ wait_for_info_messages(Ref, Fun, Acc0, ChunksLeft); -+ {Ref, Result, continue} -> -+ wait_for_info_messages(Ref, Fun, Fun(Result, Acc0), ChunksLeft); -+ {Ref, error, Error} -> -+ {error, simplify_emission_error(Error)}; -+ {'DOWN', _MRef, process, _Pid, normal} -> -+ wait_for_info_messages(Ref, Fun, Acc0, ChunksLeft); -+ {'DOWN', _MRef, process, _Pid, Reason} -> -+ {error, simplify_emission_error(Reason)}; -+ _Msg -> -+ wait_for_info_messages(Ref, Fun, Acc0, ChunksLeft) - end. - -+simplify_emission_error({badrpc, {'EXIT', {{nocatch, EmissionError}, _Stacktrace}}}) -> -+ EmissionError; -+simplify_emission_error({{nocatch, EmissionError}, _Stacktrace}) -> -+ EmissionError; -+simplify_emission_error(Anything) -> -+ {error, Anything}. -+ -+notify_if_timeout(_, _, infinity) -> -+ ok; - notify_if_timeout(Pid, Ref, Timeout) -> - timer:send_after(Timeout, Pid, {Ref, {timeout, Timeout}}). - -diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl -index 8965c59..9341ea9 100644 ---- a/src/rabbit_misc.erl -+++ b/src/rabbit_misc.erl -@@ -75,7 +75,7 @@ - -export([get_env/3]). - -export([get_channel_operation_timeout/0]). - -export([random/1]). ---export([rpc_call/4, rpc_call/5, rpc_call/7]). -+-export([rpc_call/4, rpc_call/5]). - -export([report_default_thread_pool_size/0]). - -export([get_gc_info/1]). - -@@ -264,8 +264,6 @@ - -spec random(non_neg_integer()) -> non_neg_integer(). - -spec rpc_call(node(), atom(), atom(), [any()]) -> any(). - -spec rpc_call(node(), atom(), atom(), [any()], number()) -> any(). ---spec rpc_call -- (node(), atom(), atom(), [any()], reference(), pid(), number()) -> any(). - -spec report_default_thread_pool_size() -> 'ok'. - -spec get_gc_info(pid()) -> integer(). - -@@ -1184,9 +1182,6 @@ rpc_call(Node, Mod, Fun, Args, Timeout) -> - rpc:call(Node, Mod, Fun, Args, Timeout) - end. - --rpc_call(Node, Mod, Fun, Args, Ref, Pid, Timeout) -> -- rpc_call(Node, Mod, Fun, Args++[Ref, Pid], Timeout). -- - guess_number_of_cpu_cores() -> - case erlang:system_info(logical_processors_available) of - unknown -> % Happens on Mac OS X. -diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl -index 5bf30ff..63e3ed0 100644 ---- a/src/rabbit_networking.erl -+++ b/src/rabbit_networking.erl -@@ -33,7 +33,8 @@ - node_listeners/1, register_connection/1, unregister_connection/1, - connections/0, connection_info_keys/0, - connection_info/1, connection_info/2, -- connection_info_all/0, connection_info_all/1, connection_info_all/3, -+ connection_info_all/0, connection_info_all/1, -+ emit_connection_info_all/4, emit_connection_info_local/3, - close_connection/2, force_connection_event_refresh/1, tcp_host/1]). - - %% Used by TCP-based transports, e.g. STOMP adapter -@@ -89,8 +90,6 @@ - -spec connection_info_all() -> [rabbit_types:infos()]. - -spec connection_info_all(rabbit_types:info_keys()) -> - [rabbit_types:infos()]. ---spec connection_info_all(rabbit_types:info_keys(), reference(), pid()) -> -- 'ok'. - -spec close_connection(pid(), string()) -> 'ok'. - -spec force_connection_event_refresh(reference()) -> 'ok'. - -@@ -365,10 +364,15 @@ connection_info(Pid, Items) -> rabbit_reader:info(Pid, Items). - connection_info_all() -> cmap(fun (Q) -> connection_info(Q) end). - connection_info_all(Items) -> cmap(fun (Q) -> connection_info(Q, Items) end). - --connection_info_all(Items, Ref, AggregatorPid) -> -+emit_connection_info_all(Nodes, Items, Ref, AggregatorPid) -> -+ Pids = [ spawn_link(Node, rabbit_networking, emit_connection_info_local, [Items, Ref, AggregatorPid]) || Node <- Nodes ], -+ rabbit_control_misc:await_emitters_termination(Pids), -+ ok. -+ -+emit_connection_info_local(Items, Ref, AggregatorPid) -> - rabbit_control_misc:emitting_map_with_exit_handler( - AggregatorPid, Ref, fun(Q) -> connection_info(Q, Items) end, -- connections()). -+ connections_local()). - - close_connection(Pid, Explanation) -> - rabbit_log:info("Closing connection ~p because ~p~n", [Pid, Explanation]), diff --git a/rabbitmq-common-0001-Use-proto_dist-from-command-line.patch b/rabbitmq-common-0001-Use-proto_dist-from-command-line.patch new file mode 100644 index 0000000..a923a28 --- /dev/null +++ b/rabbitmq-common-0001-Use-proto_dist-from-command-line.patch @@ -0,0 +1,31 @@ +From: Peter Lemenkov +Date: Fri, 15 Jul 2016 16:01:08 +0200 +Subject: [PATCH] Use proto_dist from command line + +Use protocol distribution value from command line when provided instead +of always using default value (inet_tcp) when trying to check epmd. + +If provided more than one protocol distribution types, then use the +first one. + +Signed-off-by: Peter Lemenkov + +diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl +index 70a5355..18f7714 100644 +--- a/src/rabbit_nodes.erl ++++ b/src/rabbit_nodes.erl +@@ -221,9 +221,14 @@ set_cluster_name(Name) -> + ensure_epmd() -> + {ok, Prog} = init:get_argument(progname), + ID = rabbit_misc:random(1000000000), ++ ProtoDist = case init:get_argument(proto_dist) of ++ {ok, [Proto | _Protos]} -> Proto; ++ error -> "inet_tcp" ++ end, + Port = open_port( + {spawn_executable, os:find_executable(Prog)}, + [{args, ["-sname", rabbit_misc:format("epmd-starter-~b", [ID]), ++ "-proto_dist", rabbit_misc:format("~p", [ProtoDist]), + "-noshell", "-eval", "halt()."]}, + exit_status, stderr_to_stdout, use_stdio]), + port_shutdown_loop(Port). diff --git a/rabbitmq-common-0002-Use-proto_dist-from-command-line.patch b/rabbitmq-common-0002-Use-proto_dist-from-command-line.patch deleted file mode 100644 index a923a28..0000000 --- a/rabbitmq-common-0002-Use-proto_dist-from-command-line.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Peter Lemenkov -Date: Fri, 15 Jul 2016 16:01:08 +0200 -Subject: [PATCH] Use proto_dist from command line - -Use protocol distribution value from command line when provided instead -of always using default value (inet_tcp) when trying to check epmd. - -If provided more than one protocol distribution types, then use the -first one. - -Signed-off-by: Peter Lemenkov - -diff --git a/src/rabbit_nodes.erl b/src/rabbit_nodes.erl -index 70a5355..18f7714 100644 ---- a/src/rabbit_nodes.erl -+++ b/src/rabbit_nodes.erl -@@ -221,9 +221,14 @@ set_cluster_name(Name) -> - ensure_epmd() -> - {ok, Prog} = init:get_argument(progname), - ID = rabbit_misc:random(1000000000), -+ ProtoDist = case init:get_argument(proto_dist) of -+ {ok, [Proto | _Protos]} -> Proto; -+ error -> "inet_tcp" -+ end, - Port = open_port( - {spawn_executable, os:find_executable(Prog)}, - [{args, ["-sname", rabbit_misc:format("epmd-starter-~b", [ID]), -+ "-proto_dist", rabbit_misc:format("~p", [ProtoDist]), - "-noshell", "-eval", "halt()."]}, - exit_status, stderr_to_stdout, use_stdio]), - port_shutdown_loop(Port). diff --git a/rabbitmq-server-0001-Remove-excessive-sd_notify-code.patch b/rabbitmq-server-0001-Remove-excessive-sd_notify-code.patch index 61a7f40..e93c46c 100644 --- a/rabbitmq-server-0001-Remove-excessive-sd_notify-code.patch +++ b/rabbitmq-server-0001-Remove-excessive-sd_notify-code.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove excessive sd_notify code Signed-off-by: Peter Lemenkov diff --git a/src/rabbit.erl b/src/rabbit.erl -index a86fd97..32ff240 100644 +index 1f0df1a..1a35669 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -280,120 +280,8 @@ broker_start() -> diff --git a/rabbitmq-server-0002-Add-systemd-notification-support.patch b/rabbitmq-server-0002-Add-systemd-notification-support.patch index 7e8b0a4..958619d 100644 --- a/rabbitmq-server-0002-Add-systemd-notification-support.patch +++ b/rabbitmq-server-0002-Add-systemd-notification-support.patch @@ -4,7 +4,7 @@ Subject: [PATCH] Add systemd notification support diff --git a/src/rabbit.erl b/src/rabbit.erl -index 32ff240..f9e8231 100644 +index 1a35669..6b1531d 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -280,6 +280,11 @@ broker_start() -> diff --git a/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch b/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch index e98c427..ae6213f 100644 --- a/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch +++ b/rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch @@ -5,13 +5,14 @@ Subject: [PATCH] Revert "Distinct exit-codes for CLI utilities" This reverts commit 7984540175d0b8852025165b6b6a0ac05d692c98. diff --git a/include/rabbit_cli.hrl b/include/rabbit_cli.hrl -index a0d1ecf..efd328a 100644 +index 53be9fc..4d8cb9e 100644 --- a/include/rabbit_cli.hrl +++ b/include/rabbit_cli.hrl -@@ -46,14 +46,3 @@ - -define(RAM_DEF, {?RAM_OPT, flag}). - -define(OFFLINE_DEF, {?OFFLINE_OPT, flag}). - -define(ONLINE_DEF, {?ONLINE_OPT, flag}). +@@ -60,15 +60,3 @@ + -define(ITERATIONS_DEF, {?ITERATIONS_OPT, {option, integer_to_list(rabbit_pbe:default_iterations())}}). + -define(LIST_CIPHERS_DEF, {?LIST_CIPHERS_OPT, flag}). + -define(LIST_HASHES_DEF, {?LIST_HASHES_OPT, flag}). +- - -%% Subset of standartized exit codes from sysexits.h, see -%% https://github.com/rabbitmq/rabbitmq-server/issues/396 for discussion. @@ -24,10 +25,10 @@ index a0d1ecf..efd328a 100644 --define(EX_TEMPFAIL , 75). % Temporary error (e.g. something has timed out). --define(EX_CONFIG , 78). % Misconfiguration detected diff --git a/src/rabbit_cli.erl b/src/rabbit_cli.erl -index 6b35482..dc490ad 100644 +index c0e5c93..ee72090 100644 --- a/src/rabbit_cli.erl +++ b/src/rabbit_cli.erl -@@ -58,7 +58,7 @@ ensure_cli_distribution() -> +@@ -57,7 +57,7 @@ ensure_cli_distribution() -> {error, Error} -> print_error("Failed to initialize erlang distribution: ~p.", [Error]), @@ -36,7 +37,7 @@ index 6b35482..dc490ad 100644 end. %%---------------------------------------------------------------------------- -@@ -84,10 +84,10 @@ main(ParseFun, DoFun, UsageMod) -> +@@ -83,10 +83,10 @@ main(ParseFun, DoFun, UsageMod) -> %% thrown errors into normal return values case catch DoFun(Command, Node, Args, Opts) of ok -> @@ -49,7 +50,7 @@ index 6b35482..dc490ad 100644 {'EXIT', {function_clause, [{?MODULE, action, _} | _]}} -> %% < R15 PrintInvalidCommandError(), usage(UsageMod); -@@ -97,51 +97,51 @@ main(ParseFun, DoFun, UsageMod) -> +@@ -96,51 +96,51 @@ main(ParseFun, DoFun, UsageMod) -> {error, {missing_dependencies, Missing, Blame}} -> print_error("dependent plugins ~p not found; used by ~p.", [Missing, Blame]), @@ -113,8 +114,8 @@ index 6b35482..dc490ad 100644 end. start_distribution_anon(0, LastError) -> -@@ -172,7 +172,7 @@ name_type() -> - end. +@@ -187,7 +187,7 @@ generate_cli_node_name() -> + list_to_atom(NameAsList). usage(Mod) -> - usage(Mod, ?EX_USAGE). diff --git a/rabbitmq-server-0004-Allow-guest-login-from-non-loopback-connections.patch b/rabbitmq-server-0004-Allow-guest-login-from-non-loopback-connections.patch index 8bf55b4..ee8ed8b 100644 --- a/rabbitmq-server-0004-Allow-guest-login-from-non-loopback-connections.patch +++ b/rabbitmq-server-0004-Allow-guest-login-from-non-loopback-connections.patch @@ -4,7 +4,7 @@ Subject: [PATCH] Allow guest login from non-loopback connections diff --git a/src/rabbit.app.src b/src/rabbit.app.src -index 572c1f6..4676e03 100644 +index dd38ad4..b03a888 100644 --- a/src/rabbit.app.src +++ b/src/rabbit.app.src @@ -39,7 +39,7 @@ diff --git a/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch b/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch deleted file mode 100644 index 238d3d5..0000000 --- a/rabbitmq-server-0005-Avoid-RPC-roundtrips-in-list-commands.patch +++ /dev/null @@ -1,280 +0,0 @@ -From: Alexey Lebedeff -Date: Wed, 9 Mar 2016 18:09:04 +0300 -Subject: [PATCH] Avoid RPC roundtrips in list commands - -Current implementation of various `list_XXX` commands require cross-node -roundtrip for every processed item - because `rabbitmqctl` target node -is responsible for gathering global list of all items of -interest (channels etc.) and then processing them one by one. - -For example, listing 10000 channels evenly distributed across 3 nodes -where network has 1ms delay takes more than 10 seconds on my -machine. And with the proposed change listing will take almost the same -time as it'll take to gather this info locally. E.g. in the case above -listing now takes 0.7 second on the same machine with same 1ms delay. - -It works by invoking emitting_map on every node, where it should send -info about only local items to aggregator, in an async fashion - as no -reply from aggregator is needed. - -diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl -index ea9d6a2..e6b168a 100644 ---- a/src/rabbit_control_main.erl -+++ b/src/rabbit_control_main.erl -@@ -23,7 +23,7 @@ - sync_queue/1, cancel_sync_queue/1, become/1, - purge_queue/1]). - ---import(rabbit_misc, [rpc_call/4, rpc_call/5, rpc_call/7]). -+-import(rabbit_misc, [rpc_call/4, rpc_call/5]). - - -define(EXTERNAL_CHECK_INTERVAL, 1000). - -@@ -595,56 +595,74 @@ action(purge_queue, Node, [Q], Opts, Inform, Timeout) -> - - action(list_users, Node, [], _Opts, Inform, Timeout) -> - Inform("Listing users", []), -- call(Node, {rabbit_auth_backend_internal, list_users, []}, -- rabbit_auth_backend_internal:user_info_keys(), true, Timeout); -+ call_emitter(Node, {rabbit_auth_backend_internal, list_users, []}, -+ rabbit_auth_backend_internal:user_info_keys(), -+ [{timeout, Timeout}, to_bin_utf8]); - - action(list_permissions, Node, [], Opts, Inform, Timeout) -> - VHost = proplists:get_value(?VHOST_OPT, Opts), - Inform("Listing permissions in vhost \"~s\"", [VHost]), -- call(Node, {rabbit_auth_backend_internal, list_vhost_permissions, [VHost]}, -- rabbit_auth_backend_internal:vhost_perms_info_keys(), true, Timeout, -- true); -+ call_emitter(Node, {rabbit_auth_backend_internal, list_vhost_permissions, [VHost]}, -+ rabbit_auth_backend_internal:vhost_perms_info_keys(), -+ [{timeout, Timeout}, to_bin_utf8, is_escaped]); - - action(list_parameters, Node, [], Opts, Inform, Timeout) -> - VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), - Inform("Listing runtime parameters", []), -- call(Node, {rabbit_runtime_parameters, list_formatted, [VHostArg]}, -- rabbit_runtime_parameters:info_keys(), Timeout); -+ call_emitter(Node, {rabbit_runtime_parameters, list_formatted, [VHostArg]}, -+ rabbit_runtime_parameters:info_keys(), -+ [{timeout, Timeout}]); - - action(list_policies, Node, [], Opts, Inform, Timeout) -> - VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), - Inform("Listing policies", []), -- call(Node, {rabbit_policy, list_formatted, [VHostArg]}, -- rabbit_policy:info_keys(), Timeout); -+ call_emitter(Node, {rabbit_policy, list_formatted, [VHostArg]}, -+ rabbit_policy:info_keys(), -+ [{timeout, Timeout}]); - - action(list_vhosts, Node, Args, _Opts, Inform, Timeout) -> - Inform("Listing vhosts", []), - ArgAtoms = default_if_empty(Args, [name]), -- call(Node, {rabbit_vhost, info_all, []}, ArgAtoms, true, Timeout); -+ call_emitter(Node, {rabbit_vhost, info_all, []}, ArgAtoms, -+ [{timeout, Timeout}, to_bin_utf8]); - - action(list_user_permissions, _Node, _Args = [], _Opts, _Inform, _Timeout) -> - {error_string, - "list_user_permissions expects a username argument, but none provided."}; - action(list_user_permissions, Node, Args = [_Username], _Opts, Inform, Timeout) -> - Inform("Listing permissions for user ~p", Args), -- call(Node, {rabbit_auth_backend_internal, list_user_permissions, Args}, -- rabbit_auth_backend_internal:user_perms_info_keys(), true, Timeout, -- true); -+ call_emitter(Node, {rabbit_auth_backend_internal, list_user_permissions, Args}, -+ rabbit_auth_backend_internal:user_perms_info_keys(), -+ [{timeout, Timeout}, to_bin_utf8, is_escaped]); - - action(list_queues, Node, Args, Opts, Inform, Timeout) -> -- [Online, Offline] = rabbit_cli:filter_opts(Opts, [?ONLINE_OPT, ?OFFLINE_OPT]), - Inform("Listing queues", []), -+ %% User options -+ [Online, Offline] = rabbit_cli:filter_opts(Opts, [?ONLINE_OPT, ?OFFLINE_OPT]), - VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), - ArgAtoms = default_if_empty(Args, [name, messages]), -- call(Node, {rabbit_amqqueue, info_all, [VHostArg, ArgAtoms, Online, Offline]}, -- ArgAtoms, Timeout); -+ -+ %% Data for emission -+ Nodes = nodes_in_cluster(Node, Timeout), -+ OnlineChunks = if Online -> length(Nodes); true -> 0 end, -+ OfflineChunks = if Offline -> 1; true -> 0 end, -+ ChunksOpt = {chunks, OnlineChunks + OfflineChunks}, -+ TimeoutOpt = {timeout, Timeout}, -+ EmissionRef = make_ref(), -+ EmissionRefOpt = {ref, EmissionRef}, -+ -+ _ = Online andalso start_emission(Node, {rabbit_amqqueue, emit_info_all, [Nodes, VHostArg, ArgAtoms]}, -+ [TimeoutOpt, EmissionRefOpt]), -+ _ = Offline andalso start_emission(Node, {rabbit_amqqueue, emit_info_down, [VHostArg, ArgAtoms]}, -+ [TimeoutOpt, EmissionRefOpt]), -+ display_emission_result(EmissionRef, ArgAtoms, [ChunksOpt, TimeoutOpt]); - - action(list_exchanges, Node, Args, Opts, Inform, Timeout) -> - Inform("Listing exchanges", []), - VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), - ArgAtoms = default_if_empty(Args, [name, type]), -- call(Node, {rabbit_exchange, info_all, [VHostArg, ArgAtoms]}, -- ArgAtoms, Timeout); -+ call_emitter(Node, {rabbit_exchange, info_all, [VHostArg, ArgAtoms]}, -+ ArgAtoms, [{timeout, Timeout}]); - - action(list_bindings, Node, Args, Opts, Inform, Timeout) -> - Inform("Listing bindings", []), -@@ -652,27 +670,31 @@ action(list_bindings, Node, Args, Opts, Inform, Timeout) -> - ArgAtoms = default_if_empty(Args, [source_name, source_kind, - destination_name, destination_kind, - routing_key, arguments]), -- call(Node, {rabbit_binding, info_all, [VHostArg, ArgAtoms]}, -- ArgAtoms, Timeout); -+ call_emitter(Node, {rabbit_binding, info_all, [VHostArg, ArgAtoms]}, -+ ArgAtoms, [{timeout, Timeout}]); - - action(list_connections, Node, Args, _Opts, Inform, Timeout) -> - Inform("Listing connections", []), - ArgAtoms = default_if_empty(Args, [user, peer_host, peer_port, state]), -- call(Node, {rabbit_networking, connection_info_all, [ArgAtoms]}, -- ArgAtoms, Timeout); -+ Nodes = nodes_in_cluster(Node, Timeout), -+ call_emitter(Node, {rabbit_networking, emit_connection_info_all, [Nodes, ArgAtoms]}, -+ ArgAtoms, [{timeout, Timeout}, {chunks, length(Nodes)}]); - - action(list_channels, Node, Args, _Opts, Inform, Timeout) -> - Inform("Listing channels", []), - ArgAtoms = default_if_empty(Args, [pid, user, consumer_count, - messages_unacknowledged]), -- call(Node, {rabbit_channel, info_all, [ArgAtoms]}, -- ArgAtoms, Timeout); -+ Nodes = nodes_in_cluster(Node, Timeout), -+ call_emitter(Node, {rabbit_channel, emit_info_all, [Nodes, ArgAtoms]}, ArgAtoms, -+ [{timeout, Timeout}, {chunks, length(Nodes)}]); - - action(list_consumers, Node, _Args, Opts, Inform, Timeout) -> - Inform("Listing consumers", []), - VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), -- call(Node, {rabbit_amqqueue, consumers_all, [VHostArg]}, -- rabbit_amqqueue:consumer_info_keys(), Timeout); -+ Nodes = nodes_in_cluster(Node, Timeout), -+ call_emitter(Node, {rabbit_amqqueue, emit_consumers_all, [Nodes, VHostArg]}, -+ rabbit_amqqueue:consumer_info_keys(), -+ [{timeout, Timeout}, {chunks, length(Nodes)}]); - - action(node_health_check, Node, _Args, _Opts, Inform, Timeout) -> - Inform("Checking health of node ~p", [Node]), -@@ -788,17 +810,18 @@ display_info_message_row(IsEscaped, Result, InfoItemKeys) -> - {X, Value} -> Value - end, IsEscaped) || X <- InfoItemKeys]). - --display_info_message(IsEscaped) -> -+display_info_message(IsEscaped, InfoItemKeys) -> - fun ([], _) -> - ok; -- ([FirstResult|_] = List, InfoItemKeys) when is_list(FirstResult) -> -+ ([FirstResult|_] = List, _) when is_list(FirstResult) -> - lists:foreach(fun(Result) -> - display_info_message_row(IsEscaped, Result, InfoItemKeys) - end, - List), - ok; -- (Result, InfoItemKeys) -> -- display_info_message_row(IsEscaped, Result, InfoItemKeys) -+ (Result, _) -> -+ display_info_message_row(IsEscaped, Result, InfoItemKeys), -+ ok - end. - - display_info_list(Results, InfoItemKeys) when is_list(Results) -> -@@ -855,7 +878,10 @@ display_call_result(Node, MFA) -> - end. - - unsafe_rpc(Node, Mod, Fun, Args) -> -- case rpc_call(Node, Mod, Fun, Args) of -+ unsafe_rpc(Node, Mod, Fun, Args, ?RPC_TIMEOUT). -+ -+unsafe_rpc(Node, Mod, Fun, Args, Timeout) -> -+ case rpc_call(Node, Mod, Fun, Args, Timeout) of - {badrpc, _} = Res -> throw(Res); - Normal -> Normal - end. -@@ -874,33 +900,42 @@ ensure_app_running(Node) -> - call(Node, {Mod, Fun, Args}) -> - rpc_call(Node, Mod, Fun, lists:map(fun list_to_binary_utf8/1, Args)). - --call(Node, {Mod, Fun, Args}, InfoKeys, Timeout) -> -- call(Node, {Mod, Fun, Args}, InfoKeys, false, Timeout, false). -+call_emitter(Node, {Mod, Fun, Args}, InfoKeys, Opts) -> -+ Ref = start_emission(Node, {Mod, Fun, Args}, Opts), -+ display_emission_result(Ref, InfoKeys, Opts). -+ -+start_emission(Node, {Mod, Fun, Args}, Opts) -> -+ ToBinUtf8 = proplists:get_value(to_bin_utf8, Opts, false), -+ Timeout = proplists:get_value(timeout, Opts, infinity), -+ Ref = proplists:get_value(ref, Opts, make_ref()), -+ rabbit_control_misc:spawn_emitter_caller( -+ Node, Mod, Fun, prepare_call_args(Args, ToBinUtf8), -+ Ref, self(), Timeout), -+ Ref. -+ -+display_emission_result(Ref, InfoKeys, Opts) -> -+ IsEscaped = proplists:get_value(is_escaped, Opts, false), -+ Chunks = proplists:get_value(chunks, Opts, 1), -+ Timeout = proplists:get_value(timeout, Opts, infinity), -+ EmissionStatus = rabbit_control_misc:wait_for_info_messages( -+ self(), Ref, display_info_message(IsEscaped, InfoKeys), ok, Timeout, Chunks), -+ emission_to_action_result(EmissionStatus). -+ -+%% Convert rabbit_control_misc:wait_for_info_messages/6 return value -+%% into form expected by rabbit_cli:main/3. -+emission_to_action_result({ok, ok}) -> -+ ok; -+emission_to_action_result({error, Error}) -> -+ Error. - --call(Node, {Mod, Fun, Args}, InfoKeys, ToBinUtf8, Timeout) -> -- call(Node, {Mod, Fun, Args}, InfoKeys, ToBinUtf8, Timeout, false). -+prepare_call_args(Args, ToBinUtf8) -> -+ case ToBinUtf8 of -+ true -> valid_utf8_args(Args); -+ false -> Args -+ end. - --call(Node, {Mod, Fun, Args}, InfoKeys, ToBinUtf8, Timeout, IsEscaped) -> -- Args0 = case ToBinUtf8 of -- true -> lists:map(fun list_to_binary_utf8/1, Args); -- false -> Args -- end, -- Ref = make_ref(), -- Pid = self(), -- spawn_link( -- fun () -> -- case rabbit_cli:rpc_call(Node, Mod, Fun, Args0, -- Ref, Pid, Timeout) of -- {error, _} = Error -> -- Pid ! {error, Error}; -- {bad_argument, _} = Error -> -- Pid ! {error, Error}; -- _ -> -- ok -- end -- end), -- rabbit_control_misc:wait_for_info_messages( -- Pid, Ref, InfoKeys, display_info_message(IsEscaped), Timeout). -+valid_utf8_args(Args) -> -+ lists:map(fun list_to_binary_utf8/1, Args). - - list_to_binary_utf8(L) -> - B = list_to_binary(L), -@@ -950,7 +985,10 @@ split_list([_]) -> exit(even_list_needed); - split_list([A, B | T]) -> [{A, B} | split_list(T)]. - - nodes_in_cluster(Node) -> -- unsafe_rpc(Node, rabbit_mnesia, cluster_nodes, [running]). -+ unsafe_rpc(Node, rabbit_mnesia, cluster_nodes, [running], ?RPC_TIMEOUT). -+ -+nodes_in_cluster(Node, Timeout) -> -+ unsafe_rpc(Node, rabbit_mnesia, cluster_nodes, [running], Timeout). - - alarms_by_node(Name) -> - case rpc_call(Name, rabbit, status, []) of diff --git a/rabbitmq-server-0005-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch b/rabbitmq-server-0005-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch new file mode 100644 index 0000000..54948e8 --- /dev/null +++ b/rabbitmq-server-0005-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch @@ -0,0 +1,18 @@ +From: Peter Lemenkov +Date: Sun, 17 Jul 2016 18:42:06 +0300 +Subject: [PATCH] rabbit_prelaunch must use RABBITMQ_SERVER_ERL_ARGS + +Signed-off-by: Peter Lemenkov + +diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server +index 7b0599e..130ff0b 100755 +--- a/scripts/rabbitmq-server ++++ b/scripts/rabbitmq-server +@@ -82,6 +82,7 @@ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ + -boot "${CLEAN_BOOT_FILE}" \ + -noinput \ + -hidden \ ++ ${RABBITMQ_SERVER_ERL_ARGS} \ + -s rabbit_prelaunch \ + ${RABBITMQ_NAME_TYPE} ${RABBITMQ_PRELAUNCH_NODENAME} \ + -extra "${RABBITMQ_NODENAME}" diff --git a/rabbitmq-server-0006-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch b/rabbitmq-server-0006-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch deleted file mode 100644 index efbff82..0000000 --- a/rabbitmq-server-0006-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Peter Lemenkov -Date: Sun, 17 Jul 2016 18:42:06 +0300 -Subject: [PATCH] rabbit_prelaunch must use RABBITMQ_SERVER_ERL_ARGS - -Signed-off-by: Peter Lemenkov - -diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server -index 7433731..25fff3a 100755 ---- a/scripts/rabbitmq-server -+++ b/scripts/rabbitmq-server -@@ -71,6 +71,7 @@ RABBITMQ_DIST_PORT=$RABBITMQ_DIST_PORT \ - -boot "${CLEAN_BOOT_FILE}" \ - -noinput \ - -hidden \ -+ ${RABBITMQ_SERVER_ERL_ARGS} \ - -s rabbit_prelaunch \ - ${RABBITMQ_NAME_TYPE} rabbitmqprelaunch$$ \ - -extra "${RABBITMQ_NODENAME}" diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 987f93b..652d379 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -4,8 +4,8 @@ Name: rabbitmq-server -Version: 3.6.5 -Release: 2%{?dist} +Version: 3.6.6 +Release: 1%{?dist} License: MPLv1.1 Group: Development/Libraries Source0: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.xz @@ -20,10 +20,8 @@ Patch1: rabbitmq-server-0001-Remove-excessive-sd_notify-code.patch Patch2: rabbitmq-server-0002-Add-systemd-notification-support.patch 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 -Patch101: rabbitmq-common-0001-Avoid-RPC-roundtrips-while-listing-items.patch -Patch102: rabbitmq-common-0002-Use-proto_dist-from-command-line.patch +Patch5: rabbitmq-server-0005-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch +Patch101: rabbitmq-common-0001-Use-proto_dist-from-command-line.patch URL: http://www.rabbitmq.com/ BuildArch: noarch @@ -57,16 +55,17 @@ scalable implementation of an AMQP broker. %prep %setup -q + +cd deps/rabbit %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 +cd ../.. cd deps/rabbit_common %patch101 -p1 -%patch102 -p1 cd ../.. # We have to remove it until common_test subpackage lands RHOS @@ -95,7 +94,7 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq #Copy all necessary lib files etc. -install -p -D -m 0644 docs/rabbitmq-server.service.example %{buildroot}%{_unitdir}/%{name}.service +install -p -D -m 0644 ./deps/rabbit/docs/rabbitmq-server.service.example %{buildroot}%{_unitdir}/%{name}.service install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmqctl install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-server install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-plugins @@ -111,9 +110,7 @@ install -p -D -m 0755 scripts/rabbitmq-server-ha.ocf %{buildroot}%{_exec_prefix} install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server -install -p -D -m 0644 docs/rabbitmq.config.example %{buildroot}%{_sysconfdir}/rabbitmq/rabbitmq.config - -rm %{buildroot}%{_rabbit_libdir}/lib/rabbitmq_server-%{version}/{LICENSE,LICENSE-*,INSTALL} +install -p -D -m 0644 ./deps/rabbit/docs/rabbitmq.config.example %{buildroot}%{_sysconfdir}/rabbitmq/rabbitmq.config install -d %{buildroot}%{_localstatedir}/run/rabbitmq install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf @@ -177,7 +174,7 @@ done %dir %attr(0750, rabbitmq, rabbitmq) %{_localstatedir}/lib/rabbitmq %dir %attr(0750, rabbitmq, rabbitmq) %{_localstatedir}/log/rabbitmq %dir %attr(0755, rabbitmq, rabbitmq) %{_localstatedir}/run/rabbitmq -%doc LICENSE LICENSE-* docs/rabbitmq.config.example +%doc LICENSE LICENSE-* %{_mandir}/man1/rabbitmq-plugins.1* %{_mandir}/man1/rabbitmq-server.1* %{_mandir}/man1/rabbitmqctl.1* @@ -185,6 +182,10 @@ done %changelog +* Wed Mar 1 2017 Peter Lemenkov - 3.6.6-1 +- Ver. 3.6.6 +- Revert "Listing items in parallel" patches + * Sat Feb 11 2017 Fedora Release Engineering - 3.6.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index dcab44e..67a0005 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e9f96b5763a89a246f53250e46c2796b rabbitmq-server-3.6.5.tar.xz +SHA512 (rabbitmq-server-3.6.6.tar.xz) = 6a79226ffa61103d237a8978587df966141c17d6f6348cc6c0971ffbd7a1adc593b3eecfec327ffe589d5fd3029fe045fbd80ed0d5a0f24ffb478cc8de5c124b