Accepting request 964745 from network:messaging:amqp

OBS-URL: https://build.opensuse.org/request/show/964745
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rabbitmq-server?expand=0&rev=78
This commit is contained in:
Dominique Leuenberger 2022-03-25 20:54:38 +00:00 committed by Git OBS Bridge
commit defe1b6a39
8 changed files with 32 additions and 289 deletions

View File

@ -1,188 +0,0 @@
From d2b7b8a40275c24b271b7d806774fa813a883241 Mon Sep 17 00:00:00 2001
From: Michael Klishin <klishinm@vmware.com>
Date: Fri, 4 Feb 2022 18:59:19 +0300
Subject: [PATCH 2/2] Elixir 1.13 OptionParser no longer supports :atom values
so coerce e.g. node names in our own code.
---
.../lib/rabbitmq/cli/core/command_modules.ex | 4 ++--
.../lib/rabbitmq/cli/core/helpers.ex | 12 +++++++++++-
.../rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex | 16 +++++++++-------
.../rabbitmq/cli/ctl/commands/decode_command.ex | 7 ++++---
.../rabbitmq/cli/ctl/commands/encode_command.ex | 7 ++++---
5 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex
index 006119cc7a..7343a139cc 100644
--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex
+++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/command_modules.ex
@@ -5,7 +5,7 @@
## Copyright (c) 2007-2021 VMware, Inc. or its affiliates. All rights reserved.
defmodule RabbitMQ.CLI.Core.CommandModules do
- alias RabbitMQ.CLI.Core.Config
+ alias RabbitMQ.CLI.Core.{Config, DataCoercion}
alias RabbitMQ.CLI.Plugins.Helpers, as: PluginsHelpers
alias RabbitMQ.CLI.CommandBehaviour
@@ -37,7 +37,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do
def script_scope(opts) do
scopes = Application.get_env(:rabbitmqctl, :scopes, [])
- scopes[Config.get_option(:script_name, opts)] || :none
+ scopes[DataCoercion.to_atom(Config.get_option(:script_name, opts))] || :none
end
def load_commands_core(scope) do
diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex
index d9834f6cc5..4719af08d0 100644
--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex
+++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/helpers.ex
@@ -5,7 +5,7 @@
## Copyright (c) 2007-2021 VMware, Inc. or its affiliates. All rights reserved.
defmodule RabbitMQ.CLI.Core.Helpers do
- alias RabbitMQ.CLI.Core.{Config, NodeName}
+ alias RabbitMQ.CLI.Core.{Config, DataCoercion, NodeName}
require Record
def get_rabbit_hostname(node_name_type \\ :shortnames) do
@@ -115,6 +115,16 @@ defmodule RabbitMQ.CLI.Core.Helpers do
)
end
+ def atomize_values(map, keys) do
+ Enum.reduce(map, %{},
+ fn({k, v}, acc) ->
+ case Enum.member?(keys, k) do
+ false -> Map.put(acc, k, v)
+ true -> Map.put(acc, k, DataCoercion.to_atom(v))
+ end
+ end)
+ end
+
def apply_if_exported(mod, fun, args, default) do
Code.ensure_loaded(mod)
case function_exported?(mod, fun, length(args)) do
diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex
index bd1aa45815..d8e2c8e4b7 100644
--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex
+++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/parser.ex
@@ -6,11 +6,11 @@
defmodule RabbitMQ.CLI.Core.Parser do
alias RabbitMQ.CLI.{CommandBehaviour, FormatterBehaviour}
- alias RabbitMQ.CLI.Core.{CommandModules, Config}
+ alias RabbitMQ.CLI.Core.{CommandModules, Config, Helpers}
def default_switches() do
[
- node: :atom,
+ node: :string,
quiet: :boolean,
silent: :boolean,
dry_run: :boolean,
@@ -22,18 +22,20 @@ defmodule RabbitMQ.CLI.Core.Parser do
formatter: :string,
printer: :string,
file: :string,
- script_name: :atom,
+ script_name: :string,
rabbitmq_home: :string,
mnesia_dir: :string,
plugins_dir: :string,
enabled_plugins_file: :string,
aliases_file: :string,
- erlang_cookie: :atom,
+ erlang_cookie: :string,
help: :boolean,
print_stacktrace: :boolean
]
end
+ @atomized_options [:node, :script_name, :erlang_cookie]
+
def default_aliases() do
[
p: :vhost,
@@ -68,13 +70,13 @@ defmodule RabbitMQ.CLI.Core.Parser do
{[_alias_command_name | cmd_arguments], cmd_options, cmd_invalid} =
parse_alias(input, command_name, alias_module, alias_content, options)
- {alias_module, command_name, cmd_arguments, cmd_options, cmd_invalid}
+ {alias_module, command_name, cmd_arguments, Helpers.atomize_values(cmd_options, @atomized_options), cmd_invalid}
command_module when is_atom(command_module) ->
{[^command_name | cmd_arguments], cmd_options, cmd_invalid} =
parse_command_specific(input, command_module, options)
- {command_module, command_name, cmd_arguments, cmd_options, cmd_invalid}
+ {command_module, command_name, cmd_arguments, Helpers.atomize_values(cmd_options, @atomized_options), cmd_invalid}
end
end
@@ -208,7 +210,7 @@ defmodule RabbitMQ.CLI.Core.Parser do
)
norm_options = normalize_options(options, switches) |> Map.new()
- {args, norm_options, invalid}
+ {args, Helpers.atomize_values(norm_options, @atomized_options), invalid}
end
defp build_switches(default, command, formatter) do
diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex
index 7c8da87d26..001d978c81 100644
--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex
+++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/decode_command.ex
@@ -14,11 +14,12 @@ defmodule RabbitMQ.CLI.Ctl.Commands.DecodeCommand do
def switches() do
[
- cipher: :atom,
- hash: :atom,
+ cipher: :string,
+ hash: :string,
iterations: :integer
]
end
+ @atomized_keys [:cipher, :hash]
def distribution(_), do: :none
@@ -28,7 +29,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.DecodeCommand do
hash: :rabbit_pbe.default_hash(),
iterations: :rabbit_pbe.default_iterations()
}, opts)
- {args, with_defaults}
+ {args, Helpers.atomize_values(with_defaults, @atomized_keys)}
end
def validate(args, _) when length(args) < 2 do
diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex
index d18f948fce..ae65beae5b 100644
--- a/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex
+++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/encode_command.ex
@@ -12,11 +12,12 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EncodeCommand do
def switches() do
[
- cipher: :atom,
- hash: :atom,
+ cipher: :string,
+ hash: :string,
iterations: :integer
]
end
+ @atomized_keys [:cipher, :hash]
def distribution(_), do: :none
@@ -26,7 +27,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EncodeCommand do
hash: :rabbit_pbe.default_hash(),
iterations: :rabbit_pbe.default_iterations()
}, opts)
- {args, with_defaults}
+ {args, Helpers.atomize_values(with_defaults, @atomized_keys)}
end
def validate(args, _) when length(args) < 2 do

