diff --git a/images/nginx/rootfs/build.sh b/images/nginx/rootfs/build.sh index 3baf775fca..1c82a4c7fb 100755 --- a/images/nginx/rootfs/build.sh +++ b/images/nginx/rootfs/build.sh @@ -18,7 +18,7 @@ set -o errexit set -o nounset set -o pipefail -export NGINX_VERSION=1.25.5 +export NGINX_VERSION=1.27.1 # Check for recent changes: https://github.com/vision5/ngx_devel_kit/compare/v0.3.3...master export NDK_VERSION=v0.3.3 @@ -44,32 +44,32 @@ export MODSECURITY_LIB_VERSION=v3.0.12 # Check for recent changes: https://github.com/coreruleset/coreruleset/compare/v3.3.5...v4.0/main export OWASP_MODSECURITY_CRS_VERSION=v4.4.0 -# Check for recent changes: https://github.com/openresty/lua-nginx-module/compare/v0.10.26``...master -export LUA_NGX_VERSION=v0.10.26 +# Check for recent changes: https://github.com/openresty/lua-nginx-module/compare/v0.10.27...master +export LUA_NGX_VERSION=v0.10.27 -# Check for recent changes: https://github.com/openresty/stream-lua-nginx-module/compare/bea8a0c0de94cede71554f53818ac0267d675d63...master -export LUA_STREAM_NGX_VERSION=bea8a0c0de94cede71554f53818ac0267d675d63 +# Check for recent changes: https://github.com/openresty/stream-lua-nginx-module/compare/v0.0.15...master +export LUA_STREAM_NGX_VERSION=v0.0.15 # Check for recent changes: https://github.com/openresty/lua-upstream-nginx-module/compare/8aa93ead98ba2060d4efd594ae33a35d153589bf...master export LUA_UPSTREAM_VERSION=542be0893543a4e42d89f6dd85372972f5ff2a36 -# Check for recent changes: https://github.com/openresty/lua-cjson/compare/2.1.0.13...openresty:master -export LUA_CJSON_VERSION=2.1.0.13 +# Check for recent changes: https://github.com/openresty/lua-cjson/compare/2.1.0.14...openresty:master +export LUA_CJSON_VERSION=2.1.0.14 # Check for recent changes: https://github.com/leev/ngx_http_geoip2_module/compare/a607a41a8115fecfc05b5c283c81532a3d605425...master export GEOIP2_VERSION=a607a41a8115fecfc05b5c283c81532a3d605425 -# Check for recent changes: https://github.com/openresty/luajit2/compare/v2.1-20240314...v2.1-agentzh -export LUAJIT_VERSION=v2.1-20240314 +# Check for recent changes: https://github.com/openresty/luajit2/compare/v2.1-20240815...master +export LUAJIT_VERSION=v2.1-20240815 # Check for recent changes: https://github.com/openresty/lua-resty-balancer/compare/1cd4363c0a239afe4765ec607dcfbbb4e5900eea...master export LUA_RESTY_BALANCER=1cd4363c0a239afe4765ec607dcfbbb4e5900eea -# Check for recent changes: https://github.com/openresty/lua-resty-lrucache/compare/99e7578465b40f36f596d099b82eab404f2b42ed...master -export LUA_RESTY_CACHE=99e7578465b40f36f596d099b82eab404f2b42ed +# Check for recent changes: https://github.com/openresty/lua-resty-lrucache/compare/v0.14...master +export LUA_RESTY_CACHE=v0.14 -# Check for recent changes: https://github.com/openresty/lua-resty-core/compare/v0.1.27...master -export LUA_RESTY_CORE=v0.1.28 +# Check for recent changes: https://github.com/openresty/lua-resty-core/compare/v0.1.29...master +export LUA_RESTY_CORE=v0.1.29 # Check for recent changes: https://github.com/cloudflare/lua-resty-cookie/compare/f418d77082eaef48331302e84330488fdc810ef4...master export LUA_RESTY_COOKIE_VERSION=f418d77082eaef48331302e84330488fdc810ef4 @@ -86,14 +86,14 @@ export LUA_RESTY_LOCK=405d0bf4cbfa74d742c6ed3158d442221e6212a9 # Check for recent changes: https://github.com/openresty/lua-resty-upload/compare/v0.11...master export LUA_RESTY_UPLOAD_VERSION=979372cce011f3176af3c9aff53fd0e992c4bfd3 -# Check for recent changes: https://github.com/openresty/lua-resty-string/compare/v0.15...master -export LUA_RESTY_STRING_VERSION=6f1bc21d86daef804df3cc34d6427ef68da26844 +# Check for recent changes: https://github.com/openresty/lua-resty-string/compare/v0.16...master +export LUA_RESTY_STRING_VERSION=v0.16 # Check for recent changes: https://github.com/openresty/lua-resty-memcached/compare/v0.17...master export LUA_RESTY_MEMCACHED_VERSION=2f02b68bf65fa2332cce070674a93a69a6c7239b -# Check for recent changes: https://github.com/openresty/lua-resty-redis/compare/v0.30...master -export LUA_RESTY_REDIS_VERSION=8641b9f1b6f75cca50c90cf8ca5c502ad8950aa8 +# Check for recent changes: https://github.com/openresty/lua-resty-redis/compare/v0.31...master +export LUA_RESTY_REDIS_VERSION=v0.31 # Check for recent changes: https://github.com/api7/lua-resty-ipmatcher/compare/v0.6.1...master export LUA_RESTY_IPMATCHER_VERSION=3e93c53eb8c9884efe939ef070486a0e507cc5be diff --git a/images/nginx/rootfs/patches/18_nginx-1.25.3-no_Werror.patch b/images/nginx/rootfs/patches/18_nginx-1.25.3-no_Werror.patch deleted file mode 100644 index f7176faffb..0000000000 --- a/images/nginx/rootfs/patches/18_nginx-1.25.3-no_Werror.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -urp nginx-1.25.3/auto/cc/clang nginx-1.25.3-patched/auto/cc/clang ---- nginx-1.25.3/auto/cc/clang 2014-03-04 03:39:24.000000000 -0800 -+++ nginx-1.25.3-patched/auto/cc/clang 2014-03-13 20:54:26.241413360 -0700 -@@ -89,7 +89,7 @@ CFLAGS="$CFLAGS -Wconditional-uninitiali - CFLAGS="$CFLAGS -Wno-unused-parameter" - - # stop on warning --CFLAGS="$CFLAGS -Werror" -+#CFLAGS="$CFLAGS -Werror" - - # debug - CFLAGS="$CFLAGS -g" -diff -urp nginx-1.25.3/auto/cc/gcc nginx-1.25.3-patched/auto/cc/gcc ---- nginx-1.25.3/auto/cc/gcc 2014-03-04 03:39:24.000000000 -0800 -+++ nginx-1.25.3-patched/auto/cc/gcc 2014-03-13 20:54:13.301355329 -0700 -@@ -168,7 +168,7 @@ esac - - - # stop on warning --CFLAGS="$CFLAGS -Werror" -+#CFLAGS="$CFLAGS -Werror" - - # debug - CFLAGS="$CFLAGS -g" -diff -urp nginx-1.25.3/auto/cc/icc nginx-1.25.3-patched/auto/cc/icc ---- nginx-1.25.3/auto/cc/icc 2014-03-04 03:39:24.000000000 -0800 -+++ nginx-1.25.3-patched/auto/cc/icc 2014-03-13 20:54:13.301355329 -0700 -@@ -115,7 +115,7 @@ case "$NGX_ICC_VER" in - esac - - # stop on warning --CFLAGS="$CFLAGS -Werror" -+#CFLAGS="$CFLAGS -Werror" - - # debug - CFLAGS="$CFLAGS -g" diff --git a/images/nginx/rootfs/patches/24_nginx-1.25.3-always_enable_cc_feature_tests.patch b/images/nginx/rootfs/patches/nginx-1.27.1-always_enable_cc_feature_tests.patch similarity index 65% rename from images/nginx/rootfs/patches/24_nginx-1.25.3-always_enable_cc_feature_tests.patch rename to images/nginx/rootfs/patches/nginx-1.27.1-always_enable_cc_feature_tests.patch index b381d9b07b..9517e92c46 100644 --- a/images/nginx/rootfs/patches/24_nginx-1.25.3-always_enable_cc_feature_tests.patch +++ b/images/nginx/rootfs/patches/nginx-1.27.1-always_enable_cc_feature_tests.patch @@ -1,5 +1,5 @@ ---- nginx-1.25.3/auto/cc/conf 2015-10-30 22:47:50.000000000 +0800 -+++ nginx-1.25.3-patched/auto/cc/conf 2015-11-02 12:23:05.385156987 +0800 +--- nginx-1.27.1/auto/cc/conf 2015-10-30 22:47:50.000000000 +0800 ++++ nginx-1.27.1-patched/auto/cc/conf 2015-11-02 12:23:05.385156987 +0800 @@ -144,7 +144,7 @@ fi CFLAGS="$CFLAGS $NGX_CC_OPT" NGX_TEST_LD_OPT="$NGX_LD_OPT" diff --git a/images/nginx/rootfs/patches/nginx-1.27.1-balancer_pool_max_retry.patch b/images/nginx/rootfs/patches/nginx-1.27.1-balancer_pool_max_retry.patch new file mode 100644 index 0000000000..8ee44ea9b5 --- /dev/null +++ b/images/nginx/rootfs/patches/nginx-1.27.1-balancer_pool_max_retry.patch @@ -0,0 +1,27 @@ +diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c +index d04d91e..397cb08 100644 +--- a/src/http/ngx_http_upstream.c ++++ b/src/http/ngx_http_upstream.c +@@ -4378,6 +4378,9 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u, + if (u->peer.cached && ft_type == NGX_HTTP_UPSTREAM_FT_ERROR) { + /* TODO: inform balancer instead */ + u->peer.tries++; ++ if (u->peer.notify) { ++ u->peer.notify(&u->peer, u->peer.data, NGX_HTTP_UPSTREAM_NOTIFY_CACHED_CONNECTION_ERROR); ++ } + } + + switch (ft_type) { +diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h +index f6621af..2b5957e 100644 +--- a/src/http/ngx_http_upstream.h ++++ b/src/http/ngx_http_upstream.h +@@ -55,6 +55,8 @@ + #define NGX_HTTP_UPSTREAM_IGN_XA_CHARSET 0x00000100 + #define NGX_HTTP_UPSTREAM_IGN_VARY 0x00000200 + ++#define NGX_HTTP_UPSTREAM_NOTIFY_CACHED_CONNECTION_ERROR 0x1 ++ + + typedef struct { + ngx_uint_t status; diff --git a/images/nginx/rootfs/patches/09_nginx-1.25.3-balancer_status_code.patch b/images/nginx/rootfs/patches/nginx-1.27.1-balancer_status_code.patch similarity index 100% rename from images/nginx/rootfs/patches/09_nginx-1.25.3-balancer_status_code.patch rename to images/nginx/rootfs/patches/nginx-1.27.1-balancer_status_code.patch diff --git a/images/nginx/rootfs/patches/nginx-1.27.1-builtin_error_page_footer.patch b/images/nginx/rootfs/patches/nginx-1.27.1-builtin_error_page_footer.patch new file mode 100644 index 0000000000..2212ab459b --- /dev/null +++ b/images/nginx/rootfs/patches/nginx-1.27.1-builtin_error_page_footer.patch @@ -0,0 +1,13 @@ +diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c +index 64e5acd..f5374f6 100644 +--- a/src/http/ngx_http_special_response.c ++++ b/src/http/ngx_http_special_response.c +@@ -26,7 +26,7 @@ static u_char ngx_http_error_full_tail[] = + + + static u_char ngx_http_error_tail[] = +-"