public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/knot-resolver/files/
Date: Sun, 23 Mar 2025 14:30:27 +0000 (UTC)	[thread overview]
Message-ID: <1742739982.8fc94b8390929d2ce40c4582b06435cd7fc484eb.conikost@gentoo> (raw)

commit:     8fc94b8390929d2ce40c4582b06435cd7fc484eb
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Thu Mar 20 07:16:18 2025 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Mar 23 14:26:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fc94b83

net-dns/knot-resolver: remove unused patch

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/knot-resolver-6.0.9-sd_notify_alt.patch  | 82 ----------------------
 1 file changed, 82 deletions(-)

diff --git a/net-dns/knot-resolver/files/knot-resolver-6.0.9-sd_notify_alt.patch b/net-dns/knot-resolver/files/knot-resolver-6.0.9-sd_notify_alt.patch
deleted file mode 100644
index 9752b314cfa0..000000000000
--- a/net-dns/knot-resolver/files/knot-resolver-6.0.9-sd_notify_alt.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-https://gitlab.nic.cz/knot/knot-resolver/-/merge_requests/1608
-Draft: daemon: add sd_notify alternative
-This allows kresd to run even if libsystemd is not available.
-
-diff --git a/daemon/main.c b/daemon/main.c
-index 44b8ae4c1b745c19ae91f6c9119b895d7738947f..230b1e453217682df387165c08f4115d795cb983 100644
---- a/daemon/main.c
-+++ b/daemon/main.c
-@@ -36,6 +36,8 @@
- #include <uv.h>
- #if ENABLE_LIBSYSTEMD
- #include <systemd/sd-daemon.h>
-+#else
-+static int notify_ready(const char *state);
- #endif
- #include <libknot/error.h>
- 
-@@ -68,6 +70,7 @@ KR_EXPORT const char *malloc_conf = "narenas:1";
- #define TCP_BACKLOG_DEFAULT 128
- #endif
- 
-+
- /** I don't know why linker is dropping these functions otherwise. TODO: revisit. */
- KR_EXPORT void kr_misc_unused(void)
- {
-@@ -209,6 +212,8 @@ static int run_worker(uv_loop_t *loop, bool leader, struct args *args)
- 	/* Notify supervisor. */
- #if ENABLE_LIBSYSTEMD
- 	sd_notify(0, "READY=1");
-+#else
-+	notify_ready("READY=1");
- #endif
- 	/* Run event loop */
- 	uv_run(loop, UV_RUN_DEFAULT);
-@@ -414,6 +419,47 @@ static int start_listening(flagged_fd_array_t *fds) {
- 	return some_bad_ret;
- }
- 
-+#if !ENABLE_LIBSYSTEMD
-+/* Notify supervisord about successful inicialization
-+ * @note tested only on an abstract address in $NOTIFY_SOCKET*/
-+static int notify_ready(const char *state)
-+{
-+	int sockfd;
-+	struct sockaddr_un addr;
-+	char *socket_path = getenv("NOTIFY_SOCKET");
-+	if (!socket_path) {
-+		kr_log_error(WORKER, "Failed retrieving env variable $NOTIFY_SOCKET\n");
-+		return EXIT_FAILURE;
-+	}
-+	if ((sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
-+		kr_log_error(WORKER, "Failed to create unix socket at $NOTIFY_SOCKET ('%s'): %s\n",
-+				socket_path, strerror(errno));
-+		return EXIT_FAILURE;
-+	}
-+
-+	addr.sun_family = AF_UNIX;
-+
-+	int addrlen;
-+	if (socket_path[0] == '@') {
-+		addr.sun_path[0] = '\0';
-+		strncpy(&addr.sun_path[1], socket_path + 1, sizeof(addr.sun_path) - 2);
-+		addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path + 1) + 1;
-+	} else {
-+		strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1);
-+		addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path) + 1;
-+	}
-+	if (sendto(sockfd, state, strlen(state), 0, &addr, addrlen) == -1) {
-+		kr_log_error(WORKER, "Failed to send notify message to '%s': %s\n",
-+			socket_path, strerror(errno));
-+		close(sockfd);
-+		return EXIT_FAILURE;
-+	}
-+
-+	close(sockfd);
-+	return kr_ok();
-+}
-+#endif /* if !ENABLE_LIBSYSTEMD */
-+
- /* Drop POSIX 1003.1e capabilities. */
- static void drop_capabilities(void)
- {


             reply	other threads:[~2025-03-23 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-23 14:30 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-04  6:42 [gentoo-commits] repo/gentoo:master commit in: net-dns/knot-resolver/files/ Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1742739982.8fc94b8390929d2ce40c4582b06435cd7fc484eb.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox