From cc3698a3b81f3f207fb7868eda368a5ba6483922 Mon Sep 17 00:00:00 2001 From: Camber Huang Date: Sun, 20 Nov 2022 19:20:04 +0800 Subject: [PATCH] fcgi: update to 2.4.2 Signed-off-by: Camber Huang --- extra-libs/fcgi/autobuild/beyond | 1 - extra-libs/fcgi/autobuild/defines | 3 - .../patches/binutils-indirect-linking | 9 -- .../patches/fix_compiler_warnings.patch | 97 ------------------- .../fcgi/autobuild/patches/gcc44-fix-include | 28 ------ extra-libs/fcgi/autobuild/patches/poll | 86 ---------------- extra-libs/fcgi/autobuild/patches/series | 4 - extra-libs/fcgi/spec | 5 +- 8 files changed, 2 insertions(+), 231 deletions(-) delete mode 100644 extra-libs/fcgi/autobuild/beyond delete mode 100644 extra-libs/fcgi/autobuild/patches/binutils-indirect-linking delete mode 100644 extra-libs/fcgi/autobuild/patches/fix_compiler_warnings.patch delete mode 100644 extra-libs/fcgi/autobuild/patches/gcc44-fix-include delete mode 100644 extra-libs/fcgi/autobuild/patches/poll delete mode 100644 extra-libs/fcgi/autobuild/patches/series diff --git a/extra-libs/fcgi/autobuild/beyond b/extra-libs/fcgi/autobuild/beyond deleted file mode 100644 index 2cc0e23b6e6..00000000000 --- a/extra-libs/fcgi/autobuild/beyond +++ /dev/null @@ -1 +0,0 @@ -chmod -R a-s $PKGDIR diff --git a/extra-libs/fcgi/autobuild/defines b/extra-libs/fcgi/autobuild/defines index c1e74e786b1..2340216f3d2 100644 --- a/extra-libs/fcgi/autobuild/defines +++ b/extra-libs/fcgi/autobuild/defines @@ -2,6 +2,3 @@ PKGNAME=fcgi PKGSEC=libs PKGDEP="gcc-runtime libnsl2" PKGDES="A language independent, high performant extension to CGI" - -NOPARALLEL=1 -RECONF=0 diff --git a/extra-libs/fcgi/autobuild/patches/binutils-indirect-linking b/extra-libs/fcgi/autobuild/patches/binutils-indirect-linking deleted file mode 100644 index ac7d28d0456..00000000000 --- a/extra-libs/fcgi/autobuild/patches/binutils-indirect-linking +++ /dev/null @@ -1,9 +0,0 @@ ---- libfcgi-2.4.0.orig/examples/Makefile.am -+++ libfcgi-2.4.0/examples/Makefile.am -@@ -34,5 +34,5 @@ threaded_CFLAGS = @PTHREAD_CFLAGS@ - threaded_LDFLAGS = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ - - echo_cpp_SOURCES = $(INCLUDE_FILES) $(INCLUDEDIR)/fcgio.h echo-cpp.cpp --echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la -+echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la $(LIBDIR)/libfcgi.la - diff --git a/extra-libs/fcgi/autobuild/patches/fix_compiler_warnings.patch b/extra-libs/fcgi/autobuild/patches/fix_compiler_warnings.patch deleted file mode 100644 index 07b0c6364a0..00000000000 --- a/extra-libs/fcgi/autobuild/patches/fix_compiler_warnings.patch +++ /dev/null @@ -1,97 +0,0 @@ -Description: Fix up compiler warnings in codebase, including: - - Unwind complex deferencing of pointers resolving: - "warning: dereferencing type-punned pointer will break strict-aliasing rules" - - Remove unused variable from the codebase: - "warning: variable 'numFDs' set but not used" - - Cast parameters properly for formatting in fprintf: - "warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t'" - - Interim cast to intprt_t when passing FD's as ClientData pointers: - "warning: cast to pointer from integer of different size" -Author: James Page -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1017978 -Forwarded: yes, fastcgi-developers@mailman.fastcgi.com - ---- a/libfcgi/fcgiapp.c -+++ b/libfcgi/fcgiapp.c -@@ -1486,16 +1486,17 @@ static int ProcessManagementRecord(int t - } - len = responseP - &response[FCGI_HEADER_LEN]; - paddedLen = AlignInt8(len); -- *((FCGI_Header *) response) -- = MakeHeader(FCGI_GET_VALUES_RESULT, FCGI_NULL_REQUEST_ID, -- len, paddedLen - len); -+ FCGI_Header *header = (FCGI_Header *)response; -+ *header = MakeHeader(FCGI_GET_VALUES_RESULT, FCGI_NULL_REQUEST_ID, -+ len, paddedLen - len); - FreeParams(¶msPtr); - } else { - paddedLen = len = sizeof(FCGI_UnknownTypeBody); -- ((FCGI_UnknownTypeRecord *) response)->header -+ FCGI_UnknownTypeRecord *utr = (FCGI_UnknownTypeRecord *) response; -+ utr->header - = MakeHeader(FCGI_UNKNOWN_TYPE, FCGI_NULL_REQUEST_ID, - len, 0); -- ((FCGI_UnknownTypeRecord *) response)->body -+ utr->body - = MakeUnknownTypeBody(type); - } - if (write_it_all(data->reqDataPtr->ipcFd, response, FCGI_HEADER_LEN + paddedLen) < 0) { ---- a/cgi-fcgi/cgi-fcgi.c -+++ b/cgi-fcgi/cgi-fcgi.c -@@ -386,8 +386,8 @@ static void WebServerReadHandler(ClientD - if(bytesRead < 0) { - exit(OS_Errno); - } -- *((FCGI_Header *) &fromWS.buff[0]) -- = MakeHeader(FCGI_STDIN, requestId, bytesRead, 0); -+ FCGI_Header *header = (FCGI_Header *) &fromWS.buff[0]; -+ *header = MakeHeader(FCGI_STDIN, requestId, bytesRead, 0); - bytesToRead -= bytesRead; - fromWS.stop = &fromWS.buff[sizeof(FCGI_Header) + bytesRead]; - webServerReadHandlerEOF = (bytesRead == 0); -@@ -458,7 +458,7 @@ static void ScheduleIo(void) - ((length = fromWS.stop - fromWS.next) != 0)) { - if(OS_AsyncWrite(appServerSock, 0, fromWS.next, length, - AppServerWriteHandler, -- (ClientData)appServerSock) == -1) { -+ (ClientData)(intptr_t)appServerSock) == -1) { - FCGIexit(OS_Errno); - } else { - fcgiWritePending = TRUE; -@@ -474,7 +474,7 @@ static void ScheduleIo(void) - - if(OS_AsyncRead(appServerSock, 0, fromAS.next, BUFFLEN, - AppServerReadHandler, -- (ClientData)appServerSock) == -1) { -+ (ClientData)(intptr_t)appServerSock) == -1) { - FCGIexit(OS_Errno); - } else { - fcgiReadPending = TRUE; -@@ -640,7 +640,7 @@ static int ParseArgs(int argc, char *arg - } - if((av[ac] = (char *)malloc(strlen(tp1)+1)) == NULL) { - fprintf(stderr, "Cannot allocate %d bytes\n", -- strlen(tp1)+1); -+ (int)strlen(tp1)+1); - exit(-1); - } - strcpy(av[ac++], tp1); -@@ -722,7 +722,6 @@ int main(int argc, char **argv) - char **envp = environ; - int count; - FCGX_Stream *paramsStream; -- int numFDs; - unsigned char headerBuff[8]; - int headerLen, valueLen; - char *equalPtr; -@@ -821,10 +820,6 @@ int main(int argc, char **argv) - */ - fromWS.stop = fromWS.next = &fromWS.buff[0]; - webServerReadHandlerEOF = FALSE; -- /* -- * XXX: might want to use numFDs in the os library. -- */ -- numFDs = max(appServerSock, STDIN_FILENO) + 1; - OS_SetFlags(appServerSock, O_NONBLOCK); - - if (bytesToRead <= 0) diff --git a/extra-libs/fcgi/autobuild/patches/gcc44-fix-include b/extra-libs/fcgi/autobuild/patches/gcc44-fix-include deleted file mode 100644 index 8a846cf27af..00000000000 --- a/extra-libs/fcgi/autobuild/patches/gcc44-fix-include +++ /dev/null @@ -1,28 +0,0 @@ -Description: Upstream changes introduced in version 2.4.0-8 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - libfcgi (2.4.0-8) unstable; urgency=low - . - * Switch to dpkg-source 3.0 (quilt) format - . - The person named in the Author field signed this changelog entry. -Author: Tatsuki Sugiura -Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504963 -Bug-Debian: http://bugs.debian.org/504963 -Forwarded: no -Last-Update: 2010-02-08 - -Index: libfcgi/libfcgi/fcgio.cpp -=================================================================== ---- libfcgi.orig/libfcgi/fcgio.cpp 2010-01-23 19:13:53.000000000 +0900 -+++ libfcgi/libfcgi/fcgio.cpp 2010-01-23 19:13:55.000000000 +0900 -@@ -22,6 +22,7 @@ - #define DLLAPI __declspec(dllexport) - #endif - -+#include - #include - #include "fcgio.h" - diff --git a/extra-libs/fcgi/autobuild/patches/poll b/extra-libs/fcgi/autobuild/patches/poll deleted file mode 100644 index d4bc2400e20..00000000000 --- a/extra-libs/fcgi/autobuild/patches/poll +++ /dev/null @@ -1,86 +0,0 @@ -Author: Anton Kortunov -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfcgi/+bug/933417 -Description: use poll in os_unix.c instead of select to avoid problem with > 1024 connections -Forwarded: yes, fastcgi-developers@mailman.fastcgi.com - -diff --git a/libfcgi/os_unix.c b/libfcgi/os_unix.c -index 73e6a7f..af35aee 100755 ---- a/libfcgi/os_unix.c -+++ b/libfcgi/os_unix.c -@@ -42,6 +42,7 @@ static const char rcsid[] = "$Id: os_unix.c,v 1.37 2002/03/05 19:14:49 robs Exp - #include - #include - #include -+#include - - #ifdef HAVE_NETDB_H - #include -@@ -103,6 +104,9 @@ static int volatile maxFd = -1; - static int shutdownPending = FALSE; - static int shutdownNow = FALSE; - -+static int libfcgiOsClosePollTimeout = 2000; -+static int libfcgiIsAfUnixKeeperPollTimeout = 2000; -+ - void OS_ShutdownPending() - { - shutdownPending = TRUE; -@@ -168,6 +172,16 @@ int OS_LibInit(int stdioFds[3]) - if(libInitialized) - return 0; - -+ char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" ); -+ if(libfcgiOsClosePollTimeoutStr) { -+ libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr); -+ } -+ -+ char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" ); -+ if(libfcgiIsAfUnixKeeperPollTimeoutStr) { -+ libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr); -+ } -+ - asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo)); - if(asyncIoTable == NULL) { - errno = ENOMEM; -@@ -755,19 +769,16 @@ int OS_Close(int fd) - - if (shutdown(fd, 1) == 0) - { -- struct timeval tv; -- fd_set rfds; -+ struct pollfd pfd; - int rv; - char trash[1024]; - -- FD_ZERO(&rfds); -+ pfd.fd = fd; -+ pfd.events = POLLIN; - - do - { -- FD_SET(fd, &rfds); -- tv.tv_sec = 2; -- tv.tv_usec = 0; -- rv = select(fd + 1, &rfds, NULL, NULL, &tv); -+ rv = poll(&pfd, 1, libfcgiOsClosePollTimeout); - } - while (rv > 0 && read(fd, trash, sizeof(trash)) > 0); - } -@@ -1116,13 +1127,11 @@ static int is_reasonable_accept_errno (const int error) - */ - static int is_af_unix_keeper(const int fd) - { -- struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL }; -- fd_set read_fds; -- -- FD_ZERO(&read_fds); -- FD_SET(fd, &read_fds); -+ struct pollfd pfd; -+ pfd.fd = fd; -+ pfd.events = POLLIN; - -- return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds); -+ return poll(&pfd, 1, libfcgiIsAfUnixKeeperPollTimeout) >= 0 && (pfd.revents & POLLIN); - } - - /* diff --git a/extra-libs/fcgi/autobuild/patches/series b/extra-libs/fcgi/autobuild/patches/series deleted file mode 100644 index 0cf635be1f8..00000000000 --- a/extra-libs/fcgi/autobuild/patches/series +++ /dev/null @@ -1,4 +0,0 @@ -binutils-indirect-linking -gcc44-fix-include -poll -fix_compiler_warnings.patch diff --git a/extra-libs/fcgi/spec b/extra-libs/fcgi/spec index e5e132409f7..2b901f0d09f 100644 --- a/extra-libs/fcgi/spec +++ b/extra-libs/fcgi/spec @@ -1,5 +1,4 @@ -VER=2.4.0 -REL=4 +VER=2.4.2 SRCS="tbl::http://http.debian.net/debian/pool/main/libf/libfcgi/libfcgi_$VER.orig.tar.gz" -CHKSUMS="sha256::c21f553f41141a847b2f1a568ec99a3068262821e4e30bc9d4b5d9091aa0b5f7" +CHKSUMS="sha256::1fe83501edfc3a7ec96bb1e69db3fd5ea1730135bd73ab152186fd0b437013bc" CHKUPDATE="anitya::id=59392"