View File

@ -1,77 +0,0 @@
From 59e211d97eb57150714af9973a3dfc0baae86a13 Mon Sep 17 00:00:00 2001
From: Luke Bakken <luke@bakken.io>
Date: Thu, 20 Jan 2022 09:53:51 -0800
Subject: [PATCH 1/2] Support Elixir 1.13
This is the build error prior to these changes:
```
* rabbit_common (/home/bakkenl/development/rabbitmq/rabbitmq-server/deps/rabbit_common)
could not find an app file at "_build/dev/lib/rabbit_common/ebin/rabbit_common.app". This may happen if the dependency was not yet compiled or the dependency indeed has no app file (then you can pass app: false as option)
** (Mix) Can't continue due to errors on dependencies
```
Telling `mix` to compile `rabbit_common` ensures that the following
links are created:
```
$ ll deps/rabbitmq_cli/_build/dev/lib/rabbit_common/
total 8
drwxr-xr-x 2 bakkenl bakkenl 4096 Jan 20 09:46 .
drwxr-xr-x 10 bakkenl bakkenl 4096 Jan 20 09:46 ..
lrwxrwxrwx 1 bakkenl bakkenl 33 Jan 20 09:46 ebin -> ../../../../../rabbit_common/ebin
lrwxrwxrwx 1 bakkenl bakkenl 36 Jan 20 09:46 include -> ../../../../../rabbit_common/include
```
---
deps/rabbitmq_cli/mix.exs | 6 +-----
deps/rabbitmq_ct_client_helpers/rabbitmq-components.mk | 2 +-
deps/rabbitmq_ct_helpers/rabbitmq-components.mk | 2 +-
rabbitmq-components.mk | 2 +-
4 files changed, 4 insertions(+), 8 deletions(-)
Index: rabbitmq-server-3.9.13/deps/rabbitmq_cli/mix.exs
===================================================================
--- rabbitmq-server-3.9.13.orig/deps/rabbitmq_cli/mix.exs
+++ rabbitmq-server-3.9.13/deps/rabbitmq_cli/mix.exs
@@ -11,7 +11,7 @@ defmodule RabbitMQCtl.MixfileBase do
[
app: :rabbitmqctl,
version: "3.8.0-dev",
- elixir: ">= 1.10.4 and < 1.13.0",
+ elixir: ">= 1.10.4 and < 1.14.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
escript: [main_module: RabbitMQCtl,
@@ -149,19 +149,15 @@ defmodule RabbitMQCtl.MixfileBase do
end
end
- # We disable compilation for rabbit_common and amqp_client
- # because Erlang.mk already built them.
[
{
:rabbit_common,
path: Path.join(deps_dir, "rabbit_common"),
- compile: false,
override: true
},
{
:amqp_client,
path: Path.join(deps_dir, "amqp_client"),
- compile: false,
override: true,
only: :test
},
Index: rabbitmq-server-3.9.13/rabbitmq-components.mk
===================================================================
--- rabbitmq-server-3.9.13.orig/rabbitmq-components.mk
+++ rabbitmq-server-3.9.13/rabbitmq-components.mk
@@ -118,7 +118,7 @@ dep_looking_glass = git https://github.c
dep_prometheus = git https://github.com/deadtrickster/prometheus.erl 06425c21a39c1564164f1cc3fe5bdfa8b23b1f78
dep_ra = hex 2.0.3
dep_ranch = hex 2.1.0
-dep_recon = hex 2.5.1
+dep_recon = hex 2.5.2
dep_redbug = hex 2.0.7
dep_observer_cli = hex 1.7.1
dep_stdout_formatter = hex 0.2.4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e7759ef89be085cabba4c4ac8ea5fa1109bf3a4480f65cbef1d1e51989f727a
size 4816788

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEECpryEV9Gh70pgDoga3OjbmAm38oFAmHnQ8YACgkQa3OjbmAm
38qCuxAArjHGf+JqPuM02K7hzsH4dygDq06y1rb6rVfoSUJbBfUjGKwwbIXUeOeE
1DIwfg9tKKmcuUkt3ZZE/VuPwGqgxSVyskm/kKu4hiINRhDuYd6l8th8LzOQamvJ
gn2q7FNCdUinIhN8tVfc7j3ZUOZlZgjOzdzHpmcFG9Y5BgKt743AuP/j4JIY2/kw
3p9fD/yk1u6/0DbugL6vFhL/sXhZchHLRbnNMFB/MXKsbKsN7SXyZ+fTCE0VPqBT
6E1dh9HkOuSRy6hjiPrFQeO0aBwUtYF2fzfPtlvu1IUgtDG7uT7qA5nKRA8wUo2w
VoSKAbDNgEz/UwbUmY/enSedugdNJJNkWhfos73GI9d4RNOph5v6dyZLa4qlD86/
jl6dqOJ+P5sqLRmAMcXRGbmhRa6iscJlgmCIcSz5OxgPrIkD/ftsIj/Ti9AVAZA+
SmrZTb+l5gwv/VoRlhS6X0Q1Av80gzF84YzkEASa5K1YkkkPEjyTmCltKSM5ck5z
02p+HhTiKYH9juv8FmoEO2x477waePmjgUtt5dGDC2MI9kJWZ9CyVgbOMAVvlMpP
LJ2+elaLQdqQQO7B+7f8Tsf4ZtxnUi3S6BsQoC+WZa+dkpENgFVpteOb+VMByGi9
njAMv+BHOIrfbA3b/1r5w3aj5W9Cu7QE9N34f4DoZeSk3CJXUwU=
=vjC2
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:73a1a907a092087894f614c2f45931c93735529356c71e623f7cb675b4d47d2d
size 4821952

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEECpryEV9Gh70pgDoga3OjbmAm38oFAmI52VcACgkQa3OjbmAm
38poYhAAjoPHcDE08lXUbLk/DbDsFyeUd1gBWkzONG6jSE/+l0CCsUUT0Ci5hE89
9bH4kWxauH0OQiLqVHDmpvlIqlzMeZaFUeNWv5NqgOMPmFFluEC9cSWb0jZh736O
XYRW9018SuQSEpKvSrviFgKXpspIEVYZyUSrVomW6xt/AbzD+MZNab0PSF1+gxaV
DLBx7sy9ASsiv31LTSx5Yt4B5sjmtLGLpzIFocddzER01hLcAEa143fd2Yu+Ev86
U/CkK5IEqFt+eNSIVRmW62/fJfXN+7kyMvBVgO1rZAq43wyCLPcdEkwsUrEaK3zM
N0EVJ6DZrt/5GyTp5EeRWyIjgpAMxyYFqhkmpiQX4p+qV/mk4V+d6zctvRlNzT9j
UeBEpFAt8wuRJgbC8//HtOHpuuiQyVzfIYD9jlOkoiwn1KDJzrSO3eO9SnyEe6bB
74QlggRMq+hGY4MyCBYxECOywi+6gsYnZEmMYr/wcgDY20btXHtzmH2V2sYwy7BP
I2dAKJ26PiFU0dLKzbqLeUBk89HsRHGlb59lYbkJXK08LJojo/0GXWvNuLaY0MLY
Yk5BVAggMs8SWpKoUjuaKOahiidyoZndW9mEGiCOq6L2/fyiCDcu4cCdHGEu2MQl
JoU79fMZLHKt5aFL2xb0FVg2R5rkj0Vf2SmtWkv9B7+jpSb/iqE=
=Cgcl
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Mar 25 01:32:07 UTC 2022 - Fusion Future <qydwhotmail@gmail.com>
- Update to 3.9.14
* See https://github.com/rabbitmq/rabbitmq-server/blob/v3.9.x/release-notes/3.9.14.md
for the full changelog.
* Build time compatibility with Elixir 1.13 (gh#rabbitmq/rabbitmq-server#4019)
- Drop Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch
- Drop Support-Elixir-1.13.patch
* Adapt to a breaking Erlang 24.3 LDAP client change.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Feb 19 10:44:15 UTC 2022 - Fusion Future <qydwhotmail@gmail.com> Sat Feb 19 10:44:15 UTC 2022 - Fusion Future <qydwhotmail@gmail.com>

View File

@ -39,7 +39,7 @@
%define _rabbitmq_group rabbitmq %define _rabbitmq_group rabbitmq
Name: rabbitmq-server Name: rabbitmq-server
Version: 3.9.13 Version: 3.9.14
Release: 0 Release: 0
Summary: A message broker supporting AMQP, STOMP and MQTT Summary: A message broker supporting AMQP, STOMP and MQTT
License: MPL-2.0 License: MPL-2.0
@ -52,9 +52,6 @@ Source4: rabbitmq-env.conf
Source6: rabbitmq-server.service Source6: rabbitmq-server.service
Source7: https://raw.githubusercontent.com/rabbitmq/rabbitmq-packaging/v%{version}/RPMS/Fedora/rabbitmq-server.tmpfiles Source7: https://raw.githubusercontent.com/rabbitmq/rabbitmq-packaging/v%{version}/RPMS/Fedora/rabbitmq-server.tmpfiles
Source8: README.SUSE Source8: README.SUSE
# PATCH-FIX-UPSTREAM Allow building with elixir 1.13.x gh#rabbitmq/rabbitmq-server#4019
Patch0: Support-Elixir-1.13.patch
Patch1: Elixir-1.13-OptionParser-no-longer-supports-atom-val.patch
BuildRequires: elixir BuildRequires: elixir
# https://www.rabbitmq.com/which-erlang.html # https://www.rabbitmq.com/which-erlang.html
BuildRequires: erlang >= 23.2 BuildRequires: erlang >= 23.2
@ -121,8 +118,8 @@ Optional dependency offering bash completion for %{name}.
Summary: Zsh completion for %{name} Summary: Zsh completion for %{name}
Group: System/Shells Group: System/Shells
BuildRequires: zsh BuildRequires: zsh
Requires: zsh
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: zsh
Supplements: (%{name} and zsh) Supplements: (%{name} and zsh)
BuildArch: noarch BuildArch: noarch