-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
62 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
|
||
APISIX_PACKAGE_NAME=apisix | ||
|
||
APISIX_RUNTIME=1.0.2 | ||
APISIX_RUNTIME=1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,41 +35,12 @@ sudo add-apt-repository -y "deb https://openresty.org/package/${arch_path}ubuntu | |
sudo add-apt-repository -y "deb http://repos.apiseven.com/packages/${arch_path}debian bullseye main" | ||
|
||
sudo apt-get update | ||
sudo apt-get install -y openresty-openssl111 openresty-openssl111-dev libldap2-dev openresty-pcre openresty-zlib | ||
sudo apt-get install -y libldap2-dev openresty-pcre-dev openresty-zlib-dev build-essential gcc g++ cpanminus | ||
|
||
COMPILE_OPENSSL3=${COMPILE_OPENSSL3-no} | ||
USE_OPENSSL3=${USE_OPENSSL3-no} | ||
OPENSSL3_PREFIX=${OPENSSL3_PREFIX-/home/runner} | ||
SSL_LIB_VERSION=${SSL_LIB_VERSION-openssl} | ||
ENABLE_FIPS=${ENABLE_FIPS:-"false"} | ||
|
||
if [ "$OPENRESTY_VERSION" == "source" ]; then | ||
export openssl_prefix=/usr/local/openresty/openssl111 | ||
export zlib_prefix=/usr/local/openresty/zlib | ||
export pcre_prefix=/usr/local/openresty/pcre | ||
|
||
export cc_opt="-DNGX_LUA_ABORT_AT_PANIC -I${zlib_prefix}/include -I${pcre_prefix}/include -I${openssl_prefix}/include" | ||
export 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" | ||
|
||
if [ "$COMPILE_OPENSSL3" == "yes" ]; then | ||
apt install -y build-essential | ||
git clone https://github.com/openssl/openssl | ||
cd openssl | ||
./Configure --prefix=$OPENSSL3_PREFIX/openssl-3.0 enable-fips | ||
make install | ||
bash -c "echo $OPENSSL3_PREFIX/openssl-3.0/lib64 > /etc/ld.so.conf.d/openssl3.conf" | ||
ldconfig | ||
$OPENSSL3_PREFIX/openssl-3.0/bin/openssl fipsinstall -out $OPENSSL3_PREFIX/openssl-3.0/ssl/fipsmodule.cnf -module $OPENSSL3_PREFIX/openssl-3.0/lib64/ossl-modules/fips.so | ||
sed -i 's@# .include [email protected] '"$OPENSSL3_PREFIX"'/openssl-3.0/ssl/fipsmodule.cnf@g; s/# \(fips = fips_sect\)/\1\nbase = base_sect\n\n[base_sect]\nactivate=1\n/g' $OPENSSL3_PREFIX/openssl-3.0/ssl/openssl.cnf | ||
cd .. | ||
fi | ||
|
||
if [ "$USE_OPENSSL3" == "yes" ]; then | ||
bash -c "echo $OPENSSL3_PREFIX/openssl-3.0/lib64 > /etc/ld.so.conf.d/openssl3.conf" | ||
ldconfig | ||
export cc_opt="-I$OPENSSL3_PREFIX/openssl-3.0/include" | ||
export ld_opt="-L$OPENSSL3_PREFIX/openssl-3.0/lib64 -Wl,-rpath,$OPENSSL3_PREFIX/openssl-3.0/lib64" | ||
fi | ||
|
||
if [ "$SSL_LIB_VERSION" == "tongsuo" ]; then | ||
export openssl_prefix=/usr/local/tongsuo | ||
export zlib_prefix=$OPENRESTY_PREFIX/zlib | ||
|
@@ -84,5 +55,10 @@ wget "https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/$ | |
chmod +x build-apisix-runtime.sh | ||
./build-apisix-runtime.sh latest | ||
|
||
if [ ! "$ENABLE_FIPS" == "true" ]; then | ||
curl -o /usr/local/openresty/openssl3/ssl/openssl.cnf \ | ||
https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/conf/openssl3/openssl.cnf | ||
fi | ||
|
||
# patch lua-resty-events | ||
sudo sed -i 's/log(ERR, "event worker failed: ", perr)/log(ngx.WARN, "event worker failed: ", perr)/' /usr/local/openresty/lualib/resty/events/worker.lua | ||
sed -i 's/log(ERR, "event worker failed: ", perr)/log(ngx.WARN, "event worker failed: ", perr)/' /usr/local/openresty/lualib/resty/events/worker.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters