Compare commits

..

22 Commits

Author SHA1 Message Date
3fd2b53ccb tests: fixed tests to reflect component version bumps. 2020-07-03 17:30:07 -07:00
156fd1fcf9 win32: avoided applying a patch for openssl 1.1.1g since it was already applied. 2020-07-03 17:27:32 -07:00
13b879394a win32: fixed the patch version for openssl 1.1.1g. 2020-07-03 17:01:39 -07:00
90894b2b48 win32: upgraded openssl to 1.1.1g. 2020-07-03 16:56:14 -07:00
1aa7a2bcd3 bumped version to 1.17.8.1. 2020-07-03 16:21:30 -07:00
f85fe22ac2 upgraded ngx_lua to 0.10.17 and lua-resty-core to 0.1.19. 2020-07-03 16:17:57 -07:00
11fbbe5c62 upgraded echo-nginx-module to 0.62, ngx_devel_kit to 0.3.1, lua-nginx-module to 0.10.16, stream-lua-nginx-module to 0.0.8, srcache-nginx-module to 0.32, resty-cli to 0.25, lua-cjson to 2.1.0.8, lua-resty-redis to 0.28, lua-resty-string to 0.12, lua-resty-lrucache to 0.10, lua-resty-core to 0.1.18, lua-resty-shell to 0.03 2020-07-03 15:35:07 +08:00
cee71edf71 upgraded resty-cli to 0.25rc3. 2020-06-30 14:04:24 -07:00
50717794af bugfix: nginx would crash when receiving SIGHUP in the single process mode.
Signed-off-by: Yichun Zhang (agentzh) <yichun@openresty.com>
2020-06-29 22:59:05 -07:00
6985198d46 bugfix: ngx_http_static_module: the 'Locatoin' response header value was not properly encoded by URI rules.
This may impose security vulnerabilities for Location values from
untrusted sources.

The corresponding tests are in the lua-nginx-module repo.
2020-06-25 16:50:22 -07:00
4568281eaf skipped the problematic pg_config test case. 2020-06-25 00:09:08 -07:00
afa9800e79 tests: updated tests to reflect recent changes. 2020-06-24 20:05:59 -07:00
5a03142ec3 configure: removed outdated '--with-luajit' option (always the default).
* keep the option to avoid the script from producing an error - it NOPs.
* removed a dead branch of code since it is now impossible for the
  `luajit` and `luajit_path` options to be both enabled at once.
* update `--help` output to remove mentions of PUC-Rio Lua
2020-06-24 20:02:44 -07:00
e3615c3522 configure: removed dead code since PUC-Lua isn't supported anymore. 2020-06-24 20:02:11 -07:00
947365b3b1 configure: updated options inherited from NGINX 1.17.8.
* removed duplicated `--without-stream_ssl_module` option
* removed obsolete `--with-pcre-conf-opt` option
* added "(defautl on) description to `--with-http_ssl_module` option
* moved `--without-stream` option to OpenResty's section
2020-06-24 20:01:28 -07:00
61f6ecb419 feature: passed C compiler option -g by default for statically linked openssl, pcre, and zlib libraries to enable debuginfo. 2020-06-24 19:59:32 -07:00
fc17ac5bc2 upgraded lua-resty-memcached to v0.15. 2020-05-11 13:01:13 -07:00
463d3e1de9 travis-ci: upgraded PCRE to 8.44. 2020-04-02 20:45:05 -07:00
e48becb75d travis-ci: upgraded OpenSSL to 1.1.1f, 1.0.2q, 1.1.0l, and fixed older versions downloads. 2020-04-02 20:45:05 -07:00
549d68b71b tests: sanity.t: fixed (again) test cases failing due to the last few commits.
Yet another fix for this test case. The util/fix-tests script seems to
be working fine and preserving the `--- out_like` section, so I honestly
have no idea why it keeps being overridden.
2020-04-01 13:42:52 -07:00
4debfd5a3c upgraded lua-cjson to 2.1.0.8rc1. 2020-04-01 11:46:56 -07:00
4b5cb7a546 patches: added the openssl-1.1.1f-sess_set_get_cb_yield patch. 2020-03-31 17:06:26 -07:00
9 changed files with 1247 additions and 1010 deletions

View File

