summaryrefslogtreecommitdiff
path: root/net-im/ejabberd/files
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-03-11 18:00:06 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-03-11 18:00:06 +0000
commit8dd9f1fc09678e91f7811b7c0c37f3ec272ed155 (patch)
tree02dd026e7122416ea2096f1f7abe67df7b033fde /net-im/ejabberd/files
parentUpdate to 324 (diff)
net-im/ejabberd: 15.07 -> 16.02
Lots of changes: https://blog.process-one.net/ejabberd-16-02-happy-leap-day/ https://blog.process-one.net/ejabberd-16-01/ https://blog.process-one.net/ejabberd-15-11-simpler-cluster-setup/ https://blog.process-one.net/ejabberd-15-10-http-upload-metrics-and-performance/ https://blog.process-one.net/ejabberd-15-09-oauth/ Submitted by: ashish (maintainer)
Diffstat (limited to 'net-im/ejabberd/files')
-rw-r--r--net-im/ejabberd/files/patch-Makefile.in37
-rw-r--r--net-im/ejabberd/files/patch-deps_stringprep_c__src_stringprep.cpp10
-rw-r--r--net-im/ejabberd/files/patch-ejabberdctl.template44
-rw-r--r--net-im/ejabberd/files/patch-erlang-17-dict-queue212
-rw-r--r--net-im/ejabberd/files/patch-erlang-18209
-rw-r--r--net-im/ejabberd/files/pkg-install.in12
6 files changed, 67 insertions, 457 deletions
diff --git a/net-im/ejabberd/files/patch-Makefile.in b/net-im/ejabberd/files/patch-Makefile.in
index d5102bc2513a..21bf55f4cba1 100644
--- a/net-im/ejabberd/files/patch-Makefile.in
+++ b/net-im/ejabberd/files/patch-Makefile.in
@@ -1,7 +1,7 @@
---- Makefile.in.orig 2015-02-12 00:14:57.000000000 +0100
-+++ Makefile.in 2015-03-14 23:50:41.000000000 +0100
-@@ -18,7 +18,7 @@
- SBINDIR = $(DESTDIR)@sbindir@
+--- Makefile.in.orig 2016-02-29 13:35:45 UTC
++++ Makefile.in
+@@ -21,7 +21,7 @@ SBINDIR = $(DESTDIR)@sbindir@
+ LIBDIR = $(DESTDIR)@libdir@
# /lib/ejabberd/
-EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
@@ -9,8 +9,8 @@
# /share/doc/ejabberd
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-@@ -44,10 +44,10 @@
- MSGSDIR = $(PRIVDIR)/msgs
+@@ -50,10 +50,10 @@ MSGSDIR = $(PRIVDIR)/msgs
+ SQLDIR = $(PRIVDIR)/sql
# /var/lib/ejabberd/
-SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
@@ -23,7 +23,16 @@
# /var/lib/ejabberd/.erlang.cookie
COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
-@@ -116,9 +116,7 @@
+@@ -117,7 +117,7 @@ JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),
+ VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
+
+ ELIXIR_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 5,1000,$(1))
+-DEPS_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 3,1000,$(1))
++DEPS_TO_DEST=$(LIBDIR)/ejabberd-$(PORTVERSION)/lib $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 3,1000,$(1))
+ MAIN_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,ejabberd) $(1)
+ TO_DEST_SINGLE=$(if $(subst XdepsX,,X$(word 1,$(1))X),$(call MAIN_TO_DEST,$(1)),$(if $(subst XlibX,,X$(word 3,$(1))X),$(call DEPS_TO_DEST,$(1)),$(call ELIXIR_TO_DEST,$(1))))
+ TO_DEST=$(foreach path,$(1),$(call JOIN_PATHS,$(call TO_DEST_SINGLE,$(subst /, ,$(path)))))
+@@ -174,9 +174,7 @@ install: all copy-files
#
# Configuration files
$(INSTALL) -d -m 750 $(G_USER) $(ETCDIR)
@@ -34,7 +43,7 @@
$(SED) -e "s*{{rootdir}}*@prefix@*" \
-e "s*{{installuser}}*@INSTALLUSER@*" \
-e "s*{{bindir}}*@bindir@*" \
-@@ -126,16 +124,15 @@
+@@ -184,16 +182,15 @@ install: all copy-files
-e "s*{{sysconfdir}}*@sysconfdir@*" \
-e "s*{{localstatedir}}*@localstatedir@*" \
-e "s*{{docdir}}*@docdir@*" \
@@ -56,18 +65,16 @@
+ $(INSTALL) -m 555 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
# Elixir binaries
[ -d $(BINDIR) ] || $(INSTALL) -d -m 755 $(BINDIR)
- -[ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex
-@@ -196,6 +193,7 @@
+ [ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex || true
+@@ -223,11 +220,13 @@ install: all copy-files
chmod -R 750 $(LOGDIR)
#
# Documentation
+ifndef NOPORTDOCS
$(INSTALL) -d $(DOCDIR)
- [ -f doc/dev.html ] \
- && $(INSTALL) -m 644 doc/dev.html $(DOCDIR) \
-@@ -208,6 +206,7 @@
- || echo "No doc/guide.pdf was built"
- $(INSTALL) -m 644 doc/*.png $(DOCDIR)
+ [ -f doc/guide.html ] \
+ && $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \
+ || echo "Documentation not included in sources"
$(INSTALL) -m 644 COPYING $(DOCDIR)
+endif
diff --git a/net-im/ejabberd/files/patch-deps_stringprep_c__src_stringprep.cpp b/net-im/ejabberd/files/patch-deps_stringprep_c__src_stringprep.cpp
new file mode 100644
index 000000000000..fd94864aefa0
--- /dev/null
+++ b/net-im/ejabberd/files/patch-deps_stringprep_c__src_stringprep.cpp
@@ -0,0 +1,10 @@
+--- deps/stringprep/c_src/stringprep.cpp.orig 2016-03-04 14:58:46 UTC
++++ deps/stringprep/c_src/stringprep.cpp
+@@ -19,6 +19,7 @@
+ */
+
+ #include <string.h>
++#include <libutil.h>
+ #include <erl_nif.h>
+
+ #include "uni_data.c"
diff --git a/net-im/ejabberd/files/patch-ejabberdctl.template b/net-im/ejabberd/files/patch-ejabberdctl.template
index ceca246e0678..d7b42a194616 100644
--- a/net-im/ejabberd/files/patch-ejabberdctl.template
+++ b/net-im/ejabberd/files/patch-ejabberdctl.template
@@ -1,6 +1,31 @@
---- ejabberdctl.template.orig
+--- ejabberdctl.template.orig 2016-03-09 03:31:00 UTC
+++ ejabberdctl.template
-@@ -71,10 +71,10 @@
+@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
+ EPMD={{bindir}}/epmd
+ INSTALLUSER={{installuser}}
+ ERL_LIBS={{libdir}}
++ERL_LIBS=$ERL_LIBS:{{libdir}}/ejabberd/lib
+
+ # check the proper system user is used if defined
+ if [ "$INSTALLUSER" != "" ] ; then
+@@ -31,14 +32,14 @@ if [ "$INSTALLUSER" != "" ] ; then
+ fi
+ done
+ if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
+- EXEC_CMD="bash -c"
++ EXEC_CMD="/usr/local/bin/bash -c"
+ fi
+ if [ "$EXEC_CMD" = "false" ] ; then
+ echo "This command can only be run by root or the user $INSTALLUSER" >&2
+ exit 4
+ fi
+ else
+- EXEC_CMD="bash -c"
++ EXEC_CMD="/usr/local/bin/bash -c"
+ fi
+
+ # parse command line parameters
+@@ -73,10 +74,10 @@ if [ "$EJABBERD_CONFIG_PATH" = "" ] ; th
EJABBERD_CONFIG_PATH=$ETC_DIR/ejabberd.yml
fi
if [ "$LOGS_DIR" = "" ] ; then
@@ -13,20 +38,7 @@
fi
if [ "$EJABBERD_DOC_PATH" = "" ] ; then
EJABBERD_DOC_PATH={{docdir}}
-@@ -88,10 +88,10 @@
- EJABBERDDIR={{libdir}}/ejabberd
- fi
- if [ "$EJABBERD_EBIN_PATH" = "" ] ; then
-- EJABBERD_EBIN_PATH=$EJABBERDDIR/ebin
-+ EJABBERD_EBIN_PATH={{rootdir}}/lib/erlang/lib/ejabberd/ebin
- fi
- if [ "$EJABBERD_PRIV_PATH" = "" ] ; then
-- EJABBERD_PRIV_PATH=$EJABBERDDIR/priv
-+ EJABBERD_PRIV_PATH={{rootdir}}/lib/erlang/lib/ejabberd/priv
- fi
- if [ "$EJABBERD_BIN_PATH" = "" ] ; then
- EJABBERD_BIN_PATH=$EJABBERD_PRIV_PATH/bin
-@@ -335,7 +335,7 @@
+@@ -354,7 +355,7 @@ ctl()
# using flock if available. Expects a linux-style
# flock that can lock a file descriptor.
MAXCONNID=100
diff --git a/net-im/ejabberd/files/patch-erlang-17-dict-queue b/net-im/ejabberd/files/patch-erlang-17-dict-queue
deleted file mode 100644
index ace41dd408e2..000000000000
--- a/net-im/ejabberd/files/patch-erlang-17-dict-queue
+++ /dev/null
@@ -1,212 +0,0 @@
-Fixes to make it work with Erlang R17
-
---- ../deps/riak_pb/src/riak_pb_kv_codec.erl.orig
-+++ ../deps/riak_pb/src/riak_pb_kv_codec.erl
-@@ -49,7 +49,11 @@
-
- -type symbolic_quorum() :: one | quorum | all | default.
- -type value() :: binary().
-+-ifdef(ERLANG_17).
-+-type metadata() :: dict:dict().
-+-else.
- -type metadata() :: dict().
-+-endif.
- -type contents() :: [{metadata(), value()}].
-
- %% @doc Convert a list of object {MetaData,Value} pairs to protocol
-
---- ../deps/riak_pb/rebar.config.orig
-+++ ../deps/riak_pb/rebar.config
-@@ -1,5 +1,5 @@
- %% -*- mode: erlang -*-
--{erl_opts, [debug_info]}.
-+{erl_opts, [{platform_define, "^1[78]-", 'ERLANG_17'},debug_info]}.
- {deps, [
- {protobuffs, "0.8.1", {git, "git://github.com/basho/erlang_protobuffs.git", {tag, "0.8.1p1"}}}
- ]}.
-
---- ../deps/esip/src/esip_listener.erl.orig
-+++ ../deps/esip/src/esip_listener.erl
-@@ -37,7 +37,11 @@
-
- -include("esip_lib.hrl").
- -define(TCP_SEND_TIMEOUT, 10000).
-+-ifdef(ERLANG_17).
-+-record(state, {listeners = dict:new() :: dict:dict()}).
-+-else.
- -record(state, {listeners = dict:new() :: dict()}).
-+-endif.
-
- %%%===================================================================
- %%% API
-
---- ../deps/esip/rebar.config.orig
-+++ ../deps/esip/rebar.config
-@@ -1,4 +1,5 @@
--{erl_opts, [{i, "include"},
-+{erl_opts, [{platform_define, "^1[78]-", 'ERLANG_17'},
-+ {i, "include"},
- {i, "deps/p1_stun/include"},
- {i, "../p1_stun/include"}]}.
-
-
---- ../deps/p1_stun/src/turn.erl.orig
-+++ ../deps/p1_stun/src/turn.erl
-@@ -56,6 +56,29 @@
-
- -type addr() :: {inet:ip_address(), inet:port_number()}.
-
-+-ifdef(ERLANG_17).
-+-record(state,
-+ {sock_mod = gen_udp :: gen_udp | gen_tcp | p1_tls,
-+ sock :: inet:socket() | p1_tls:tls_socket(),
-+ addr = {{0,0,0,0}, 0} :: addr(),
-+ owner = self() :: pid(),
-+ username = <<"">> :: binary(),
-+ realm = <<"">> :: binary(),
-+ key = {<<"">>, <<"">>, <<"">>} :: {binary(), binary(), binary()},
-+ server_name = <<"">> :: binary(),
-+ permissions = ?DICT:new() :: dict:dict(),
-+ channels = ?DICT:new() :: dict:dict(),
-+ max_permissions :: non_neg_integer() | atom(),
-+ relay_ip = {127,0,0,1} :: inet:ip_address(),
-+ min_port = 49152 :: non_neg_integer(),
-+ max_port = 65535 :: non_neg_integer(),
-+ relay_addr :: addr(),
-+ relay_sock :: inet:socket(),
-+ last_trid :: non_neg_integer(),
-+ last_pkt = <<>> :: binary(),
-+ seq = 1 :: non_neg_integer(),
-+ life_timer :: reference()}).
-+-else.
- -record(state,
- {sock_mod = gen_udp :: gen_udp | gen_tcp | p1_tls,
- sock :: inet:socket() | p1_tls:tls_socket(),
-@@ -77,6 +100,7 @@
- last_pkt = <<>> :: binary(),
- seq = 1 :: non_neg_integer(),
- life_timer :: reference()}).
-+-endif.
-
- %%====================================================================
- %% API
-
---- ../deps/p1_stun/rebar.config.orig
-+++ ../deps/p1_stun/rebar.config
-@@ -1,4 +1,5 @@
--{erl_opts, [debug_info, {i, "include"}]}.
-+{erl_opts, [{platform_define, "^1[78]-", 'ERLANG_17'},
-+ debug_info, {i, "include"}]}.
-
- {deps, [{p1_tls, ".*", {git, "git://github.com/processone/tls.git"}},
- {p1_utils, ".*", {git, "git://github.com/processone/p1_utils.git"}}]}.
-
---- ../deps/p1_stun/src/stun_listener.erl.orig
-+++ ../deps/p1_stun/src/stun_listener.erl
-@@ -36,7 +36,11 @@
- terminate/2, code_change/3]).
-
- -define(TCP_SEND_TIMEOUT, 10000).
-+-ifdef(ERLANG_17).
-+-record(state, {listeners = dict:new() :: dict:dict()}).
-+-else.
- -record(state, {listeners = dict:new() :: dict()}).
-+-endif.
-
- %%%===================================================================
- %%% API
---- ../deps/riakc/rebar.config.orig
-+++ ../deps/riakc/rebar.config
-@@ -1,6 +1,8 @@
- {cover_enabled, true}.
- {eunit_opts, [verbose]}.
--{erl_opts, [warnings_as_errors, debug_info]}.
-+{erl_opts, [
-+ {platform_define, "^1[78]-", 'ERLANG_17'},
-+ warnings_as_errors, debug_info]}.
- {deps, [
- {riak_pb, ".*", {git, "git://github.com/basho/riak_pb", {tag, "1.4.4.0"}}}
- ]}.
---- ../deps/riakc/src/riakc_obj.erl.orig
-+++ ../deps/riakc/src/riakc_obj.erl
-@@ -79,7 +79,11 @@
- -type key() :: binary() | 'undefined'. %% A key name
- -type id() :: {bucket(), key()}.
- -type vclock() :: binary(). %% An opaque vector clock
-+-ifdef(ERLANG_17).
-+-type metadata() :: dict:dict(). %% Value metadata
-+-else.
- -type metadata() :: dict(). %% Value metadata
-+-endif.
- -type content_type() :: string(). %% The media type of a value
- -type value() :: binary(). %% An opaque value
- -type contents() :: [{metadata(), value()}]. %% All metadata/value pairs in a `riakc_obj'.
-@@ -98,6 +102,16 @@
- -type tag() :: binary().
- -type link() :: {tag(), [id()]}.
-
-+-ifdef(ERLANG_17).
-+-record(riakc_obj, {
-+ bucket :: bucket(),
-+ key :: key(),
-+ vclock :: vclock(),
-+ contents :: contents(),
-+ updatemetadata :: dict:dict(),
-+ updatevalue :: value()
-+ }).
-+-else.
- -record(riakc_obj, {
- bucket :: bucket(),
- key :: key(),
-@@ -106,6 +120,7 @@
- updatemetadata :: dict(),
- updatevalue :: value()
- }).
-+-endif.
-
- -type riakc_obj() :: #riakc_obj{}. %% The record/type containing the entire Riak object.
- -export_type([riakc_obj/0, bucket/0, key/0, vclock/0, contents/0, metadata/0, value/0,
-@@ -284,7 +299,11 @@
- end.
-
- %% @doc Return the content type from metadata
-+-ifdef(ERLANG_17).
-+-spec md_ctype(dict:dict()) -> undefined | content_type().
-+-else.
- -spec md_ctype(dict()) -> undefined | content_type().
-+-endif.
- md_ctype(MetaData) ->
- case dict:find(?MD_CTYPE, MetaData) of
- error ->
---- ../deps/riakc/src/riakc_pb_socket.erl.orig
-+++ ../deps/riakc/src/riakc_pb_socket.erl
-@@ -110,6 +110,20 @@
-
- -type portnum() :: non_neg_integer(). %% The TCP port number of the Riak node's Protocol Buffers interface
- -type address() :: string() | atom() | inet:ip_address(). %% The TCP/IP host name or address of the Riak node
-+-ifdef(ERLANG_17).
-+-record(state, {address :: address(), % address to connect to
-+ port :: portnum(), % port to connect to
-+ auto_reconnect = false :: boolean(), % if true, automatically reconnects to server
-+ % if false, exits on connection failure/request timeout
-+ queue_if_disconnected = false :: boolean(), % if true, add requests to queue if disconnected
-+ sock :: port(), % gen_tcp socket
-+ active :: #request{} | undefined, % active request
-+ queue :: queue:queue() | undefined, % queue of pending requests
-+ connects=0 :: non_neg_integer(), % number of successful connects
-+ failed=[] :: [connection_failure()], % breakdown of failed connects
-+ connect_timeout=infinity :: timeout(), % timeout of TCP connection
-+ reconnect_interval=?FIRST_RECONNECT_INTERVAL :: non_neg_integer()}).
-+-else.
- -record(state, {address :: address(), % address to connect to
- port :: portnum(), % port to connect to
- auto_reconnect = false :: boolean(), % if true, automatically reconnects to server
-@@ -122,6 +136,7 @@
- failed=[] :: [connection_failure()], % breakdown of failed connects
- connect_timeout=infinity :: timeout(), % timeout of TCP connection
- reconnect_interval=?FIRST_RECONNECT_INTERVAL :: non_neg_integer()}).
-+-endif.
-
- %% @doc Create a linked process to talk with the riak server on Address:Port
- %% Client id will be assigned by the server.
-
diff --git a/net-im/ejabberd/files/patch-erlang-18 b/net-im/ejabberd/files/patch-erlang-18
deleted file mode 100644
index 93f67663326d..000000000000
--- a/net-im/ejabberd/files/patch-erlang-18
+++ /dev/null
@@ -1,209 +0,0 @@
-diff -ruN --exclude '*.orig' ../deps/esip/src/esip.erl ../deps/esip/src/esip.erl
---- ../deps/esip/src/esip.erl 2015-01-14 12:52:19.000000000 +0100
-+++ ../deps/esip/src/esip.erl 2015-06-25 10:20:59.000000000 +0200
-@@ -739,7 +739,7 @@
- %% gen_server callbacks
- %%====================================================================
- init([]) ->
-- {A, B, C} = now(),
-+ {A, B, C} = erlang:timestamp(),
- random:seed(A, B, C),
- ets:new(esip_config, [named_table, public]),
- set_config([]),
-diff -ruN --exclude '*.orig' ../deps/esip/src/esip_codec.erl ../deps/esip/src/esip_codec.erl
---- ../deps/esip/src/esip_codec.erl 2015-01-14 12:52:19.000000000 +0100
-+++ ../deps/esip/src/esip_codec.erl 2015-06-25 10:21:17.000000000 +0200
-@@ -1334,10 +1334,10 @@
- io:format("~n== Estimate: ~p~n", [T div N]).
-
- test_loop(P, Msg, N) ->
-- test_loop(P, Msg, N, now()).
-+ test_loop(P, Msg, N, erlang:timestamp()).
-
- test_loop(P, _, 0, T) ->
-- P ! {ok, timer:now_diff(now(), T)};
-+ P ! {ok, timer:now_diff(erlang:timestamp(), T)};
- test_loop(P, Msg, N, T) ->
- decode(Msg),
- test_loop(P, Msg, N-1, T).
-diff -ruN --exclude '*.orig' ../deps/esip/src/esip_transaction.erl ../deps/esip/src/esip_transaction.erl
---- ../deps/esip/src/esip_transaction.erl 2015-01-14 12:52:19.000000000 +0100
-+++ ../deps/esip/src/esip_transaction.erl 2015-06-25 10:20:38.000000000 +0200
-@@ -205,9 +205,9 @@
- maybe_report_error(Type, N) ->
- case ets:lookup(?MODULE, {last_error_report, Type}) of
- [{_, Now}] ->
-- case timer:now_diff(now(), Now) of
-+ case timer:now_diff(erlang:timestamp(), Now) of
- T when T > 60000000 ->
-- ets:insert(?MODULE, {{last_error_report, Type}, now()}),
-+ ets:insert(?MODULE, {{last_error_report, Type}, erlang:timestamp()}),
- ?ERROR_MSG("too many ~s transactions: ~p", [Type, N]);
- _ ->
- ok
-diff -ruN --exclude '*.orig' ../deps/p1_cache_tab/src/cache_tab.erl ../deps/p1_cache_tab/src/cache_tab.erl
---- ../deps/p1_cache_tab/src/cache_tab.erl 2015-01-14 12:52:24.000000000 +0100
-+++ ../deps/p1_cache_tab/src/cache_tab.erl 2015-06-25 10:22:59.000000000 +0200
-@@ -405,7 +405,7 @@
- [get_proc(Tab, N) || N <- lists:seq(1, get_proc_num())].
-
- now_priority() ->
-- {MSec, Sec, USec} = now(),
-+ {MSec, Sec, USec} = erlang:timestamp(),
- -((MSec*1000000 + Sec)*1000000 + USec).
-
- clean_priority(LifeTime) ->
-@@ -594,20 +594,20 @@
- test3(Iter) ->
- ok = new(test_tbl, [{max_size, unlimited}, {life_time, unlimited}]),
- L = lists:seq(1, Iter),
-- T1 = now(),
-+ T1 = erlang:timestamp(),
- lists:foreach(
- fun(N) ->
- ok = ?insert(test_tbl, N, N, fun() -> ok end)
- end, L),
- io:format("** average insert (size = ~p): ~p usec~n",
-- [Iter, round(timer:now_diff(now(), T1)/Iter)]),
-- T2 = now(),
-+ [Iter, round(timer:now_diff(erlang:timestamp(), T1)/Iter)]),
-+ T2 = erlang:timestamp(),
- lists:foreach(
- fun(N) ->
- {ok, N} = ?lookup(test_tbl, N, fun() -> ok end)
- end, L),
- io:format("** average lookup (size = ~p): ~p usec~n",
-- [Iter, round(timer:now_diff(now(), T2)/Iter)]),
-+ [Iter, round(timer:now_diff(erlang:timestamp(), T2)/Iter)]),
- {ok, Iter} = info(test_tbl, size),
- delete(test_tbl).
-
-diff -ruN --exclude '*.orig' ../deps/p1_stun/src/stun.erl ../deps/p1_stun/src/stun.erl
---- ../deps/p1_stun/src/stun.erl 2015-01-14 12:52:02.000000000 +0100
-+++ ../deps/p1_stun/src/stun.erl 2015-06-25 10:22:10.000000000 +0200
-@@ -583,7 +583,7 @@
- end.
-
- now_priority() ->
-- {MSec, Sec, USec} = now(),
-+ {MSec, Sec, USec} = erlang:timestamp(),
- -((MSec*1000000 + Sec)*1000000 + USec).
-
- clean_treap(Treap, CleanPriority) ->
-@@ -647,7 +647,7 @@
- {ok, Sock}.
-
- seed() ->
-- {A, B, C} = now(),
-+ {A, B, C} = erlang:timestamp(),
- random:seed(A, B, C).
-
- prepare_response(State, Msg) ->
-diff -ruN --exclude '*.orig' ../deps/p1_stun/src/stun_shaper.erl ../deps/p1_stun/src/stun_shaper.erl
---- ../deps/p1_stun/src/stun_shaper.erl 2014-05-19 04:09:58.000000000 +0200
-+++ ../deps/p1_stun/src/stun_shaper.erl 2015-06-25 10:21:53.000000000 +0200
-@@ -46,7 +46,7 @@
- new(none) -> none;
- new(MaxRate) when is_integer(MaxRate) ->
- #maxrate{maxrate = MaxRate, lastrate = 0.0,
-- lasttime = now_to_usec(now())}.
-+ lasttime = now_to_usec(erlang:timestamp())}.
-
- -spec update(shaper(), integer()) -> {shaper(), integer()}.
-
-@@ -54,13 +54,13 @@
- update(#maxrate{} = State, Size) ->
- MinInterv = 1000 * Size /
- (2 * State#maxrate.maxrate - State#maxrate.lastrate),
-- Interv = (now_to_usec(now()) - State#maxrate.lasttime) /
-+ Interv = (now_to_usec(erlang:timestamp()) - State#maxrate.lasttime) /
- 1000,
- Pause = if MinInterv > Interv ->
- 1 + trunc(MinInterv - Interv);
- true -> 0
- end,
-- NextNow = now_to_usec(now()) + Pause * 1000,
-+ NextNow = now_to_usec(erlang:timestamp()) + Pause * 1000,
- {State#maxrate{lastrate =
- (State#maxrate.lastrate +
- 1000000 * Size / (NextNow - State#maxrate.lasttime))
-diff -ruN --exclude '*.orig' ../deps/p1_stun/src/stun_test.erl ../deps/p1_stun/src/stun_test.erl
---- ../deps/p1_stun/src/stun_test.erl 2014-05-19 04:09:58.000000000 +0200
-+++ ../deps/p1_stun/src/stun_test.erl 2015-06-25 10:21:35.000000000 +0200
-@@ -356,7 +356,7 @@
- end.
-
- mk_trid() ->
-- {A, B, C} = now(),
-+ {A, B, C} = erlang:timestamp(),
- random:seed(A, B, C),
- random:uniform(1 bsl 96).
-
-diff -ruN --exclude '*.orig' ../deps/p1_stun/src/turn.erl ../deps/p1_stun/src/turn.erl
---- ../deps/p1_stun/src/turn.erl 2014-05-19 04:09:58.000000000 +0200
-+++ ../deps/p1_stun/src/turn.erl 2015-06-25 10:16:52.000000000 +0200
-@@ -64,8 +64,8 @@
- realm = <<"">> :: binary(),
- key = {<<"">>, <<"">>, <<"">>} :: {binary(), binary(), binary()},
- server_name = <<"">> :: binary(),
-- permissions = ?DICT:new() :: dict(),
-- channels = ?DICT:new() :: dict(),
-+ permissions = ?DICT:new() :: dict:dict(),
-+ channels = ?DICT:new() :: dict:dict(),
- max_permissions :: non_neg_integer() | atom(),
- relay_ip = {127,0,0,1} :: inet:ip_address(),
- min_port = 49152 :: non_neg_integer(),
-@@ -117,7 +117,7 @@
- ok
- end,
- TRef = erlang:start_timer(?DEFAULT_LIFETIME, self(), stop),
-- {A1, A2, A3} = now(),
-+ {A1, A2, A3} = erlang:timestamp(),
- random:seed(A1, A2, A3),
- case turn_sm:add_allocation(AddrPort, Username, Realm, MaxAllocs, self()) of
- ok ->
-diff -ruN --exclude '*.orig' ../deps/p1_utils/src/p1_fsm.erl ../deps/p1_utils/src/p1_fsm.erl
---- ../deps/p1_utils/src/p1_fsm.erl 2014-07-28 01:40:11.000000000 +0200
-+++ ../deps/p1_utils/src/p1_fsm.erl 2015-06-25 10:22:37.000000000 +0200
-@@ -601,12 +601,12 @@
- true ->
- Time1
- end,
-- Now = now(),
-+ Now = erlang:timestamp(),
- Reason = case catch rpc_call(Node, M, F, A, RPCTimeout) of
- {ok, Clone} ->
- process_flag(trap_exit, true),
- MRef = erlang:monitor(process, Clone),
-- NowDiff = timer:now_diff(now(), Now) div 1000,
-+ NowDiff = timer:now_diff(erlang:timestamp(), Now) div 1000,
- TimeLeft = lists:max([Time1 - NowDiff, 0]),
- TRef = erlang:start_timer(TimeLeft, self(), timeout),
- relay_messages(MRef, TRef, Clone, Queue);
-@@ -664,12 +664,12 @@
- true ->
- Time1
- end,
-- Now = now(),
-+ Now = erlang:timestamp(),
- Reason = case catch rpc_call(Node, M, F, A, RPCTimeout) of
- {ok, Clone} ->
- process_flag(trap_exit, true),
- MRef = erlang:monitor(process, Clone),
-- NowDiff = timer:now_diff(now(), Now) div 1000,
-+ NowDiff = timer:now_diff(erlang:timestamp(), Now) div 1000,
- TimeLeft = lists:max([Time1 - NowDiff, 0]),
- TRef = erlang:start_timer(TimeLeft, self(), timeout),
- relay_messages(MRef, TRef, Clone, Queue);
-diff -ruN --exclude '*.orig' ../deps/riakc/src/riakc_pb_socket.erl ../deps/riakc/src/riakc_pb_socket.erl
---- ../deps/riakc/src/riakc_pb_socket.erl 2015-01-14 13:01:53.000000000 +0100
-+++ ../deps/riakc/src/riakc_pb_socket.erl 2015-06-25 10:23:23.000000000 +0200
-@@ -1728,7 +1728,7 @@
- end.
-
- %% @private
--mk_reqid() -> erlang:phash2(erlang:now()). % only has to be unique per-pid
-+mk_reqid() -> erlang:phash2(erlang:timestamp()). % only has to be unique per-pid
-
- %% @private
- wait_for_list(ReqId) ->
diff --git a/net-im/ejabberd/files/pkg-install.in b/net-im/ejabberd/files/pkg-install.in
index b0f89a34b8d5..59cc2a570f1a 100644
--- a/net-im/ejabberd/files/pkg-install.in
+++ b/net-im/ejabberd/files/pkg-install.in
@@ -9,12 +9,14 @@ USERS_HOME="/var/spool/ejabberd"
install -d -m 750 -o %%USERS%% -g %%GROUPS%% ${USERS_HOME} /var/log/ejabberd /var/run/ejabberdctl
chown -R %%USERS%%:%%GROUPS%% %%PREFIX%%/etc/%%PORTNAME%%
-chown -R %%USERS%%:%%GROUPS%% %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%
+chown -R %%USERS%%:%%GROUPS%% %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%
-find %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chmod %%SHAREMODE%%
-find %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chown %%SHAREOWN%%:%%SHAREGRP%%
+find %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chmod %%SHAREMODE%%
+find %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%% -type f -print0 | xargs -0 chown %%SHAREOWN%%:%%SHAREGRP%%
-%%PAM%%chmod 4750 %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam
-%%PAM%%chown root:%%GROUPS%% %%PREFIX%%/lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam
+%%PAM%%chmod 4750 %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/lib/p1_pam-1.0.0/priv/bin/epam \
+%%PAM%% %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam
+%%PAM%%chown root:%%GROUPS%% %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/lib/p1_pam-1.0.0/priv/bin/epam \
+%%PAM%% %%PREFIX%%/%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/bin/epam
exit 0