mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
sysutils/conmon: update to 2.1.10
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
PORTNAME= conmon
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.1.7
|
||||
PORTREVISION= 6
|
||||
DISTVERSION= 2.1.10
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= dfr@FreeBSD.org
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1678090049
|
||||
SHA256 (containers-conmon-v2.1.7_GH0.tar.gz) = 7d0f9a2f7cb8a76c51990128ac837aaf0cc89950b6ef9972e94417aa9cf901fe
|
||||
SIZE (containers-conmon-v2.1.7_GH0.tar.gz) = 158201
|
||||
TIMESTAMP = 1702974978
|
||||
SHA256 (containers-conmon-v2.1.10_GH0.tar.gz) = 455fabcbd4a5a5dc5e05374a71b62dc0b08ee865c2ba398e9dc9acac1ea1836a
|
||||
SIZE (containers-conmon-v2.1.10_GH0.tar.gz) = 121047
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
--- src/close_fds.c.orig 2023-02-28 02:39:11 UTC
|
||||
+++ src/close_fds.c
|
||||
@@ -22,6 +22,12 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#define OPEN_FILES_DIR "/dev/fd"
|
||||
+#else
|
||||
+#define OPEN_FILES_DIR "/proc/self/fd"
|
||||
+#endif
|
||||
+
|
||||
static int open_files_max_fd;
|
||||
static fd_set *open_files_set;
|
||||
|
||||
@@ -31,7 +37,7 @@ static void __attribute__((constructor)) init()
|
||||
ssize_t size = 0;
|
||||
DIR *d;
|
||||
|
||||
- d = opendir("/proc/self/fd");
|
||||
+ d = opendir(OPEN_FILES_DIR);
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
@@ -85,7 +91,7 @@ void close_all_fds_ge_than(int firstfd)
|
||||
struct dirent *ent;
|
||||
DIR *d;
|
||||
|
||||
- d = opendir("/proc/self/fd");
|
||||
+ d = opendir(OPEN_FILES_DIR);
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
--- src/conn_sock.c.orig 2023-07-07 12:04:59 UTC
|
||||
+++ src/conn_sock.c
|
||||
@@ -110,6 +110,14 @@ static void bind_relative_to_dir(int dir_fd, int sock_
|
||||
if (bind(sock_fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
|
||||
pexit("Failed to bind to console-socket");
|
||||
}
|
||||
+
|
||||
+static void set_socket_buffers(G_GNUC_UNUSED int fd)
|
||||
+{
|
||||
+ /*
|
||||
+ * Nothing needed here for Linux - the default buffer sizes for unix domain sockets are large enough.
|
||||
+ */
|
||||
+}
|
||||
+
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
@@ -135,6 +143,18 @@ static void bind_relative_to_dir(int dir_fd, int sock_
|
||||
if (fchmodat(dir_fd, addr.sun_path, 0700, AT_SYMLINK_NOFOLLOW))
|
||||
pexit("Failed to change console-socket permissions");
|
||||
}
|
||||
+
|
||||
+static void set_socket_buffers(int fd)
|
||||
+{
|
||||
+ int sz = CONN_SOCK_BUF_SIZE;
|
||||
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &sz, sizeof(sz))) {
|
||||
+ nwarn("failed to set socket receive buffer size");
|
||||
+ }
|
||||
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sz, sizeof(sz))) {
|
||||
+ nwarn("failed to set socket send buffer size");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#endif
|
||||
|
||||
static char *setup_socket(int *fd, const char *path)
|
||||
@@ -357,6 +377,7 @@ static gboolean attach_cb(int fd, G_GNUC_UNUSED GIOCon
|
||||
nwarn("Failed to accept client connection on attach socket");
|
||||
} else {
|
||||
struct remote_sock_s *remote_sock;
|
||||
+ set_socket_buffers(new_fd);
|
||||
if (srcsock->dest->readers == NULL) {
|
||||
srcsock->dest->readers = g_ptr_array_new_with_free_func(free);
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
|
||||
To properly support podman's container restart policy, conmon needs fdescfs(5)
|
||||
To properly support Podman's container restart policy, conmon needs fdescfs(5)
|
||||
to be mounted on /dev/fd.
|
||||
|
||||
If /dev/fd is not already mounted:
|
||||
|
||||
Reference in New Issue
Block a user