diff options
author | Martin Matuska <mm@FreeBSD.org> | 2012-03-19 09:18:13 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2012-03-19 09:18:13 +0000 |
commit | 3478ae5e153c896bf8dc4ea2dcb8653feb9b30b5 (patch) | |
tree | e0411ae2e17c7a859e0421a3f814c68fa487fbb8 | |
parent | 0ee1cbc21627d869056078b8e4e8560f498030ca (diff) | |
download | ports-3478ae5e153c896bf8dc4ea2dcb8653feb9b30b5.tar.gz ports-3478ae5e153c896bf8dc4ea2dcb8653feb9b30b5.zip |
Notes
-rw-r--r-- | www/lighttpd/Makefile | 2 | ||||
-rw-r--r-- | www/lighttpd/files/patch-src-server.c | 19 | ||||
-rw-r--r-- | www/lighttpd/files/patch-svn-2822 (renamed from www/lighttpd/files/patch-src-connections.c) | 0 | ||||
-rw-r--r-- | www/lighttpd/files/patch-svn-2824 | 44 | ||||
-rw-r--r-- | www/lighttpd/files/patch-svn-2825 | 19 | ||||
-rw-r--r-- | www/lighttpd/files/patch-svn-2826-2827 | 138 |
6 files changed, 202 insertions, 20 deletions
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile index b23029c41d52..7828d7107012 100644 --- a/www/lighttpd/Makefile +++ b/www/lighttpd/Makefile @@ -7,7 +7,7 @@ PORTNAME?= lighttpd PORTVERSION= 1.4.30 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES?= www MASTER_SITES?= http://download.lighttpd.net/lighttpd/releases-1.4.x/ diff --git a/www/lighttpd/files/patch-src-server.c b/www/lighttpd/files/patch-src-server.c deleted file mode 100644 index 458b4ec5b10b..000000000000 --- a/www/lighttpd/files/patch-src-server.c +++ /dev/null @@ -1,19 +0,0 @@ ---- src/server.c.orig 2011-12-24 01:18:53.093922971 +0100 -+++ src/server.c 2011-12-24 01:18:56.738921103 +0100 -@@ -411,7 +411,7 @@ - "\nNetwork handler:\n\n" - #if defined(USE_LINUX_SENDFILE) || defined(USE_FREEBSD_SENDFILE) || defined(USE_SOLARIS_SENDFILEV) || defined(USE_AIX_SENDFILE) - "\t+ sendfile\n" --#else -+#endif - #ifdef USE_WRITEV - "\t+ writev\n" - #else -@@ -422,7 +422,6 @@ - #else - "\t- mmap support\n" - #endif --#endif - "\nFeatures:\n\n" - #ifdef HAVE_IPV6 - "\t+ IPv6 support\n" diff --git a/www/lighttpd/files/patch-src-connections.c b/www/lighttpd/files/patch-svn-2822 index 97f25856c51f..97f25856c51f 100644 --- a/www/lighttpd/files/patch-src-connections.c +++ b/www/lighttpd/files/patch-svn-2822 diff --git a/www/lighttpd/files/patch-svn-2824 b/www/lighttpd/files/patch-svn-2824 new file mode 100644 index 000000000000..cb91bfff392f --- /dev/null +++ b/www/lighttpd/files/patch-svn-2824 @@ -0,0 +1,44 @@ +Index: src/server.c +=================================================================== +--- src/server.c (revision 2823) ++++ src/server.c (revision 2824) +@@ -409,19 +409,31 @@ + "\t- libev (generic)\n" + #endif + "\nNetwork handler:\n\n" +-#if defined(USE_LINUX_SENDFILE) || defined(USE_FREEBSD_SENDFILE) || defined(USE_SOLARIS_SENDFILEV) || defined(USE_AIX_SENDFILE) +- "\t+ sendfile\n" ++#if defined USE_LINUX_SENDFILE ++ "\t+ linux-sendfile\n" + #else +- #ifdef USE_WRITEV ++ "\t- linux-sendfile\n" ++#endif ++#if defined USE_FREEBSD_SENDFILE ++ "\t+ freebsd-sendfile\n" ++#else ++ "\t- freebsd-sendfile\n" ++#endif ++#if defined USE_SOLARIS_SENDFILEV ++ "\t+ solaris-sendfilev\n" ++#else ++ "\t- solaris-sendfilev\n" ++#endif ++#if defined USE_WRITEV + "\t+ writev\n" +- #else ++#else ++ "\t- writev\n" ++#endif + "\t+ write\n" +- #endif +- #ifdef USE_MMAP ++#ifdef USE_MMAP + "\t+ mmap support\n" +- #else ++#else + "\t- mmap support\n" +- #endif + #endif + "\nFeatures:\n\n" + #ifdef HAVE_IPV6 diff --git a/www/lighttpd/files/patch-svn-2825 b/www/lighttpd/files/patch-svn-2825 new file mode 100644 index 000000000000..71e2fe443d32 --- /dev/null +++ b/www/lighttpd/files/patch-svn-2825 @@ -0,0 +1,19 @@ +Index: src/network.c +=================================================================== +--- src/network.c (revision 2824) ++++ src/network.c (revision 2825) +@@ -25,6 +25,14 @@ + # include <openssl/ssl.h> + # include <openssl/err.h> + # include <openssl/rand.h> ++# include <openssl/dh.h> ++# include <openssl/bn.h> ++ ++# if OPENSSL_VERSION_NUMBER >= 0x0090800fL ++# ifndef OPENSSL_NO_ECDH ++# include <openssl/ecdh.h> ++# endif ++# endif + #endif + + #ifdef USE_OPENSSL diff --git a/www/lighttpd/files/patch-svn-2826-2827 b/www/lighttpd/files/patch-svn-2826-2827 new file mode 100644 index 000000000000..e5ce5e0a8f83 --- /dev/null +++ b/www/lighttpd/files/patch-svn-2826-2827 @@ -0,0 +1,138 @@ +Index: src/network_backends.h +=================================================================== +--- src/network_backends.h (revision 2825) ++++ src/network_backends.h (revision 2827) +@@ -31,7 +31,7 @@ + # include <sys/uio.h> + #endif + +-#if defined HAVE_SYS_MMAN_H && defined HAVE_MMAP ++#if defined HAVE_SYS_MMAN_H && defined HAVE_MMAP && defined ENABLE_MMAP + # define USE_MMAP + # include <sys/mman.h> + /* NetBSD 1.3.x needs it */ +Index: src/mod_compress.c +=================================================================== +--- src/mod_compress.c (revision 2825) ++++ src/mod_compress.c (revision 2827) +@@ -485,7 +485,7 @@ + return -1; + } + +- ++#ifdef USE_MMAP + if (MAP_FAILED == (start = mmap(NULL, sce->st.st_size, PROT_READ, MAP_SHARED, ifd, 0))) { + log_error_write(srv, __FILE__, __LINE__, "sbss", "mmaping", fn, "failed", strerror(errno)); + +@@ -499,7 +499,24 @@ + + return -1; + } ++#else ++ start = malloc(sce->st.st_size); ++ if (NULL == start || sce->st.st_size != read(ifd, start, sce->st.st_size)) { ++ log_error_write(srv, __FILE__, __LINE__, "sbss", "reading", fn, "failed", strerror(errno)); + ++ close(ofd); ++ close(ifd); ++ free(start); ++ ++ /* Remove the incomplete cache file, so that later hits aren't served from it */ ++ if (-1 == unlink(p->ofn->ptr)) { ++ log_error_write(srv, __FILE__, __LINE__, "sbss", "unlinking incomplete cachefile", p->ofn, "failed:", strerror(errno)); ++ } ++ ++ return -1; ++ } ++#endif ++ + switch(type) { + #ifdef USE_ZLIB + case HTTP_ACCEPT_ENCODING_GZIP: +@@ -530,7 +547,12 @@ + } + } + ++#ifdef USE_MMAP + munmap(start, sce->st.st_size); ++#else ++ free(start); ++#endif ++ + close(ofd); + close(ifd); + +@@ -571,14 +593,24 @@ + return -1; + } + +- ++#ifdef USE_MMAP + if (MAP_FAILED == (start = mmap(NULL, sce->st.st_size, PROT_READ, MAP_SHARED, ifd, 0))) { + log_error_write(srv, __FILE__, __LINE__, "sbss", "mmaping", fn, "failed", strerror(errno)); + + close(ifd); + return -1; + } ++#else ++ start = malloc(sce->st.st_size); ++ if (NULL == start || sce->st.st_size != read(ifd, start, sce->st.st_size)) { ++ log_error_write(srv, __FILE__, __LINE__, "sbss", "reading", fn, "failed", strerror(errno)); + ++ close(ifd); ++ free(start); ++ return -1; ++ } ++#endif ++ + switch(type) { + #ifdef USE_ZLIB + case HTTP_ACCEPT_ENCODING_GZIP: +@@ -598,7 +630,11 @@ + break; + } + ++#ifdef USE_MMAP + munmap(start, sce->st.st_size); ++#else ++ free(start); ++#endif + close(ifd); + + if (ret != 0) return -1; +@@ -826,7 +862,7 @@ + } + response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type)); + /* let mod_staticfile handle the cached compressed files, physical path was modified */ +- return p->conf.compress_cache_dir->used ? HANDLER_GO_ON : HANDLER_FINISHED; ++ return (use_etag && p->conf.compress_cache_dir->used) ? HANDLER_GO_ON : HANDLER_FINISHED; + } + } + } +Index: configure.ac +=================================================================== +--- configure.ac (revision 2825) ++++ configure.ac (revision 2827) +@@ -569,7 +569,22 @@ + fi + fi + ++# disable mmap by default; if a mmapped file gets truncated, the process gets a SIGBUS signal ++# on reading the truncated area which we can't handle (yet). ++# lighttpd may always use mmap with files it owns (created tmp files) ++AC_ARG_ENABLE(mmap, ++ AC_HELP_STRING([--enable-mmap],[use mmap if available (DANGEROUS, allows local users to trigger SIGBUS crashes)]), ++ [case "${enableval}" in ++ yes) mmap=true ;; ++ no) mmap=false ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-mmap) ;; ++ esac],[mmap=false]) + ++if teest x$mmap = xtrue; then ++ AC_DEFINE(ENABLE_MMAP, [1], [Use mmap if available]) ++fi ++ ++ + AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes) + + dnl check for fastcgi lib, for the tests only |