From d1558bbbd0c9f7cfc4d80f4f0b1a8e64a223fe21 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Wed, 22 Jan 2025 18:17:36 +0545 Subject: [PATCH 1/9] chore: upgrade openresty version to v1.27.11 --- build-apisix-runtime.sh | 45 ++++------------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index dc57c38c9..e301e9310 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -21,49 +21,14 @@ ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -W # dependencies for building openresty OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"} -OPENRESTY_VERSION="1.25.3.2" -ngx_multi_upstream_module_ver="1.2.0" +OPENRESTY_VERSION="1.27.1.1" +ngx_multi_upstream_module_ver="12711" mod_dubbo_ver="1.0.2" -apisix_nginx_module_ver="1.16.2" +apisix_nginx_module_ver="12711" wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" - -install_openssl_3(){ - local fips="" - if [ "$ENABLE_FIPS" == "true" ]; then - fips="enable-fips" - fi - # required for openssl 3.x config - cpanm IPC/Cmd.pm - wget --no-check-certificate https://github.com/openssl/openssl/releases/download/openssl-3.2.0/openssl-${OPENSSL_VERSION}.tar.gz - tar xvf openssl-${OPENSSL_VERSION}.tar.gz - cd openssl-${OPENSSL_VERSION}/ - export LDFLAGS="-Wl,-rpath,$zlib_prefix/lib:$OPENSSL_PREFIX/lib" - ./config $fips \ - shared \ - zlib \ - enable-camellia enable-seed enable-rfc3779 \ - enable-cms enable-md2 enable-rc5 \ - enable-weak-ssl-ciphers \ - --prefix=$OPENSSL_PREFIX \ - --libdir=lib \ - --with-zlib-lib=$zlib_prefix/lib \ - --with-zlib-include=$zlib_prefix/include - make -j $(nproc) LD_LIBRARY_PATH= CC="gcc" - sudo make install - if [ -f "$OPENSSL_CONF_PATH" ]; then - sudo cp "$OPENSSL_CONF_PATH" "$OPENSSL_PREFIX"/ssl/openssl.cnf - fi - if [ "$ENABLE_FIPS" == "true" ]; then - $OPENSSL_PREFIX/bin/openssl fipsinstall -out $OPENSSL_PREFIX/ssl/fipsmodule.cnf -module $OPENSSL_PREFIX/lib/ossl-modules/fips.so - sudo sed -i 's@# .include fipsmodule.cnf@.include '"$OPENSSL_PREFIX"'/ssl/fipsmodule.cnf@g; s/# \(fips = fips_sect\)/\1\nbase = base_sect\n\n[base_sect]\nactivate=1\n/g' $OPENSSL_PREFIX/ssl/openssl.cnf - fi - cd .. -} - - if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$runtime_version" == "0.0.0" ]; then debug_args="--with-debug" fi @@ -74,8 +39,6 @@ workdir=$(mktemp -d) cd "$workdir" || exit 1 -install_openssl_3 - wget --no-check-certificate https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz tar -zxvpf openresty-${OPENRESTY_VERSION}.tar.gz > /dev/null @@ -91,7 +54,7 @@ if [ "$repo" == ngx_multi_upstream_module ]; then cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} else git clone --depth=1 -b $ngx_multi_upstream_module_ver \ - https://github.com/api7/ngx_multi_upstream_module.git \ + https://github.com/shreemaan-abhishek/ngx_multi_upstream_module.git \ ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} fi From 6d7b30d00a36b8811e643a4f5250e9a6733acee4 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Thu, 23 Jan 2025 09:45:26 +0545 Subject: [PATCH 2/9] add back openssl3 installation block --- build-apisix-runtime.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index e301e9310..3ac9e08bb 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -29,6 +29,41 @@ wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" + +install_openssl_3(){ + local fips="" + if [ "$ENABLE_FIPS" == "true" ]; then + fips="enable-fips" + fi + # required for openssl 3.x config + cpanm IPC/Cmd.pm + wget --no-check-certificate https://github.com/openssl/openssl/releases/download/openssl-3.2.0/openssl-${OPENSSL_VERSION}.tar.gz + tar xvf openssl-${OPENSSL_VERSION}.tar.gz + cd openssl-${OPENSSL_VERSION}/ + export LDFLAGS="-Wl,-rpath,$zlib_prefix/lib:$OPENSSL_PREFIX/lib" + ./config $fips \ + shared \ + zlib \ + enable-camellia enable-seed enable-rfc3779 \ + enable-cms enable-md2 enable-rc5 \ + enable-weak-ssl-ciphers \ + --prefix=$OPENSSL_PREFIX \ + --libdir=lib \ + --with-zlib-lib=$zlib_prefix/lib \ + --with-zlib-include=$zlib_prefix/include + make -j $(nproc) LD_LIBRARY_PATH= CC="gcc" + sudo make install + if [ -f "$OPENSSL_CONF_PATH" ]; then + sudo cp "$OPENSSL_CONF_PATH" "$OPENSSL_PREFIX"/ssl/openssl.cnf + fi + if [ "$ENABLE_FIPS" == "true" ]; then + $OPENSSL_PREFIX/bin/openssl fipsinstall -out $OPENSSL_PREFIX/ssl/fipsmodule.cnf -module $OPENSSL_PREFIX/lib/ossl-modules/fips.so + sudo sed -i 's@# .include fipsmodule.cnf@.include '"$OPENSSL_PREFIX"'/ssl/fipsmodule.cnf@g; s/# \(fips = fips_sect\)/\1\nbase = base_sect\n\n[base_sect]\nactivate=1\n/g' $OPENSSL_PREFIX/ssl/openssl.cnf + fi + cd .. +} + + if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$runtime_version" == "0.0.0" ]; then debug_args="--with-debug" fi @@ -39,6 +74,8 @@ workdir=$(mktemp -d) cd "$workdir" || exit 1 +install_openssl_3 + wget --no-check-certificate https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz tar -zxvpf openresty-${OPENRESTY_VERSION}.tar.gz > /dev/null From c0ea59c527094f1aa29ab26299cf5bc5c97cfb15 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Tue, 28 Jan 2025 15:20:50 +0545 Subject: [PATCH 3/9] dibag --- build-apisix-runtime.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index 3ac9e08bb..3d8901506 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -71,6 +71,7 @@ fi prev_workdir="$PWD" repo=$(basename "$prev_workdir") workdir=$(mktemp -d) +echo $workdir dibag cd "$workdir" || exit 1 From c595b7a158f6107a1802b4f405a2aaa88432eee4 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Wed, 29 Jan 2025 18:09:24 +0545 Subject: [PATCH 4/9] modify apisix-base script --- build-apisix-base.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index f92e22f80..a508be7a6 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -4,9 +4,9 @@ set -x version=${version:-0.0.0} -OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.25.3.2} +OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.27.1.1} if [ "$OPENRESTY_VERSION" == "source" ] || [ "$OPENRESTY_VERSION" == "default" ]; then - OPENRESTY_VERSION="1.25.3.2" + OPENRESTY_VERSION="1.27.1.1" fi if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then @@ -19,9 +19,9 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then debug_args="--with-debug" OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"} else - ngx_multi_upstream_module_ver="1.2.0" + ngx_multi_upstream_module_ver="12711" mod_dubbo_ver="1.0.2" - apisix_nginx_module_ver="1.16.2" + apisix_nginx_module_ver="12711" wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" From 3b6d8fcb997643f568fa8fbb012a9a216dbde5a6 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Wed, 29 Jan 2025 18:41:20 +0545 Subject: [PATCH 5/9] use my personal repo in base.sh temporarily --- build-apisix-base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index a508be7a6..07402b775 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -41,7 +41,7 @@ if [ "$repo" == ngx_multi_upstream_module ]; then cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} else git clone --depth=1 -b $ngx_multi_upstream_module_ver \ - https://github.com/api7/ngx_multi_upstream_module.git \ + https://github.com/shreemaan-abhishek/ngx_multi_upstream_module.git \ ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} fi From 95e1744774263b7e84822399bb06f83ca1f7d821 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Tue, 4 Feb 2025 10:54:57 +0545 Subject: [PATCH 6/9] preserve cc variable --- build-apisix-runtime.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index 3d8901506..b9b5a650c 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -17,7 +17,7 @@ pcre_prefix=${OR_PREFIX}/pcre cc_opt=${cc_opt:-"-DNGX_LUA_ABORT_AT_PANIC -I$zlib_prefix/include -I$pcre_prefix/include -I$OPENSSL_PREFIX/include"} ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -Wl,-rpath,$zlib_prefix/lib:$pcre_prefix/lib:$OPENSSL_PREFIX/lib"} - +old_cc=${CC:-} # dependencies for building openresty OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"} @@ -158,7 +158,8 @@ else mv lua-resty-limit-traffic-$limit_ver bundle/lua-resty-limit-traffic-$or_limit_ver fi - +CC=${old_cc} +echo "dibag" ./configure --prefix="$OR_PREFIX" \ --with-cc-opt="-DAPISIX_RUNTIME_VER=$runtime_version $cc_opt" \ --with-ld-opt="-Wl,-rpath,$OR_PREFIX/wasmtime-c-api/lib $ld_opt" \ From 557c09c018c1ddc9ed4ab68a95fd35e5c2ccb43f Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Tue, 4 Feb 2025 14:11:15 +0545 Subject: [PATCH 7/9] reset cc --- build-apisix-runtime.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index b9b5a650c..556fba4e2 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -18,6 +18,7 @@ pcre_prefix=${OR_PREFIX}/pcre cc_opt=${cc_opt:-"-DNGX_LUA_ABORT_AT_PANIC -I$zlib_prefix/include -I$pcre_prefix/include -I$OPENSSL_PREFIX/include"} ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -Wl,-rpath,$zlib_prefix/lib:$pcre_prefix/lib:$OPENSSL_PREFIX/lib"} old_cc=${CC:-} +CC="" # dependencies for building openresty OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"} From ea1b44607795cf775e71eb915869aace37a823ca Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Thu, 6 Feb 2025 17:06:34 +0545 Subject: [PATCH 8/9] use real refs --- build-apisix-base.sh | 6 +++--- build-apisix-runtime.sh | 13 +++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 07402b775..4547b7751 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -19,9 +19,9 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then debug_args="--with-debug" OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"} else - ngx_multi_upstream_module_ver="12711" + ngx_multi_upstream_module_ver="1.3.0" mod_dubbo_ver="1.0.2" - apisix_nginx_module_ver="12711" + apisix_nginx_module_ver="1.18.0" wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" @@ -41,7 +41,7 @@ if [ "$repo" == ngx_multi_upstream_module ]; then cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} else git clone --depth=1 -b $ngx_multi_upstream_module_ver \ - https://github.com/shreemaan-abhishek/ngx_multi_upstream_module.git \ + https://github.com/api7/ngx_multi_upstream_module.git \ ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} fi diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index 556fba4e2..96d7a94d2 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -17,15 +17,14 @@ pcre_prefix=${OR_PREFIX}/pcre cc_opt=${cc_opt:-"-DNGX_LUA_ABORT_AT_PANIC -I$zlib_prefix/include -I$pcre_prefix/include -I$OPENSSL_PREFIX/include"} ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -Wl,-rpath,$zlib_prefix/lib:$pcre_prefix/lib:$OPENSSL_PREFIX/lib"} -old_cc=${CC:-} -CC="" + # dependencies for building openresty OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"} OPENRESTY_VERSION="1.27.1.1" -ngx_multi_upstream_module_ver="12711" +ngx_multi_upstream_module_ver="1.3.0" mod_dubbo_ver="1.0.2" -apisix_nginx_module_ver="12711" +apisix_nginx_module_ver="1.18.0" wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" @@ -72,7 +71,6 @@ fi prev_workdir="$PWD" repo=$(basename "$prev_workdir") workdir=$(mktemp -d) -echo $workdir dibag cd "$workdir" || exit 1 @@ -93,7 +91,7 @@ if [ "$repo" == ngx_multi_upstream_module ]; then cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} else git clone --depth=1 -b $ngx_multi_upstream_module_ver \ - https://github.com/shreemaan-abhishek/ngx_multi_upstream_module.git \ + https://github.com/api7/ngx_multi_upstream_module.git \ ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} fi @@ -159,8 +157,7 @@ else mv lua-resty-limit-traffic-$limit_ver bundle/lua-resty-limit-traffic-$or_limit_ver fi -CC=${old_cc} -echo "dibag" + ./configure --prefix="$OR_PREFIX" \ --with-cc-opt="-DAPISIX_RUNTIME_VER=$runtime_version $cc_opt" \ --with-ld-opt="-Wl,-rpath,$OR_PREFIX/wasmtime-c-api/lib $ld_opt" \ From a0cc3d8ca3870089c4f2cddda453f1ba20d03be5 Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Thu, 6 Feb 2025 18:44:40 +0545 Subject: [PATCH 9/9] bump multi upstream mod --- build-apisix-base.sh | 2 +- build-apisix-runtime.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 4547b7751..3496edb10 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -19,7 +19,7 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then debug_args="--with-debug" OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"} else - ngx_multi_upstream_module_ver="1.3.0" + ngx_multi_upstream_module_ver="1.3.1" mod_dubbo_ver="1.0.2" apisix_nginx_module_ver="1.18.0" wasm_nginx_module_ver="0.7.0" diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index 96d7a94d2..61bf48b53 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -22,7 +22,7 @@ ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -W # dependencies for building openresty OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"} OPENRESTY_VERSION="1.27.1.1" -ngx_multi_upstream_module_ver="1.3.0" +ngx_multi_upstream_module_ver="1.3.1" mod_dubbo_ver="1.0.2" apisix_nginx_module_ver="1.18.0" wasm_nginx_module_ver="0.7.0"