From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Robert Schwebel Date: Mon, 20 Jan 2020 10:11:17 +0100 Message-Id: <20200120091117.226936-1-r.schwebel@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH] fcgi: version bump 2.4.0 -> 2.4.2 List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Robert Schwebel , Patrick Enns The repository on sourceforge doesn't exist any more, there seems to be a maintained repo on github, so switch to it. The patches from 2.4.0 can be removed: 0001, 0002 and 0004 are already in upstream, 0003 isn't necessary any more as the file doesn't contain an EOF (which was the reason to include stdio.h). The new upstream repo doesn't contain configure, so we have to autogen it. Signed-off-by: Robert Schwebel [add patch description, check patches, remove patches] Signed-off-by: Patrick Enns --- patches/fcgi-2.4.0/0001-fix-buildsystem.patch | 69 ------------- .../0002-prepare-for-new-autotools.patch | 26 ----- patches/fcgi-2.4.0/0003-include-stdio.h.patch | 24 ----- ...e-poll-in-os_unix.c-instead-of-selec.patch | 96 ------------------- patches/fcgi-2.4.0/series | 7 -- patches/{fcgi-2.4.0 => fcgi-2.4.2}/autogen.sh | 0 rules/fcgi.make | 6 +- 7 files changed, 3 insertions(+), 225 deletions(-) delete mode 100644 patches/fcgi-2.4.0/0001-fix-buildsystem.patch delete mode 100644 patches/fcgi-2.4.0/0002-prepare-for-new-autotools.patch delete mode 100644 patches/fcgi-2.4.0/0003-include-stdio.h.patch delete mode 100644 patches/fcgi-2.4.0/0004-CVE-2012-6687-use-poll-in-os_unix.c-instead-of-selec.patch delete mode 100644 patches/fcgi-2.4.0/series rename patches/{fcgi-2.4.0 => fcgi-2.4.2}/autogen.sh (100%) diff --git a/patches/fcgi-2.4.0/0001-fix-buildsystem.patch b/patches/fcgi-2.4.0/0001-fix-buildsystem.patch deleted file mode 100644 index a15794d4c..000000000 --- a/patches/fcgi-2.4.0/0001-fix-buildsystem.patch +++ /dev/null @@ -1,69 +0,0 @@ -From: Michael Olbrich -Date: Wed, 27 Oct 2010 23:17:40 +0200 -Subject: [PATCH] fix buildsystem - - * Use libfcgi.la instead of -lfcgi when linking against a library in the - same directory - * Use AM_* where appropriate. - -Signed-off-by: Michael Olbrich ---- - cgi-fcgi/Makefile.am | 2 +- - examples/Makefile.am | 4 ++-- - libfcgi/Makefile.am | 5 +++-- - 3 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/cgi-fcgi/Makefile.am b/cgi-fcgi/Makefile.am -index 4a5c685bce01..04b4483bd307 100644 ---- a/cgi-fcgi/Makefile.am -+++ b/cgi-fcgi/Makefile.am -@@ -2,7 +2,7 @@ - bin_PROGRAMS = cgi-fcgi - - INCLUDEDIR = ../include --CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include -+AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include - - INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ - $(INCLUDEDIR)/fcgiapp.h \ -diff --git a/examples/Makefile.am b/examples/Makefile.am -index 484d3e897437..930f2030e830 100644 ---- a/examples/Makefile.am -+++ b/examples/Makefile.am -@@ -11,7 +11,7 @@ noinst_PROGRAMS = authorizer \ - EXTRA_PROGRAMS = threaded echo-cpp - - INCLUDEDIR = ../include --CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include -+AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include - - INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ - $(INCLUDEDIR)/fcgiapp.h \ -@@ -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/libfcgi/Makefile.am b/libfcgi/Makefile.am -index 0f1461566a35..d7346f5eb26c 100644 ---- a/libfcgi/Makefile.am -+++ b/libfcgi/Makefile.am -@@ -1,7 +1,7 @@ - # $Id: Makefile.am,v 1.9 2001/12/22 03:16:20 robs Exp $ - - INCLUDEDIR = ../include --CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include -+AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include - - INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ - $(INCLUDEDIR)/fcgiapp.h \ -@@ -23,5 +23,6 @@ libfcgi___la_SOURCES = $(INCLUDE_FILES) \ - $(INCLUDEDIR)/fcgio.h \ - fcgio.cpp - libfcgi___la_CFLAGS = @PTHREAD_CFLAGS@ --libfcgi___la_LDFLAGS = -lfcgi -rpath @libdir@ -+libfcgi___la_LDFLAGS = -rpath @libdir@ -+libfcgi___la_LIBADD = libfcgi.la - diff --git a/patches/fcgi-2.4.0/0002-prepare-for-new-autotools.patch b/patches/fcgi-2.4.0/0002-prepare-for-new-autotools.patch deleted file mode 100644 index b7d442057..000000000 --- a/patches/fcgi-2.4.0/0002-prepare-for-new-autotools.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Michael Olbrich -Date: Wed, 27 Oct 2010 23:17:40 +0200 -Subject: [PATCH] prepare for new autotools - -we need AM_INIT_AUTOMAKE([foreign]) or automake fails with missing files - -Signed-off-by: Michael Olbrich ---- - configure.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.in b/configure.in -index e1941d008704..1f94ddeea03b 100755 ---- a/configure.in -+++ b/configure.in -@@ -4,8 +4,8 @@ dnl This file is an input file used by the GNU "autoconf" program to - dnl generate the file "configure", which is run during the build - dnl to configure the system for the local environment. - --AC_INIT --AM_INIT_AUTOMAKE(fcgi, 2.4.0) -+AC_INIT([fcgi],[2.4.0],[]) -+AM_INIT_AUTOMAKE([foreign]) - - AM_CONFIG_HEADER(fcgi_config.h) - diff --git a/patches/fcgi-2.4.0/0003-include-stdio.h.patch b/patches/fcgi-2.4.0/0003-include-stdio.h.patch deleted file mode 100644 index e10d9c762..000000000 --- a/patches/fcgi-2.4.0/0003-include-stdio.h.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: George McCollister -Date: Wed, 27 Oct 2010 23:17:40 +0200 -Subject: [PATCH] include stdio.h - -fcgi failed to compile. EOF wasn't defined because stdio.h wasn't included. - -Signed-off-by: George McCollister ---- - include/fcgiapp.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/fcgiapp.h b/include/fcgiapp.h -index d7236f6f3f2a..c39a6715021c 100644 ---- a/include/fcgiapp.h -+++ b/include/fcgiapp.h -@@ -34,6 +34,8 @@ - extern "C" { - #endif - -+#include -+ - /* - * Error codes. Assigned to avoid conflict with EOF and errno(2). - */ diff --git a/patches/fcgi-2.4.0/0004-CVE-2012-6687-use-poll-in-os_unix.c-instead-of-selec.patch b/patches/fcgi-2.4.0/0004-CVE-2012-6687-use-poll-in-os_unix.c-instead-of-selec.patch deleted file mode 100644 index 2973172ad..000000000 --- a/patches/fcgi-2.4.0/0004-CVE-2012-6687-use-poll-in-os_unix.c-instead-of-selec.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Anton Kortunov -Date: Tue, 9 Jul 2019 16:24:02 +0200 -Subject: [PATCH] CVE-2012-6687: use poll in os_unix.c instead of select to - avoid problem with > 1024 connections - -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfcgi/+bug/933417 -Forwarded: yes, fastcgi-developers@mailman.fastcgi.com -Origin: https://github.com/tehnick/libfcgi-debian/blob/master/debian/patches/use-poll.patch, - https://bugs.launchpad.net/ubuntu/+source/libfcgi/+bug/933417/+attachment/2745025/+files/poll.patch, -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681591 -Signed-off-by: Roland Hieber ---- - libfcgi/os_unix.c | 35 ++++++++++++++++++++++------------- - 1 file changed, 22 insertions(+), 13 deletions(-) - -diff --git a/libfcgi/os_unix.c b/libfcgi/os_unix.c -index 73e6a7f51522..af35aeed471b 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/patches/fcgi-2.4.0/series b/patches/fcgi-2.4.0/series deleted file mode 100644 index 0a44f7fd1..000000000 --- a/patches/fcgi-2.4.0/series +++ /dev/null @@ -1,7 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-fix-buildsystem.patch -0002-prepare-for-new-autotools.patch -0003-include-stdio.h.patch -0004-CVE-2012-6687-use-poll-in-os_unix.c-instead-of-selec.patch -# b3af8b9128742fb7ab04b50022c278f5 - git-ptx-patches magic diff --git a/patches/fcgi-2.4.0/autogen.sh b/patches/fcgi-2.4.2/autogen.sh similarity index 100% rename from patches/fcgi-2.4.0/autogen.sh rename to patches/fcgi-2.4.2/autogen.sh diff --git a/rules/fcgi.make b/rules/fcgi.make index bca126dbc..dbe4e6f0d 100644 --- a/rules/fcgi.make +++ b/rules/fcgi.make @@ -12,11 +12,11 @@ PACKAGES-$(PTXCONF_FCGI) += fcgi # # Paths and names # -FCGI_VERSION := 2.4.0 -FCGI_MD5 := d15060a813b91383a9f3c66faf84867e +FCGI_VERSION := 2.4.2 +FCGI_MD5 := 146376d5c5c059b9184755db76505fab FCGI := fcgi-$(FCGI_VERSION) FCGI_SUFFIX := tar.gz -FCGI_URL := https://sourceforge.net/projects/slackbuildsdirectlinks/files/fcgi/$(FCGI).$(FCGI_SUFFIX) +FCGI_URL := https://github.com/FastCGI-Archives/fcgi2/archive/$(FCGI_VERSION).$(FCGI_SUFFIX) FCGI_SOURCE := $(SRCDIR)/$(FCGI).$(FCGI_SUFFIX) FCGI_DIR := $(BUILDDIR)/$(FCGI) FCGI_LICENSE := OML -- 2.25.0.rc2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de