24688963 Upgrade lighttpd to version 1.4.41
authorPetr Sumbera <petr.sumbera@oracle.com>
Mon, 19 Sep 2016 05:51:20 -0700
changeset 7006 eb24eb49f7c4
parent 7005 6bae9701e86a
child 7007 8aba3abf65e1
24688963 Upgrade lighttpd to version 1.4.41 24688996 problem in UTILITY/LIGHTTPD
components/lighttpd/Makefile
components/lighttpd/patches/01-drop_privileges.patch
components/lighttpd/patches/02-sslv3-disable.patch
components/lighttpd/patches/03-lighttpd.conf.patch
components/lighttpd/patches/04-manpage.patch
components/lighttpd/patches/05-network-nodelay.patch
components/lighttpd/patches/06-fix_lua.patch
components/lighttpd/patches/Bug2752.patch
components/lighttpd/patches/studio.patch
components/lighttpd/patches/tests-perlver.patch
components/lighttpd/test/results-64.master
--- a/components/lighttpd/Makefile	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/Makefile	Mon Sep 19 05:51:20 2016 -0700
@@ -26,13 +26,13 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		lighttpd
-COMPONENT_VERSION=	1.4.39
+COMPONENT_VERSION=	1.4.41
 COMPONENT_PROJECT_URL=	http://www.lighttpd.net/
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:bc5f910f78b8cbae3e8fe1a1d8558259f09dbe50dd3907db771404bfab27bb2e
+    sha256:8a5749e218237fafc3119dd8a4fcf510ea728728b3fcf1193fcad7209be4b6d7
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
 
-TPNO=			27512
+TPNO=			31753
 
 LIGHTTPD_INSTALLDIR=$(USRDIR)/lighttpd/1.4
 
@@ -58,17 +58,17 @@
 CONFIGURE_OPTIONS +=	--with-openssl
 CONFIGURE_OPTIONS +=	--with-pcre
 CONFIGURE_OPTIONS +=	--with-ldap
-CONFIGURE_OPTIONS +=	--with-mysql=$(USRDIR)/mysql/5.5/bin/mysql_config
+CONFIGURE_OPTIONS +=	--with-mysql=$(USRDIR)/mysql/5.7/bin/mysql_config
 CONFIGURE_OPTIONS +=    PCRECONFIG="$(USRBINDIR64)/pcre-config"
 
 COMPONENT_TEST_TRANSFORMS += \
-	'-e "s/[0-9][0-9]* wallclock secs (.*CPU)$$/<TIMINGS REMOVED>/" ' \
+	'-e "s/, *[0-9][0-9]* wallclock secs (.*CPU)$$/, <TIMINGS REMOVED>/" ' \
 	'-e "/^preparing infrastructure/,/make\[4\]: Leaving directory/p" ' \
 	'-e "/.*/d" '
 
 REQUIRED_PACKAGES += compress/bzip2
-REQUIRED_PACKAGES += database/mysql-55
-REQUIRED_PACKAGES += database/mysql-55/library
+REQUIRED_PACKAGES += database/mysql-57
+REQUIRED_PACKAGES += database/mysql-57/library
 REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/pcre
 REQUIRED_PACKAGES += library/security/openssl
--- a/components/lighttpd/patches/01-drop_privileges.patch	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/patches/01-drop_privileges.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -6,7 +6,7 @@
 
 --- src/network.c
 +++ src/network.c
-@@ -21,6 +21,8 @@
+@@ -23,6 +23,8 @@
  #include <stdlib.h>
  #include <assert.h>
  
@@ -15,7 +15,7 @@
  #ifdef USE_OPENSSL
  # include <openssl/ssl.h>
  # include <openssl/err.h>
-@@ -615,6 +617,8 @@
+@@ -677,6 +679,8 @@
  	size_t i, j;
  	network_backend_t backend;
  
@@ -24,7 +24,7 @@
  #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
  #ifndef OPENSSL_NO_ECDH
  	EC_KEY *ecdh;
-@@ -1005,6 +1009,16 @@
+@@ -1082,6 +1086,16 @@
  		}
  	}
  
--- a/components/lighttpd/patches/02-sslv3-disable.patch	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/patches/02-sslv3-disable.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -5,12 +5,12 @@
 
 --- src/network.c
 +++ src/network.c
