From nobody Wed Jul 12 02:21:01 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R11gf1nywz2tnqP; Wed, 12 Jul 2023 02:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R11gf08nSz3wFW; Wed, 12 Jul 2023 02:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689128462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cH9tfggwqcDdsaN4gIBsT3z4ZUyTiJ3qjfRTjEFH8i8=; b=TG97vAxdgnztBs8NUW6Dqlk1KjA5h2kBztQpym0KUsyL72eDExQcCjLbQeu1wDZn+VBCB9 A9X8vHaOAU4ZeDi/FTsusevT0GUPkD9bjribYZ7SWMRyQZcP32H36oDDvrU0LBAP1a+bXu z4dAE7Rk+tGuPb8/hOWzG0wtdcoLQxy624eaKf36DfHgxIZ7QIOqT/wpRckWISgjv0tzCc pX02UXqqb0Kkoaa5zxUVQ979qA+28g/i7KXZwoXx37ZDgQ6oEmYYLa1bHT3yoKne2BJv37 Q7l5sERCfe8PBFe+2lhh6PMj26QDbUv9hpr+8TWc3zLfz1NpBSHqC5sb+kPhjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689128462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cH9tfggwqcDdsaN4gIBsT3z4ZUyTiJ3qjfRTjEFH8i8=; b=nJgH1eQZ17r3e0fyk6dKidEnY+Ze0Ib7TkeajpO6d7+dg78TypVtxSbzeH72eowC1x/4kx rvegKnhNPue6LuG1xCuf5bbSPBArHT1dsKD2AxbbZ/h/rYi8wNTp7gyWgFKu8zFhoxW6ZS PoLASGa7vqJeGv2vyBFg9vBkyZ+ZHusdR2TzgCr74MztbCyk2NBrGvHRTjF3YEs3yZEbuB uioRna+wLZecCLsVIMpupRGm5bVCXclIrMY77Pm8gJoanB68FhC506IBQFeg5LZZ6uaM9B 9w41MaCGhEDyqQD9iAbtQ6CsAVw8NBRf62IQqxiBf5248J0M6cJPhEg55KYNCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689128462; a=rsa-sha256; cv=none; b=HQT7pu9kf6Bs005wypEWlsIdbjHxFtq3S0ZvwgYgok1Q5YcYj7dJN4BVI7UAvDyJ+JQ0X7 zi6rXpFvkdP28E+DwUv9JnwSfqBfLo3bZUT+nYoXzkSBlAb7LtHATArPBNiroeVOc3GY7p nBHya07nUgFcUIAujFyaks+bqGgWzwhkbukEx+rmBJcTaU99RwYnPzdGhEY+zCeelhGDRY RbFxnBNARCEs9Uvujrp+pet1D+TFf7OPrKTrey4hvgSsPebF91GP1bQSetSNzykAPWId0j m1ti1z9zzGaAk8hHydW/Em9Jy9ifmgJL69GxW0GjeWQ8KqODx6t86wltBNNyrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R11gd6MSQzrGv; Wed, 12 Jul 2023 02:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36C2L1J4027893; Wed, 12 Jul 2023 02:21:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36C2L1UH027892; Wed, 12 Jul 2023 02:21:01 GMT (envelope-from git) Date: Wed, 12 Jul 2023 02:21:01 GMT Message-Id: <202307120221.36C2L1UH027892@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 30ba18e2a5f1 - main - */*: update NGINX JavaScript: 0.7.12 -> 0.8.0 (+) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30ba18e2a5f12cfd52d8ea1f732f4602a0ba4659 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/ports/commit/?id=30ba18e2a5f12cfd52d8ea1f732f4602a0ba4659 commit 30ba18e2a5f12cfd52d8ea1f732f4602a0ba4659 Author: Sergey A. Osokin AuthorDate: 2023-07-12 02:15:02 +0000 Commit: Sergey A. Osokin CommitDate: 2023-07-12 02:20:38 +0000 */*: update NGINX JavaScript: 0.7.12 -> 0.8.0 (+) nginx modules: *) Change: removed special treatment of forbidden headers in Fetch API introduced in 0.7.10. *) Change: removed deprecated since 0.5.0 r.requestBody and r.responseBody in HTTP module. *) Change: throwing an exception in r.internalRedirect() while filtering in HTTP module. *) Feature: introduced global nginx properties. ngx.build - an optional nginx build name, corresponds to --build=name argument of configure script, by default is "". ngx.conf_file_path - the file path to current nginx configuration file. ngx.error_log_path - the file path to current error log file. ngx.prefix - the directory that keeps server files. ngx.version - the nginx version as a string, for example: "1.25.0". ngx.version_number - the nginx version as a number, for example: 1025000. ngx.worker_id - corresponds to an nginx internal worker id. The value is between 0 and worker_processes - 1. *) Feature: introduced js_shared_dict_zone directive. The directive allows to declare a dictionary that is shared among the working processes. *) Improvement: added compile-time options to disable njs modules. For example to disable libxslt related code: NJS_LIBXSLT=NO ./configure .. --add-module=/path/to/njs/module *) Bugfix: fixed r.status setter when filtering in HTTP module. *) Bugfix: fixed setting of Location header in HTTP module. Core: *) Change: native methods are provided with retval argument. This change breaks compatibility with C extension for njs requiring to modify the code. *) Change: non-compliant deprecated String methods were removed. The following methods were removed: String.bytesFrom(), String.prototype.fromBytes(), String.prototype.fromUTF8(), String.prototype.toBytes(), String.prototype.toUTF8(), String.prototype.toString(encoding). *) Change: removed support for building with GNU readline. *) Feature: added Array.from(), Array.prototype.toSorted(), Array.prototype.toSpliced(), Array.prototype.toReversed(). *) Feature: added %TypedArray%.prototype.toSorted(), %TypedArray%.prototype.toSpliced(), %TypedArray%.prototype.toReversed(). *) Feature: added CryptoKey properties in WebCrypto. The following properties for CryptoKey were added: algorithm, extractable, type, usages. *) Bugfix: fixed retval of crypto.getRandomValues(). *) Bugfix: fixed evaluation of computed property names with function expressions. *) Bugfix: fixed implicit name for a function expression declared in arrays. *) Bugfix: fixed parsing of for-in loops. *) Bugfix: fixed Date.parse() with ISO-8601 format and UTC time offset. --- devel/libnjs/Makefile | 3 +- devel/libnjs/distinfo | 6 +-- devel/libnjs/files/patch-auto_make | 22 ++++------- devel/libnjs/files/patch-src_njs.pc.in | 13 ++++++ lang/njs/Makefile | 2 +- lang/njs/distinfo | 6 +-- www/nginx-devel/Makefile | 5 ++- www/nginx-devel/Makefile.extmod | 6 +-- www/nginx-devel/distinfo | 6 +-- www/unit/Makefile | 1 + www/unit/files/patch-src_nxt__js.c | 72 ++++++++++++++++++++++++++++++++++ 11 files changed, 111 insertions(+), 31 deletions(-) diff --git a/devel/libnjs/Makefile b/devel/libnjs/Makefile index 39a1a022976a..a6ede4df4804 100644 --- a/devel/libnjs/Makefile +++ b/devel/libnjs/Makefile @@ -1,6 +1,5 @@ PORTNAME= libnjs -DISTVERSION= 0.7.12 -PORTREVISION= 1 +DISTVERSION= 0.8.0 CATEGORIES= devel www MAINTAINER= osa@FreeBSD.org diff --git a/devel/libnjs/distinfo b/devel/libnjs/distinfo index 7095c6bb428e..8ccb193ce347 100644 --- a/devel/libnjs/distinfo +++ b/devel/libnjs/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1681160351 -SHA256 (nginx-njs-0.7.12_GH0.tar.gz) = 7a75a39022dfb58dbf461053903a07cc48dd4942f7d82a46601819c1b0077687 -SIZE (nginx-njs-0.7.12_GH0.tar.gz) = 662554 +TIMESTAMP = 1688833591 +SHA256 (nginx-njs-0.8.0_GH0.tar.gz) = b98033fff6aadcbb8e108b96e80c0d94c6e2103bcbe75846b5ae0b560696084b +SIZE (nginx-njs-0.8.0_GH0.tar.gz) = 715391 diff --git a/devel/libnjs/files/patch-auto_make b/devel/libnjs/files/patch-auto_make index bcc24076ba99..5a7b66d1ad47 100644 --- a/devel/libnjs/files/patch-auto_make +++ b/devel/libnjs/files/patch-auto_make @@ -1,19 +1,13 @@ ---- auto/make.orig 2023-05-11 23:24:57 UTC +--- auto/make.orig 2023-07-11 23:27:41 UTC +++ auto/make -@@ -320,11 +320,11 @@ cat << END >> $NJS_MAKEFILE +@@ -320,9 +320,7 @@ cat << END >> $NJS_MAKEFILE pc: $NJS_BUILD_DIR/njs.pc $NJS_BUILD_DIR/njs.pc: $NJS_BUILD_DIR/njs_auto_config.h -- sed -e "s,@PREFIX@,$(pwd)/$NJS_BUILD_DIR," \\ -- -e "s,@LIBDIR@,$(pwd)/$NJS_BUILD_DIR," \\ -- -e "s,@CFLAGS@,-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src," \\ -- -e "s,@VERSION@,\$(NJS_VER)," \\ -- -e "s,@EXTRA_LIBS@,-lm $NJS_LIBS $NJS_LIB_AUX_LIBS," \\ -+ sed -e "s|@PREFIX@|$(pwd)/$NJS_BUILD_DIR|" \\ -+ -e "s|@LIBDIR@|$(pwd)/$NJS_BUILD_DIR|" \\ -+ -e "s|@CFLAGS@|-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src|" \\ -+ -e "s|@VERSION@|\$(NJS_VER)|" \\ -+ -e "s|@EXTRA_LIBS@|-lm $NJS_LIBS $NJS_LIB_AUX_LIBS|" \\ +- sed -e "s#@PREFIX@#$(pwd)/$NJS_BUILD_DIR#" \\ +- -e "s#@LIBDIR@#$(pwd)/$NJS_BUILD_DIR#" \\ +- -e "s#@CFLAGS@#-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src#" \\ ++ sed -e "s#@PREFIX@#%%LOCALBASE%%#" \\ + -e "s#@VERSION@#\$(NJS_VER)#" \\ + -e "s#@EXTRA_LIBS@#-lm $NJS_LIBS $NJS_LIB_AUX_LIBS#" \\ src/njs.pc.in > \$@ - END - diff --git a/devel/libnjs/files/patch-src_njs.pc.in b/devel/libnjs/files/patch-src_njs.pc.in new file mode 100644 index 000000000000..1a85733f9e9d --- /dev/null +++ b/devel/libnjs/files/patch-src_njs.pc.in @@ -0,0 +1,13 @@ +--- src/njs.pc.in.orig 2023-07-11 23:13:20 UTC ++++ src/njs.pc.in +@@ -1,8 +1,8 @@ + prefix=@PREFIX@ +-libdir=@LIBDIR@ ++libdir=${prefix}/lib + + Name: njs + Description: library to embed njs scripting language + Version: @VERSION@ + Libs: -L${libdir} -lnjs @EXTRA_LIBS@ +-Cflags: @CFLAGS@ ++Cflags: -I${prefix}/include diff --git a/lang/njs/Makefile b/lang/njs/Makefile index 88e9a3c0bd03..bf164be364d3 100644 --- a/lang/njs/Makefile +++ b/lang/njs/Makefile @@ -1,5 +1,5 @@ PORTNAME= njs -DISTVERSION= 0.7.12 +DISTVERSION= 0.8.0 CATEGORIES= lang www MAINTAINER= osa@FreeBSD.org diff --git a/lang/njs/distinfo b/lang/njs/distinfo index 84648dc73ec7..ed576717150e 100644 --- a/lang/njs/distinfo +++ b/lang/njs/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1681160550 -SHA256 (nginx-njs-0.7.12_GH0.tar.gz) = 7a75a39022dfb58dbf461053903a07cc48dd4942f7d82a46601819c1b0077687 -SIZE (nginx-njs-0.7.12_GH0.tar.gz) = 662554 +TIMESTAMP = 1689100616 +SHA256 (nginx-njs-0.8.0_GH0.tar.gz) = b98033fff6aadcbb8e108b96e80c0d94c6e2103bcbe75846b5ae0b560696084b +SIZE (nginx-njs-0.8.0_GH0.tar.gz) = 715391 diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index 0d66c490df2f..fe72cee17917 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME?= nginx PORTVERSION= 1.25.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= https://nginx.org/download/ \ LOCAL/osa @@ -249,7 +249,8 @@ CONFIGURE_ARGS+= --with-ld-opt="-L ${LOCALBASE}/lib -lpcre" LIB_DEPENDS+= libpcre.so:devel/pcre .endif -.if empty(PORT_OPTIONS:MNJS_XML) +.if ${PORT_OPTIONS:MNJS} && empty(PORT_OPTIONS:MNJS_XML) +CONFIGURE_ENV+= NJS_LIBXSLT=NO NJS_CONFIGURE_ARGS= --no-libxml2 .endif diff --git a/www/nginx-devel/Makefile.extmod b/www/nginx-devel/Makefile.extmod index ee1d035eb47f..6ef47d920908 100644 --- a/www/nginx-devel/Makefile.extmod +++ b/www/nginx-devel/Makefile.extmod @@ -236,12 +236,12 @@ NAXSI_GH_TUPLE= nbs-system:naxsi:${NAXSI_NGINX_VER}:naxsi NAXSI_VARS= DSO_EXTMODS+=naxsi NAXSI_SUBDIR=/naxsi_src NAXSI_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-naxsi_runtime.c -NJS_GH_TUPLE= nginx:njs:0.7.12:njs +NJS_GH_TUPLE= nginx:njs:0.8.0:njs NJS_VARS= DSO_EXTMODS+=njs NJS_SUBDIR=/nginx -NJS_USES= libedit NJS_XML_IMPLIES= NJS -NJS_XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 +NJS_XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 \ + libxslt.so:textproc/libxslt OPENTRACING_GH_TUPLE= opentracing-contrib:nginx-opentracing:v0.24.0:opentracing OPENTRACING_LIB_DEPENDS= libopentracing.so:devel/libopentracing diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo index 88e2a46c53e7..a265baf0a3ae 100644 --- a/www/nginx-devel/distinfo +++ b/www/nginx-devel/distinfo @@ -1,4 +1,4 @@ -TIMESTAMP = 1688165378 +TIMESTAMP = 1689101193 SHA256 (nginx-1.25.1.tar.gz) = f09071ac46e0ea3adc0008ef0baca229fc6b4be4533baef9bbbfba7de29a8602 SIZE (nginx-1.25.1.tar.gz) = 1213919 SHA256 (nginx_mogilefs_module-1.0.4.tar.gz) = 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae @@ -105,8 +105,8 @@ SHA256 (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 32a42256616cc674dca24c SIZE (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 34063 SHA256 (nbs-system-naxsi-29793dc_GH0.tar.gz) = 579df0e50ff32464f7bb152df9d93ea18c05c4aa3966ec4d8c603b5dd629be08 SIZE (nbs-system-naxsi-29793dc_GH0.tar.gz) = 236932 -SHA256 (nginx-njs-0.7.12_GH0.tar.gz) = 7a75a39022dfb58dbf461053903a07cc48dd4942f7d82a46601819c1b0077687 -SIZE (nginx-njs-0.7.12_GH0.tar.gz) = 662554 +SHA256 (nginx-njs-0.8.0_GH0.tar.gz) = b98033fff6aadcbb8e108b96e80c0d94c6e2103bcbe75846b5ae0b560696084b +SIZE (nginx-njs-0.8.0_GH0.tar.gz) = 715391 SHA256 (opentracing-contrib-nginx-opentracing-v0.24.0_GH0.tar.gz) = 5328c5f37e0615b5252aed51b9cd40f3d14989d995ad54134076aeda4ab9b280 SIZE (opentracing-contrib-nginx-opentracing-v0.24.0_GH0.tar.gz) = 679417 SHA256 (konstruxi-ngx_postgres-8aa7359_GH0.tar.gz) = c69ad4495de7c7883ebc23e1e6c4cc83a4ac6a7fddd4d5c12e49d33b65f7c50b diff --git a/www/unit/Makefile b/www/unit/Makefile index 018e336e7b0f..d283d5a06a57 100644 --- a/www/unit/Makefile +++ b/www/unit/Makefile @@ -1,5 +1,6 @@ PORTNAME= unit PORTVERSION= ${UNIT_VERSION} +PORTREVISION= 1 CATEGORIES= www MASTER_SITES?= https://unit.nginx.org/download/ diff --git a/www/unit/files/patch-src_nxt__js.c b/www/unit/files/patch-src_nxt__js.c new file mode 100644 index 000000000000..bd7ba596126d --- /dev/null +++ b/www/unit/files/patch-src_nxt__js.c @@ -0,0 +1,72 @@ +--- src/nxt_js.c.orig 2023-05-10 16:22:28 UTC ++++ src/nxt_js.c +@@ -386,11 +386,11 @@ nxt_js_call(nxt_task_t *task, nxt_js_conf_t *jcf, nxt_ + nxt_js_t *js, nxt_str_t *str, void *ctx) + { + njs_vm_t *vm; +- njs_int_t rc, ret; ++ njs_int_t ret; + njs_str_t res; +- njs_value_t *array, *value; ++ njs_value_t *value; + njs_function_t *func; +- njs_opaque_value_t opaque_value, arguments[6]; ++ njs_opaque_value_t retval, opaque_value, arguments[6]; + + static const njs_str_t uri_str = njs_str("uri"); + static const njs_str_t host_str = njs_str("host"); +@@ -407,15 +407,13 @@ nxt_js_call(nxt_task_t *task, nxt_js_conf_t *jcf, nxt_ + return NXT_ERROR; + } + +- ret = njs_vm_start(vm); ++ ret = njs_vm_start(vm, njs_value_arg(&retval)); + if (ret != NJS_OK) { + return NXT_ERROR; + } + +- array = njs_vm_retval(vm); +- + cache->vm = vm; +- cache->array = *array; ++ cache->array = *njs_value_arg(&retval); + } + + value = njs_vm_array_prop(vm, &cache->array, js->index, &opaque_value); +@@ -463,18 +461,20 @@ nxt_js_call(nxt_task_t *task, nxt_js_conf_t *jcf, nxt_ + return NXT_ERROR; + } + +- ret = njs_vm_call(vm, func, njs_value_arg(&arguments), 6); ++ ret = njs_vm_invoke(vm, func, njs_value_arg(&arguments), 6, ++ njs_value_arg(&retval)); + +- rc = njs_vm_retval_string(vm, &res); +- if (rc != NJS_OK) { +- return NXT_ERROR; +- } +- + if (ret != NJS_OK) { +- nxt_alert(task, "js exception: %V", &res); ++ ret = njs_vm_exception_string(vm, &res); ++ if (ret == NJS_OK) { ++ nxt_alert(task, "js exception: %V", &res); ++ } ++ + return NXT_ERROR; + } + ++ ret = njs_vm_value_string(vm, &res, njs_value_arg(&retval)); ++ + str->length = res.length; + str->start = res.start; + +@@ -498,7 +498,7 @@ nxt_js_error(njs_vm_t *vm, u_char *error) + njs_str_t res; + nxt_str_t err; + +- ret = njs_vm_retval_string(vm, &res); ++ ret = njs_vm_exception_string(vm, &res); + if (nxt_slow_path(ret != NJS_OK)) { + return NXT_ERROR; + }