commit:     5f26f0602377c4268475837d0472f220bc97a0f1
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri May  2 09:28:36 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri May  2 09:34:07 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5f26f060

net-im/eturnal: add 1.12.2, drop 1.12.0-r1

If you wondered why epmd was stopped after you stopped Eturnal, this is
now fixed by setting ERL_DIST_PORT during the build!

This commit also comes with a new revision of the OpenRC init service:

* Use supervise-daemon instead of s-s-d.
* Add startup command logging.
* Don't ping with superuser privileges.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 net-im/eturnal/Manifest                            |  2 +-
 ...rnal-1.12.0-r1.ebuild => eturnal-1.12.2.ebuild} |  8 ++--
 net-im/eturnal/files/eturnal.initd-r1              | 47 ++++++++++++++++++++++
 3 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/net-im/eturnal/Manifest b/net-im/eturnal/Manifest
index 24d95afe2..cb35dafe2 100644
--- a/net-im/eturnal/Manifest
+++ b/net-im/eturnal/Manifest
@@ -1,2 +1,2 @@
-DIST eturnal-1.12.0.tar.gz 919050 BLAKE2B 
76c7f0709f82231cff47609e234e2555d68f86df8efa6117351cea8e632b91d023bf22542953a083b0172f9b55f0b1a24dd4abee94cbfde8b86ff4e76b233b82
 SHA512 
b990fd010d26dc29ab69124dd6db354ab018c1b8882ef7f82631c06234b79027ba838a746d6c606a9f6678feffb6bcaa2b879270c3abe407ef509a5f50367774
 DIST eturnal-1.12.1.tar.gz 965160 BLAKE2B 
7a908b52beda6a9acda92fec21ff5583e8bbd657b47ebac23ed1f589e576f19708a4c17261a1500b88a3d6f0f5a2c9163713485e83848639c6cc635f60e941cc
 SHA512 
ffd8e9376944babd4a3afade3cc0421ad146f8ec24e04f0b59964e3f1d6f8b05951e7d59bab5ac940e5b9e818450346cad1f42c9c0d30b76ec4c5e1590c885eb
+DIST eturnal-1.12.2.tar.gz 964784 BLAKE2B 
087735ce0d0f90298c4042ae0515c4204b87fee04939ef8d813304736609cea8da6f94391c3f18ecf819605560c473667100aa2b73e556d7e7a72e165131ec82
 SHA512 
a121834b6461c30214aba95576bb2baec7bdd2e1c9cd7061ec16e21d3c2ff55c24f07b35eb1138d40a57185c8bceef7a4868c60c4875fccd6e6ee5833f19ad22

diff --git a/net-im/eturnal/eturnal-1.12.0-r1.ebuild 
b/net-im/eturnal/eturnal-1.12.2.ebuild
similarity index 89%
rename from net-im/eturnal/eturnal-1.12.0-r1.ebuild
rename to net-im/eturnal/eturnal-1.12.2.ebuild
index acb6aa0f5..442abb1ac 100644
--- a/net-im/eturnal/eturnal-1.12.0-r1.ebuild
+++ b/net-im/eturnal/eturnal-1.12.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2024 Gentoo Authors
+# Copyright 2024-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,7 +18,7 @@ KEYWORDS="~amd64"
 
 DEPEND="
        acct-user/eturnal
-       >=dev-lang/erlang-21:=[ssl]
+       >=dev-lang/erlang-23.1:=[ssl]
        dev-libs/libyaml
        dev-libs/openssl:=
        >=dev-erlang/conf-0.1
@@ -38,7 +38,7 @@ src_configure() {
        export ETURNAL_USER=eturnal
        export ETURNAL_PREFIX="${EPREFIX}"/opt/eturnal
        export ETURNAL_ETC_DIR="${EPREFIX}"/etc
-       export ERL_EPMD_ADDRESS=""
+       export ERL_DIST_PORT=3470
        export CODE_LOADING=dynamic
 
        export SKIP_DEPS=true
@@ -50,7 +50,7 @@ rebar3_install_release() {
        cp -pR bin lib releases "${ED}"/opt/eturnal/ || die
 
        systemd_dounit etc/systemd/system/eturnal.service
-       newinitd "${FILESDIR}"/eturnal.initd eturnal
+       newinitd "${FILESDIR}"/eturnal.initd-r1 eturnal
        newconfd etc/openrc/eturnal.confd eturnal
 
        insinto /etc

diff --git a/net-im/eturnal/files/eturnal.initd-r1 
b/net-im/eturnal/files/eturnal.initd-r1
new file mode 100644
index 000000000..5f97e7328
--- /dev/null
+++ b/net-im/eturnal/files/eturnal.initd-r1
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# shellcheck shell=sh
+#
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+description_reload="Reload eturnal's configuration"
+
+supervisor="supervise-daemon"
+description="STUN/TURN server"
+command="/usr/sbin/eturnalctl"
+command_args_foreground="foreground"
+command_args_background="daemon"
+command_user="eturnal:turnserver"
+pidfile="/run/eturnal.pid"
+capabilities="^cap_net_bind_service"
+healthcheck_delay=300
+healthcheck_timer=60
+output_log="/opt/eturnal/log/eturnal.log"
+error_log="${output_log}"
+
+depend() {
+       need net
+       want epmd
+       use firewall
+}
+
+healthcheck() {
+       su -g turnserver -s /bin/sh eturnal -c "'${command}' ping" >/dev/null
+}
+
+start_post() {
+       local i=10
+       while [ $((i = i - 1)) -gt 0 ]; do
+               healthcheck && return 0
+               sleep 1
+       done
+
+       return 1
+}
+
+reload() {
+       ebegin "Reloading ${RC_SVCNAME}"
+       "${command}" reload
+       eend $?
+}

Reply via email to