Closed GautaA closed 2 months ago
That variable was added in 94a733c6669afb7b41fdafcb9bf0a4ac24a483f2. The variable is set and used when building an OTP release; but it is useless when using other install methods.
If ejabberd is built into an OTP release with:
./configure --with-rebar=rebar3
# or ./configure --with-rebar=mix
make
make prod
# or make dev
then the file _build/prod/rel/ejabberd/bin/ejabberdctl
contains:
ERTS_VSN="14.2.3"
ERL="${SCRIPT_DIR%/*}/erts-${ERTS_VSN#erts-}/bin/erl"
EPMD="${SCRIPT_DIR%/*}/erts-${ERTS_VSN#erts-}/bin/epmd"
This is also the case in the RUN, DEB and RPM binary installers from ProcessOne, as they use OTP release method. And the container images too.
However, when using make relive
or make install
or make install-rel
, the file _build/relive/ejabberdctl
(or $PREFIX/sbin/ejabberdctl
) contains:
ERTS_VSN="{{erts_vsn}}"
ERL="/home/badlop/.asdf/shims/erl"
EPMD="/home/badlop/.asdf/shims/epmd"
How do you obtain that ejabberdctl script? Did you use make install
?
In your script, as you can see, ERTS_VSN is not used, so it isn't a problem for the script that the variable isn't set. If there is another tool that detects this and complains, you could try to remove that variable definition.
Hi!
Thank you for a detailed explanation. I checked, and you were right, make install
was used.
We did remove the variable and everything works smoothly so far.
What do you think about omitting the variable if it doesn't get set by not building from the OTP? It's just a QOL, and not that important, but would clean up the ctl file a bit.
Right, it's easy in Makefile.in to comment that line when it isn't needed. It will be fixed in the next release.
Environment
Bug description
I'm not sure if this is a bug or not, but I have noticed that inside
ejabberdctl
script on all of our deployments only theerts_vsn
variable never gets set. This usually wouldn't be the problem, but we're trying to manageejabberdctl
ourselves for now because of this issue and this is causing Ansible to throwAnsibleUndefinedVariable: 'erts_vsn' is undefined"
errors.Example how it looks:
Does anyone know why this is happening and what's
erts_vsn
used for?