25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix ERTS path in ejabberdctl with rebar3 release

Rebar 2 expands {{erts-vsn}} to "erts-$vsn", Rebar 3 expands it to just
"$vsn".  Make sure `make rel` doesn't end up with a "$vsn" directory
next to "erts-$vsn" (which happened when using Rebar 3), and make sure
that ejabberdctl expects both "erl" and "epmd" to be installed below
"erts-$vsn" (which it didn't when using Rebar 3).
This commit is contained in:
Holger Weiss 2021-12-23 14:24:27 +01:00
parent e2b7717dd9
commit 94a733c666
3 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ ERLANG_NODE=ejabberd@localhost
# define default environment variables
[ -z "$SCRIPT" ] && SCRIPT=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
ERTS_VSN="{{erts_vsn}}"
ERL="{{erl}}"
IEX="{{bindir}}/iex"
EPMD="{{epmd}}"

View File

@ -181,7 +181,7 @@
{overlay, [{mkdir, "var/log/ejabberd"},
{mkdir, "var/lib/ejabberd"},
{mkdir, "etc/ejabberd"},
{copy, "rel/files/erl", "\{\{erts_vsn\}\}/bin/erl"}, % in rebar2 this prepends erts-
{copy, "rel/files/erl", "erts-\{\{erts_vsn\}\}/bin/erl"},
{template, "ejabberdctl.template", "bin/ejabberdctl"},
{copy, "inetrc", "etc/ejabberd/inetrc"},
{copy, "tools/captcha*.sh", "lib/ejabberd-\{\{release_version\}\}/priv/bin/"},

View File

@ -51,9 +51,10 @@
{release, true}.
{release_dir, "${SCRIPT_DIR%/*}"}.
{sysconfdir, "{{release_dir}}/etc"}.
{erts_dir, "{{release_dir}}/erts-${ERTS_VSN#erts-}"}.
{installuser, "@INSTALLUSER@"}.
{erl, "{{release_dir}}/{{erts_vsn}}/bin/erl"}.
{epmd, "{{release_dir}}/{{erts_vsn}}/bin/epmd"}.
{erl, "{{erts_dir}}/bin/erl"}.
{epmd, "{{erts_dir}}/bin/epmd"}.
{localstatedir, "{{release_dir}}/var"}.
{libdir, "{{release_dir}}/lib"}.
{docdir, "{{release_dir}}/doc"}.