Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2022 02:32:25 GMT
From:      "Sergey A. Osokin" <osa@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fac9f62d7e01 - main - www/nginx-devel: third-party modules management
Message-ID:  <202207110232.26B2WPgL090372@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by osa:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fac9f62d7e01e7ccceb0e5667f8049b77163d2aa

commit fac9f62d7e01e7ccceb0e5667f8049b77163d2aa
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-07-11 02:30:17 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-07-11 02:30:17 +0000

    www/nginx-devel: third-party modules management
    
    Remove third-party clojure module.
    
    Fix build for third-party upload_progress module.       (*)
    Obtained from:  https://github.com/masterzen/nginx-upload-progress-module/files/8980323/nginx_1.23.0.patch.txt (*)
    
    Bump PORTREVISION.
---
 www/nginx-devel/Makefile                           |  7 +--
 www/nginx-devel/Makefile.extmod                    | 14 ++---
 www/nginx-devel/distinfo                           |  2 -
 .../extra-patch-ngx_http_uploadprogress_module.c   | 73 ++++++++++++++++++++++
 www/nginx-devel/pkg-plist                          |  1 -
 5 files changed, 78 insertions(+), 19 deletions(-)

diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile
index 170667410b67..c725a2460089 100644
--- a/www/nginx-devel/Makefile
+++ b/www/nginx-devel/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME?=	nginx
 PORTVERSION=	1.23.0
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	www
 MASTER_SITES=	https://nginx.org/download/ \
 		LOCAL/osa
@@ -245,11 +245,6 @@ IGNORE=		required HTTPV3_BORING or HTTPV3_QTLS \
 NJS_CONFIGURE_ARGS=	--no-pcre2
 .endif
 
-.if ${PORT_OPTIONS:MCLOJURE} || \
-    ${PORT_OPTIONS:MHTTP_UPLOAD_PROGRESS}
-IGNORE=		a patch requires
-.endif
-
 pre-everything::
 	@${ECHO_MSG}
 .if ${PORT_OPTIONS:MHTTP_UPSTREAM_FAIR}
diff --git a/www/nginx-devel/Makefile.extmod b/www/nginx-devel/Makefile.extmod
index f4a68d6ac580..8c8c7ee37c18 100644
--- a/www/nginx-devel/Makefile.extmod
+++ b/www/nginx-devel/Makefile.extmod
@@ -2,7 +2,7 @@
 
 OPTIONS_GROUP+=	THIRDPARTYGRP
 # External modules (arrayvar MUST appear after devel_kit for build-dep)
-OPTIONS_GROUP_THIRDPARTYGRP=	AJP AWS_AUTH BROTLI CACHE_PURGE CLOJURE COOKIE_FLAG CT \
+OPTIONS_GROUP_THIRDPARTYGRP=	AJP AWS_AUTH BROTLI CACHE_PURGE COOKIE_FLAG CT \
 	DEVEL_KIT ARRAYVAR DRIZZLE DYNAMIC_HC DYNAMIC_UPSTREAM ECHO ENCRYPTSESSION \
 	FORMINPUT GRIDFS HEADERS_MORE HTTP_ACCEPT_LANGUAGE HTTP_AUTH_DIGEST \
 	HTTP_AUTH_KRB5 HTTP_AUTH_LDAP HTTP_AUTH_PAM HTTP_DAV_EXT HTTP_EVAL \
@@ -32,13 +32,6 @@ BROTLI_VARS=		DSO_EXTMODS+=brotli
 CACHE_PURGE_GH_TUPLE=	torden:ngx_cache_purge:2b977cf:cache_purge
 CACHE_PURGE_VARS=	DSO_EXTMODS+=cache_purge
 
