Move all to deprecated folder.
This commit is contained in:
24
deprecated/firmware/buildroot/package/libfcgi/0001-eof.patch
Normal file
24
deprecated/firmware/buildroot/package/libfcgi/0001-eof.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
[PATCH] fix build with C++ support and gcc >= 4.4
|
||||
|
||||
EOF is defined in stdio, so ensure it is included.
|
||||
|
||||
Based on similar patch by Markus Rothe:
|
||||
http://comments.gmane.org/gmane.comp.web.fastcgi.devel/3205
|
||||
|
||||
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
|
||||
---
|
||||
libfcgi/fcgio.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: fcgi-2.4.0/libfcgi/fcgio.cpp
|
||||
===================================================================
|
||||
--- fcgi-2.4.0.orig/libfcgi/fcgio.cpp
|
||||
+++ fcgi-2.4.0/libfcgi/fcgio.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
+#include <cstdio>
|
||||
#include <limits.h>
|
||||
#include "fcgio.h"
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Properly link libfcgi++ against libfcgi
|
||||
|
||||
We cannot directly use -lfcgi to link libfcgi++ against libfcgi,
|
||||
because libfcgi is not installed at this time. Instead, we should rely
|
||||
on libtool doing the right thing, by specifying libfcgi.la in
|
||||
libfcgi++ LIBADD variable.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/libfcgi/Makefile.am
|
||||
===================================================================
|
||||
--- a/libfcgi/Makefile.am
|
||||
+++ b/libfcgi/Makefile.am
|
||||
@@ -23,5 +23,6 @@
|
||||
$(INCLUDEDIR)/fcgio.h \
|
||||
fcgio.cpp
|
||||
libfcgi___la_CFLAGS = @PTHREAD_CFLAGS@
|
||||
-libfcgi___la_LDFLAGS = -lfcgi -rpath @libdir@
|
||||
+libfcgi___la_LIBADD = libfcgi.la
|
||||
+libfcgi___la_LDFLAGS = -rpath @libdir@
|
||||
@@ -0,0 +1,16 @@
|
||||
Link libfcgi against the math library.
|
||||
|
||||
Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
|
||||
|
||||
Index: b/libfcgi/Makefile.am
|
||||
===================================================================
|
||||
--- a/libfcgi/Makefile.am
|
||||
+++ b/libfcgi/Makefile.am
|
||||
@@ -18,6 +18,7 @@
|
||||
os_@SYSTEM@.c
|
||||
libfcgi_la_CC = @PTHREAD_CC@
|
||||
libfcgi_la_CFLAGS = @PTHREAD_CFLAGS@
|
||||
+libfcgi_la_LIBADD = -lm
|
||||
|
||||
libfcgi___la_SOURCES = $(INCLUDE_FILES) \
|
||||
$(INCLUDEDIR)/fcgio.h \
|
||||
@@ -0,0 +1,67 @@
|
||||
Make the package autoreconfigurable
|
||||
|
||||
Adjust minor details in Makefile.am and configure.in in order to make
|
||||
the package compatible with the autoconf/automake versions we are
|
||||
using in Buildroot.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/cgi-fcgi/Makefile.am
|
||||
===================================================================
|
||||
--- 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 \
|
||||
Index: b/configure.in
|
||||
===================================================================
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -4,12 +4,13 @@
|
||||
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)
|
||||
|
||||
AC_PROG_CC
|
||||
+AC_PROG_CC_C_O
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
Index: b/examples/Makefile.am
|
||||
===================================================================
|
||||
--- a/examples/Makefile.am
|
||||
+++ b/examples/Makefile.am
|
||||
@@ -11,7 +11,7 @@
|
||||
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 \
|
||||
Index: b/libfcgi/Makefile.am
|
||||
===================================================================
|
||||
--- 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 \
|
||||
@@ -0,0 +1,21 @@
|
||||
Common subdirectories: libfcgi-2.4.0.orig/cgi-fcgi and libfcgi-2.4.0/cgi-fcgi
|
||||
Common subdirectories: libfcgi-2.4.0.orig/doc and libfcgi-2.4.0/doc
|
||||
Common subdirectories: libfcgi-2.4.0.orig/examples and libfcgi-2.4.0/examples
|
||||
Common subdirectories: libfcgi-2.4.0.orig/images and libfcgi-2.4.0/images
|
||||
Common subdirectories: libfcgi-2.4.0.orig/include and libfcgi-2.4.0/include
|
||||
Common subdirectories: libfcgi-2.4.0.orig/java and libfcgi-2.4.0/java
|
||||
Common subdirectories: libfcgi-2.4.0.orig/libfcgi and libfcgi-2.4.0/libfcgi
|
||||
diff -du libfcgi-2.4.0.orig/Makefile.am libfcgi-2.4.0/Makefile.am
|
||||
--- libfcgi-2.4.0.orig/Makefile.am 2001-12-22 14:05:39.000000000 +0100
|
||||
+++ libfcgi-2.4.0/Makefile.am 2014-07-19 16:56:21.935216540 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
# $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $
|
||||
#
|
||||
|
||||
-SUBDIRS = libfcgi cgi-fcgi examples include
|
||||
+SUBDIRS = libfcgi cgi-fcgi include
|
||||
|
||||
include_HEADERS = fcgi_config.h
|
||||
|
||||
Common subdirectories: libfcgi-2.4.0.orig/perl and libfcgi-2.4.0/perl
|
||||
Common subdirectories: libfcgi-2.4.0.orig/Win32 and libfcgi-2.4.0/Win32
|
||||
@@ -0,0 +1,104 @@
|
||||
libfcgi:add security patch for CVE-2012-6687
|
||||
CVE-2012-6687 - remote attackers cause a denial of service (crash) via a large number
|
||||
of connections (http://www.cvedetails.com/cve/CVE-2012-6687/).
|
||||
Fix:use poll in os_unix.c instead of select to avoid problem with > 1024 connections.
|
||||
This patch libfcgi_2.4.0-8.3.debian.tar.xz is pulled from the below link:
|
||||
(https://launchpad.net/ubuntu/+source/libfcgi/2.4.0-8.3)
|
||||
The next release of libfcgi is 2.4.1 which may have this fix is yet to be released
|
||||
officially.
|
||||
|
||||
Signed-off-by: Anton Kortunov <toshic.toshic@gmail.com>
|
||||
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
|
||||
|
||||
Index: b/libfcgi/os_unix.c
|
||||
===================================================================
|
||||
--- a/libfcgi/os_unix.c
|
||||
+++ b/libfcgi/os_unix.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/un.h>
|
||||
#include <signal.h>
|
||||
+#include <poll.h>
|
||||
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
@@ -103,6 +104,9 @@
|
||||
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 @@
|
||||
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 @@
|
||||
|
||||
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_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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Index: b/examples/Makefile.am
|
||||
===================================================================
|
||||
--- a/examples/Makefile.am
|
||||
+++ b/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
|
||||
7
deprecated/firmware/buildroot/package/libfcgi/Config.in
Normal file
7
deprecated/firmware/buildroot/package/libfcgi/Config.in
Normal file
@@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_LIBFCGI
|
||||
bool "libfcgi"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
FCGI, a fastcgi developer library for C/C++
|
||||
|
||||
http://www.fastcgi.com/
|
||||
@@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 66fc45c6b36a21bf2fbbb68e90f780cc21a9da1fffbae75e76d2b4402d3f05b9 fcgi-2.4.0.tar.gz
|
||||
15
deprecated/firmware/buildroot/package/libfcgi/libfcgi.mk
Normal file
15
deprecated/firmware/buildroot/package/libfcgi/libfcgi.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
################################################################################
|
||||
#
|
||||
# libfcgi
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBFCGI_VERSION = 2.4.0
|
||||
LIBFCGI_SOURCE = fcgi-$(LIBFCGI_VERSION).tar.gz
|
||||
LIBFCGI_SITE = http://www.fastcgi.com/dist
|
||||
LIBFCGI_LICENSE = fcgi license
|
||||
LIBFCGI_LICENSE_FILES = LICENSE.TERMS
|
||||
LIBFCGI_INSTALL_STAGING = YES
|
||||
LIBFCGI_AUTORECONF = YES
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user