From 89895f60594d5cb57d18fb280767a1a0854b8600 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Wed, 11 Sep 2024 21:45:20 +0800 Subject: [PATCH] fix(build): use a more reliable way to replace websocket library --- build/BUILD.bazel | 3 --- build/openresty/BUILD.openresty.bazel | 9 +++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build/BUILD.bazel b/build/BUILD.bazel index 15150345fde..3822ba21373 100644 --- a/build/BUILD.bazel +++ b/build/BUILD.bazel @@ -249,9 +249,6 @@ kong_genrule( mkdir -p ${BUILD_DESTDIR}/etc/kong/ cp ${WORKSPACE_PATH}/kong.conf.default ${BUILD_DESTDIR}/etc/kong/kong.conf.default - # TODO: remove this after lua-resty-websocket becomes a patch or merged to upstream - rm -rf ${BUILD_DESTDIR}/openresty/lualib/resty/websocket - # housecleaning if [[ -d ${BUILD_DESTDIR}/kong/lib64 ]]; then cp -r ${BUILD_DESTDIR}/kong/lib64/* ${BUILD_DESTDIR}/kong/lib/. diff --git a/build/openresty/BUILD.openresty.bazel b/build/openresty/BUILD.openresty.bazel index 8d09004b6a5..525d551252f 100644 --- a/build/openresty/BUILD.openresty.bazel +++ b/build/openresty/BUILD.openresty.bazel @@ -314,10 +314,11 @@ configure_make( "//conditions:default": [], }), postfix_script = select({ - # macOS ln doesn't support -r/relative path - "@platforms//os:macos": "ln -sf openresty/nginx/sbin/nginx openresty/bin/openresty", - "//conditions:default": "ln -srf openresty/nginx/sbin/nginx openresty/bin/openresty", - }), + # macOS ln doesn't support -r/relative path + "@platforms//os:macos": "ln -sf openresty/nginx/sbin/nginx openresty/bin/openresty", + "//conditions:default": "ln -srf openresty/nginx/sbin/nginx openresty/bin/openresty", + }) + # TODO: remove this after lua-resty-websocket becomes a patch or merged to upstream + " && rm -rf $INSTALLDIR/lualib/resty/websocket", targets = [ "-j " + KONG_VAR["NPROC"], "install -j" + KONG_VAR["NPROC"],