diff options
author | mm <mm@FreeBSD.org> | 2010-08-04 03:09:15 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2010-08-04 03:09:15 +0800 |
commit | 51a743b8a2cb9b4223305bf787829d4ce46d3bd5 (patch) | |
tree | eda9be47c271233319f3f1cb52c07df3b7d98863 /www/lighttpd | |
parent | 488ba52353e309558a76b19c799e3e7f0939cd1c (diff) | |
download | freebsd-ports-graphics-51a743b8a2cb9b4223305bf787829d4ce46d3bd5.tar.gz freebsd-ports-graphics-51a743b8a2cb9b4223305bf787829d4ce46d3bd5.tar.zst freebsd-ports-graphics-51a743b8a2cb9b4223305bf787829d4ce46d3bd5.zip |
Fix stalls while reading from ssl sockets [1]
Fix reload signal in rc script [2]
Fix use of IPv6 adresses in mod_extforward [3]
Add optional support for mod_geoip [4]
Move pkg-config to BUILD_DEPENDS
References:
http://redmine.lighttpd.net/issues/2197 [1]
http://redmine.lighttpd.net/issues/1889 [3]
http://redmine.lighttpd.net/wiki/1/Docs:ModGeoip [4]
PR: ports/145749 [1], ports/148869 [2], ports/144110 [3], ports/137664 [4]
Diffstat (limited to 'www/lighttpd')
-rw-r--r-- | www/lighttpd/Makefile | 23 | ||||
-rw-r--r-- | www/lighttpd/distinfo | 3 | ||||
-rw-r--r-- | www/lighttpd/files/lighttpd.sh.in | 2 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-connections.c | 47 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-mod_extforward.c | 19 | ||||
-rw-r--r-- | www/lighttpd/pkg-plist | 3 |
6 files changed, 91 insertions, 6 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile index d35879625c0..b3edb959aab 100644 --- a/www/lighttpd/Makefile +++ b/www/lighttpd/Makefile @@ -7,19 +7,20 @@ PORTNAME= lighttpd PORTVERSION= 1.4.26 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MASTER_SITES= http://download.lighttpd.net/lighttpd/releases-1.4.x/ MAINTAINER= mm@FreeBSD.org COMMENT= A secure, fast, compliant, and very flexible Web Server +BUILD_DEPENDS= pkg-config:${PORTSDIR}/devel/pkg-config LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre USE_BZIP2= yes USE_AUTOTOOLS= libtool:22 GNU_CONFIGURE= yes -USE_GNOME= lthack pkgconfig +USE_GNOME= lthack USE_RC_SUBR= lighttpd.sh CONFIGURE_ARGS= --libdir=${PREFIX}/lib/lighttpd --enable-static @@ -32,6 +33,7 @@ OPTIONS= BZIP2 "Enable Bzip2 support" off \ CML "Enable Cache Meta Language support" off \ FAM "Enable fam/gamin support" off \ GDBM "Enable gdbm storage support" off \ + GEOIP "Enable GeoIP support" off \ H264 "Enable H.264 streaming" off \ IPV6 "Enable IPV6 support" on \ MAGNET "Enable magnet support" off \ @@ -53,19 +55,30 @@ PORTDOCS= AUTHORS COPYING INSTALL NEWS README # Default REQUIRE to rc.d script _REQUIRE= DAEMON -.if defined(WITH_H264) +.if defined(WITH_H264) || defined(WITH_GEOIP) PATCH_SITES+= ${MASTER_SITE_LOCAL} PATCH_SITE_SUBDIR+= mm -PATCHFILES+= lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz USE_AUTOTOOLS+= autoconf:262 autoheader:262 aclocal:110 automake:110 ACLOCAL_ARGS+= -I m4 +.endif + +.if defined(WITH_H264) +PATCHFILES+= lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz PORTDOCS+= COPYING_H264 -MANUAL_PACKAGE_BUILD= free for non-commercial use only +#MANUAL_PACKAGE_BUILD= free for non-commercial use only PLIST_SUB+= H264="" .else PLIST_SUB+= H264="@comment " .endif +.if defined(WITH_GEOIP) +PATCHFILES+= lighttpd-1.4.26_mod_geoip.patch.gz +LIB_DEPENDS+= GeoIP.5:${PORTSDIR}/net/GeoIP +PLIST_SUB+= GEOIP="" +.else +PLIST_SUB+= GEOIP="@comment " +.endif + .if !defined(WITHOUT_OPENSSL) .include "${PORTSDIR}/Mk/bsd.openssl.mk" CONFIGURE_ARGS+= --with-openssl \ diff --git a/www/lighttpd/distinfo b/www/lighttpd/distinfo index c816dd7aa06..cb22d99ab1c 100644 --- a/www/lighttpd/distinfo +++ b/www/lighttpd/distinfo @@ -4,3 +4,6 @@ SIZE (lighttpd-1.4.26.tar.bz2) = 627971 MD5 (lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz) = 633af734ed50d42b743ab70724058951 SHA256 (lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz) = d7c3704d5253c4f3c18459f89059063b311e50096cd2c38fc982cec683c32e61 SIZE (lighttpd-1.4.26_mod_h264_streaming-2.2.9.patch.gz) = 44695 +MD5 (lighttpd-1.4.26_mod_geoip.patch.gz) = b2971dc204fe6f0be1fdd695ae53078d +SHA256 (lighttpd-1.4.26_mod_geoip.patch.gz) = db43cc0ed7c808b5eed3185d97346e70dea0f1ef4fa9ed436d08e4faff7f97e7 +SIZE (lighttpd-1.4.26_mod_geoip.patch.gz) = 3267 diff --git a/www/lighttpd/files/lighttpd.sh.in b/www/lighttpd/files/lighttpd.sh.in index 3437aafe36f..dca9319f510 100644 --- a/www/lighttpd/files/lighttpd.sh.in +++ b/www/lighttpd/files/lighttpd.sh.in @@ -35,7 +35,7 @@ stop_postcmd=stop_postcmd restart_precmd="checkconfig" reload_precmd=reload_precmd reload_postcmd=reload_postcmd -sig_reload="-INT" +sig_reload="INT" check_cmd="checkconfig" extra_commands="reload check" diff --git a/www/lighttpd/files/patch-src-connections.c b/www/lighttpd/files/patch-src-connections.c new file mode 100644 index 00000000000..96cf9698fc7 --- /dev/null +++ b/www/lighttpd/files/patch-src-connections.c @@ -0,0 +1,47 @@ +--- src/connections.c.orig ++++ src/connections.c +@@ -310,6 +310,8 @@ static int connection_handle_read_ssl(server *srv, connection *con) { + /* the other end close the connection -> KEEP-ALIVE */ + + return -2; ++ } else { ++ joblist_append(srv, con); + } + + return 0; +@@ -320,6 +322,7 @@ static int connection_handle_read_ssl(server *srv, connection *con) { + #endif + } + ++/* 0: everything ok, -1: error, -2: con closed */ + static int connection_handle_read(server *srv, connection *con) { + int len; + buffer *b; +@@ -1180,15 +1183,20 @@ static handler_t connection_handle_fdevent(void *s, void *context, int revents) + + joblist_append(srv, con); + +- if (revents & FDEVENT_IN) { +- con->is_readable = 1; +-#if 0 +- log_error_write(srv, __FILE__, __LINE__, "sd", "read-wait - done", con->fd); +-#endif +- } +- if (revents & FDEVENT_OUT) { +- con->is_writable = 1; +- /* we don't need the event twice */ ++ if (con->conf.is_ssl) { ++ /* ssl may read and write for both reads and writes */ ++ if (revents & (FDEVENT_IN | FDEVENT_OUT)) { ++ con->is_readable = 1; ++ con->is_writable = 1; ++ } ++ } else { ++ if (revents & FDEVENT_IN) { ++ con->is_readable = 1; ++ } ++ if (revents & FDEVENT_OUT) { ++ con->is_writable = 1; ++ /* we don't need the event twice */ ++ } + } diff --git a/www/lighttpd/files/patch-src-mod_extforward.c b/www/lighttpd/files/patch-src-mod_extforward.c new file mode 100644 index 00000000000..398f53fbdc0 --- /dev/null +++ b/www/lighttpd/files/patch-src-mod_extforward.c @@ -0,0 +1,19 @@ +--- src/mod_extforward.c.orig 2010-02-19 11:34:37.000000000 +0100 ++++ src/mod_extforward.c 2010-02-19 11:40:02.000000000 +0100 +@@ -240,14 +240,14 @@ static array *extract_forward_array(buff + int in_str = 0; + for (base = pbuffer->ptr, curr = pbuffer->ptr; *curr; curr++) { + if (in_str) { +- if ((*curr > '9' || *curr < '0') && *curr != '.' && *curr != ':') { ++ if ((*curr < '0' || *curr > '9') && *curr != '.' && *curr != ':' && (*curr < 'a' || *curr > 'f') && (*curr < 'A' || *curr > 'F')) { + /* found an separator , insert value into result array */ + put_string_into_array_len(result, base, curr - base); + /* change state to not in string */ + in_str = 0; + } + } else { +- if (*curr >= '0' && *curr <= '9') { ++ if ((*curr >= '0' && *curr <= '9') || (*curr >= 'a' && *curr <= 'f') || (*curr >= 'A' && *curr <= 'F')) { + /* found leading char of an IP address, move base pointer and change state */ + base = curr; + in_str = 1; diff --git a/www/lighttpd/pkg-plist b/www/lighttpd/pkg-plist index e0686c0c44f..9d3667a41f6 100644 --- a/www/lighttpd/pkg-plist +++ b/www/lighttpd/pkg-plist @@ -44,6 +44,9 @@ lib/lighttpd/mod_fastcgi.so lib/lighttpd/mod_flv_streaming.a lib/lighttpd/mod_flv_streaming.la lib/lighttpd/mod_flv_streaming.so +%%GEOIP%%lib/lighttpd/mod_geoip.a +%%GEOIP%%lib/lighttpd/mod_geoip.la +%%GEOIP%%lib/lighttpd/mod_geoip.so %%H264%%lib/lighttpd/mod_h264_streaming.a %%H264%%lib/lighttpd/mod_h264_streaming.la %%H264%%lib/lighttpd/mod_h264_streaming.so |