Created attachment 246339 [details] eturnal 1.12.0 I have never worked with Rebar3. Coming from C, erlang and nodejs are rather painful to port (build). It is necessary to override do-install, Mk scripts in ports are not copying other erlang libraries. The ugly hack about erts_dir is due to Rebar3 generating incorrect shell script. Upstream acknowledged the many problems with Rebar3: https://github.com/processone/eturnal/blob/master/doc/PACKAGING.md If an Rebar3 (erlang) expert shows up, please let me know the changes needed to get it committed. Many thanks.
Created attachment 246340 [details] testport log
putting erlang@ in cc, they might have some input
Out of curiosity, how does this compare to net/turnserver (coturn) and why would you choose one over the other?
It shares the same TURN library with ejabberd. The focus is the current WebRTC (and other real time communication) applications. As such, it is easier to configure than coturn -- just change the shared secret (if behind NAT, supply external address). Unlike coturn, it does not support any user database (other than a static user table). Simply because RTC does not make use of any user database, but ephemeral accounts created with a shared secret. The short version: * eturnal is the lightweight solution for a very common use case (real time communication). * Erlang means low latency. * Fewer dependencies (features) than coturn. * Users won't ask how to enable REST (like https://github.com/coturn/coturn/issues/1275) :)
Created attachment 247449 [details] pet patch a bit thanks for your contribution! I made a few minor changes: - complied with portclippy & portfmt - sorted pkg-plist in en_US.UTF-8 locale - use `' -exec ${STRIP_CMD} {} +` - add net/Makefile change Normally in erlang world, tools like rebar3 will create a full self-contained release, including the erts runtime, and ports tree would bundle all of that "as is". This simplifies some things (dependencies just work), and complicates others (respecting hier(7) can be quite hard work). This is using `{include_erts, true}` in rebar.config, currently not the default. It might be easier to submit an upstream patch to address these in the Makefile for next time?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=51829949294f2fc73e7efc24bd0595bc083971a0 commit 51829949294f2fc73e7efc24bd0595bc083971a0 Author: Dave Cottlehuber <dch@FreeBSD.org> AuthorDate: 2024-01-04 23:25:10 +0000 Commit: Dave Cottlehuber <dch@FreeBSD.org> CommitDate: 2024-01-04 23:25:10 +0000 net/eturnal: erlang-based TURN server (new port) - appease portclippy - sort pkg-plist PR: 275114 Sponsored by: SkunkWerks, GmbH GIDs | 2 +- UIDs | 2 +- net/Makefile | 1 + net/eturnal/Makefile (new) | 90 +++++++++++++++++++ net/eturnal/distinfo (new) | 33 +++++++ net/eturnal/files/eturnal.in (new) | 78 +++++++++++++++++ net/eturnal/files/patch-config_eturnal.yml (new) | 13 +++ net/eturnal/pkg-descr (new) | 5 ++ net/eturnal/pkg-plist (new) | 107 +++++++++++++++++++++++ 9 files changed, 329 insertions(+), 2 deletions(-)