@ -36,7 +36,7 @@ linux-s390x: &linux-s390x
- libpq-dev - libpq-dev
install: install:
- sudo cpanm --notest Test::Nginx IPC::Run3 > build.log 2>&1 || (cat build.log && exit 1) - sudo cpanm --notest Test::Nginx IPC::Run3 > build.log 2>&1 || (cat build.log && exit 1)
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz; fi - if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi
- tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz - tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz
- cd openssl-$OPENSSL_VER/ - cd openssl-$OPENSSL_VER/
- patch -p1 < ../patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch - patch -p1 < ../patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch
@ -63,7 +63,7 @@ cache:
env: env:
global: global:
- JOBS=3 - JOBS=3
- PCRE_VER=8.41 - PCRE_VER=8.44
- PCRE_PREFIX=/opt/pcre - PCRE_PREFIX=/opt/pcre
- PCRE_LIB=$PCRE_PREFIX/lib - PCRE_LIB=$PCRE_PREFIX/lib
- PCRE_INC=$PCRE_PREFIX/include - PCRE_INC=$PCRE_PREFIX/include
@ -72,23 +72,23 @@ env:
- OPENSSL_INC=$OPENSSL_PREFIX/include - OPENSSL_INC=$OPENSSL_PREFIX/include
- OPENRESTY_PREFIX=/opt/openresty - OPENRESTY_PREFIX=/opt/openresty
matrix: matrix:
- OPENSSL_VER=1.0.2q OPENSSL_PATCH_VER=1.0.2h - OPENSSL_VER=1.0.2u OPENSSL_PATCH_VER=1.0.2h
- OPENSSL_VER=1.1.0j OPENSSL_PATCH_VER=1.1.0d - OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d
- OPENSSL_VER=1.1.1c OPENSSL_PATCH_VER=1.1.1c - OPENSSL_VER=1.1.1f OPENSSL_PATCH_VER=1.1.1f
jobs: jobs:
include: include:
- <<: *linux-s390x - <<: *linux-s390x
env: OPENSSL_VER=1.0.2q OPENSSL_PATCH_VER=1.0.2h env: OPENSSL_VER=1.0.2u OPENSSL_PATCH_VER=1.0.2h
- <<: *linux-s390x - <<: *linux-s390x
env: OPENSSL_VER=1.1.0j OPENSSL_PATCH_VER=1.1.0d env: OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d
- <<: *linux-s390x - <<: *linux-s390x
env: OPENSSL_VER=1.1.1c OPENSSL_PATCH_VER=1.1.1c env: OPENSSL_VER=1.1.1f OPENSSL_PATCH_VER=1.1.1f
install: install:
- sudo cpanm --notest Test::Nginx IPC::Run3 > build.log 2>&1 || (cat build.log && exit 1) - sudo cpanm --notest Test::Nginx IPC::Run3 > build.log 2>&1 || (cat build.log && exit 1)
- if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache http://ftp.cs.stanford.edu/pub/exim/pcre/pcre-$PCRE_VER.tar.gz; fi - if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VER.tar.gz; fi
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz; fi - if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi
- tar zxf download-cache/pcre-$PCRE_VER.tar.gz - tar zxf download-cache/pcre-$PCRE_VER.tar.gz
- cd pcre-$PCRE_VER/ - cd pcre-$PCRE_VER/
- ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1) - ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1)

View File