-@@ -780,7 +780,7 @@
+@@ -845,7 +845,7 @@
  			}
  		}
  
 -		if (!s->ssl_use_sslv3) {
 +		if (1) {
  			/* disable SSLv3 */
- 			if (!(SSL_OP_NO_SSLv3 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv3))) {
+ 			if ((SSL_OP_NO_SSLv3 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv3)) != SSL_OP_NO_SSLv3) {
  				log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
--- a/components/lighttpd/patches/03-lighttpd.conf.patch	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/patches/03-lighttpd.conf.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -67,7 +67,7 @@
  
  ##
  ## The basic network interface for all platforms at the syscalls read()
-@@ -296,7 +296,7 @@
+@@ -325,7 +325,7 @@
  ##                                 "index.htm", "default.htm" )
  ##
  index-file.names += (
@@ -76,7 +76,7 @@
  )
  
  ##
-@@ -345,7 +345,7 @@
+@@ -380,7 +380,7 @@
  ## Format: <errorfile-prefix><status-code>.html
  ## -> ..../status-404.html for 'File not found'
  ##
--- a/components/lighttpd/patches/04-manpage.patch	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/patches/04-manpage.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -2,9 +2,9 @@
 Solaris specific: manpage update to reflect Solaris specific
 configuration.
 
---- doc/lighttpd.8-orig	Mon Mar 30 15:16:59 2009
-+++ doc/lighttpd.8	Mon Jun 20 08:03:16 2011
-@@ -47,10 +47,10 @@
+--- doc/lighttpd.8
++++ doc/lighttpd.8
+@@ -56,10 +56,10 @@
  .
  .SH FILES
  .TP 8
--- a/components/lighttpd/patches/05-network-nodelay.patch	Tue Sep 20 00:25:26 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-Developed in-house reflecting community issue.
-http://redmine.lighttpd.net/issues/1239
-Solaris-specific, currently ignored by community.
-
---- src/network.c	2013-11-05 09:41:41.841723296 -0800
-+++ src/network.c	2013-11-05 09:40:25.359053258 -0800
-@@ -274,6 +274,10 @@
- 		log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt(SO_REUSEADDR) failed:", strerror(errno));
- 		goto error_free_socket;
- 	}
-+        if (setsockopt(srv_socket->fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)) < 0) {
-+                log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt(TCP_NODELAY) failed:", strerror(errno));
-+                goto error_free_socket;
-+        }
- 
- 	switch(srv_socket->addr.plain.sa_family) {
- #ifdef HAVE_IPV6
--- a/components/lighttpd/patches/06-fix_lua.patch	Tue Sep 20 00:25:26 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-Developed in-house, fed to community. Developed in order to
-reflect community issue.
-http://redmine.lighttpd.net/issues/2421
-Awaiting accept.
-
---- src/mod_cml_lua.c.orig	2012-10-22 06:17:17.418886286 -0700
-+++ src/mod_cml_lua.c	2012-10-22 06:25:50.289753316 -0700
-@@ -28,6 +28,10 @@
- #include <lualib.h>
- #include <lauxlib.h>
- 
-+#if LUA_VERSION_NUM >= 502
-+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
-+#endif
-+
- typedef struct {
- 	stream st;
- 	int done;
-@@ -291,7 +291,11 @@
- 	lua_settable(L, LUA_GLOBALSINDEX);
- 
- 	/* load lua program */
-+#if LUA_VERSION_NUM >= 502
-+	if (lua_load(L, load_file, &rm, fn->ptr, NULL) || lua_pcall(L,0,1,0)) {
-+#else
- 	if (lua_load(L, load_file, &rm, fn->ptr) || lua_pcall(L,0,1,0)) {
-+#endif
- 		log_error_write(srv, __FILE__, __LINE__, "s",
- 				lua_tostring(L,-1));
-
---- src/mod_magnet.c	2011-06-13 04:17:01.000000000 -0700
-+++ src/mod_magnet.c2	2013-10-01 06:39:18.771549986 -0700
-@@ -24,6 +24,10 @@
- #define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to"
- #define MAGNET_RESTART_REQUEST      99
- 
-+#if LUA_VERSION_NUM >= 502
-+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX
-+#endif
-+
- /* plugin config for all request/connections */
- 
- static jmp_buf exceptionjmp;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/lighttpd/patches/Bug2752.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -0,0 +1,16 @@
+Patch origin: in-house
+Patch status: submitted upstream
+
+https://redmine.lighttpd.net/issues/2752
+
+--- src/Makefile.in
++++ src/Makefile.in
+@@ -585,7 +585,7 @@
+ test_buffer_DEPENDENCIES = $(am__DEPENDENCIES_1)
+ am_test_configfile_OBJECTS = test_configfile.$(OBJEXT) \
+ 	buffer.$(OBJEXT) array.$(OBJEXT) data_string.$(OBJEXT) \
+-	keyvalue.$(OBJEXT) log.$(OBJEXT)
++	keyvalue.$(OBJEXT) log.$(OBJEXT) vector.$(OBJEXT)
+ test_configfile_OBJECTS = $(am_test_configfile_OBJECTS)
+ test_configfile_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/lighttpd/patches/studio.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -0,0 +1,31 @@
+Patch origin: in-house
+Patch status: not suitable for upstream
+
+Solaris Studio will report: non-constant initializer: op "?"
+gcc seems to be fine with it.
+
+The change which triggered this issue was change from:
+"struct {" to "static const struct {" .
+
+Compiler bug: 24681821
+
+--- src/configparser.y
++++ src/configparser.y
+@@ -470,6 +470,8 @@
+         char *comp_key;
+         size_t len;
+       } comps[] = {
++#undef  CONST_STR_LEN
++#define CONST_STR_LEN(x) x, sizeof(x) - 1
+         { COMP_SERVER_SOCKET,      CONST_STR_LEN("SERVER[\"socket\"]"   ) },
+         { COMP_HTTP_URL,           CONST_STR_LEN("HTTP[\"url\"]"        ) },
+         { COMP_HTTP_HOST,          CONST_STR_LEN("HTTP[\"host\"]"       ) },
+@@ -484,6 +486,8 @@
+         { COMP_HTTP_QUERY_STRING,  CONST_STR_LEN("HTTP[\"query-string\"]") },
+         { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
+         { COMP_HTTP_SCHEME,        CONST_STR_LEN("HTTP[\"scheme\"]"     ) },
++#undef  CONST_STR_LEN
++#define CONST_STR_LEN(x) x, (x) ? sizeof(x) - 1 : 0
+         { COMP_UNSET, NULL, 0 },
+       };
+       size_t i;
--- a/components/lighttpd/patches/tests-perlver.patch	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/patches/tests-perlver.patch	Mon Sep 19 05:51:20 2016 -0700
@@ -6,7 +6,7 @@
 
 --- tests/Makefile.in
 +++ tests/Makefile.in
-@@ -449,7 +449,7 @@
+@@ -444,7 +444,7 @@
  	var-include-sub.conf \
  	var-include.conf
  
--- a/components/lighttpd/test/results-64.master	Tue Sep 20 00:25:26 2016 -0700
+++ b/components/lighttpd/test/results-64.master	Mon Sep 19 05:51:20 2016 -0700
@@ -4,37 +4,7 @@
 # 
 # status failed: expected '304', got '200'
 $(SOURCE_DIR)/tests/cachable.t .......... ok
-# 
-# body failed: expected 'found here
-# ', got ''
-
-#   Failed test '404 handler => dynamic(200)'
-#   at $(SOURCE_DIR)/tests/core-404-handler.t line 45.
-# 
-# status failed: expected '302', got '200'
-
-#   Failed test '404 handler => dynamic(302)'
-#   at $(SOURCE_DIR)/tests/core-404-handler.t line 52.
-# 
-# status failed: expected '404', got '200'
-
-#   Failed test '404 handler => dynamic(404)'
-#   at $(SOURCE_DIR)/tests/core-404-handler.t line 59.
-# 
-# body failed: expected 'found here
-# ', got ''
-
-#   Failed test '404 handler => dynamic(nostatus)'
-#   at $(SOURCE_DIR)/tests/core-404-handler.t line 66.
-# 
-# status failed: expected '404', got '200'
-
-#   Failed test '404 generated by CGI should stay 404'
-#   at $(SOURCE_DIR)/tests/core-404-handler.t line 73.
-# Looks like you failed 5 tests of 8.
-$(SOURCE_DIR)/tests/core-404-handler.t .. 
-Dubious, test returned 5 (wstat 1280, 0x500)
-Failed 5/8 subtests 
+$(SOURCE_DIR)/tests/core-404-handler.t .. ok
 $(SOURCE_DIR)/tests/core-condition.t .... ok
 $(SOURCE_DIR)/tests/core-keepalive.t .... ok
 $(SOURCE_DIR)/tests/core-request.t ...... ok
@@ -58,21 +28,12 @@
 $(SOURCE_DIR)/tests/mod-userdir.t ....... ok
 $(SOURCE_DIR)/tests/request.t ........... ok
 $(SOURCE_DIR)/tests/symlink.t ........... ok
-
-Test Summary Report
--------------------
-$(SOURCE_DIR)/tests/core-404-handler.t (Wstat: 1280 Tests: 8 Failed: 5)
-  Failed tests:  3-7
-  Non-zero exit status: 5
-Files=25, Tests=396, <TIMINGS REMOVED>
-Result: FAIL
-Failed 1/25 test programs. 5/396 subtests failed.
-FAIL: run-tests.pl
+All tests successful.
+Files=25, Tests=401, <TIMINGS REMOVED>
+Result: PASS
+PASS: run-tests.pl
 cleaning up                             PASS: cleanup.sh
-=====================================
-1 of 3 tests failed
-Please report to [email protected]
-=====================================
-Makefile:651: recipe for target 'check-TESTS' failed
-make[4]: *** [check-TESTS] Error 1
+==================
+All 3 tests passed
+==================
 make[4]: Leaving directory '$(@D)/tests'