commit: 3bc11fe7c11bf7222367fbee85d4cb78b62ec60f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 16 18:24:40 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 16 18:24:40 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bc11fe7
www-misc/fcgiwrap: drop one of the cleanup patches
... briefly added in 6bcd7b2f7d9c1075df6ff103c4328ccddfb71c29. It uses
strlcpy which isn't available in older glibc. That could easily be fixed
but it seems that fcgiwrap-1.1.0-cleanup.patch is actually sufficient
for the bug I was looking at anyway.
Signed-off-by: Sam James <sam <AT> gentoo.org>
...1.ebuild => fcgiwrap-1.1.0_p20150419-r2.ebuild} | 1 -
.../files/fcgiwrap-1.1.0-cleanup-startup.patch | 62 ----------------------
2 files changed, 63 deletions(-)
diff --git a/www-misc/fcgiwrap/fcgiwrap-1.1.0_p20150419-r1.ebuild
b/www-misc/fcgiwrap/fcgiwrap-1.1.0_p20150419-r2.ebuild
similarity index 97%
rename from www-misc/fcgiwrap/fcgiwrap-1.1.0_p20150419-r1.ebuild
rename to www-misc/fcgiwrap/fcgiwrap-1.1.0_p20150419-r2.ebuild
index 3704d9498fb8..9aa4dce6e7a0 100644
--- a/www-misc/fcgiwrap/fcgiwrap-1.1.0_p20150419-r1.ebuild
+++ b/www-misc/fcgiwrap/fcgiwrap-1.1.0_p20150419-r2.ebuild
@@ -35,7 +35,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.1.0-systemd.patch
"${FILESDIR}"/${PN}-1.1.0-uninit-ipv6.patch
"${FILESDIR}"/${PN}-1.1.0-cleanup.patch
- "${FILESDIR}"/${PN}-1.1.0-cleanup-startup.patch
)
src_prepare() {
diff --git a/www-misc/fcgiwrap/files/fcgiwrap-1.1.0-cleanup-startup.patch
b/www-misc/fcgiwrap/files/fcgiwrap-1.1.0-cleanup-startup.patch
deleted file mode 100644
index a354219af016..000000000000
--- a/www-misc/fcgiwrap/files/fcgiwrap-1.1.0-cleanup-startup.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-https://github.com/gnosek/fcgiwrap/pull/52
-
-From 1d8bacb3145cf1aed2d6b7f7e725db5b424eb8ec Mon Sep 17 00:00:00 2001
-From: Andy Fiddaman <[email protected]>
-Date: Fri, 17 Apr 2020 13:41:46 +0000
-Subject: [PATCH] Clean up any stale UNIX domain socket on start
-
----
- fcgiwrap.c | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/fcgiwrap.c b/fcgiwrap.c
-index b44d8aa..5ee2327 100644
---- a/fcgiwrap.c
-+++ b/fcgiwrap.c
-@@ -727,6 +727,8 @@ static int setup_socket(char *url) {
- } sa;
-
- if (!strncmp(p, "unix:", sizeof("unix:") - 1)) {
-+ struct stat st;
-+
- p += sizeof("unix:") - 1;
-
- if (strlen(p) >= UNIX_PATH_MAX) {
-@@ -738,6 +740,36 @@ static int setup_socket(char *url) {
- sockaddr_size = sizeof sa.sa_un;
- sa.sa_un.sun_family = AF_UNIX;
- strcpy(sa.sa_un.sun_path, p);
-+
-+ if (stat(p, &st) != -1) {
-+ /* Socket already exists. See if it is still alive. */
-+ struct sockaddr_un server;
-+ int fd;
-+
-+ memset((char *)&server, '\0',
-+ sizeof(struct sockaddr_un));
-+ server.sun_family = AF_UNIX;
-+ strlcpy(server.sun_path, p, sizeof(server.sun_path));
-+
-+ if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) {
-+ if (connect(fd, (struct sockaddr *)&server,
-+ sizeof(struct sockaddr_un)) >= 0) {
-+ close(fd);
-+ fprintf(stderr,
-+ "Socket %s is in use by "
-+ "another process.\n", p);
-+ return -1;
-+ }
-+ close(fd);
-+ }
-+
-+ fprintf(stderr, "Removing stale socket %s.\n", p);
-+ if (unlink(p) == -1) {
-+ fprintf(stderr,
-+ "Could not unlink stale socket %s\n", p);
-+ return -1;
-+ }
-+ }
- } else if (!strncmp(p, "tcp:", sizeof("tcp:") - 1)) {
- p += sizeof("tcp:") - 1;
-
-