From ff1e7d9a6c18ff967e887115f1ecfe798f7f4824 Mon Sep 17 00:00:00 2001 From: osa Date: Fri, 21 Dec 2018 00:09:17 +0000 Subject: Upgrade from 1.6 to 1.7. *) Change: now rpath is set in Ruby module only if the library was not found in default search paths; this allows to meet packaging restrictions on some systems. *) Bugfix: "disable_functions" and "disable_classes" PHP options set via Control API did not work. *) Bugfix: Promises on request data in Node.js were not triggered. *) Bugfix: various compatibility issues with Node.js applications. *) Bugfix: a segmentation fault occurred in Node.js module if application tried to read request body after request.end() was called. *) Bugfix: a segmentation fault occurred in Node.js module if application attempted to send header twice. *) Bugfix: names of response header fields in Node.js module were erroneously treated as case-sensitive. *) Bugfix: uncatched exceptions in Node.js were not logged. *) Bugfix: global install of Node.js module from sources was broken on some systems; the bug had appeared in 1.6. *) Bugfix: traceback for exceptions during initialization of Python applications might not be logged. *) Bugfix: PHP module build failed if PHP interpreter was built with thread safety enabled. --- www/unit/Makefile | 5 +- www/unit/distinfo | 6 +-- www/unit/files/php_zts.patch | 109 ------------------------------------------- 3 files changed, 4 insertions(+), 116 deletions(-) delete mode 100644 www/unit/files/php_zts.patch (limited to 'www') diff --git a/www/unit/Makefile b/www/unit/Makefile index c6d98ae162e7..baf63d904538 100644 --- a/www/unit/Makefile +++ b/www/unit/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= unit -PORTVERSION= 1.6 -PORTREVISION= 2 +PORTVERSION= 1.7 CATEGORIES= www MASTER_SITES= https://unit.nginx.org/download/ @@ -13,8 +12,6 @@ COMMENT?= Dynamic web application server LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -EXTRA_PATCHES= ${FILESDIR}/php_zts.patch:-p1 - USES+= compiler:c11 cpe CPE_VENDOR= nginx diff --git a/www/unit/distinfo b/www/unit/distinfo index dd7c05fb3b1b..7a506574a153 100644 --- a/www/unit/distinfo +++ b/www/unit/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1542315914 -SHA256 (unit-1.6.tar.gz) = 24d0de255d1be0ef6420eb03fe086e02d858bd7d17c57dd803bbb2f96f2f9a53 -SIZE (unit-1.6.tar.gz) = 439244 +TIMESTAMP = 1545350776 +SHA256 (unit-1.7.tar.gz) = f2a5c13c078423c295f9c194b003a1c96151dcd55d0a71c59186e13ee221fab8 +SIZE (unit-1.7.tar.gz) = 445144 diff --git a/www/unit/files/php_zts.patch b/www/unit/files/php_zts.patch deleted file mode 100644 index 6aa935887265..000000000000 --- a/www/unit/files/php_zts.patch +++ /dev/null @@ -1,109 +0,0 @@ -# HG changeset patch -# User Valentin Bartenev -# Date 1542651747 -10800 -# Mon Nov 19 21:22:27 2018 +0300 -# Node ID ea6d58aea6f59d23c53f90c98d29424aa635aed0 -# Parent cb3595d839665885cc83c6a20c84ae4ee1e0b5da -PHP: fixed compatibility with ZTS. - -This closes #184 issue on GitHub. - -diff -r cb3595d83966 -r ea6d58aea6f5 auto/modules/php ---- a/auto/modules/php Thu Nov 15 21:50:00 2018 +0300 -+++ b/auto/modules/php Mon Nov 19 21:22:27 2018 +0300 -@@ -111,7 +111,7 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --versi - #include - - int main() { -- php_request_startup(); -+ php_module_startup(NULL, NULL, 0); - return 0; - }" - -diff -r cb3595d83966 -r ea6d58aea6f5 src/nxt_php_sapi.c ---- a/src/nxt_php_sapi.c Thu Nov 15 21:50:00 2018 +0300 -+++ b/src/nxt_php_sapi.c Mon Nov 19 21:22:27 2018 +0300 -@@ -45,19 +45,19 @@ static void nxt_php_set_options(nxt_task - int type); - static nxt_int_t nxt_php_alter_option(nxt_str_t *name, nxt_str_t *value, - int type); --static int nxt_php_send_headers(sapi_headers_struct *sapi_headers); --static char *nxt_php_read_cookies(void); -+static int nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC); -+static char *nxt_php_read_cookies(TSRMLS_D); - static void nxt_php_set_sptr(nxt_unit_request_info_t *req, const char *name, - nxt_unit_sptr_t *v, uint32_t len, zval *track_vars_array TSRMLS_DC); - nxt_inline void nxt_php_set_str(nxt_unit_request_info_t *req, const char *name, - nxt_str_t *s, zval *track_vars_array TSRMLS_DC); - static void nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name, - char *str, uint32_t len, zval *track_vars_array TSRMLS_DC); --static void nxt_php_register_variables(zval *track_vars_array); -+static void nxt_php_register_variables(zval *track_vars_array TSRMLS_DC); - #ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE - static void nxt_php_log_message(char *message, int syslog_type_int); - #else --static void nxt_php_log_message(char *message); -+static void nxt_php_log_message(char *message TSRMLS_DC); - #endif - - #ifdef NXT_PHP7 -@@ -159,6 +159,9 @@ NXT_EXPORT nxt_app_module_t nxt_app_mod - - - static nxt_task_t *nxt_php_task; -+#ifdef ZTS -+static void ***tsrm_ls; -+#endif - - - static nxt_int_t -@@ -262,6 +265,17 @@ nxt_php_init(nxt_task_t *task, nxt_commo - nxt_memcpy(index->start, c->index.start, c->index.length); - } - -+#ifdef ZTS -+ tsrm_startup(1, 1, 0, NULL); -+ tsrm_ls = ts_resource(0); -+#endif -+ -+#ifdef NXT_PHP7 -+#if defined(ZEND_SIGNALS) || PHP_MINOR_VERSION > 0 -+ zend_signal_startup(); -+#endif -+#endif -+ - sapi_startup(&nxt_php_sapi_module); - - if (c->options != NULL) { -@@ -433,7 +447,8 @@ nxt_php_alter_option(nxt_str_t *name, nx - if (ini_entry->on_modify - && ini_entry->on_modify(ini_entry, cstr, value->length, - ini_entry->mh_arg1, ini_entry->mh_arg2, -- ini_entry->mh_arg3, ZEND_INI_STAGE_ACTIVATE) -+ ini_entry->mh_arg3, ZEND_INI_STAGE_ACTIVATE -+ TSRMLS_CC) - != SUCCESS) - { - nxt_free(cstr); -@@ -573,7 +588,11 @@ nxt_php_request_handler(nxt_unit_request - (char *) ctx->script.start); - } - -+#if (NXT_PHP7) - if (nxt_slow_path(php_request_startup() == FAILURE)) { -+#else -+ if (nxt_slow_path(php_request_startup(TSRMLS_C) == FAILURE)) { -+#endif - nxt_unit_req_debug(req, "php_request_startup() failed"); - rc = NXT_UNIT_ERROR; - -@@ -915,7 +934,7 @@ static void - nxt_php_log_message(char *message, int syslog_type_int) - #else - static void --nxt_php_log_message(char *message) -+nxt_php_log_message(char *message TSRMLS_DC) - #endif - { - nxt_log(nxt_php_task, NXT_LOG_NOTICE, "php message: %s", message); - -- cgit