-CLOJURE_CATEGORIES+=	java
-CLOJURE_USE=		JAVA=yes JAVA_OS=native JAVA_VERSION=1.8 \
-			JAVA_VENDOR=openjdk JAVA_BUILD=yes JAVA_RUN=yes
-CLOJURE_GH_TUPLE=	nginx-clojure:nginx-clojure:4b1e964:clojure
-CLOJURE_CONFIGURE_ENV=	"JNI_INCS=-I${LOCALBASE}/openjdk8/include -I${LOCALBASE}/openjdk8/include/freebsd"
-CLOJURE_VARS=		DSO_EXTMODS+=clojure CLOJURE_SUBDIR=/src/c
-
 COOKIE_FLAG_GH_TUPLE=	AirisX:nginx_cookie_flag_module:c4ff449:cookie_flag
 COOKIE_FLAG_VARS=	DSO_EXTMODS+=cookie_flag
 
@@ -179,8 +172,9 @@ HTTP_TARANTOOL_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-ngx_http_tarantool-config
 HTTP_UPLOAD_GH_TUPLE=		fdintino:nginx-upload-module:643b4c1:upload
 HTTP_UPLOAD_VARS=		DSO_EXTMODS+=upload
 
-HTTP_UPLOAD_PROGRESS_GH_TUPLE=	masterzen:nginx-upload-progress-module:68b3ab3:uploadprogress
-HTTP_UPLOAD_PROGRESS_VARS=	DSO_EXTMODS+=uploadprogress
+HTTP_UPLOAD_PROGRESS_GH_TUPLE=		masterzen:nginx-upload-progress-module:68b3ab3:uploadprogress
+HTTP_UPLOAD_PROGRESS_VARS=		DSO_EXTMODS+=uploadprogress
+HTTP_UPLOAD_PROGRESS_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-ngx_http_uploadprogress_module.c
 
 HTTP_UPSTREAM_CHECK_GH_TUPLE=		yaoweibin:nginx_upstream_check_module:9aecf15:upstreamcheck
 HTTP_UPSTREAM_CHECK_CONFIGURE_ON=	--add-module=${WRKSRC_upstreamcheck}
diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo
index c42bcd21dcd9..d086ad5aa5a7 100644
--- a/www/nginx-devel/distinfo
+++ b/www/nginx-devel/distinfo
@@ -19,8 +19,6 @@ SHA256 (google-ngx_brotli-9aec15e_GH0.tar.gz) = 0177b1158ff7092b9996346de28a0b29
 SIZE (google-ngx_brotli-9aec15e_GH0.tar.gz) = 16194
 SHA256 (torden-ngx_cache_purge-2b977cf_GH0.tar.gz) = 9de7dad5827edf37e803435ee764f6815562053daa0821aedaf539580307ff93
 SIZE (torden-ngx_cache_purge-2b977cf_GH0.tar.gz) = 16739
-SHA256 (nginx-clojure-nginx-clojure-4b1e964_GH0.tar.gz) = bc41ee5233e5eefba92067499a09ca82a0606036d3b9dd8e550b519674f32761
-SIZE (nginx-clojure-nginx-clojure-4b1e964_GH0.tar.gz) = 753436
 SHA256 (AirisX-nginx_cookie_flag_module-c4ff449_GH0.tar.gz) = 4b8c1c1e1ed59ed85751f4bd7d68026ad5051103c8b983e05ad17eb0cdab138e
 SIZE (AirisX-nginx_cookie_flag_module-c4ff449_GH0.tar.gz) = 4713
 SHA256 (grahamedgecombe-nginx-ct-93e9884_GH0.tar.gz) = 72fdd125b9207cdda135f368095f85b943a78a4ff004d1cd217972e12b1571b2
