summaryrefslogtreecommitdiffstats
path: root/net-im/ejabberd
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-04-24 21:37:41 +0000
committerpav <pav@FreeBSD.org>2005-04-24 21:37:41 +0000
commit41e900592abb0ce4d4fdaa75571ae737302967e2 (patch)
treedea05eef4612b412f9052b01aa7c8125e6c854fc /net-im/ejabberd
parent4b9697e7509fe58bc7befb4f242213f08ff6ef14 (diff)
downloadFreeBSD-ports-41e900592abb0ce4d4fdaa75571ae737302967e2.zip
FreeBSD-ports-41e900592abb0ce4d4fdaa75571ae737302967e2.tar.gz
- Update to 0.9
PR: ports/80252 Submitted by: Lars Eggert <lars.eggert@gmx.net>, this patch by Alexander Timoshenko <gonzo@univ.kiev.ua> (maintainer)
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r--net-im/ejabberd/Makefile38
-rw-r--r--net-im/ejabberd/distinfo4
-rw-r--r--net-im/ejabberd/files/ejabberd.cfg.sample182
-rw-r--r--net-im/ejabberd/files/patch-src-Makefile.in31
-rw-r--r--net-im/ejabberd/files/patch-src-ejabberd.hrl15
-rw-r--r--net-im/ejabberd/files/patch-src-ejabberd_auth.erl40
-rw-r--r--net-im/ejabberd/files/patch-src-jd2ejd.erl29
-rw-r--r--net-im/ejabberd/files/patch-src-mod_disco.erl37
-rw-r--r--net-im/ejabberd/files/patch-src-tls-tls_drv.c19
-rw-r--r--net-im/ejabberd/files/patch-src-web-ejabberd_web_admin.erl64
-rw-r--r--net-im/ejabberd/files/patch-src::ejabberd.sh6
-rw-r--r--net-im/ejabberd/files/patch-src::ejabberdctl18
-rw-r--r--net-im/ejabberd/pkg-plist179
13 files changed, 348 insertions, 314 deletions
diff --git a/net-im/ejabberd/Makefile b/net-im/ejabberd/Makefile
index 4ca5ca8..d2cdb46 100644
--- a/net-im/ejabberd/Makefile
+++ b/net-im/ejabberd/Makefile
@@ -1,4 +1,4 @@
-# New ports collection makefile for: ejabberd
+## New ports collection makefile for: ejabberd
# Date created: 03 July 2004
# Whom: Alexander Timoshenko <gonzo@univ.kiev.ua>
#
@@ -6,9 +6,10 @@
#
PORTNAME= ejabberd
-PORTVERSION= 0.7.5
+PORTVERSION= 0.9
CATEGORIES= net
-MASTER_SITES= http://www.jabber.ru/files/ejabberd/
+MASTER_SITES= http://www.jabber.ru/files/ejabberd/ \
+ http://www.process-one.net/en/projects/ejabberd/download/${PORTVERSION}/
MAINTAINER= gonzo@univ.kiev.ua
COMMENT= Free and Open Source distributed fault-tolerant Jabber server
@@ -18,43 +19,30 @@ RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang
PLIST_SUB= VERSION="${PORTVERSION}"
-WRKSRC= ${WRKDIR}/${DISTNAME}/src
-HAS_CONFIGURE= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}/src
+GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_REINPLACE= yes
-
-# MAN1= yaws.1
-# MAN5= yaws.conf.5 yaws_api.5
-
-APPDIR= ${PREFIX}/lib/erlang/lib/ejabberd-${PORTVERSION}
+PLIST_SUB= PORTVERSION=${PORTVERSION}
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
- ${WRKSRC}/ejabberd ${WRKSRC}/ejabberdctl ${WRKSRC}/ejabberd.sh
+ ${WRKSRC}/ejabberd ${WRKSRC}/ejabberd.sh
+ @${REINPLACE_CMD} -e 's|%%PORTVERSION%%|${PORTVERSION}|g' \
+ ${WRKSRC}/Makefile.in
@${FIND} ${WRKSRC} -name \*.orig -or -name \*.bak | ${XARGS} ${RM}
-do-install:
- @${MKDIR} ${APPDIR}/ebin
- @${INSTALL_DATA} ${WRKSRC}/*.beam ${APPDIR}/ebin
- @${RM} -f ${BEAMDIR}/configure.beam
- @${INSTALL_DATA} ${WRKSRC}/*.app ${APPDIR}/ebin
- @${MKDIR} ${APPDIR}/priv/lib
- @${INSTALL_DATA} ${WRKSRC}/*.so ${APPDIR}/priv/lib
- @${MKDIR} ${APPDIR}/priv/msgs
- @${INSTALL_DATA} ${WRKSRC}/msgs/*.msg ${APPDIR}/priv/msgs
+post-install:
@${INSTALL_SCRIPT} ${WRKSRC}/ejabberd ${PREFIX}/bin
- @${INSTALL_SCRIPT} ${WRKSRC}/ejabberdctl ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/ejabberd.sh ${PREFIX}/etc/rc.d
- @${INSTALL_DATA} ${FILESDIR}/ejabberd.cfg.sample ${PREFIX}/etc/
- @${INSTALL_DATA} ${FILESDIR}/ejabberd.defaults ${PREFIX}/etc/
+ @${INSTALL_DATA} ${FILESDIR}/ejabberd.defaults ${PREFIX}/etc
+ @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}/tools/ejabberdctl ${PREFIX}/bin
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/../doc/* ${DOCSDIR}
.endif
-
-post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/net-im/ejabberd/distinfo b/net-im/ejabberd/distinfo
index 2be0c35..001cb42 100644
--- a/net-im/ejabberd/distinfo
+++ b/net-im/ejabberd/distinfo
@@ -1,2 +1,2 @@
-MD5 (ejabberd-0.7.5.tar.gz) = c9f900ed535cb446e8b567048514c705
-SIZE (ejabberd-0.7.5.tar.gz) = 410451
+MD5 (ejabberd-0.9.tar.gz) = 9c349cddb6d0b144c12d277b17ce5e65
+SIZE (ejabberd-0.9.tar.gz) = 451676
diff --git a/net-im/ejabberd/files/ejabberd.cfg.sample b/net-im/ejabberd/files/ejabberd.cfg.sample
deleted file mode 100644
index 64ba143..0000000
--- a/net-im/ejabberd/files/ejabberd.cfg.sample
+++ /dev/null
@@ -1,182 +0,0 @@
-% Default FreeBSD ejabberd.cfg
-
-%override_acls.
-
-
-% Users that have admin access. Add line like one of the following after you
-% will be successfully registered on server to get admin access:
-%{acl, admin, {user, "aleksey"}}.
-%{acl, admin, {user, "ermine"}}.
-
-% Blocked users:
-%{acl, blocked, {user, "test"}}.
-
-% Local users:
-{acl, local, {user_regexp, ""}}.
-
-% Another examples of ACLs:
-%{acl, jabberorg, {server, "jabber.org"}}.
-%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
-%{acl, test, {user_regexp, "^test"}}.
-%{acl, test, {user_glob, "test*"}}.
-
-
-% Only admins can use configuration interface:
-{access, configure, [{allow, admin}]}.
-
-% Every username can be registered via in-band registration:
-{access, register, [{allow, all}]}.
-
-% None username can be registered via in-band registration:
-%{access, register, [{deny, all}]}.
-
-% After successful registration user will get message with following subject
-% and body:
-{welcome_message,
- {"Welcome!",
- "Welcome to FreeBSD Jabber Service. "
- "For information about Jabber visit http://jabber.org"}}.
-% Replace them with 'none' if you don't want to send such message:
-%{welcome_message, none}.
-
-% List of people who will get notifications about registered users
-%{registration_watchers, ["admin1@localhost",
-% "admin2@localhost"]}.
-
-% Only admins can send announcement messages:
-{access, announce, [{allow, admin}]}.
-
-
-% Only non-blocked users can use c2s connections:
-{access, c2s, [{deny, blocked},
- {allow, all}]}.
-
-% Set shaper with name "normal" to limit traffic speed to 1000B/s
-{shaper, normal, {maxrate, 1000}}.
-
-% Set shaper with name "fast" to limit traffic speed to 50000B/s
-{shaper, fast, {maxrate, 50000}}.
-
-% For all users except admins used "normal" shaper
-{access, c2s_shaper, [{none, admin},
- {normal, all}]}.
-
-% For all S2S connections used "fast" shaper
-{access, s2s_shaper, [{fast, all}]}.
-
-% Admins of this server are also admins of MUC service:
-{access, muc_admin, [{allow, admin}]}.
-
-% All users are allowed to use MUC service:
-{access, muc, [{allow, all}]}.
-
-% This rule allows access only for local users:
-{access, local, [{allow, local}]}.
-
-
-% Authentification method. If you want to use internal user base, then use
-% this line:
-{auth_method, internal}.
-
-% For LDAP uthentification use these lines instead of above one:
-%{auth_method, ldap}.
-%{ldap_servers, ["localhost"]}. % List of LDAP servers
-%{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID
-%{ldap_base, "dc=example,dc=com"}. % Base of LDAP directory
-
-% For authentification via external script use the following:
-%{auth_method, external}.
-%{extauth_program, "/path/to/authentification/script"}.
-
-
-% Host name: (replace for your hostname)
-{host, "localhost"}.
-
-
-% Default language for server messages
-{language, "en"}.
-
-% Listened ports:
-{listen,
-% Ordinary client-2-server service
- [{5222, ejabberd_c2s, [{access, c2s},
- starttls, {certfile, "/etc/ssl/certs/ejabberd.pem"},
- {shaper, c2s_shaper}]},
-
-% SSL-enabled client-2-server service
- {5223, ejabberd_c2s, [{access, c2s},
- tls, {certfile, "/etc/ssl/certs/ejabberd.pem"},
- {shaper, c2s_shaper}]},
-
-% Server-2-server service
- {5269, ejabberd_s2s_in, [{shaper, s2s_shaper}]},
-
-% External MUC jabber-muc (but internal mod_muc is better :))
-% {5554, ejabberd_service, [{ip, {127, 0, 0, 1}},
-% {access, all},
-% {host, "muc.localhost", [{password, "secret"}]}]},
-
-% Jabber ICQ Transport
-% {5555, ejabberd_service, [{ip, {127, 0, 0, 1}},
-% {access, all},
-% {hosts, ["icq.localhost", "sms.localhost"], [{password, "secret"}]}]},
-
-% AIM Transport
-% {5556, ejabberd_service, [{ip, {127, 0, 0, 1}},
-% {access, all},
-% {host, "aim.localhost", [{password, "secret"}]}]},
-
-% MSN Transport
-% {5557, ejabberd_service, [{ip, {127, 0, 0, 1}},
-% {access, all},
-% {host, "msn.localhost", [{password, "secret"}]}]},
-
-% Yahoo! Transport
-% {5558, ejabberd_service, [{ip, {127, 0, 0, 1}},
-% {access, all},
-% {host, "yahoo.localhost", [{password, "secret"}]}]},
-
-% External JUD (internal is more powerful,
-% but doesn't allow to register users from other servers)
-% {5559, ejabberd_service, [{ip, {127, 0, 0, 1}},
-% {access, all},
-% {host, "jud.localhost", [{password, "secret"}]}]},
-
-% HTTP service (You may choose options HTTP-polling and Web-administering)
-% When commenting out, be careful with commas
- {5280, ejabberd_http, [http_poll, web_admin]}
- ]}.
-
-% If SRV lookup fails, then port 5269 is used to communicate with remote server
-{outgoing_s2s_port, 5269}.
-
-% Used modules:
-{modules,
- [
- {mod_announce, [{access, announce}]},
- {mod_register, [{access, register}]},
- {mod_roster, []},
- {mod_privacy, []},
- {mod_configure, []},
- {mod_configure2, []},
- {mod_disco, [{extra_domains, ["users.jabber.org"]}]},
- {mod_stats, []},
- {mod_vcard, []},
- {mod_offline, []},
- {mod_echo, []},
- {mod_private, []},
- {mod_irc, []},
-% Default options for mod_muc:
-% host: "conference." ++ ?MYNAME
-% access: all
-% access_create: all
-% access_admin: none (only room creator has owner privileges)
- {mod_muc, [{access, muc},
- {access_create, muc},
- {access_admin, muc_admin}]},
- {mod_pubsub, []},
- {mod_time, []},
- {mod_last, []},
- {mod_version, []}
- ]}.
-
diff --git a/net-im/ejabberd/files/patch-src-Makefile.in b/net-im/ejabberd/files/patch-src-Makefile.in
new file mode 100644
index 0000000..48d0ed9
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-Makefile.in
@@ -0,0 +1,31 @@
+--- Makefile.in Mon Sep 27 20:54:17 2004
++++ Makefile.in Fri Apr 22 17:01:48 2005
+@@ -17,15 +17,15 @@
+ SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @eldap@ @web@ stringprep @tls@
+ ERLSHLIBS = expat_erl.so
+
+-DESTDIR =
++DESTDIR = @prefix@
+
+-EJABBERDDIR = $(DESTDIR)/var/lib/ejabberd
++EJABBERDDIR = $(DESTDIR)/lib/erlang/lib/ejabberd-%%PORTVERSION%%
+ BEAMDIR = $(EJABBERDDIR)/ebin
+ PRIVDIR = $(EJABBERDDIR)/priv
+ SODIR = $(PRIVDIR)/lib
+ MSGSDIR = $(PRIVDIR)/msgs
+-LOGDIR = $(DESTDIR)/var/log/ejabberd
+-ETCDIR = $(DESTDIR)/etc/ejabberd
++LOGDIR = /var/log/ejabberd
++ETCDIR = $(DESTDIR)/etc
+
+ all: $(ERLSHLIBS) compile-beam all-recursive
+
+@@ -60,7 +60,7 @@
+ install -d $(MSGSDIR)
+ install -m 644 msgs/*.msg $(MSGSDIR)
+ install -d $(ETCDIR)
+- install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
++ install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg.sample
+ install -d $(LOGDIR)
+
+ clean: clean-recursive clean-local
diff --git a/net-im/ejabberd/files/patch-src-ejabberd.hrl b/net-im/ejabberd/files/patch-src-ejabberd.hrl
new file mode 100644
index 0000000..c5c4bd0
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-ejabberd.hrl
@@ -0,0 +1,15 @@
+--- ejabberd.hrl Sun Apr 17 18:08:34 2005
++++ ejabberd.hrl Sat Apr 23 19:28:48 2005
+@@ -3,10 +3,10 @@
+ %%% Author : Alexey Shchepin <alexey@sevcom.net>
+ %%% Purpose :
+ %%% Created : 17 Nov 2002 by Alexey Shchepin <alexey@sevcom.net>
+-%%% Id : $Id: ejabberd.hrl 307 2005-04-17 18:08:34Z tmallard $
++%%% Id : $Id: ejabberd.hrl 326 2005-04-22 16:47:16Z alexey $
+ %%%----------------------------------------------------------------------
+
+--define(VERSION, "0.8-alpha").
++-define(VERSION, "0.9.1-alpha").
+
+ %-define(ejabberd_debug, true).
+ %-define(DBGFSM, true).
diff --git a/net-im/ejabberd/files/patch-src-ejabberd_auth.erl b/net-im/ejabberd/files/patch-src-ejabberd_auth.erl
new file mode 100644
index 0000000..ccf515c2
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-ejabberd_auth.erl
@@ -0,0 +1,40 @@
+--- ejabberd_auth.erl Sun Apr 17 18:08:34 2005
++++ ejabberd_auth.erl Sat Apr 23 19:28:48 2005
+@@ -3,12 +3,12 @@
+ %%% Author : Alexey Shchepin <alexey@sevcom.net>
+ %%% Purpose : Authentification
+ %%% Created : 23 Nov 2002 by Alexey Shchepin <alexey@sevcom.net>
+-%%% Id : $Id: ejabberd_auth.erl 307 2005-04-17 18:08:34Z tmallard $
++%%% Id : $Id: ejabberd_auth.erl 323 2005-04-19 23:10:22Z alexey $
+ %%%----------------------------------------------------------------------
+
+ -module(ejabberd_auth).
+ -author('alexey@sevcom.net').
+--vsn('$Revision$ ').
++-vsn('$Revision: 323 $ ').
+
+ %% External exports
+ -export([start/0,
+@@ -26,6 +26,8 @@
+ plain_password_required/0
+ ]).
+
++-include("ejabberd.hrl").
++
+ %%%----------------------------------------------------------------------
+ %%% API
+ %%%----------------------------------------------------------------------
+@@ -45,7 +47,12 @@
+ (auth_module()):set_password(User, Server, Password).
+
+ try_register(User, Server, Password) ->
+- (auth_module()):try_register(User, Server, Password).
++ case lists:member(jlib:nameprep(Server), ?MYHOSTS) of
++ true ->
++ (auth_module()):try_register(User, Server, Password);
++ false ->
++ {error, not_allowed}
++ end.
+
+ dirty_get_registered_users() ->
+ (auth_module()):dirty_get_registered_users().
diff --git a/net-im/ejabberd/files/patch-src-jd2ejd.erl b/net-im/ejabberd/files/patch-src-jd2ejd.erl
new file mode 100644
index 0000000..73f6745
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-jd2ejd.erl
@@ -0,0 +1,29 @@
+--- jd2ejd.erl Sun Apr 17 18:08:34 2005
++++ jd2ejd.erl Sat Apr 23 19:28:48 2005
+@@ -3,12 +3,12 @@
+ %%% Author : Alexey Shchepin <alexey@sevcom.net>
+ %%% Purpose : Import of jabberd1.4 user spool file
+ %%% Created : 2 Feb 2003 by Alexey Shchepin <alexey@sevcom.net>
+-%%% Id : $Id: jd2ejd.erl 307 2005-04-17 18:08:34Z tmallard $
++%%% Id : $Id: jd2ejd.erl 324 2005-04-21 14:06:15Z alexey $
+ %%%----------------------------------------------------------------------
+
+ -module(jd2ejd).
+ -author('alexey@sevcom.net').
+--vsn('$Revision$ ').
++-vsn('$Revision: 324 $ ').
+
+ %% External exports
+ -export([import_file/1,
+@@ -87,8 +87,9 @@
+ end.
+
+
+-xdb_data(User, Server, El) ->
+- {xmlelement, _Name, Attrs, _Els} = El,
++xdb_data(User, Server, {xmlcdata, _CData}) ->
++ ok;
++xdb_data(User, Server, {xmlelement, _Name, Attrs, _Els} = El) ->
+ From = jlib:make_jid(User, Server, ""),
+ case xml:get_attr_s("xmlns", Attrs) of
+ ?NS_AUTH ->
diff --git a/net-im/ejabberd/files/patch-src-mod_disco.erl b/net-im/ejabberd/files/patch-src-mod_disco.erl
new file mode 100644
index 0000000..2e37176
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-mod_disco.erl
@@ -0,0 +1,37 @@
+--- mod_disco.erl Sun Apr 17 18:08:34 2005
++++ mod_disco.erl Sat Apr 23 19:28:48 2005
+@@ -3,12 +3,12 @@
+ %%% Author : Alexey Shchepin <alexey@sevcom.net>
+ %%% Purpose : Service Discovery (JEP-0030) support
+ %%% Created : 1 Jan 2003 by Alexey Shchepin <alexey@sevcom.net>
+-%%% Id : $Id: mod_disco.erl 307 2005-04-17 18:08:34Z tmallard $
++%%% Id : $Id: mod_disco.erl 322 2005-04-19 22:19:22Z alexey $
+ %%%----------------------------------------------------------------------
+
+ -module(mod_disco).
+ -author('alexey@sevcom.net').
+--vsn('$Revision$ ').
++-vsn('$Revision: 322 $ ').
+
+ -behaviour(gen_mod).
+
+@@ -344,9 +344,17 @@
+
+
+ get_vh_services(Host) ->
+- DotHost = "." ++ Host,
++ Hosts = lists:sort(fun(H1, H2) -> length(H1) >= length(H2) end, ?MYHOSTS),
+ lists:filter(fun(H) ->
+- lists:suffix(DotHost, H)
++ case lists:dropwhile(
++ fun(VH) ->
++ not lists:suffix("." ++ VH, H)
++ end, Hosts) of
++ [] ->
++ false;
++ [VH | _] ->
++ VH == Host
++ end
+ end, ejabberd_router:dirty_get_all_routes()).
+
+ get_online_vh_users(Host) ->
diff --git a/net-im/ejabberd/files/patch-src-tls-tls_drv.c b/net-im/ejabberd/files/patch-src-tls-tls_drv.c
new file mode 100644
index 0000000..c8b6ec6
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-tls-tls_drv.c
@@ -0,0 +1,19 @@
+--- tls/tls_drv.c Sat Apr 9 23:47:56 2005
++++ tls/tls_drv.c Sat Apr 23 19:28:48 2005
+@@ -1,4 +1,4 @@
+-/* $Id: tls_drv.c 305 2005-04-09 23:47:56Z aleksey $ */
++/* $Id: tls_drv.c 327 2005-04-24 12:09:47Z alexey $ */
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -80,8 +80,8 @@
+ d->ctx = SSL_CTX_new(SSLv23_server_method());
+ die_unless(d->ctx, "SSL_CTX_new failed");
+
+- res = SSL_CTX_use_certificate_chain_file(d->ctx, buf);
+- die_unless(res > 0, "ssl_ctx_use_certificate_chain_file failed");
++ res = SSL_CTX_use_certificate_file(d->ctx, buf, SSL_FILETYPE_PEM);
++ die_unless(res > 0, "SSL_CTX_use_certificate_file failed");
+
+ res = SSL_CTX_use_PrivateKey_file(d->ctx, buf, SSL_FILETYPE_PEM);
+ die_unless(res > 0, "SSL_CTX_use_PrivateKey_file failed");
diff --git a/net-im/ejabberd/files/patch-src-web-ejabberd_web_admin.erl b/net-im/ejabberd/files/patch-src-web-ejabberd_web_admin.erl
new file mode 100644
index 0000000..e0a1c85
--- /dev/null
+++ b/net-im/ejabberd/files/patch-src-web-ejabberd_web_admin.erl
@@ -0,0 +1,64 @@
+--- web/ejabberd_web_admin.erl Mon Apr 18 20:03:07 2005
++++ web/ejabberd_web_admin.erl Sat Apr 23 19:28:48 2005
+@@ -3,7 +3,7 @@
+ %%% Author : Alexey Shchepin <alexey@sevcom.net>
+ %%% Purpose : Administration web interface
+ %%% Created : 9 Apr 2004 by Alexey Shchepin <alexey@sevcom.net>
+-%%% Id : $Id: ejabberd_web_admin.erl 316 2005-04-18 20:03:07Z alexey $
++%%% Id : $Id: ejabberd_web_admin.erl 323 2005-04-19 23:10:22Z alexey $
+ %%%----------------------------------------------------------------------
+ %%% Copyright (c) 2004-2005 Alexey Shchepin
+ %%% Copyright (c) 2004-2005 Process One
+@@ -11,7 +11,7 @@
+
+ -module(ejabberd_web_admin).
+ -author('alexey@sevcom.net').
+--vsn('$Revision$ ').
++-vsn('$Revision: 323 $ ').
+
+ %% External exports
+ -export([process_admin/1]).
+@@ -1143,23 +1143,26 @@
+ list_users_parse_query(Query) ->
+ case lists:keysearch("addnewuser", 1, Query) of
+ {value, _} ->
+- {value, {_, User}} =
++ {value, {_, JIDString}} =
+ lists:keysearch("newusername", 1, Query),
+ {value, {_, Password}} =
+ lists:keysearch("newuserpassword", 1, Query),
+- case jlib:nodeprep(User) of
++ case jlib:string_to_jid(JIDString) of
+ error ->
+ error;
+- "" ->
+- error;
+- _ ->
+- ejabberd_auth:try_register(User, Password),
+- ok
++ #jid{user = User, server = Server} ->
++ case ejabberd_auth:try_register(User, Server, Password) of
++ {error, _Reason} ->
++ error;
++ _ ->
++ ok
++ end
+ end;
+ false ->
+ nothing
+ end.
+
++
+ list_users_in_diapason(Diap, Lang) ->
+ Users = ejabberd_auth:dirty_get_registered_users(),
+ SUsers = lists:sort([{S, U} || {U, S} <- Users]),
+@@ -1181,7 +1184,8 @@
+ fun(SU = {Server, User}) ->
+ US = {User, Server},
+ QueueLen = length(mnesia:dirty_read({offline_msg, US})),
+- FQueueLen = [?AC(Prefix ++ "user/" ++ User ++ "/queue/",
++ FQueueLen = [?AC(Prefix ++ "user/" ++
++ User ++ "@" ++ Server ++ "/queue/",
+ integer_to_list(QueueLen))],
+ FLast =
+ case ejabberd_sm:get_user_resources(User, Server) of
diff --git a/net-im/ejabberd/files/patch-src::ejabberd.sh b/net-im/ejabberd/files/patch-src::ejabberd.sh
index 1a2da91..1add6e7 100644
--- a/net-im/ejabberd/files/patch-src::ejabberd.sh
+++ b/net-im/ejabberd/files/patch-src::ejabberd.sh
@@ -27,7 +27,7 @@
+
+status()
+{
-+ $EJABBERDCTL status >/dev/null
++ su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` status >/dev/null"
+}
+
+start()
@@ -53,7 +53,7 @@
+ stop)
+ echo -n "Stopping $DESC: "
+
-+ if $EJABBERDCTL stop
++ if su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` stop"
+ then
+ cnt=0
+ while status
@@ -77,7 +77,7 @@
+ echo -n "Restarting $DESC: "
+ if status
+ then
-+ $EJABBERDCTL restart
++ su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` restart"
+ else
+ start
+ fi
diff --git a/net-im/ejabberd/files/patch-src::ejabberdctl b/net-im/ejabberd/files/patch-src::ejabberdctl
deleted file mode 100644
index 3eb278a..0000000
--- a/net-im/ejabberd/files/patch-src::ejabberdctl
+++ /dev/null
@@ -1,18 +0,0 @@
---- ejabberdctl.orig Wed Oct 20 22:10:55 2004
-+++ ejabberdctl Wed Oct 20 22:10:49 2004
-@@ -0,0 +1,15 @@
-+#!/bin/sh
-+
-+[ -r /var/run/ejabberd/.erlang.cookie ] && HOME=/var/run/ejabberd
-+
-+NODE=ejabberd@`hostname -s`
-+
-+if [ $# -ne 0 ]
-+then
-+ case $1 in
-+ --node) shift ; NODE=$1 ; shift ;;
-+ esac
-+fi
-+
-+exec erl -noinput -sname ejabberdctl -s ejabberd_ctl -extra $NODE "$@"
-+
diff --git a/net-im/ejabberd/pkg-plist b/net-im/ejabberd/pkg-plist
index e1c98b0..ea20494 100644
--- a/net-im/ejabberd/pkg-plist
+++ b/net-im/ejabberd/pkg-plist
@@ -1,85 +1,94 @@
bin/ejabberd
bin/ejabberdctl
-etc/ejabberd.defaults
etc/ejabberd.cfg.sample
+etc/ejabberd.defaults
etc/rc.d/ejabberd.sh
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ELDAPv3.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/acl.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/configure.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/cyrsasl.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/cyrsasl_digest.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/cyrsasl_plain.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_app.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_auth.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_c2s.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_config.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_ctl.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_hooks.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_http.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_http_poll.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_listener.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_local.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_logger_h.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/eldap.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_receiver.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_router.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_s2s.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_s2s_in.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_s2s_out.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_service.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_sm.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_sup.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_tmp_sup.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_web.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd_web_admin.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/extauth.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/gen_iq_handler.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/gen_mod.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/iconv.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/idna.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/jd2ejd.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/jlib.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_announce.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_configure.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_configure2.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_disco.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_echo.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_irc.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_irc_connection.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_last.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_muc.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_muc_room.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_offline.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_privacy.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_private.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_pubsub.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_register.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_roster.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_service_log.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_stats.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_time.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_vcard.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_vcard_ldap.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/mod_version.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/randoms.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/sha.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/shaper.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/stringprep.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/tls.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/translate.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/xml.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/xml_stream.beam
-lib/erlang/lib/ejabberd-%%VERSION%%/ebin/ejabberd.app
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/expat_erl.so
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/iconv_erl.so
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/stringprep_drv.so
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/lib/tls_drv.so
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/es.msg
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/fr.msg
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/nl.msg
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/ru.msg
-lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/uk.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ELDAPv3.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/acl.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/cyrsasl.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/cyrsasl_digest.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/cyrsasl_plain.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd.app
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_app.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_auth.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_auth_external.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_auth_internal.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_auth_ldap.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_auth_odbc.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_c2s.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_config.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_ctl.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_hooks.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_http.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_http_poll.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_listener.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_local.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_logger_h.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_receiver.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_router.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_s2s.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_s2s_in.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_s2s_out.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_service.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_sm.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_sup.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_tmp_sup.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_web.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/ejabberd_web_admin.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/eldap.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/extauth.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/gen_iq_handler.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/gen_mod.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/iconv.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/idna.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/jd2ejd.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/jlib.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_announce.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_configure.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_configure2.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_disco.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_echo.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_irc.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_irc_connection.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_last.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_last_odbc.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_muc.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_muc_room.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_offline.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_offline_odbc.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_privacy.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_private.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_pubsub.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_register.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_roster.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_roster_odbc.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_service_log.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_shared_roster.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_stats.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_time.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_vcard.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_vcard_ldap.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/mod_version.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/randoms.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/sha.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/shaper.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/stringprep.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/tls.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/translate.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/xml.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin/xml_stream.beam
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/lib/expat_erl.so
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/lib/iconv_erl.so
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/lib/stringprep_drv.so
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/lib/tls_drv.so
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/de.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/es.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/fr.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/nl.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/pl.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/ru.msg
+lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs/uk.msg
%%PORTDOCS%%%%DOCSDIR%%/confacls.png
%%PORTDOCS%%%%DOCSDIR%%/confhostname.png
%%PORTDOCS%%%%DOCSDIR%%/dev.html
@@ -88,14 +97,16 @@ lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs/uk.msg
%%PORTDOCS%%%%DOCSDIR%%/discoallusers.png
%%PORTDOCS%%%%DOCSDIR%%/discorunnodes.png
%%PORTDOCS%%%%DOCSDIR%%/discorus.png
+%%PORTDOCS%%%%DOCSDIR%%/flow.dot
%%PORTDOCS%%%%DOCSDIR%%/guide.html
%%PORTDOCS%%%%DOCSDIR%%/guide.tex
%%PORTDOCS%%%%DOCSDIR%%/logo.png
+%%PORTDOCS%%%%DOCSDIR%%/release_notes_%%PORTVERSION%%.txt
%%PORTDOCS%%%%DOCSDIR%%/webadmmain.png
%%PORTDOCS%%%%DOCSDIR%%/webadmmainru.png
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/priv/lib
-@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/priv/msgs
-@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/priv
-@dirrm lib/erlang/lib/ejabberd-%%VERSION%%/ebin
-@dirrm lib/erlang/lib/ejabberd-%%VERSION%%
+@dirrm %%PORTDOCS%%share/doc/ejabberd
+@dirrm lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/msgs
+@dirrm lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv/lib
+@dirrm lib/erlang/lib/ejabberd-%%PORTVERSION%%/priv
+@dirrm lib/erlang/lib/ejabberd-%%PORTVERSION%%/ebin
+@dirrm lib/erlang/lib/ejabberd-%%PORTVERSION%%
OpenPOWER on IntegriCloud