This is an automated email from the ASF dual-hosted git repository.

monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 847db2a2d chore: remove the shell script and docs for installing 
APISIX on MacOS (#10864)
847db2a2d is described below

commit 847db2a2d9084791f6c337bbe6e7c1b9c2f43728
Author: Vacant <vacant2...@gmail.com>
AuthorDate: Wed Jan 24 17:25:55 2024 +0800

    chore: remove the shell script and docs for installing APISIX on MacOS 
(#10864)
---
 Makefile                               | 33 +--------------------------------
 apisix-master-0.rockspec               |  2 +-
 benchmark/run.sh                       | 18 ++++--------------
 docs/en/latest/building-apisix.md      |  6 ------
 docs/en/latest/install-dependencies.md |  2 +-
 docs/zh/latest/building-apisix.md      |  6 ------
 docs/zh/latest/install-dependencies.md |  2 +-
 utils/install-dependencies.sh          | 19 ++++++-------------
 8 files changed, 14 insertions(+), 74 deletions(-)

diff --git a/Makefile b/Makefile
index 7f285b91e..1482198f0 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,6 @@ ENV_LUAROCKS           ?= luarocks
 ENV_INST_PREFIX        ?= /usr
 ENV_INST_LUADIR        ?= $(ENV_INST_PREFIX)/share/lua/5.1
 ENV_INST_BINDIR        ?= $(ENV_INST_PREFIX)/bin
-ENV_HOMEBREW_PREFIX    ?= /usr/local
 ENV_RUNTIME_VER             ?= $(shell $(ENV_NGINX_EXEC) -V 2>&1 | tr ' ' '\n' 
 | grep 'APISIX_RUNTIME_VER' | cut -d '=' -f2)
 
 -include .requirements
@@ -67,29 +66,6 @@ ifneq ($(shell test -d $(ENV_OPENSSL_PREFIX) && echo -n 
yes), yes)
        endif
 endif
 
-# ENV patch for darwin
-ifeq ($(ENV_OS_NAME), darwin)
-       ifeq ($(ENV_OS_ARCH), arm64)
-               ENV_HOMEBREW_PREFIX := /opt/homebrew
-               ENV_INST_BINDIR := $(ENV_INST_PREFIX)/local/bin
-               ENV_INST_LUADIR := $(shell which lua | xargs realpath | sed 
's/bin\/lua//g')
-       endif
-
-       # OSX archive `._` cache file
-       ENV_TAR      := COPYFILE_DISABLE=1 $(ENV_TAR)
-       ENV_LUAROCKS := $(ENV_LUAROCKS) 
--lua-dir=$(ENV_HOMEBREW_PREFIX)/opt/lua@5.1
-
-       ifeq ($(shell test -d $(ENV_HOMEBREW_PREFIX)/opt/openresty-openssl && 
echo -n yes), yes)
-               ENV_OPENSSL_PREFIX := 
$(ENV_HOMEBREW_PREFIX)/opt/openresty-openssl
-       endif
-       ifeq ($(shell test -d $(ENV_HOMEBREW_PREFIX)/opt/openresty-openssl3 && 
echo -n yes), yes)
-               ENV_OPENSSL_PREFIX := 
$(ENV_HOMEBREW_PREFIX)/opt/openresty-openssl3
-       endif
-       ifeq ($(shell test -d $(ENV_HOMEBREW_PREFIX)/opt/pcre && echo -n yes), 
yes)
-               ENV_PCRE_PREFIX := $(ENV_HOMEBREW_PREFIX)/opt/pcre
-       endif
-endif
-
 
 # Makefile basic extension function
 _color_red    =\E[1;31m
@@ -144,13 +120,7 @@ endif
 .PHONY: help
 help:
        @$(call func_echo_success_status, "Makefile rules:")
-       @echo
-       @if [ '$(ENV_OS_NAME)' = 'darwin' ]; then \
-               awk '{ if(match($$0, /^#{3}([^:]+):(.*)$$/)){ split($$0, res, 
":"); gsub(/^#{3}[ ]*/, "", res[1]); _desc=$$0; gsub(/^#{3}([^:]+):[ \t]*/, "", 
_desc); printf("    make %-15s : %-10s\n", res[1], _desc) } }' Makefile; \
-       else \
-               awk '{ if(match($$0, /^\s*#{3}\s*([^:]+)\s*:\s*(.*)$$/, res)){ 
printf("    make %-15s : %-10s\n", res[1], res[2]) } }' Makefile; \
-       fi
-       @echo
+       @awk '{ if(match($$0, /^\s*#{3}\s*([^:]+)\s*:\s*(.*)$$/, res)){ 
printf("    make %-15s : %-10s\n", res[1], res[2]) } }' Makefile
 
 
 ### deps : Installing dependencies
