make uninstall does not remove all ejabberd directories
Environment
- ejabberd version: commit a57bdff
- Erlang version: 13.1.5
- OS: Devuan GNU/Linux 5 (daedalus)
Compilation
./autogen.sh
./configure
make
Problem
sudo make install installs the ejabberd library files to /usr/local/lib/ejabberd-23.10.34.
sudo make uninstall tries to removes the directory /usr/local/lib/ejabberd which does not exist.
Therefore, /usr/local/lib/ejabberd-23.10.34 stays after uninstall. This is not expected.
Can you please install the library files to /usr/local/lib/ejabberd?
ejabberd and all the other libraries are installed with their version number, following the Erlang/OTP convention. The problem is that make uninstall does not follow that convention. This was reported long ago in https://github.com/processone/ejabberd/issues/1496
I tried to write a patch, but it still left some files there in the system... https://github.com/processone/ejabberd/issues/1496#issuecomment-282039442
Yes, it would be great if somebody fixes make uninstall to really uninstall the binary files.
Some workarounds:
./configure --prefix=/some/path
make
make install
Or using OTP releases, which includes erlang from your system:
./configure
make
make rel
mkdir -p /opt/ejabberd
tar -xzvf _build/prod/rel/ejabberd/ejabberd-23.10.64.tar.gz -C /opt/ejabberd
If you repeat this same process with a newer ejabberd version, it will install the binary files with the versioned directories, so they don't conflict, and the start script will use the newer binaries. Of course, you can delete erts-14.2/, lib/ and releases/ before installing a new version
Thank you for the info! What about the apt package repository? It installed files in /opt/ejabberd-23.10. What will happen when there is an upgrade to 23.11, will the /opt/ejabberd-23.10 directory stay or will it be automatically removed?