pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/chat/ejabberd
Module Name: pkgsrc
Committed By: gdt
Date: Fri Aug 23 12:59:05 UTC 2024
Modified Files:
pkgsrc/chat/ejabberd: Makefile distinfo
pkgsrc/chat/ejabberd/patches: patch-aa patch-ae
patch-tools_ejabberdctl.bc
Added Files:
pkgsrc/chat/ejabberd/patches: patch-src_ejabberd__auth.erl
patch-src_ejabberd__auth__anonymous.erl
Log Message:
chat/ejabberd: Recover from breakage due to untested erlang update
A recent update to erlang broke building of ejabberd. The problem is
essentially "languages should have their own packaging system"
disease. ejabberd includes rebar and rebar3 as erlang binaries
("beam"), and the new erlang refused to run them. Therefore, remove
them and symlink.
Also, two source files had constructs objected to by the new compiler.
rebar objects to https_proxy being syntactically invalid, even though
I think it isn't trying to download anything. It's not really wrong
to object, so this seems like a pkgsrc infrastructure bug. Work
around it by not setting https_proxy to fail.
While investigating, clean up multiple things, likely accumulated over time:
- explicitly ask for rebar to build, rather than relying on defaults
- drop dependency on elixir; configure defaults to off and it isn't used
- stop disabling the erlang version check; the build succeeds without it
- drop USE_GLOBAL_DEPS from the environment because that string
doesn't appear in the sources. Probably it is a previous method
of asking for reasonable behavior (rather than fetching and
building dependencies).
- remove, but leave commented, another workaround to avoid building
dependencies
- add patch comments
To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 pkgsrc/chat/ejabberd/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/chat/ejabberd/distinfo
cvs rdiff -u -r1.18 -r1.19 pkgsrc/chat/ejabberd/patches/patch-aa
cvs rdiff -u -r1.22 -r1.23 pkgsrc/chat/ejabberd/patches/patch-ae
cvs rdiff -u -r0 -r1.1 \
pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth.erl \
pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth__anonymous.erl
cvs rdiff -u -r1.3 -r1.4 \
pkgsrc/chat/ejabberd/patches/patch-tools_ejabberdctl.bc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/chat/ejabberd/Makefile
diff -u pkgsrc/chat/ejabberd/Makefile:1.99 pkgsrc/chat/ejabberd/Makefile:1.100
--- pkgsrc/chat/ejabberd/Makefile:1.99 Fri Aug 11 13:50:30 2023
+++ pkgsrc/chat/ejabberd/Makefile Fri Aug 23 12:59:05 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.99 2023/08/11 13:50:30 manu Exp $
+# $NetBSD: Makefile,v 1.100 2024/08/23 12:59:05 gdt Exp $
DISTNAME= ejabberd-22.05
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= chat
MASTER_SITES= https://www.process-one.net/downloads/downloads-action.php?file=/${PKGVERSION_NOREV}/
@@ -10,7 +10,6 @@ HOMEPAGE= https://www.ejabberd.im/
COMMENT= Free and Open Source distributed fault-tolerant Jabber server
LICENSE= gnu-gpl-v2
-DEPENDS+= elixir>=1.4.4:../../lang/elixir
DEPENDS+= erlang-base64url>=1.0.1:../../devel/erlang-base64url
DEPENDS+= erlang-cache_tab>=1.0.30:../../devel/erlang-cache_tab
DEPENDS+= erlang-epam>=1.0.12:../../security/erlang-epam
@@ -43,9 +42,16 @@ GNU_CONFIGURE= yes
USE_GCC_RUNTIME= yes
USE_TOOLS+= aclocal autoconf automake bash:run gmake patch perl
+# Upstream allows building with mix, rebar(2), and rebar3. As of
+# 22.05, the mix build fails, and both rebar versions work. Disabling
+# bundled deps seems cleaner with rebar(2).
+TOOL_DEPENDS+= rebar-[0-9]*:../../devel/rebar
+CONFIGURE_ARGS+= --with-rebar=rebar
+
CONFIGURE_ARGS+= --disable-debug
+# We intend to use the erlang packages DEPENDed on above, rather than having
+# ejabberd's build system build them. This is a bit messy and fragile.
CONFIGURE_ARGS+= --enable-system-deps
-CONFIGURE_ARGS+= --enable-erlang-version-check=no
CONFIGURE_ARGS+= --enable-mysql
CONFIGURE_ARGS+= --enable-odbc
CONFIGURE_ARGS+= --enable-pam
@@ -59,7 +65,15 @@ CONFIGURE_ARGS+= --enable-group=${EJABBE
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASEDIR}
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
-MAKE_ENV+= USE_GLOBAL_DEPS=true
+# rebar crashes; probably this is just objecting to the proxy value
+# being malformed, rather than trying to use the network. Avoid the
+# issue until pkgsrc fixes the disable method to block access without
+# triggering errors when not used.
+# Uncaught error: {error,{bad_option,https_proxy,
+# {{"downloads-forbidden-except-during-fetch",
+# []},
+# []}}}
+ALLOW_NETWORK_ACCESS= yes
RCD_SCRIPTS= ejabberd
@@ -115,7 +129,15 @@ SUBST_VARS.paths= DISTNAME EJABBERD_DB E
SUBST_VARS.paths+= PKG_SYSCONFDIR PREFIX LOCALBASE
post-extract:
- cd ${WRKSRC} && ${MKDIR} deps && ${TOUCH} deps/.got deps/.built
+ # Upstream includes rebar(2) and rebar3 built with an old OTP.
+ # Remove both and symlink in the one we are using -- built
+ # with the current OTP.
+ cd ${WRKSRC} && ${RM} rebar rebar3 && ${LN} -s ${LOCALBASE}/bin/rebar .
+ # Building deps is disabled above; this is leftover code to
+ # disable them differently. It is intentionally left
+ # commented out because it may be necessary with rebar3, which may be
+ # necessary in future ejabberd.
+ #cd ${WRKSRC} && ${MKDIR} deps && ${TOUCH} deps/.got deps/.built
pre-configure:
cd ${WRKSRC} && ${SH} autogen.sh
Index: pkgsrc/chat/ejabberd/distinfo
diff -u pkgsrc/chat/ejabberd/distinfo:1.69 pkgsrc/chat/ejabberd/distinfo:1.70
--- pkgsrc/chat/ejabberd/distinfo:1.69 Fri Aug 11 13:50:30 2023
+++ pkgsrc/chat/ejabberd/distinfo Fri Aug 23 12:59:05 2024
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.69 2023/08/11 13:50:30 manu Exp $
+$NetBSD: distinfo,v 1.70 2024/08/23 12:59:05 gdt Exp $
BLAKE2s (ejabberd-22.05.tar.gz) = 657dcfe4ee9f78fbba344588c255c8d3be8ee155e55c702b125fd0626673b908
SHA512 (ejabberd-22.05.tar.gz) = 33f98a9c45ff8257d240e7b90181e399ecab84e361f5619dc8d57252642e81d4958467cfa89b90681f3cf0d1d56a3079eb98d4e80cc6af5ca11938bb2a69f865
Size (ejabberd-22.05.tar.gz) = 2527957 bytes
-SHA1 (patch-aa) = 8544545d6a858a4853d339743d9f35c9506af241
-SHA1 (patch-ae) = de7536dbafab8d14430faa5fcbd767c238a151e5
+SHA1 (patch-aa) = 1e8947a3a3ce36c91df67137edf115d8f80c8a9a
+SHA1 (patch-ae) = 9e72782b7b46437edac02b341e726b28a3524c6d
SHA1 (patch-m4_erlang-extra.m4) = 3b89c1a8212e8a45ae319b30606a41429762e2fe
-SHA1 (patch-tools_ejabberdctl.bc) = 167f542c95f8e25ba601076ad717a85bfd456dc7
+SHA1 (patch-src_ejabberd__auth.erl) = f54216e2cf41c800b6c7657b9d99bb8338b84077
+SHA1 (patch-src_ejabberd__auth__anonymous.erl) = a0781130fb63c45aa911b0ff64156f3724505bb9
+SHA1 (patch-tools_ejabberdctl.bc) = 6e4f5d8411212d94dffe59192b9dca8aafba8b3f
Index: pkgsrc/chat/ejabberd/patches/patch-aa
diff -u pkgsrc/chat/ejabberd/patches/patch-aa:1.18 pkgsrc/chat/ejabberd/patches/patch-aa:1.19
--- pkgsrc/chat/ejabberd/patches/patch-aa:1.18 Fri Aug 11 13:50:30 2023
+++ pkgsrc/chat/ejabberd/patches/patch-aa Fri Aug 23 12:59:05 2024
@@ -1,7 +1,11 @@
-$NetBSD: patch-aa,v 1.18 2023/08/11 13:50:30 manu Exp $
+$NetBSD: patch-aa,v 1.19 2024/08/23 12:59:05 gdt Exp $
Fix locations; don't mess with ownership.
+\todo File parts of this upstream. At least including DESTDIR in
+EJABBERDDIR seem like a bug, and in general DESTDIR is tangled more
+than it should be.
+
--- Makefile.in.orig 2022-05-06 15:12:22.000000000 +0200
+++ Makefile.in 2023-08-11 09:08:52.337637204 +0200
@@ -9,9 +9,10 @@
Index: pkgsrc/chat/ejabberd/patches/patch-ae
diff -u pkgsrc/chat/ejabberd/patches/patch-ae:1.22 pkgsrc/chat/ejabberd/patches/patch-ae:1.23
--- pkgsrc/chat/ejabberd/patches/patch-ae:1.22 Sat Oct 15 18:20:40 2022
+++ pkgsrc/chat/ejabberd/patches/patch-ae Fri Aug 23 12:59:05 2024
@@ -1,13 +1,16 @@
-$NetBSD: patch-ae,v 1.22 2022/10/15 18:20:40 triaxx Exp $
+$NetBSD: patch-ae,v 1.23 2024/08/23 12:59:05 gdt Exp $
- Default locations.
- Use 'su -' instead of just 'su'. Fixes priv delegation on SunOS
and AIX where Erlang relies on $HOME set correctly. Use a portable
su arg order while at it.
- At least SunOS has not wheel group.
+ + \todo wheel is not patched out - explain/fix
- Portable grep calls.
- Fix spool directory.
+\todo File upstream.
+
--- ejabberdctl.template.orig 2022-05-06 13:12:22.000000000 +0000
+++ ejabberdctl.template
@@ -112,7 +112,7 @@ export SCRIPT_DIR
Index: pkgsrc/chat/ejabberd/patches/patch-tools_ejabberdctl.bc
diff -u pkgsrc/chat/ejabberd/patches/patch-tools_ejabberdctl.bc:1.3 pkgsrc/chat/ejabberd/patches/patch-tools_ejabberdctl.bc:1.4
--- pkgsrc/chat/ejabberd/patches/patch-tools_ejabberdctl.bc:1.3 Sat Oct 15 18:20:40 2022
+++ pkgsrc/chat/ejabberd/patches/patch-tools_ejabberdctl.bc Fri Aug 23 12:59:05 2024
@@ -1,7 +1,9 @@
-$NetBSD: patch-tools_ejabberdctl.bc,v 1.3 2022/10/15 18:20:40 triaxx Exp $
+$NetBSD: patch-tools_ejabberdctl.bc,v 1.4 2024/08/23 12:59:05 gdt Exp $
Proper log file location.
+\todo File upstream.
+
--- tools/ejabberdctl.bc.orig 2022-05-06 13:12:22.000000000 +0000
+++ tools/ejabberdctl.bc
@@ -3,7 +3,7 @@
Added files:
Index: pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth.erl
diff -u /dev/null pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth.erl:1.1
--- /dev/null Fri Aug 23 12:59:05 2024
+++ pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth.erl Fri Aug 23 12:59:05 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_ejabberd__auth.erl,v 1.1 2024/08/23 12:59:05 gdt Exp $
+
+Adjust erlang code based on pattern recognition without understanding.
+
+To be filed upstream after pkgsrc is up to date.
+
+--- src/ejabberd_auth.erl.orig 2024-08-22 22:15:04.612183309 +0000
++++ src/ejabberd_auth.erl
+@@ -409,7 +409,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).
+@@ -423,7 +423,7 @@ user_exists_in_other_modules_loop([AuthM
+ 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()}).
Index: pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth__anonymous.erl
diff -u /dev/null pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth__anonymous.erl:1.1
--- /dev/null Fri Aug 23 12:59:05 2024
+++ pkgsrc/chat/ejabberd/patches/patch-src_ejabberd__auth__anonymous.erl Fri Aug 23 12:59:05 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_ejabberd__auth__anonymous.erl,v 1.1 2024/08/23 12:59:05 gdt Exp $
+
+Adjust erlang code based on pattern recognition without understanding.
+
+To be filed upstream after pkgsrc is up to date.
+
+--- src/ejabberd_auth_anonymous.erl.orig 2024-08-22 22:18:25.679114701 +0000
++++ src/ejabberd_auth_anonymous.erl
+@@ -153,7 +153,7 @@ check_password(User, _AuthzId, Server, _
+ %% 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}.
+
Home |
Main Index |
Thread Index |
Old Index