AlinsRan commented on code in PR #10729:
URL: https://github.com/apache/apisix/pull/10729#discussion_r1440045135
##########
Makefile:
##########
@@ -126,12 +128,12 @@ endef
.PHONY: runtime
runtime:
ifeq ($(ENV_NGINX_EXEC), )
-ifeq ("$(wildcard /usr/local/openresty-debug/bin/openresty)", "")
+ifeq ("$(wildcard /usr/local/openresty/bin/openresty)", "")
@$(call func_echo_warn_status, "WARNING: OpenResty not found. You have
to install OpenResty and add the binary file to PATH before install Apache
APISIX.")
exit 1
else
- $(eval ENV_NGINX_EXEC := /usr/local/openresty-debug/bin/openresty)
- @$(call func_echo_status, "Use openresty-debug as default runtime")
+ $(eval ENV_NGINX_EXEC := /usr/local/openresty/bin/openresty)
Review Comment:
Do not install to openrest-debug
##########
ci/centos7-ci.sh:
##########
@@ -43,9 +42,9 @@ install_dependencies() {
# install openresty to make apisix's rpm test work
yum install -y yum-utils && yum-config-manager --add-repo
https://openresty.org/package/centos/openresty.repo
- export luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2
-DLUAJIT_ENABLE_LUA52COMPAT -O0"
- export debug_args=--with-debug
Review Comment:
`./build-apisix-runtime.sh latest` contains debug information.
Without `with-debug`, our test cases cannot pass.
##########
utils/install-dependencies.sh:
##########
@@ -45,31 +45,25 @@ function install_dependencies_with_aur() {
# Install dependencies on centos and fedora
function install_dependencies_with_yum() {
sudo yum install -y yum-utils
-
- local common_dep="curl wget git gcc openresty-openssl111-devel unzip pcre
pcre-devel openldap-devel"
- if [ "${1}" == "centos" ]; then
- # add APISIX source
- local apisix_pkg=apache-apisix-repo-1.0-1.noarch
- rpm -q --quiet ${apisix_pkg} || sudo yum install -y
https://repos.apiseven.com/packages/centos/${apisix_pkg}.rpm
-
- # install apisix-runtime and some compilation tools
- # shellcheck disable=SC2086
- sudo yum install -y apisix-runtime $common_dep
- else
- # add OpenResty source
- sudo yum-config-manager --add-repo
"https://openresty.org/package/${1}/openresty.repo"
-
- # install OpenResty and some compilation tools
- # shellcheck disable=SC2086
- sudo yum install -y openresty $common_dep
+ sudo yum-config-manager --add-repo
"https://openresty.org/package/${1}/openresty.repo"
+ if [[ "${1}" == "centos" ]]; then
+ sudo yum -y install centos-release-scl
+ sudo yum -y install devtoolset-9 patch wget
+ set +eu
+ source scl_source enable devtoolset-9
+ set -eu
fi
+ sudo yum install -y \
+ gcc gcc-c++ curl wget unzip xz gnupg perl-ExtUtils-Embed cpanminus
patch \
+ perl perl-devel pcre pcre-devel openldap-devel \
+ openresty-zlib-devel openresty-pcre-devel
}
# Install dependencies on ubuntu and debian
function install_dependencies_with_apt() {
# add OpenResty source
sudo apt-get update
- sudo apt-get -y install software-properties-common wget lsb-release
+ sudo apt-get -y install software-properties-common wget lsb-release gnupg
patch
Review Comment:
The reason is the same as before, unless we do not build from the apisix
runtime source code.
##########
Makefile:
##########
@@ -40,13 +40,17 @@ ENV_DOCKER ?= docker
ENV_DOCKER_COMPOSE ?= docker-compose --project-directory $(CURDIR) -p
$(project_name) -f $(project_compose_ci)
ENV_NGINX ?= $(ENV_NGINX_EXEC) -p $(CURDIR) -c
$(CURDIR)/conf/nginx.conf
ENV_NGINX_EXEC := $(shell command -v openresty 2>/dev/null || command
-v nginx 2>/dev/null)
-ENV_OPENSSL_PREFIX ?= $(addprefix $(ENV_NGINX_PREFIX), openssl3)
+ENV_OPENSSL_PREFIX ?= /usr/local/openresty/openssl3
Review Comment:
By default, `ENV_ NGINX_ PREFIX` is empty.
Only when it is set, or when openssl3 dir is empty, it will take effect in
the future
##########
utils/install-dependencies.sh:
##########
@@ -45,31 +45,25 @@ function install_dependencies_with_aur() {
# Install dependencies on centos and fedora
function install_dependencies_with_yum() {
sudo yum install -y yum-utils
-
- local common_dep="curl wget git gcc openresty-openssl111-devel unzip pcre
pcre-devel openldap-devel"
- if [ "${1}" == "centos" ]; then
- # add APISIX source
- local apisix_pkg=apache-apisix-repo-1.0-1.noarch
- rpm -q --quiet ${apisix_pkg} || sudo yum install -y
https://repos.apiseven.com/packages/centos/${apisix_pkg}.rpm
-
- # install apisix-runtime and some compilation tools
- # shellcheck disable=SC2086
- sudo yum install -y apisix-runtime $common_dep
- else
- # add OpenResty source
- sudo yum-config-manager --add-repo
"https://openresty.org/package/${1}/openresty.repo"
-
- # install OpenResty and some compilation tools
- # shellcheck disable=SC2086
- sudo yum install -y openresty $common_dep
+ sudo yum-config-manager --add-repo
"https://openresty.org/package/${1}/openresty.repo"
Review Comment:
yes
##########
ci/redhat-ci.sh:
##########
@@ -36,12 +36,9 @@ install_dependencies() {
# install apisix-runtime to make apisix's rpm test work
yum install -y yum-utils && yum-config-manager --add-repo
https://openresty.org/package/centos/openresty.repo
- rpm --import https://repos.apiseven.com/KEYS
- yum -y install
https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm
-
- export luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2
-DLUAJIT_ENABLE_LUA52COMPAT -O0"
- export debug_args=--with-debug
+ yum install -y openresty-pcre-devel openresty-zlib-devel
Review Comment:
It is required to build the apisix-runtime.
##########
Makefile:
##########
@@ -126,12 +128,12 @@ endef
.PHONY: runtime
runtime:
ifeq ($(ENV_NGINX_EXEC), )
-ifeq ("$(wildcard /usr/local/openresty-debug/bin/openresty)", "")
+ifeq ("$(wildcard /usr/local/openresty/bin/openresty)", "")
Review Comment:
Do not install to openrest-debug
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]