@@ -161,7 +131,6 @@ deps: install-runtime
                mkdir -p ~/.luarocks; \
                $(ENV_LUAROCKS) config $(ENV_LUAROCKS_FLAG_LOCAL) 
variables.OPENSSL_LIBDIR $(addprefix $(ENV_OPENSSL_PREFIX), /lib); \
                $(ENV_LUAROCKS) config $(ENV_LUAROCKS_FLAG_LOCAL) 
variables.OPENSSL_INCDIR $(addprefix $(ENV_OPENSSL_PREFIX), /include); \
-               [ '$(ENV_OS_NAME)' == 'darwin' ] && $(ENV_LUAROCKS) config 
$(ENV_LUAROCKS_FLAG_LOCAL) variables.PCRE_INCDIR $(addprefix 
$(ENV_PCRE_PREFIX), /include); \
                $(ENV_LUAROCKS) install apisix-master-0.rockspec --tree deps 
--only-deps $(ENV_LUAROCKS_SERVER_OPT); \
        else \
                $(call func_echo_warn_status, "WARNING: You're not using 
LuaRocks 3.x; please remove the luarocks and reinstall it via 
https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh";);
 \
diff --git a/apisix-master-0.rockspec b/apisix-master-0.rockspec
index c7314037a..7ad0d7226 100644
--- a/apisix-master-0.rockspec
+++ b/apisix-master-0.rockspec
@@ -17,7 +17,7 @@
 
 package = "apisix"
 version = "master-0"
-supported_platforms = {"linux", "macosx"}
+supported_platforms = {"linux"}
 
 source = {
     url = "git://github.com/apache/apisix",
diff --git a/benchmark/run.sh b/benchmark/run.sh
index f119afb84..fb185c93c 100755
--- a/benchmark/run.sh
+++ b/benchmark/run.sh
@@ -57,15 +57,9 @@ do
     fi
 done
 
-if [[ "$(uname)" == "Darwin" ]]; then
-    sed  -i "" "s/\- proxy-mirror .*/#\- proxy-mirror/g" 
conf/config-default.yaml
-    sed  -i "" "s/\- proxy-cache .*/#\- proxy-cache/g" conf/config-default.yaml
-    sed  -i "" "s/listen .*;/$nginx_listen/g" benchmark/server/conf/nginx.conf
-else
-    sed  -i "s/\- proxy-mirror/#\- proxy-mirror/g" conf/config-default.yaml
-    sed  -i "s/\- proxy-cache/#\- proxy-cache/g" conf/config-default.yaml
-    sed  -i "s/listen .*;/$nginx_listen/g" benchmark/server/conf/nginx.conf
-fi
+sed  -i "s/\- proxy-mirror/#\- proxy-mirror/g" conf/config-default.yaml
+sed  -i "s/\- proxy-cache/#\- proxy-cache/g" conf/config-default.yaml
+sed  -i "s/listen .*;/$nginx_listen/g" benchmark/server/conf/nginx.conf
 
 echo "
 nginx_config:
@@ -144,11 +138,7 @@ echo -e "\n\nfake empty apisix server: $worker_cnt worker"
 
 sleep 1
 
-if [[ "$(uname)" == "Darwin" ]]; then
-    sed  -i "" "s/worker_processes [0-9]*/worker_processes $worker_cnt/g" 
benchmark/fake-apisix/conf/nginx.conf
-else
-    sed  -i "s/worker_processes [0-9]*/worker_processes $worker_cnt/g" 
benchmark/fake-apisix/conf/nginx.conf
-fi
+sed  -i "s/worker_processes [0-9]*/worker_processes $worker_cnt/g" 
benchmark/fake-apisix/conf/nginx.conf
 
 sudo ${fake_apisix_cmd} || exit 1
 
diff --git a/docs/en/latest/building-apisix.md 
b/docs/en/latest/building-apisix.md
index 1c5206ad3..413739c9b 100644
--- a/docs/en/latest/building-apisix.md
+++ b/docs/en/latest/building-apisix.md
@@ -254,12 +254,6 @@ For the error `Error unknown directive "lua_package_path" 
in /API_ASPIX/apisix/t
   export PATH=/usr/local/openresty/nginx/sbin:$PATH
   ```
 
-- macOS default installation path (view homebrew):
-
-  ```shell
-  export PATH=/usr/local/opt/openresty/nginx/sbin:$PATH
-  ```
-
 #### Running a specific test case
 
 To run a specific test case, use the command below:
diff --git a/docs/en/latest/install-dependencies.md 
b/docs/en/latest/install-dependencies.md
index 0deacec48..83545f2cf 100644
--- a/docs/en/latest/install-dependencies.md
+++ b/docs/en/latest/install-dependencies.md
@@ -37,7 +37,7 @@ title: Install Dependencies
 
 Run the following command to install Apache APISIX's dependencies on a 
supported operating system.
 
-Supported OS versions: CentOS7, Fedora31 & 32, Ubuntu 16.04 & 18.04, Debian 9 
& 10, Arch Linux, Mac OSX
+Supported OS versions: CentOS7, Fedora31 & 32, Ubuntu 16.04 & 18.04, Debian 9 
& 10, Arch Linux.
 
 Note that in the case of Arch Linux, we use `openresty` from the AUR, thus 
requiring a AUR helper. For now `yay` and `pacaur` are supported.
 
diff --git a/docs/zh/latest/building-apisix.md 
b/docs/zh/latest/building-apisix.md
index e27fc1176..2a16ab0b1 100644
--- a/docs/zh/latest/building-apisix.md
+++ b/docs/zh/latest/building-apisix.md
@@ -252,12 +252,6 @@ APISIX 的一些特性需要在 OpenResty 中引入额外的 NGINX 模块。
   export PATH=/usr/local/openresty/nginx/sbin:$PATH
   ```
 
-- macOS 通过 `homebrew` 的默认安装路径:
-
-  ```shell
-  export PATH=/usr/local/opt/openresty/nginx/sbin:$PATH
-  ```
-
 ### 运行指定的测试用例
 
 使用以下命令运行指定的测试用例:
diff --git a/docs/zh/latest/install-dependencies.md 
b/docs/zh/latest/install-dependencies.md
index 1925956c6..c7d36f511 100644
--- a/docs/zh/latest/install-dependencies.md
+++ b/docs/zh/latest/install-dependencies.md
@@ -37,7 +37,7 @@ title: 安装依赖
 
 在支持的操作系统上运行以下指令即可安装 Apache APISIX dependencies。
 
-支持的操作系统版本:CentOS 7, Fedora 31 & 32, Ubuntu 16.04 & 18.04, Debian 9 & 10, Arch 
Linux, Mac OSX。
+支持的操作系统版本:CentOS 7, Fedora 31 & 32, Ubuntu 16.04 & 18.04, Debian 9 & 10, Arch 
Linux。
 
 注意,对于 Arch Linux 来说,我们使用 AUR 源中的 `openresty`,所以需要 AUR Helper 才能正常安装。目前支持 `yay` 
和 `pacaur`。
 
diff --git a/utils/install-dependencies.sh b/utils/install-dependencies.sh
index bdf545984..058a87eed 100755
--- a/utils/install-dependencies.sh
+++ b/utils/install-dependencies.sh
@@ -81,12 +81,6 @@ function install_dependencies_with_apt() {
     sudo apt-get install -y curl make gcc g++ cpanminus libpcre3 libpcre3-dev 
libldap2-dev unzip openresty-zlib-dev openresty-pcre-dev
 }
 
-# Install dependencies on mac osx
-function install_dependencies_on_mac_osx() {
-    # install OpenResty, etcd and some compilation tools
-    brew install openresty/brew/openresty luarocks lua@5.1 wget curl git pcre 
openldap
-}
-
 # Identify the different distributions and call the corresponding function
 function multi_distro_installation() {
     if grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
@@ -102,7 +96,7 @@ function multi_distro_installation() {
     elif grep -Eqi "Arch" /etc/issue || grep -Eqi "EndeavourOS" /etc/issue || 
grep -Eq "Arch" /etc/*-release; then
         install_dependencies_with_aur
     else
-        echo "Non-supported operating system version"
+        echo "Non-supported distribution, APISIX is only supported on 
Linux-based systems"
         exit 1
     fi
     install_apisix_runtime
@@ -120,7 +114,7 @@ function multi_distro_uninstallation() {
     elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; 
then
         sudo apt-get autoremove -y openresty-zlib-dev openresty-pcre-dev
     else
-        echo "Non-supported operating system version"
+        echo "Non-supported distribution, APISIX is only supported on 
Linux-based systems"
         exit 1
     fi
 }
@@ -152,12 +146,11 @@ function main() {
         if [[ "${OS_NAME}" == "linux" ]]; then
             multi_distro_installation
             install_luarocks
-        elif [[ "${OS_NAME}" == "darwin" ]]; then
-            install_dependencies_on_mac_osx
+            return
         else
-            echo "Non-supported distribution"
+            echo "Non-supported distribution, APISIX is only supported on 
Linux-based systems"
+            exit 1
         fi
-        return
     fi
 
     case_opt=$1
@@ -169,7 +162,7 @@ function main() {
             if [[ "${OS_NAME}" == "linux" ]]; then
                 multi_distro_uninstallation
             else
-                echo "Non-supported distribution"
+                echo "Non-supported distribution, APISIX is only supported on 
Linux-based systems"
             fi
         ;;
         *)

Reply via email to