diff --git a/www/nginx-module-lua-stream/Makefile b/www/nginx-module-lua-stream/Makefile index 24948c0a713d..f54e09bc94fa 100644 --- a/www/nginx-module-lua-stream/Makefile +++ b/www/nginx-module-lua-stream/Makefile @@ -1,30 +1,31 @@ PORTNAME= nginx-module-lua-stream DISTVERSIONPREFIX= v DISTVERSION= 0.0.17 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= joneum@FreeBSD.org COMMENT= Lua module for the NGINX stream subsystem WWW= https://github.com/openresty/stream-lua-nginx-module LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE USE_GITHUB= yes GH_ACCOUNT= openresty GH_PROJECT= stream-lua-nginx-module NO_ARCH= yes NO_BUILD= yes MODULESDIR= ${LOCALBASE}/share/nginx/modules/${PORTNAME} PLIST_SUB= MODULESDIR=${MODULESDIR} do-install: @${MKDIR} ${STAGEDIR}${MODULESDIR}/src ${INSTALL_DATA} ${WRKSRC}/config ${STAGEDIR}${MODULESDIR} @cd ${WRKSRC}/src && \ ${COPYTREE_SHARE} . ${STAGEDIR}${MODULESDIR}/src .include diff --git a/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__ssl__client__helloby.c b/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__ssl__client__helloby.c new file mode 100644 index 000000000000..11e24199188d --- /dev/null +++ b/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__ssl__client__helloby.c @@ -0,0 +1,11 @@ +--- src/ngx_stream_lua_ssl_client_helloby.c.orig 2025-10-24 14:55:36 UTC ++++ src/ngx_stream_lua_ssl_client_helloby.c +@@ -218,7 +218,7 @@ ngx_stream_lua_ssl_client_hello_handler(ngx_ssl_conn_t + return -1; + } + +-#if (nginx_version > 1029001) ++#if (nginx_version > 1029001) && !defined(freenginx) + /* see commit 0373fe5d98c1515640 for more details */ + rc = ngx_ssl_client_hello_callback(ssl_conn, al, arg); + diff --git a/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__time.c b/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__time.c index 79bd3eee4f57..329f72b65e39 100644 --- a/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__time.c +++ b/www/nginx-module-lua-stream/files/patch-src_ngx__stream__lua__time.c @@ -1,12 +1,20 @@ ---- src/ngx_stream_lua_time.c.orig +--- src/ngx_stream_lua_time.c.orig 2025-10-24 14:55:36 UTC +++ src/ngx_stream_lua_time.c -@@ -36,7 +36,11 @@ ngx_stream_lua_ffi_now(void) +@@ -36,7 +36,17 @@ ngx_stream_lua_ffi_req_start_time(ngx_stream_lua_reque double ngx_stream_lua_ffi_req_start_time(ngx_stream_lua_request_t *r) { +#if defined(freenginx) -+ return r->session->start_time / 1000.0; ++ ngx_time_t *tp; ++ ++ tp = ngx_timeofday(); ++ ++ return (tp->sec + tp->msec / 1000.0) ++ - (double) (ngx_current_msec - r->session->start_time) ++ / 1000.0; +#else return r->session->start_sec + r->session->start_msec / 1000.0; +#endif } + + diff --git a/www/nginx-module-lua/Makefile b/www/nginx-module-lua/Makefile index e32cd047131f..0b57938d239d 100644 --- a/www/nginx-module-lua/Makefile +++ b/www/nginx-module-lua/Makefile @@ -1,28 +1,28 @@ PORTNAME= nginx-module-lua DISTVERSIONPREFIX= v DISTVERSION= 0.10.29 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MAINTAINER= joneum@FreeBSD.org COMMENT= Lua module for the NGINX HTTP subsystem WWW= https://github.com/openresty/lua-nginx-module LICENSE= BSD2CLAUSE USE_GITHUB= yes GH_ACCOUNT= openresty GH_PROJECT= lua-nginx-module NO_ARCH= yes NO_BUILD= yes MODULESDIR= ${LOCALBASE}/share/nginx/modules/${PORTNAME} do-install: @${MKDIR} ${STAGEDIR}${MODULESDIR}/src ${INSTALL_DATA} ${WRKSRC}/config ${STAGEDIR}${MODULESDIR} @cd ${WRKSRC}/src && \ ${COPYTREE_SHARE} . ${STAGEDIR}${MODULESDIR}/src .include diff --git a/www/nginx-module-lua/files/patch-src_ngx__http__lua__ssl__client__helloby.c b/www/nginx-module-lua/files/patch-src_ngx__http__lua__ssl__client__helloby.c new file mode 100644 index 000000000000..f0203f39dc63 --- /dev/null +++ b/www/nginx-module-lua/files/patch-src_ngx__http__lua__ssl__client__helloby.c @@ -0,0 +1,11 @@ +--- src/ngx_http_lua_ssl_client_helloby.c.orig 2025-10-24 15:04:57 UTC ++++ src/ngx_http_lua_ssl_client_helloby.c +@@ -220,7 +220,7 @@ ngx_http_lua_ssl_client_hello_handler(ngx_ssl_conn_t * + + dd("first time"); + +-#if (nginx_version > 1029001) ++#if (nginx_version > 1029001) && !defined(freenginx) + /* see commit 0373fe5d98c1515640 for more details */ + rc = ngx_ssl_client_hello_callback(ssl_conn, al, arg); + diff --git a/www/nginx-module-lua/files/patch-src_ngx__http__lua__time.c b/www/nginx-module-lua/files/patch-src_ngx__http__lua__time.c index 4170906d030b..f741bd97f225 100644 --- a/www/nginx-module-lua/files/patch-src_ngx__http__lua__time.c +++ b/www/nginx-module-lua/files/patch-src_ngx__http__lua__time.c @@ -1,14 +1,19 @@ ---- src/ngx_http_lua_time.c.orig +--- src/ngx_http_lua_time.c.orig 2025-10-24 15:04:57 UTC +++ src/ngx_http_lua_time.c -@@ -28,7 +28,11 @@ +@@ -28,7 +28,16 @@ ngx_http_lua_ffi_req_start_time(ngx_http_request_t *r) double ngx_http_lua_ffi_req_start_time(ngx_http_request_t *r) { +#if defined(freenginx) -+ return r->start_time / 1000.0; ++ ngx_time_t *tp; ++ ++ tp = ngx_timeofday(); ++ ++ return (tp->sec + tp->msec / 1000.0) ++ - (double) (ngx_current_msec - r->start_time) / 1000.0; +#else return r->start_sec + r->start_msec / 1000.0; +#endif }