diff --git a/www/nginx-devel/files/extra-patch-ngx_http_uploadprogress_module.c b/www/nginx-devel/files/extra-patch-ngx_http_uploadprogress_module.c
new file mode 100644
index 000000000000..5dfbdbfea794
--- /dev/null
+++ b/www/nginx-devel/files/extra-patch-ngx_http_uploadprogress_module.c
@@ -0,0 +1,73 @@
+--- ../nginx-upload-progress-module-68b3ab3/ngx_http_uploadprogress_module.c.orig	2021-12-24 10:53:38.000000000 -0500
++++ ../nginx-upload-progress-module-68b3ab3/ngx_http_uploadprogress_module.c	2022-07-10 22:24:32.435330000 -0400
+@@ -559,12 +559,12 @@
+     ngx_chain_t                      out;
+     ngx_int_t                        rc, found=0, done=0, err_status=0;
+     off_t                            rest=0, length=0;
+-    ngx_uint_t                       len, i;
++    ngx_uint_t                       len;
+     ngx_slab_pool_t                 *shpool;
+     ngx_http_uploadprogress_conf_t  *upcf;
+     ngx_http_uploadprogress_ctx_t   *ctx;
+     ngx_http_uploadprogress_node_t  *up;
+-    ngx_table_elt_t                 *expires, *cc, **ccp;
++    ngx_table_elt_t                 *expires, *cc;
+     ngx_http_uploadprogress_state_t  state;
+     ngx_http_uploadprogress_template_t  *t;
+ 
+@@ -637,6 +637,7 @@
+         }
+ 
+         r->headers_out.expires = expires;
++        expires->next = NULL;
+ 
+         expires->hash = 1;
+         expires->key.len = sizeof("Expires") - 1;
+@@ -646,37 +647,30 @@
+     len = sizeof("Mon, 28 Sep 1970 06:00:00 GMT");
+     expires->value.len = len - 1;
+ 
+-    ccp = r->headers_out.cache_control.elts;
+-    if (ccp == NULL) {
++    cc = r->headers_out.cache_control;
+ 
+-        if (ngx_array_init(&r->headers_out.cache_control, r->pool,
+-                           1, sizeof(ngx_table_elt_t *))
+-            != NGX_OK) {
+-            return NGX_HTTP_INTERNAL_SERVER_ERROR;
+-        }
++    if (cc == NULL) {
+ 
+-        ccp = ngx_array_push(&r->headers_out.cache_control);
+-        if (ccp == NULL) {
+-            return NGX_HTTP_INTERNAL_SERVER_ERROR;
+-        }
+-
+         cc = ngx_list_push(&r->headers_out.headers);
+         if (cc == NULL) {
++            expires->hash = 0;
+             return NGX_HTTP_INTERNAL_SERVER_ERROR;
+         }
+ 
++        r->headers_out.cache_control = cc;
++        cc->next = NULL;
++
+         cc->hash = 1;
+         cc->key.len = sizeof("Cache-Control") - 1;
+         cc->key.data = (u_char *) "Cache-Control";
+ 
+-        *ccp = cc;
+-
+     } else {
+-        for (i = 1; i < r->headers_out.cache_control.nelts; i++) {
+-            ccp[i]->hash = 0;
++        for (cc = cc->next; cc; cc = cc->next) {
++            cc->hash = 0;
+         }
+ 
+-        cc = ccp[0];
++        cc = r->headers_out.cache_control;
++        cc->next = NULL;
+     }
+ 
+     expires->value.data = (u_char *) "Thu, 01 Jan 1970 00:00:01 GMT";
diff --git a/www/nginx-devel/pkg-plist b/www/nginx-devel/pkg-plist
index 0580ca5cd00e..70df030bff30 100644
--- a/www/nginx-devel/pkg-plist
+++ b/www/nginx-devel/pkg-plist
@@ -14,7 +14,6 @@
 %%DSO%%%%BROTLI%%libexec/nginx/ngx_http_brotli_filter_module.so
 %%DSO%%%%BROTLI%%libexec/nginx/ngx_http_brotli_static_module.so
 %%DSO%%%%CACHE_PURGE%%libexec/nginx/ngx_http_cache_purge_module.so
-%%DSO%%%%CLOJURE%%libexec/nginx/ngx_http_clojure_module.so
 %%DSO%%%%COOKIE_FLAG%%libexec/nginx/ngx_http_cookie_flag_filter_module.so
 %%DSO%%%%CT%%libexec/nginx/ngx_http_ssl_ct_module.so
 %%DSO%%%%CT%%libexec/nginx/ngx_ssl_ct_module.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207110232.26B2WPgL090372>