aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Teixeira <eduardo@FreeBSD.org>2026-07-08 03:33:57 +0000
committerNuno Teixeira <eduardo@FreeBSD.org>2026-07-08 03:33:57 +0000
commite3014d98e1482a9a04de595d4f4aa07e11dcbf60 (patch)
tree325808cd7e1e385b3c5a893566bd141097f02f71
parent247b1423ecc7ff7b09a52a22ac05161fb31a49d6 (diff)
net/eternalterminal: Update to 7.0.0
-rw-r--r--net/eternalterminal/Makefile3
-rw-r--r--net/eternalterminal/distinfo6
-rw-r--r--net/eternalterminal/files/patch-fix-crash-PR295956113
-rw-r--r--net/eternalterminal/pkg-plist1
4 files changed, 5 insertions, 118 deletions
diff --git a/net/eternalterminal/Makefile b/net/eternalterminal/Makefile
index 58d0ac3b460d..cd17219c209f 100644
--- a/net/eternalterminal/Makefile
+++ b/net/eternalterminal/Makefile
@@ -1,7 +1,6 @@
PORTNAME= eternalterminal
DISTVERSIONPREFIX= et-v
-DISTVERSION= 6.2.11
-PORTREVISION= 5
+DISTVERSION= 7.0.0
CATEGORIES= net
MAINTAINER= eduardo@FreeBSD.org
diff --git a/net/eternalterminal/distinfo b/net/eternalterminal/distinfo
index 00cae1d9d5c3..c8be9bd76519 100644
--- a/net/eternalterminal/distinfo
+++ b/net/eternalterminal/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1753277599
-SHA256 (MisterTea-EternalTerminal-et-v6.2.11_GH0.tar.gz) = e8e80800babc026be610d50d402a8ecbdfbd39e130d1cfeb51fb102c1ad63b0f
-SIZE (MisterTea-EternalTerminal-et-v6.2.11_GH0.tar.gz) = 28959778
+TIMESTAMP = 1783479934
+SHA256 (MisterTea-EternalTerminal-et-v7.0.0_GH0.tar.gz) = 3580962861589c0b69efd6b385ff92ad8fdf688c91d1a0edc1a83278205e28e8
+SIZE (MisterTea-EternalTerminal-et-v7.0.0_GH0.tar.gz) = 29020443
diff --git a/net/eternalterminal/files/patch-fix-crash-PR295956 b/net/eternalterminal/files/patch-fix-crash-PR295956
deleted file mode 100644
index cfe3a864bc9b..000000000000
--- a/net/eternalterminal/files/patch-fix-crash-PR295956
+++ /dev/null
@@ -1,113 +0,0 @@
-Add backports to fix etserver crashes on session end and transient errors.
-
-Backport from:
-- a2d2e62d8d7b ("terminal: Fix etserver crash on session end due to ECHILD (#748)")
-- c6650d9577f5 ("base: Fix etserver crash on transient accept() errors (#756)")
-
---- src/base/UnixSocketHandler.cpp.orig 2025-07-22 01:37:18 UTC
-+++ src/base/UnixSocketHandler.cpp
-@@ -142,12 +142,28 @@ int UnixSocketHandler::accept(int sockFd) {
- initSocket(client_sock);
- VLOG(3) << "Client_socket inserted to activeSockets";
- return client_sock;
-- } else if (acceptErrno != EAGAIN && acceptErrno != EWOULDBLOCK) {
-+ } else if (isTransientAcceptError(acceptErrno)) {
-+ // Transient, per-connection failure: fall through and return -1; the
-+ // server loop simply retries on the next iteration.
-+ } else {
- FATAL_FAIL(-1); // STFATAL with the error
- }
-
- SetErrno(acceptErrno);
- return -1;
-+}
-+
-+bool UnixSocketHandler::isTransientAcceptError(int err) {
-+ // accept(2) routinely fails for benign, per-connection reasons that must
-+ // not abort the whole server:
-+ // - EAGAIN/EWOULDBLOCK: non-blocking socket with no pending connection.
-+ // - ECONNABORTED: the peer reset the connection between landing in the
-+ // listen queue and our accept() call. Surfaced readily on FreeBSD by
-+ // clients that connect and immediately disconnect (keepalive/reconnect
-+ // churn) and previously aborted etserver.
-+ // - EINTR: the call was interrupted by a signal.
-+ return err == EAGAIN || err == EWOULDBLOCK || err == ECONNABORTED ||
-+ err == EINTR;
- }
-
- void UnixSocketHandler::close(int fd) {
---- src/base/UnixSocketHandler.hpp.orig 2025-07-22 01:37:18 UTC
-+++ src/base/UnixSocketHandler.hpp
-@@ -14,6 +14,7 @@ class UnixSocketHandler : public SocketHandler {
- virtual ssize_t read(int fd, void* buf, size_t count);
- virtual ssize_t write(int fd, const void* buf, size_t count);
- virtual int accept(int fd);
-+ static bool isTransientAcceptError(int err);
- virtual void close(int fd);
- virtual vector<int> getActiveSockets();
-
---- src/terminal/PsuedoUserTerminal.hpp.orig 2025-07-22 01:37:18 UTC
-+++ src/terminal/PsuedoUserTerminal.hpp
-@@ -96,7 +96,11 @@ class PsuedoUserTerminal : public UserTerminal {
- FATAL_FAIL(waitpid(getPid(), &throwaway, WUNTRACED));
- #else
- siginfo_t childInfo;
-- FATAL_FAIL(waitid(P_PID, getPid(), &childInfo, WEXITED));
-+ if (getPid() > 0) {
-+ if (waitid(P_PID, getPid(), &childInfo, WEXITED) == -1) {
-+ LOG(ERROR) << "waitid failed, child already reaped.";
-+ }
-+ }
- #endif
- }
-
---- test/unit_tests/UnixSocketHandlerTest.cpp.orig 2026-06-09 03:43:36 UTC
-+++ test/unit_tests/UnixSocketHandlerTest.cpp
-@@ -0,0 +1,47 @@
-+#include "PipeSocketHandler.hpp"
-+#include "TestHeaders.hpp"
-+
-+using namespace et;
-+
-+TEST_CASE("AcceptTransientErrorClassification", "[UnixSocketHandler]") {
-+ // The errnos that must be tolerated rather than aborting the server.
-+ // ECONNABORTED is the case that crashed etserver on FreeBSD.
-+ REQUIRE(UnixSocketHandler::isTransientAcceptError(EAGAIN));
-+ REQUIRE(UnixSocketHandler::isTransientAcceptError(EWOULDBLOCK));
-+ REQUIRE(UnixSocketHandler::isTransientAcceptError(ECONNABORTED));
-+ REQUIRE(UnixSocketHandler::isTransientAcceptError(EINTR));
-+
-+ // Genuine logic errors must still be treated as fatal.
-+ REQUIRE_FALSE(UnixSocketHandler::isTransientAcceptError(EBADF));
-+ REQUIRE_FALSE(UnixSocketHandler::isTransientAcceptError(EINVAL));
-+ REQUIRE_FALSE(UnixSocketHandler::isTransientAcceptError(ENOTSOCK));
-+ REQUIRE_FALSE(UnixSocketHandler::isTransientAcceptError(EFAULT));
-+}
-+
-+TEST_CASE("AcceptDoesNotAbortWhenNoPendingConnection", "[UnixSocketHandler]") {
-+ // End-to-end check: accept() on a non-blocking listening socket with no
-+ // pending connection fails with EAGAIN/EWOULDBLOCK and must return -1 to the
-+ // caller instead of hitting FATAL_FAIL.
-+ shared_ptr<PipeSocketHandler> socketHandler(new PipeSocketHandler());
-+
-+ string tmpPath = GetTempDirectory() + string("et_test_XXXXXXXX");
-+ string pipeDirectory = string(mkdtemp(&tmpPath[0]));
-+ string pipePath = pipeDirectory + "/pipe";
-+
-+ SocketEndpoint endpoint;
-+ endpoint.set_name(pipePath);
-+
-+ set<int> serverFds = socketHandler->listen(endpoint);
-+ REQUIRE(!serverFds.empty());
-+ int serverFd = *serverFds.begin();
-+
-+ int clientFd = socketHandler->accept(serverFd);
-+ REQUIRE(clientFd == -1);
-+ REQUIRE((GetErrno() == EAGAIN || GetErrno() == EWOULDBLOCK));
-+
-+ socketHandler->stopListening(endpoint);
-+ // stopListening() only closes the fd; the bound socket file remains, so
-+ // remove it before the (now empty) directory.
-+ FATAL_FAIL(::remove(pipePath.c_str()));
-+ FATAL_FAIL(::remove(pipeDirectory.c_str()));
-+}
diff --git a/net/eternalterminal/pkg-plist b/net/eternalterminal/pkg-plist
index 1bca03d07a9a..df5f74078f38 100644
--- a/net/eternalterminal/pkg-plist
+++ b/net/eternalterminal/pkg-plist
@@ -5,3 +5,4 @@ bin/htm
bin/htmd
@sample etc/etserver/et.cfg.sample
etc/rc.d/etserver
+share/zsh/site-functions/_et