[packages/ejabberd] upstream patch to fix build with erlang 27
atler
atler at pld-linux.org
Mon Nov 11 02:37:54 CET 2024
commit 2f88b19da2448dc4566e830fd57601b98e686fb4
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Nov 9 01:46:54 2024 +0100
upstream patch to fix build with erlang 27
ejabberd.spec | 2 ++
erlang-27.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
---
diff --git a/ejabberd.spec b/ejabberd.spec
index 49c2a2a..2eb2650 100644
--- a/ejabberd.spec
+++ b/ejabberd.spec
@@ -77,6 +77,7 @@ Patch1: %{name}-config.patch
# https://github.com/paleg/ejabberd/compare/paleg:19.08...paleg:19.08-mod_logdb.patch
Patch3: %{name}-mod_logdb.patch
Patch4: system-elixir.patch
+Patch5: erlang-27.patch
URL: http://www.ejabberd.im/
BuildRequires: autoconf
BuildRequires: automake
@@ -132,6 +133,7 @@ Server-side logging module.
%patch3 -p1
%endif
%patch4 -p1
+%patch5 -p1
%{__sed} -i -e 's, at ELIXIRDIR@,%{_libdir}/elixir,' ejabberdctl.template rebar.config
diff --git a/erlang-27.patch b/erlang-27.patch
new file mode 100644
index 0000000..57f014c
--- /dev/null
+++ b/erlang-27.patch
@@ -0,0 +1,46 @@
+From 18cb0bca19709d2d1282b522b07d77836da2080b Mon Sep 17 00:00:00 2001
+From: Badlop <badlop at process-one.net>
+Date: Thu, 15 Feb 2024 00:32:18 +0100
+Subject: [PATCH] Fix compilation with Erlang/OTP 27: don't use the reserved
+ word 'maybe'
+
+---
+ src/ejabberd_auth.erl | 4 ++--
+ src/ejabberd_auth_anonymous.erl | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl
+index 0034e6a92f1..594fc1bd71c 100644
+--- a/src/ejabberd_auth.erl
++++ b/src/ejabberd_auth.erl
+@@ -425,7 +425,7 @@ user_exists(User, Server) ->
+ false
+ end.
+
+--spec user_exists_in_other_modules(atom(), binary(), binary()) -> boolean() | maybe.
++-spec user_exists_in_other_modules(atom(), binary(), binary()) -> boolean() | maybe_exists.
+ user_exists_in_other_modules(Module, User, Server) ->
+ user_exists_in_other_modules_loop(
+ auth_modules(Server) -- [Module], User, Server).
+@@ -439,7 +439,7 @@ user_exists_in_other_modules_loop([AuthModule | AuthModules], User, Server) ->
+ {false, _} ->
+ user_exists_in_other_modules_loop(AuthModules, User, Server);
+ {{error, _}, _} ->
+- maybe
++ maybe_exists
+ end.
+
+ -spec which_users_exists(list({binary(), binary()})) -> list({binary(), binary()}).
+diff --git a/src/ejabberd_auth_anonymous.erl b/src/ejabberd_auth_anonymous.erl
+index 17289e6fb6c..9fb67047c6a 100644
+--- a/src/ejabberd_auth_anonymous.erl
++++ b/src/ejabberd_auth_anonymous.erl
+@@ -153,7 +153,7 @@ check_password(User, _AuthzId, Server, _Password) ->
+ %% If user exists in other module, reject anonnymous authentication
+ true -> false;
+ %% If we are not sure whether the user exists in other module, reject anon auth
+- maybe -> false;
++ maybe_exists -> false;
+ false -> login(User, Server)
+ end}.
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ejabberd.git/commitdiff/ce0e3441fa37c2ca6f8098ba00576b9feaa5640b
More information about the pld-cvs-commit
mailing list