void-linux / void-linux/void-packages

ejabberd overwrites system Elixir

Open
#21,494 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Shell
Stars
3.4k
Forks
2.8k
Avg merge
2d 5h
Merged PRs (30d)
299

Description

System
  • xuname:
    Void 5.4.35_1 x86_64 AuthenticAMD uptodate rrrmFFFFF
  • package:
    ejabberd-20.02_2
Expected behavior

ejabberd should use the elixir package in XBPS instead of installing its own. If it requires a specific version, it could be packaged & work with xbps-alternatives to allow usage of the latest elixir, or at least not overwrite each other's files & not break each other (like how the guile & guile1.8 packages work).

Actual behavior

ejabberd installs its own Elixir distribution (which, by the way, is a rather old 1.4.4, in comparison to the elixir package's 1.10.2), as well as even overwriting some of the elixir package's binaries. I doubt this is an Elixir 1.4.4 problem, but it causes elixir(1) to encounter some concerning-looking problems even with a simple elixir -v:

$ elixir -v
=SUPERVISOR REPORT==== 30-Apr-2020::20:05:34.064575 ===
    supervisor: {local,'Elixir.Logger.Supervisor'}
    errorContext: start_error
    reason: noproc
    offender: [{pid,undefined},
               {id,'Elixir.Logger.ErrorHandler'},
               {mfargs,
                   {'Elixir.Logger.Watcher',watcher,
                       [error_logger,'Elixir.Logger.ErrorHandler',
                        {true,false,500}]}},
               {restart_type,permanent},
               {shutdown,5000},
               {child_type,worker}]
=CRASH REPORT==== 30-Apr-2020::20:05:34.089540 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.85.0>
    registered_name: []
    exception exit: {{shutdown,
                         {failed_to_start_child,'Elixir.Logger.ErrorHandler',
                             noproc}},
                     {'Elixir.Logger.App',start,[normal,[]]}}
      in function  application_master:init/4 (application_master.erl, line 138)
    ancestors: [<0.84.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.86.0>,normal}]
    links: [<0.84.0>,<0.44.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 376
    stack_size: 27
    reductions: 193
  neighbours:

=INFO REPORT==== 30-Apr-2020::20:05:34.102432 ===
    application: logger
    exited: {{shutdown,
                 {failed_to_start_child,'Elixir.Logger.ErrorHandler',noproc}},
             {'Elixir.Logger.App',start,[normal,[]]}}
    type: temporary
Erlang/OTP 22 [erts-10.7] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Elixir 1.4.4

Using xbps-install -f elixir & then executing the command once again is business as usual:

$ elixir -v
Erlang/OTP 22 [erts-10.7] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Elixir 1.10.2 (compiled with Erlang/OTP 22)

Notice, also, the modified binaries in ejabberd's install:

$ ls -l /usr/bin/elixir /usr/bin/mix /usr/bin/iex | cut -c 42-
/usr/bin/elixir
/usr/bin/iex
/usr/bin/mix

These were symlinks in the elixir package, not files!

$ xbps-query -Rf elixir | grep -F '/usr/bin/'
/usr/bin/elixir -> /usr/lib/elixir/bin/elixir
/usr/bin/elixirc -> /usr/lib/elixir/bin/elixirc
/usr/bin/iex -> /usr/lib/elixir/bin/iex
/usr/bin/mix -> /usr/lib/elixir/bin/mix

In addition, the extra Elixir install (which should really be in its own package, & that's only if ejabberd doesn't work with the current version; docs do not seem to mention incompatibility with latest versions, correct me if I'm wrong):

$ ls /usr/lib/elixir* -d
/usr/lib/elixir-1.4.4  /usr/lib/elixir
Steps to reproduce the behavior

Install elixir, then ejabberd. The overwriting works in reverse as well, but not the other effects (e.g. elixir -v should work).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported install order: install elixir, then ejabberd, and run elixir -v. Compare the installed files with xbps-query -Rf elixir and inspect /usr/lib/elixir*; done means ejabberd no longer overwrites the Elixir package and elixir -v continues to report the packaged version.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.