diff --git a/.travis.yml b/.travis.yml index 06d4fe5..c63d240 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ _linux-s390x: &linux-s390x script: - util/mirror-tarballs > build.log 2>&1 || (cat build.log && exit 1) - cd "openresty-$(./util/ver)" - - ./configure --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) + - ./configure $ENABLE_HTTP3_OPTION --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - sudo make install > build.log 2>&1 || (cat build.log && exit 1) - cd .. @@ -85,7 +85,7 @@ _linux-ppc64le: &linux-ppc64le script: - util/mirror-tarballs > build.log 2>&1 || (cat build.log && exit 1) - cd "openresty-$(./util/ver)" - - ./configure --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) + - ./configure $ENABLE_HTTP3_OPTION --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - sudo make install > build.log 2>&1 || (cat build.log && exit 1) - cd .. @@ -110,16 +110,16 @@ env: - OPENRESTY_PREFIX=/opt/openresty jobs: - OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d - - OPENSSL_VER=1.1.1s OPENSSL_PATCH_VER=1.1.1f + - OPENSSL_VER=1.1.1s OPENSSL_PATCH_VER=1.1.1f ENABLE_HTTP3_OPTION=--with-http_v3_module jobs: include: - <<: *linux-s390x env: OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d - <<: *linux-s390x - env: OPENSSL_VER=1.1.1l OPENSSL_PATCH_VER=1.1.1f + env: OPENSSL_VER=1.1.1l OPENSSL_PATCH_VER=1.1.1f ENABLE_HTTP3_OPTION=--with-http_v3_module - <<: *linux-ppc64le - env: OPENSSL_VER=1.1.1s OPENSSL_PATCH_VER=1.1.1f + env: OPENSSL_VER=1.1.1s OPENSSL_PATCH_VER=1.1.1f ENABLE_HTTP3_OPTION=--with-http_v3_module install: - cpanm --sudo --notest Test::Nginx IPC::Run3 > build.log 2>&1 || (cat build.log && exit 1) @@ -143,7 +143,7 @@ install: script: - util/mirror-tarballs > build.log 2>&1 || (cat build.log && exit 1) - cd "openresty-$(./util/ver)" - - ./configure --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) + - ./configure $ENABLE_HTTP3_OPTION --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - sudo make install > build.log 2>&1 || (cat build.log && exit 1) - cd .. diff --git a/patches/nginx-1.25.1-always_enable_cc_feature_tests.patch b/patches/nginx-1.25.1-always_enable_cc_feature_tests.patch new file mode 100644 index 0000000..e28ec6a --- /dev/null +++ b/patches/nginx-1.25.1-always_enable_cc_feature_tests.patch @@ -0,0 +1,11 @@ +--- nginx-1.25.1/auto/cc/conf 2015-10-30 22:47:50.000000000 +0800 ++++ nginx-1.25.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" + +-if [ "$NGX_PLATFORM" != win32 ]; then ++if [ 1 ]; then + + if test -n "$NGX_LD_OPT"; then + ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\" diff --git a/patches/nginx-1.25.1-balancer_status_code.patch b/patches/nginx-1.25.1-balancer_status_code.patch new file mode 100644 index 0000000..c4d87e2 --- /dev/null +++ b/patches/nginx-1.25.1-balancer_status_code.patch @@ -0,0 +1,72 @@ +diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c +index f8d5707d..6efe0047 100644 +--- a/src/http/ngx_http_upstream.c ++++ b/src/http/ngx_http_upstream.c +@@ -1515,6 +1515,11 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) + return; + } + ++ if (rc >= NGX_HTTP_SPECIAL_RESPONSE) { ++ ngx_http_upstream_finalize_request(r, u, rc); ++ return; ++ } ++ + u->state->peer = u->peer.name; + + if (rc == NGX_BUSY) { +diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h +index 3e714e5b..dfbb25e0 100644 +--- a/src/http/ngx_http_upstream.h ++++ b/src/http/ngx_http_upstream.h +@@ -427,4 +427,9 @@ extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[]; + extern ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[]; + + ++#ifndef HAVE_BALANCER_STATUS_CODE_PATCH ++#define HAVE_BALANCER_STATUS_CODE_PATCH ++#endif ++ ++ + #endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */ +diff --git a/src/stream/ngx_stream.h b/src/stream/ngx_stream.h +index 09d24593..d8b4b584 100644 +--- a/src/stream/ngx_stream.h ++++ b/src/stream/ngx_stream.h +@@ -27,6 +27,7 @@ typedef struct ngx_stream_session_s ngx_stream_session_t; + + + #define NGX_STREAM_OK 200 ++#define NGX_STREAM_SPECIAL_RESPONSE 300 + #define NGX_STREAM_BAD_REQUEST 400 + #define NGX_STREAM_FORBIDDEN 403 + #define NGX_STREAM_INTERNAL_SERVER_ERROR 500 +diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c +index 818d7329..329dcdc6 100644 +--- a/src/stream/ngx_stream_proxy_module.c ++++ b/src/stream/ngx_stream_proxy_module.c +@@ -691,6 +691,11 @@ ngx_stream_proxy_connect(ngx_stream_session_t *s) + return; + } + ++ if (rc >= NGX_STREAM_SPECIAL_RESPONSE) { ++ ngx_stream_proxy_finalize(s, rc); ++ return; ++ } ++ + u->state->peer = u->peer.name; + + if (rc == NGX_BUSY) { +diff --git a/src/stream/ngx_stream_upstream.h b/src/stream/ngx_stream_upstream.h +index 73947f46..21bc0ad7 100644 +--- a/src/stream/ngx_stream_upstream.h ++++ b/src/stream/ngx_stream_upstream.h +@@ -151,4 +151,9 @@ ngx_stream_upstream_srv_conf_t *ngx_stream_upstream_add(ngx_conf_t *cf, + extern ngx_module_t ngx_stream_upstream_module; + + ++#ifndef HAVE_BALANCER_STATUS_CODE_PATCH ++#define HAVE_BALANCER_STATUS_CODE_PATCH ++#endif ++ ++ + #endif /* _NGX_STREAM_UPSTREAM_H_INCLUDED_ */ diff --git a/patches/nginx-1.25.1-builtin_error_page_footer.patch b/patches/nginx-1.25.1-builtin_error_page_footer.patch new file mode 100644 index 0000000..2212ab4 --- /dev/null +++ b/patches/nginx-1.25.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[] = +-"