@ -1,8 +1,30 @@
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index 15680237..12a8c687 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -362,8 +362,15 @@ ngx_signal_handler(int signo, siginfo_t *siginfo, void *ucontext)
break;
case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
- ngx_reconfigure = 1;
- action = ", reconfiguring";
+ if (ngx_process == NGX_PROCESS_SINGLE) {
+ ngx_terminate = 1;
+ action = ", exiting";
+
+ } else {
+ ngx_reconfigure = 1;
+ action = ", reconfiguring";
+ }
+
break;
case ngx_signal_value(NGX_REOPEN_SIGNAL):
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 1710ea81..b379da9c 100644 index 5817a2c2..f3d58e97 100644
--- a/src/os/unix/ngx_process_cycle.c --- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c
@@ -304,11 +304,26 @@ ngx_single_process_cycle(ngx_cycle_t *cycle) @@ -305,11 +305,26 @@ ngx_single_process_cycle(ngx_cycle_t *cycle)
} }
for ( ;; ) { for ( ;; ) {
@ -30,7 +52,7 @@ index 1710ea81..b379da9c 100644
for (i = 0; cycle->modules[i]; i++) { for (i = 0; cycle->modules[i]; i++) {
if (cycle->modules[i]->exit_process) { if (cycle->modules[i]->exit_process) {
@@ -319,6 +334,20 @@ ngx_single_process_cycle(ngx_cycle_t *cycle) @@ -320,6 +335,20 @@ ngx_single_process_cycle(ngx_cycle_t *cycle)
ngx_master_process_exit(cycle); ngx_master_process_exit(cycle);
} }

View File

@ -0,0 +1,50 @@
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index 282d6ee..899e11e 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -58,6 +58,8 @@ ngx_http_static_handler(ngx_http_request_t *r)
ngx_chain_t out;
ngx_open_file_info_t of;
ngx_http_core_loc_conf_t *clcf;
+ u_char *uri;
+ uintptr_t escape;
if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) {
return NGX_HTTP_NOT_ALLOWED;
@@ -162,9 +164,21 @@ ngx_http_static_handler(ngx_http_request_t *r)
*last = '/';
+ escape = 2 * ngx_escape_uri(NULL, location, len, NGX_ESCAPE_URI);
+ if (escape > 0) {
+ uri = ngx_pnalloc(r->pool, len + escape);
+ if (uri == NULL) {
+ return NGX_ERROR;
+ }
+ ngx_escape_uri(uri, location, len, NGX_ESCAPE_URI);
+ location = uri;
+ len += escape;
+ }
+
} else {
+ escape = 2 * ngx_escape_uri(NULL, r->uri.data, r->uri.len, NGX_ESCAPE_URI);
if (r->args.len) {
- len += r->args.len + 1;
+ len += r->args.len + 1 + escape;
}
location = ngx_pnalloc(r->pool, len);
@@ -173,7 +187,12 @@ ngx_http_static_handler(ngx_http_request_t *r)
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- last = ngx_copy(location, r->uri.data, r->uri.len);
+ if (escape > 0) {
+ last = (u_char *) ngx_escape_uri(location, r->uri.data, r->uri.len, NGX_ESCAPE_URI);
+
+ } else {
+ last = ngx_copy(location, r->uri.data, r->uri.len);
+ }
*last = '/';

View File

@ -0,0 +1,208 @@
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index ae559a5105..b23f59b1bf 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -216,6 +216,8 @@ void BIO_clear_flags(BIO *b, int flags);
/* Returned from the accept BIO when an accept would have blocked */
# define BIO_RR_ACCEPT 0x03
+# define BIO_RR_SSL_SESSION_LOOKUP 0x09
+
/* These are passed by the BIO callback */
# define BIO_CB_FREE 0x01
# define BIO_CB_READ 0x02
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 6724ccf2d2..e3a086c3db 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -896,6 +896,7 @@ __owur int SSL_extension_supported(unsigned int ext_type);
# define SSL_ASYNC_PAUSED 5
# define SSL_ASYNC_NO_JOBS 6
# define SSL_CLIENT_HELLO_CB 7
+# define SSL_SESS_LOOKUP 99
/* These will only be used when doing non-blocking IO */
# define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING)
@@ -905,6 +906,7 @@ __owur int SSL_extension_supported(unsigned int ext_type);
# define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED)
# define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS)
# define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB)
+# define SSL_want_sess_lookup(s) (SSL_want(s) == SSL_SESS_LOOKUP)
# define SSL_MAC_FLAG_READ_MAC_STREAM 1
# define SSL_MAC_FLAG_WRITE_MAC_STREAM 2
@@ -1190,6 +1192,8 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
# define SSL_ERROR_WANT_ASYNC 9
# define SSL_ERROR_WANT_ASYNC_JOB 10
# define SSL_ERROR_WANT_CLIENT_HELLO_CB 11
+# define SSL_ERROR_WANT_SESSION_LOOKUP 99
+# define SSL_ERROR_PENDING_SESSION 99 /* BoringSSL compatibility */
# define SSL_CTRL_SET_TMP_DH 3
# define SSL_CTRL_SET_TMP_ECDH 4
# define SSL_CTRL_SET_TMP_DH_CB 6
@@ -1662,6 +1666,7 @@ int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x);
int SSL_SESSION_up_ref(SSL_SESSION *ses);
void SSL_SESSION_free(SSL_SESSION *ses);
+SSL_SESSION *SSL_magic_pending_session_ptr(void);
__owur int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
__owur int SSL_set_session(SSL *to, SSL_SESSION *session);
int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session);
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index ab9e6668cd..11a1a6e88f 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -139,6 +139,10 @@ static int ssl_read(BIO *b, char *buf, size_t size, size_t *readbytes)
BIO_set_retry_special(b);
retry_reason = BIO_RR_SSL_X509_LOOKUP;
break;
+ case SSL_ERROR_WANT_SESSION_LOOKUP:
+ BIO_set_retry_special(b);
+ retry_reason = BIO_RR_SSL_SESSION_LOOKUP;
+ break;
case SSL_ERROR_WANT_ACCEPT:
BIO_set_retry_special(b);
retry_reason = BIO_RR_ACCEPT;
@@ -207,6 +211,10 @@ static int ssl_write(BIO *b, const char *buf, size_t size, size_t *written)
BIO_set_retry_special(b);
retry_reason = BIO_RR_SSL_X509_LOOKUP;
break;
+ case SSL_ERROR_WANT_SESSION_LOOKUP:
+ BIO_set_retry_special(b);
+ retry_reason = BIO_RR_SSL_SESSION_LOOKUP;
+ break;
case SSL_ERROR_WANT_CONNECT:
BIO_set_retry_special(b);
retry_reason = BIO_RR_CONNECT;
@@ -361,6 +369,10 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
BIO_set_retry_special(b);
BIO_set_retry_reason(b, BIO_RR_SSL_X509_LOOKUP);
break;
+ case SSL_ERROR_WANT_SESSION_LOOKUP:
+ BIO_set_retry_special(b);
+ BIO_set_retry_reason(b, BIO_RR_SSL_SESSION_LOOKUP);
+ break;
default:
break;
}
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 7c7e59789c..c443a9f0f8 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -3618,6 +3618,8 @@ int SSL_get_error(const SSL *s, int i)
return SSL_ERROR_WANT_ASYNC_JOB;
if (SSL_want_client_hello_cb(s))
return SSL_ERROR_WANT_CLIENT_HELLO_CB;
+ if (SSL_want_sess_lookup(s))
+ return SSL_ERROR_WANT_SESSION_LOOKUP;
if ((s->shutdown & SSL_RECEIVED_SHUTDOWN) &&
(s->s3->warn_alert == SSL_AD_CLOSE_NOTIFY))
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 40c157bb42..909e0ca7d2 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -16,6 +16,8 @@
#include "ssl_local.h"
#include "statem/statem_local.h"
+static const char g_pending_session_magic = 0;
+
static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
@@ -448,6 +450,10 @@ SSL_SESSION *lookup_sess_in_cache(SSL *s, const unsigned char *sess_id,
ret = s->session_ctx->get_session_cb(s, sess_id, sess_id_len, &copy);
+ if (ret == SSL_magic_pending_session_ptr()) {
+ return ret; /* Retry later */
+ }
+
if (ret != NULL) {
tsan_counter(&s->session_ctx->stats.sess_cb_hit);
@@ -536,6 +542,9 @@ int ssl_get_prev_session(SSL *s, CLIENTHELLO_MSG *hello)
try_session_cache = 1;
ret = lookup_sess_in_cache(s, hello->session_id,
hello->session_id_len);
+ if (ret == SSL_magic_pending_session_ptr()) {
+ return -2; /* Retry later */
+ }
}
break;
case SSL_TICKET_NO_DECRYPT:
@@ -952,6 +961,11 @@ X509 *SSL_SESSION_get0_peer(SSL_SESSION *s)
return s->peer;
}
+SSL_SESSION *SSL_magic_pending_session_ptr(void)
+{
+ return (SSL_SESSION *) &g_pending_session_magic;
+}
+
int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
unsigned int sid_ctx_len)
{
diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c
index 14cb27e6db..ec96640fdc 100644
--- a/ssl/statem/statem_srvr.c
+++ b/ssl/statem/statem_srvr.c
@@ -1623,6 +1623,7 @@ static int tls_early_post_process_client_hello(SSL *s)
STACK_OF(SSL_CIPHER) *scsvs = NULL;
CLIENTHELLO_MSG *clienthello = s->clienthello;
DOWNGRADE dgrd = DOWNGRADE_NONE;
+ PACKET saved_ciphers;
/* Finished parsing the ClientHello, now we can start processing it */
/* Give the ClientHello callback a crack at things */
@@ -1730,6 +1731,7 @@ static int tls_early_post_process_client_hello(SSL *s)
}
s->hit = 0;
+ saved_ciphers = clienthello->ciphersuites;
if (!ssl_cache_cipherlist(s, &clienthello->ciphersuites,
clienthello->isv2) ||
@@ -1835,6 +1837,10 @@ static int tls_early_post_process_client_hello(SSL *s)
} else if (i == -1) {
/* SSLfatal() already called */
goto err;
+ } else if (i == -2) {
+ clienthello->ciphersuites = saved_ciphers;
+ s->rwstate = SSL_SESS_LOOKUP;
+ goto retry;
} else {
/* i == 0 */
if (!ssl_get_new_session(s, 1)) {
@@ -1842,6 +1848,7 @@ static int tls_early_post_process_client_hello(SSL *s)
goto err;
}
}
+ s->rwstate = SSL_NOTHING;
}
if (SSL_IS_TLS13(s)) {
@@ -2107,6 +2114,10 @@ static int tls_early_post_process_client_hello(SSL *s)
s->clienthello = NULL;
return 0;
+retry:
+ sk_SSL_CIPHER_free(ciphers);
+ sk_SSL_CIPHER_free(scsvs);
+ return -1;
}
/*
diff --git a/util/libssl.num b/util/libssl.num
index 297522c363..11fffe8435 100644
--- a/util/libssl.num
+++ b/util/libssl.num
@@ -7,6 +7,7 @@ SSL_copy_session_id 6 1_1_0 EXIST::FUNCTION:
SSL_CTX_set_srp_password 7 1_1_0 EXIST::FUNCTION:SRP
SSL_shutdown 8 1_1_0 EXIST::FUNCTION:
SSL_CTX_set_msg_callback 9 1_1_0 EXIST::FUNCTION:
+SSL_magic_pending_session_ptr 10 1_1_0 EXIST::FUNCTION:
SSL_SESSION_get0_ticket 11 1_1_0 EXIST::FUNCTION:
SSL_get1_supported_ciphers 12 1_1_0 EXIST::FUNCTION:
SSL_state_string_long 13 1_1_0 EXIST::FUNCTION:

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,10 @@
PCRE=pcre-8.44 PCRE=pcre-8.44
ZLIB=zlib-1.2.11 ZLIB=zlib-1.2.11
OPENSSL=openssl-1.1.1d OPENSSL=openssl-1.1.1g
JOBS=12 JOBS=12
# wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz # wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
# wget http://zlib.net/zlib-1.2.11.tar.gz # wget http://zlib.net/zlib-1.2.11.tar.gz
# wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz # wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
@ -20,8 +20,8 @@ cd ../..
cd objs/lib/$OPENSSL || exit 1 cd objs/lib/$OPENSSL || exit 1
#patch -p1 < ../../../patches/openssl-1.1.0j-parallel_build_fix.patch || exit 1 #patch -p1 < ../../../patches/openssl-1.1.0j-parallel_build_fix.patch || exit 1
patch -p1 < ../../../patches/openssl-1.1.1c-sess_set_get_cb_yield.patch || exit 1 patch -p1 < ../../../patches/openssl-1.1.1f-sess_set_get_cb_yield.patch || exit 1
patch -p1 < ../../../patches/openssl-1.1.1d-win_fix.patch || exit 1 #patch -p1 < ../../../patches/openssl-1.1.1d-win_fix.patch || exit 1
#patch -p1 < ../../../patches/openssl-1.1.1e-sess_set_get_cb_yield.patch || exit 1 #patch -p1 < ../../../patches/openssl-1.1.1e-sess_set_get_cb_yield.patch || exit 1
cd ../../.. cd ../../..

106
util/configure vendored
View File

@ -25,6 +25,9 @@ my $OS = $^O;
my ($ngx_dir, $lualib_prefix); my ($ngx_dir, $lualib_prefix);
my %with_ext_lib;
my %with_ext_lib_opts;
for my $opt (@ARGV) { for my $opt (@ARGV) {
if ($opt =~ /^--platform=(.*)/) { if ($opt =~ /^--platform=(.*)/) {
$OS = $1; $OS = $1;
@ -263,7 +266,7 @@ for my $opt (@ARGV) {
$resty_opts{"$1"} = 1; $resty_opts{"$1"} = 1;
} elsif ($opt eq '--with-luajit') { } elsif ($opt eq '--with-luajit') {
$resty_opts{luajit} = 1; # NOP for backwards-compatibility (the default)
} elsif ($opt =~ /^--with-luajit=(.*)/) { } elsif ($opt =~ /^--with-luajit=(.*)/) {
$resty_opts{luajit_path} = $1; $resty_opts{luajit_path} = $1;
@ -346,6 +349,12 @@ for my $opt (@ARGV) {
} }
$path = File::Spec->rel2abs($path); $path = File::Spec->rel2abs($path);
push @ngx_opts, "--with-$lib=$path"; push @ngx_opts, "--with-$lib=$path";
$with_ext_lib{$lib} = 1;
} elsif ($opt =~ /^--with-(openssl|pcre|zlib)-opt=(.*)/) {
my ($lib, $opt) = ($1, $2);
push @ngx_opts, "--with-$lib-opt=-g $opt";
$with_ext_lib_opts{$lib} = 1;
} elsif ($opt =~ /^--sbin-path=(.*)/) { } elsif ($opt =~ /^--sbin-path=(.*)/) {
$ngx_sbin = $1; $ngx_sbin = $1;
@ -359,6 +368,12 @@ for my $opt (@ARGV) {
} }
} }
for my $lib (qw/openssl pcre zlib/) {
if ($with_ext_lib{$lib} && !$with_ext_lib_opts{$lib}) {
push @ngx_opts, "--with-$lib-opt=-g";
}
}
if ($platform eq 'msys') { if ($platform eq 'msys') {
$resty_opts{no_lua_resty_signal} = 1; $resty_opts{no_lua_resty_signal} = 1;
$resty_opts{no_lua_resty_shell} = 1; $resty_opts{no_lua_resty_shell} = 1;
@ -555,9 +570,7 @@ _END_
push @ngx_opts, '--with-stream_ssl_preread_module'; push @ngx_opts, '--with-stream_ssl_preread_module';
} }
if (!$opts->{lua} if ((!$opts->{no_http_lua} || !$opts->{no_stream_lua})
&& !$opts->{lua_path}
&& (!$opts->{no_http_lua} || !$opts->{no_stream_lua})
&& !$opts->{luajit_path}) && !$opts->{luajit_path})
{ {
#warn "HIT!"; #warn "HIT!";
@ -566,10 +579,6 @@ _END_
#die "luajit: ", $opts->{luajit}; #die "luajit: ", $opts->{luajit};
if ($opts->{luajit} && $opts->{luajit_path}) {
die "--with-luajit and --with-luajit=DIR are mutually exclusive.\n";
}
if ($opts->{no_http_ssl} && $opts->{http_ssl}) { if ($opts->{no_http_ssl} && $opts->{http_ssl}) {
die "--with-http_ssl_module conflicts with --without-http_ssl_module.", die "--with-http_ssl_module conflicts with --without-http_ssl_module.",
"\n"; "\n";
@ -902,64 +911,9 @@ int main(void) {
} }
cd '..'; cd '..';
} elsif ($opts->{lua_path}) {
my $lua_prefix = $opts->{lua_path};
env LUA_LIB => File::Spec->catfile($lua_prefix, "lib");
env LUA_INC => File::Spec->catfile($lua_prefix, "include");
push @ngx_rpaths, File::Spec->catfile($lua_prefix, "lib");
} elsif ($opts->{lua}) {
# build stdandard lua
my $lua_src = auto_complete 'lua';
if (!defined $lua_src) {
die "No lua5 found";
}
my $lua_prefix = File::Spec->catfile($prefix, "lua");
my $lua_root = File::Spec->rel2abs("lua-root");
if (-d $lua_root) {
shell "rm -rf $lua_root";
}
mkdir $lua_root or
die "create create directory lua-root: $!\n";
cd $lua_src;
my $extra_opts = '';
if (defined $cc) {
$extra_opts .= " CC='$cc'";
}
if (defined $cores) {
shell "${make} -j$cores$extra_opts $platform", $dry_run;
} else {
shell "${make}$extra_opts $platform", $dry_run;
}
my $install_top = File::Spec->catfile($lua_root, $lua_prefix);
shell "${make} install$extra_opts INSTALL_TOP=$install_top/", $dry_run;
env LUA_LIB => File::Spec->catfile($lua_root, $lua_prefix, "lib");
env LUA_INC => File::Spec->catfile($lua_root, $lua_prefix, "include");
push @make_cmds,
"cd $root_dir/build/$lua_src && \$(MAKE)$extra_opts $platform";
push @make_install_cmds, "cd $root_dir/build/$lua_src && "
. "\$(MAKE) install$extra_opts INSTALL_TOP=\$(DESTDIR)$lua_prefix";
cd '..';
} }
if ($opts->{lua} || $opts->{lua_path} if ($opts->{luajit} || $opts->{luajit_path}) {
|| $opts->{luajit} || $opts->{luajit_path})
{
# build lua modules # build lua modules
$lualib_prefix = File::Spec->catfile($prefix, "lualib"); $lualib_prefix = File::Spec->catfile($prefix, "lualib");
@ -1353,8 +1307,7 @@ sub usage ($) {
--with-no-pool-patch enable the no-pool patch for debugging memory issues --with-no-pool-patch enable the no-pool patch for debugging memory issues
-jN pass -jN option to make while building the bundled -jN pass -jN option to make while building LuaJIT 2.1
Lua 5.1 interpreter or LuaJIT 2.1
_EOC_ _EOC_
@ -1402,6 +1355,7 @@ _EOC_
$msg .= <<'_EOC_'; $msg .= <<'_EOC_';
--without-ngx_devel_kit_module disable ngx_devel_kit_module --without-ngx_devel_kit_module disable ngx_devel_kit_module
--without-stream disable TCP/UDP proxy module
--without-http_ssl_module disable ngx_http_ssl_module --without-http_ssl_module disable ngx_http_ssl_module
--without-stream_ssl_module disable ngx_stream_ssl_module --without-stream_ssl_module disable ngx_stream_ssl_module
@ -1433,12 +1387,11 @@ _EOC_
--without-lua_resty_shell disable the lua-resty-shell library --without-lua_resty_shell disable the lua-resty-shell library
--without-lua_resty_core disable the lua-resty-core library --without-lua_resty_core disable the lua-resty-core library
--with-luajit enable and build the bundled LuaJIT 2.1 (the default)
--with-luajit=DIR use the external LuaJIT 2.1 installation specified by DIR --with-luajit=DIR use the external LuaJIT 2.1 installation specified by DIR
--with-luajit-xcflags=FLAGS Specify extra C compiler flags for LuaJIT 2.1 --with-luajit-xcflags=FLAGS Specify extra C compiler flags for LuaJIT 2.1
--with-luajit-ldflags=FLAGS Specify extra C linker flags for LuaJIT 2.1 --with-luajit-ldflags=FLAGS Specify extra C linker flags for LuaJIT 2.1
--without-luajit-lua52 Turns off the LuaJIT extensions from Lua 5.2 that may break --without-luajit-lua52 Turns off the LuaJIT extensions from Lua 5.2 that may break
backward compatibility. backward compatibility
--without-luajit-gc64 Turns off the LuaJIT GC64 mode (which is enabled by default --without-luajit-gc64 Turns off the LuaJIT GC64 mode (which is enabled by default
on x86_64) on x86_64)
@ -1461,7 +1414,7 @@ Options directly inherited from nginx
worker processes worker processes
--build=NAME set build name --build=NAME set build name
--builddir=DIR set the build directory --builddir=DIR set build directory
--with-select_module enable select module --with-select_module enable select module
--without-select_module disable select module --without-select_module disable select module
@ -1472,6 +1425,7 @@ Options directly inherited from nginx
--with-file-aio enable file AIO support --with-file-aio enable file AIO support
--with-http_ssl_module enable ngx_http_ssl_module (default on)
--with-http_v2_module enable ngx_http_v2_module --with-http_v2_module enable ngx_http_v2_module
--with-http_realip_module enable ngx_http_realip_module --with-http_realip_module enable ngx_http_realip_module
--with-http_addition_module enable ngx_http_addition_module --with-http_addition_module enable ngx_http_addition_module
@ -1501,6 +1455,7 @@ Options directly inherited from nginx
--without-http_userid_module disable ngx_http_userid_module --without-http_userid_module disable ngx_http_userid_module
--without-http_access_module disable ngx_http_access_module --without-http_access_module disable ngx_http_access_module
--without-http_auth_basic_module disable ngx_http_auth_basic_module --without-http_auth_basic_module disable ngx_http_auth_basic_module
--without-http_mirror_module disable ngx_http_mirror_module
--without-http_autoindex_module disable ngx_http_autoindex_module --without-http_autoindex_module disable ngx_http_autoindex_module
--without-http_geo_module disable ngx_http_geo_module --without-http_geo_module disable ngx_http_geo_module
--without-http_map_module disable ngx_http_map_module --without-http_map_module disable ngx_http_map_module
@ -1511,6 +1466,7 @@ Options directly inherited from nginx
--without-http_fastcgi_module disable ngx_http_fastcgi_module --without-http_fastcgi_module disable ngx_http_fastcgi_module
--without-http_uwsgi_module disable ngx_http_uwsgi_module --without-http_uwsgi_module disable ngx_http_uwsgi_module
--without-http_scgi_module disable ngx_http_scgi_module --without-http_scgi_module disable ngx_http_scgi_module
--without-http_grpc_module disable ngx_http_grpc_module
--without-http_memcached_module disable ngx_http_memcached_module --without-http_memcached_module disable ngx_http_memcached_module
--without-http_limit_conn_module disable ngx_http_limit_conn_module --without-http_limit_conn_module disable ngx_http_limit_conn_module
--without-http_limit_req_module disable ngx_http_limit_req_module --without-http_limit_req_module disable ngx_http_limit_req_module
@ -1522,11 +1478,13 @@ Options directly inherited from nginx
disable ngx_http_upstream_ip_hash_module disable ngx_http_upstream_ip_hash_module
--without-http_upstream_least_conn_module --without-http_upstream_least_conn_module
disable ngx_http_upstream_least_conn_module disable ngx_http_upstream_least_conn_module
--without-http_upstream_random_module
disable ngx_http_upstream_random_module
--without-http_upstream_keepalive_module --without-http_upstream_keepalive_module
disable ngx_http_upstream_keepalive_module disable ngx_http_upstream_keepalive_module
--without-http_upstream_zone_module --without-http_upstream_zone_module
disable ngx_http_upstream_zone_module disable ngx_http_upstream_zone_module
--with-http_perl_module enable ngx_http_perl_module --with-http_perl_module enable ngx_http_perl_module
--with-http_perl_module=dynamic enable dynamic ngx_http_perl_module --with-http_perl_module=dynamic enable dynamic ngx_http_perl_module
--with-perl_modules_path=PATH set Perl modules path --with-perl_modules_path=PATH set Perl modules path
@ -1554,9 +1512,6 @@ Options directly inherited from nginx
--without-mail_imap_module disable ngx_mail_imap_module --without-mail_imap_module disable ngx_mail_imap_module
--without-mail_smtp_module disable ngx_mail_smtp_module --without-mail_smtp_module disable ngx_mail_smtp_module
--without-stream disable TCP/UDP proxy module
--without-stream_ssl_module disable ngx_stream_ssl_module
--with-stream enable TCP/UDP proxy module (default on) --with-stream enable TCP/UDP proxy module (default on)
--with-stream=dynamic enable dynamic TCP/UDP proxy module --with-stream=dynamic enable dynamic TCP/UDP proxy module
--with-stream_ssl_module enable ngx_stream_ssl_module (default on) --with-stream_ssl_module enable ngx_stream_ssl_module (default on)
@ -1575,6 +1530,8 @@ Options directly inherited from nginx
disable ngx_stream_upstream_hash_module disable ngx_stream_upstream_hash_module
--without-stream_upstream_least_conn_module --without-stream_upstream_least_conn_module
disable ngx_stream_upstream_least_conn_module disable ngx_stream_upstream_least_conn_module
--without-stream_upstream_random_module
disable ngx_stream_upstream_random_module
--without-stream_upstream_zone_module --without-stream_upstream_zone_module
disable ngx_stream_upstream_zone_module disable ngx_stream_upstream_zone_module
@ -1597,8 +1554,7 @@ Options directly inherited from nginx
--without-pcre disable PCRE library usage --without-pcre disable PCRE library usage
--with-pcre force PCRE library usage --with-pcre force PCRE library usage
--with-pcre=DIR set path to PCRE library sources --with-pcre=DIR set path to PCRE library sources
--with-pcre-opt=OPTIONS set additional make options for PCRE --with-pcre-opt=OPTIONS set additional build options for PCRE
--with-pcre-conf-opt=OPTIONS set additional configure options for PCRE
--with-pcre-jit build PCRE with JIT compilation support --with-pcre-jit build PCRE with JIT compilation support
--with-zlib=DIR set path to zlib library sources --with-zlib=DIR set path to zlib library sources

View File

@ -443,6 +443,13 @@ fi
rm -f *.patch || exit 1 rm -f *.patch || exit 1
answer=`$root/util/ver-ge "$main_ver" 1.17.8`
if [ "$answer" = "Y" ]; then
echo "$info_txt applying the patch for nginx security issue https://hackerone.com/reports/513236"
patch -p1 < $root/patches/nginx-$main_ver-static_mod_escape_loc_hdr.patch
echo
fi
echo "$info_txt applying the always_enable_cc_feature_tests patch to nginx" echo "$info_txt applying the always_enable_cc_feature_tests patch to nginx"
patch -p1 < $root/patches/nginx-$main_ver-always_enable_cc_feature_tests.patch patch -p1 < $root/patches/nginx-$main_ver-always_enable_cc_feature_tests.patch
echo echo
@ -492,7 +499,7 @@ rm -rf no-pool-nginx-$ver
################################# #################################
ver=0.62rc1 ver=0.62
$root/util/get-tarball "https://github.com/openresty/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "https://github.com/openresty/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1
tar -xzf echo-nginx-module-$ver.tar.gz || exit 1 tar -xzf echo-nginx-module-$ver.tar.gz || exit 1
mv openresty-echo-nginx-module-* echo-nginx-module-$ver || exit 1 mv openresty-echo-nginx-module-* echo-nginx-module-$ver || exit 1
@ -506,7 +513,7 @@ mv openresty-xss-nginx-module-* xss-nginx-module-$ver || exit 1
################################# #################################
ver=0.3.1rc1 ver=0.3.1
$root/util/get-tarball "https://github.com/simplresty/ngx_devel_kit/tarball/v$ver" -O ngx_devel_kit-$ver.tar.gz $root/util/get-tarball "https://github.com/simplresty/ngx_devel_kit/tarball/v$ver" -O ngx_devel_kit-$ver.tar.gz
tar -xzf ngx_devel_kit-$ver.tar.gz || exit 1 tar -xzf ngx_devel_kit-$ver.tar.gz || exit 1
mv vision5-ngx_devel_kit-* ngx_devel_kit-$ver || exit 1 mv vision5-ngx_devel_kit-* ngx_devel_kit-$ver || exit 1
@ -548,7 +555,7 @@ mv openresty-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
################################# #################################
ver=0.10.16rc5 ver=0.10.17
$root/util/get-tarball "https://github.com/openresty/lua-nginx-module/archive/v$ver.tar.gz" -O lua-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-nginx-module/archive/v$ver.tar.gz" -O lua-nginx-module-$ver.tar.gz || exit 1
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1 tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
mv lua-nginx-module-$ver ngx_lua-$ver || exit 1 mv lua-nginx-module-$ver ngx_lua-$ver || exit 1
@ -562,7 +569,7 @@ mv openresty-lua-upstream-nginx-module-* ngx_lua_upstream-$ver || exit 1
################################# #################################
ver=0.0.8rc3 ver=0.0.8
$root/util/get-tarball "https://github.com/openresty/stream-lua-nginx-module/tarball/v$ver" -O stream-lua-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "https://github.com/openresty/stream-lua-nginx-module/tarball/v$ver" -O stream-lua-nginx-module-$ver.tar.gz || exit 1
tar -xzf stream-lua-nginx-module-$ver.tar.gz || exit 1 tar -xzf stream-lua-nginx-module-$ver.tar.gz || exit 1
mv openresty-stream-lua-nginx-module-* ngx_stream_lua-$ver || exit 1 mv openresty-stream-lua-nginx-module-* ngx_stream_lua-$ver || exit 1
@ -583,7 +590,7 @@ mv openresty-memc-nginx-module-* memc-nginx-module-$ver || exit 1
################################# #################################
ver=0.32rc1 ver=0.32
$root/util/get-tarball "https://github.com/openresty/srcache-nginx-module/tarball/v$ver" -O srcache-nginx-module-$ver.tar.gz || exit 1 $root/util/get-tarball "https://github.com/openresty/srcache-nginx-module/tarball/v$ver" -O srcache-nginx-module-$ver.tar.gz || exit 1
tar -xzf srcache-nginx-module-$ver.tar.gz || exit 1 tar -xzf srcache-nginx-module-$ver.tar.gz || exit 1
mv openresty-srcache-nginx-module-* srcache-nginx-module-$ver || exit 1 mv openresty-srcache-nginx-module-* srcache-nginx-module-$ver || exit 1
@ -661,7 +668,7 @@ mv openresty-redis2-nginx-module-* redis2-nginx-module-$ver || exit 1
################################# #################################
ver=0.25rc2 ver=0.25
$root/util/get-tarball "https://github.com/openresty/resty-cli/tarball/v$ver" -O resty-cli-$ver.tar.gz || exit 1 $root/util/get-tarball "https://github.com/openresty/resty-cli/tarball/v$ver" -O resty-cli-$ver.tar.gz || exit 1
tar -xzf resty-cli-$ver.tar.gz || exit 1 tar -xzf resty-cli-$ver.tar.gz || exit 1
mv openresty-resty-cli-* resty-cli-$ver || exit 1 mv openresty-resty-cli-* resty-cli-$ver || exit 1
@ -689,7 +696,7 @@ cd .. || exit 1
################################# #################################
ver=2.1.0.7 ver=2.1.0.8
$root/util/get-tarball "https://github.com/openresty/lua-cjson/archive/$ver.tar.gz" -O "lua-cjson-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-cjson/archive/$ver.tar.gz" -O "lua-cjson-$ver.tar.gz" || exit 1
tar -xzf lua-cjson-$ver.tar.gz || exit 1 tar -xzf lua-cjson-$ver.tar.gz || exit 1
@ -723,7 +730,7 @@ cd ..
################################# #################################
ver=0.14 ver=0.15
$root/util/get-tarball "https://github.com/openresty/lua-resty-memcached/tarball/v$ver" -O "lua-resty-memcached-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-resty-memcached/tarball/v$ver" -O "lua-resty-memcached-$ver.tar.gz" || exit 1
tar -xzf lua-resty-memcached-$ver.tar.gz || exit 1 tar -xzf lua-resty-memcached-$ver.tar.gz || exit 1
mv openresty-lua-resty-memcached-* lua-resty-memcached-$ver || exit 1 mv openresty-lua-resty-memcached-* lua-resty-memcached-$ver || exit 1
@ -734,7 +741,7 @@ cd ..
################################# #################################
ver=0.28rc1 ver=0.28
$root/util/get-tarball "https://github.com/openresty/lua-resty-redis/tarball/v$ver" -O "lua-resty-redis-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-resty-redis/tarball/v$ver" -O "lua-resty-redis-$ver.tar.gz" || exit 1
tar -xzf lua-resty-redis-$ver.tar.gz || exit 1 tar -xzf lua-resty-redis-$ver.tar.gz || exit 1
mv openresty-lua-resty-redis-* lua-resty-redis-$ver || exit 1 mv openresty-lua-resty-redis-* lua-resty-redis-$ver || exit 1
@ -774,7 +781,7 @@ cd ..
################################# #################################
ver=0.12rc1 ver=0.12
$root/util/get-tarball "https://github.com/openresty/lua-resty-string/tarball/v$ver" -O "lua-resty-string-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-resty-string/tarball/v$ver" -O "lua-resty-string-$ver.tar.gz" || exit 1
tar -xzf lua-resty-string-$ver.tar.gz || exit 1 tar -xzf lua-resty-string-$ver.tar.gz || exit 1
mv openresty-lua-resty-string-* lua-resty-string-$ver || exit 1 mv openresty-lua-resty-string-* lua-resty-string-$ver || exit 1
@ -807,7 +814,7 @@ cd ..
################################# #################################
ver=0.10rc1 ver=0.10
$root/util/get-tarball "https://github.com/openresty/lua-resty-lrucache/tarball/v$ver" -O "lua-resty-lrucache-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-resty-lrucache/tarball/v$ver" -O "lua-resty-lrucache-$ver.tar.gz" || exit 1
tar -xzf lua-resty-lrucache-$ver.tar.gz || exit 1 tar -xzf lua-resty-lrucache-$ver.tar.gz || exit 1
mv openresty-lua-resty-lrucache-* lua-resty-lrucache-$ver || exit 1 mv openresty-lua-resty-lrucache-* lua-resty-lrucache-$ver || exit 1
@ -818,7 +825,7 @@ cd ..
################################# #################################
ver=0.1.18rc4 ver=0.1.19
$root/util/get-tarball "https://github.com/openresty/lua-resty-core/tarball/v$ver" -O "lua-resty-core-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-resty-core/tarball/v$ver" -O "lua-resty-core-$ver.tar.gz" || exit 1
tar -xzf lua-resty-core-$ver.tar.gz || exit 1 tar -xzf lua-resty-core-$ver.tar.gz || exit 1
mv openresty-lua-resty-core-* lua-resty-core-$ver || exit 1 mv openresty-lua-resty-core-* lua-resty-core-$ver || exit 1
@ -858,7 +865,7 @@ cd ..
################################# #################################
ver=0.03rc1 ver=0.03
$root/util/get-tarball "https://github.com/openresty/lua-resty-shell/tarball/v$ver" -O "lua-resty-shell-$ver.tar.gz" || exit 1 $root/util/get-tarball "https://github.com/openresty/lua-resty-shell/tarball/v$ver" -O "lua-resty-shell-$ver.tar.gz" || exit 1
tar -xzf lua-resty-shell-$ver.tar.gz || exit 1 tar -xzf lua-resty-shell-$ver.tar.gz || exit 1
mv openresty-lua-resty-shell-* lua-resty-shell-$ver || exit 1 mv openresty-lua-resty-shell-* lua-resty-shell-$ver || exit 1

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
main_ver=1.17.8 main_ver=1.17.8
minor_ver=1rc1 minor_ver=1
version=$main_ver.$minor_ver version=$main_ver.$minor_ver
echo $version echo $version