From 04633ac2fde8d1e287955e033b2e06f7c6ee19fc Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Thu, 23 May 2019 16:59:09 -0700 Subject: [PATCH 1/3] api: bumped API version to 0.10.16. --- README.markdown | 2 +- doc/HttpLuaModule.wiki | 2 +- src/api/ngx_http_lua_api.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index d040c9a60c..3e9c9c1d41 100644 --- a/README.markdown +++ b/README.markdown @@ -63,7 +63,7 @@ Production ready. Version ======= -This document describes ngx_lua [v0.10.15](https://github.com/openresty/lua-nginx-module/tags) released on March 14th, 2019. +This document describes ngx_lua [v0.10.16](https://github.com/openresty/lua-nginx-module/tags), which is not released yet. Synopsis ======== diff --git a/doc/HttpLuaModule.wiki b/doc/HttpLuaModule.wiki index 4dcb27b2ae..5910732d55 100644 --- a/doc/HttpLuaModule.wiki +++ b/doc/HttpLuaModule.wiki @@ -12,7 +12,7 @@ Production ready. = Version = -This document describes ngx_lua [https://github.com/openresty/lua-nginx-module/tags v0.10.15] released on March 14th, 2019. +This document describes ngx_lua [https://github.com/openresty/lua-nginx-module/tags v0.10.16], which is not released yet. = Synopsis = diff --git a/src/api/ngx_http_lua_api.h b/src/api/ngx_http_lua_api.h index 129eb9979c..221e423ddb 100644 --- a/src/api/ngx_http_lua_api.h +++ b/src/api/ngx_http_lua_api.h @@ -19,7 +19,7 @@ /* Public API for other Nginx modules */ -#define ngx_http_lua_version 10015 +#define ngx_http_lua_version 10016 typedef struct { From 12ba57d70ac552a21829327d7d54198253360708 Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Wed, 10 Jul 2019 22:41:29 -0700 Subject: [PATCH 2/3] bugfix: ensured the 'pcre_version()' symbol is preserved and undefined when PCRE is statically linked. When using `--with-pcre=...`, NGINX is statically linked against libpcre.a. Since `pcre_version()` is unused, its symbol is stripped by the linker. Because lua-resty-core's `resty.core.regex` module needs it, we here ensure that the symbol is entered as undefined in our final binary. This should not be an issue for win32 builds since `--export-all-symbols` is already set. --- config | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config b/config index 3ef8f0749f..ff44482bc4 100644 --- a/config +++ b/config @@ -588,5 +588,27 @@ else CORE_LIBS="$CORE_LIBS $ngx_module_libs" fi +# ---------------------------------------- + +if [ $PCRE != NO -a $PCRE != YES ]; then + # force pcre_version symbol to be undefined when PCRE is statically linked + + ngx_feature="force undefined symbols (--undefined)" + ngx_feature_libs="-Wl,--undefined=printf" + ngx_feature_name= + ngx_feature_run=no + ngx_feature_incs="#include " + ngx_feature_path= + ngx_feature_test='printf("hello");' + + . auto/feature + + if [ $ngx_found = yes ]; then + CORE_LIBS="$CORE_LIBS -Wl,--undefined=pcre_version" + fi +fi + +# ---------------------------------------- + #CFLAGS=$"$CFLAGS -DLUA_DEFAULT_PATH='\"/usr/local/openresty/lualib/?.lua\"'" #CFLAGS=$"$CFLAGS -DLUA_DEFAULT_CPATH='\"/usr/local/openresty/lualib/?.so\"'" From a3f07bb94b775a1e2a214e624378bd06d65d05bd Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Wed, 10 Jul 2019 23:51:48 -0700 Subject: [PATCH 3/3] [removeme] travis-ci: switched to the contributor's branch of lua-resty-core. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef3083ca54..715d87f019 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,7 +85,7 @@ install: - git clone https://github.com/openresty/rds-json-nginx-module.git ../rds-json-nginx-module - git clone https://github.com/openresty/srcache-nginx-module.git ../srcache-nginx-module - git clone https://github.com/openresty/redis2-nginx-module.git ../redis2-nginx-module - - git clone https://github.com/openresty/lua-resty-core.git ../lua-resty-core + - git clone -b chore/bump-api https://github.com/thibaultcha/lua-resty-core.git ../lua-resty-core - git clone https://github.com/openresty/lua-resty-lrucache.git ../lua-resty-lrucache - git clone https://github.com/openresty/lua-resty-mysql.git ../lua-resty-mysql - git clone https://github.com/openresty/stream-lua-nginx-module.git ../stream-lua-nginx-module