Browse Source

nginx: correct f3c7cc6

Signed-off-by: Dirk Feytons <dirk.feytons@gmail.com>
lilik-openwrt-22.03
Dirk Feytons 9 years ago
parent
commit
55ab8ffc5f
4 changed files with 69 additions and 109 deletions
  1. +1
    -1
      net/nginx/Config.in
  2. +3
    -29
      net/nginx/Makefile
  3. +0
    -65
      net/nginx/patches-lua-nginx/100-dont_export_symbols.patch
  4. +65
    -14
      net/nginx/patches-lua-nginx/100-no_by_lua_block.patch

+ 1
- 1
net/nginx/Config.in View File

@ -177,7 +177,7 @@ config NGINX_NAXSI
prompt "Enable NAXSI module" prompt "Enable NAXSI module"
default y default y
config NGINX_MODULE_LUA
config NGINX_LUA
bool bool
prompt "Enable Lua module" prompt "Enable Lua module"
default n default n


+ 3
- 29
net/nginx/Makefile View File

@ -56,7 +56,7 @@ PKG_CONFIG_DEPENDS := \
CONFIG_NGINX_HTTP_CACHE \ CONFIG_NGINX_HTTP_CACHE \
CONFIG_NGINX_PCRE \ CONFIG_NGINX_PCRE \
CONFIG_NGINX_NAXSI \ CONFIG_NGINX_NAXSI \
CONFIG_NGINX_MODULE_LUA
CONFIG_NGINX_LUA
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -66,7 +66,7 @@ define Package/nginx
SUBMENU:=Web Servers/Proxies SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server TITLE:=Nginx web server
URL:=http://nginx.org/ URL:=http://nginx.org/
DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_MODULE_LUA:liblua +libpthread
DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
MENU:=1 MENU:=1
endef endef
@ -192,12 +192,6 @@ endif
ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y) ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
ADDITIONAL_MODULES += --without-http_upstream_keepalive_module ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
endif endif
ifeq ($(CONFIG_NGINX_MODULE_LUA),y)
ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
endif
TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
TARGET_LDFLAGS += -Wl,--gc-sections
TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
TARGET_LDFLAGS += -Wl,--gc-sections TARGET_LDFLAGS += -Wl,--gc-sections
@ -259,31 +253,11 @@ define Prepare/nginx-naxsi
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef endef
define Download/lua-nginx
VERSION:=df5bf1d6242eb5c11adf0dccb8e830dc6672e14b
SUBDIR:=lua-nginx
FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
URL:=https://github.com/openresty/lua-nginx-module.git
PROTO:=git
endef
define Prepare/lua-nginx
$(eval $(call Download,lua-nginx))
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
$(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx)
endef
define Build/Prepare
$(call Build/Prepare/Default)
$(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))
$(if $(CONFIG_NGINX_MODULE_LUA),$(call Prepare/lua-nginx))
endef
define Download/lua-nginx define Download/lua-nginx
VERSION:=1967998b0eedab1ff51bff8fafa5fc3db47976aa VERSION:=1967998b0eedab1ff51bff8fafa5fc3db47976aa
SUBDIR:=lua-nginx SUBDIR:=lua-nginx
FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
URL:=git://github.com/openresty/lua-nginx-module.git
URL:=https://github.com/openresty/lua-nginx-module.git
PROTO:=git PROTO:=git
endef endef


+ 0
- 65
net/nginx/patches-lua-nginx/100-dont_export_symbols.patch View File

@ -1,65 +0,0 @@
--- a/lua-nginx/config
+++ b/lua-nginx/config
@@ -409,35 +409,35 @@ NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
CFLAGS="$CFLAGS -DNDK_SET_VAR"
-ngx_feature="export symbols by default (-E)"
-ngx_feature_libs="-Wl,-E"
-ngx_feature_name=
-ngx_feature_run=no
-ngx_feature_incs="#include <stdio.h>"
-ngx_feature_path=
-ngx_feature_test='printf("hello");'
-
-. auto/feature
-
-if [ $ngx_found = yes ]; then
- CORE_LIBS="-Wl,-E $CORE_LIBS"
-fi
+#ngx_feature="export symbols by default (-E)"
+#ngx_feature_libs="-Wl,-E"
+#ngx_feature_name=
+#ngx_feature_run=no
+#ngx_feature_incs="#include <stdio.h>"
+#ngx_feature_path=
+#ngx_feature_test='printf("hello");'
+#
+#. auto/feature
+#
+#if [ $ngx_found = yes ]; then
+# CORE_LIBS="-Wl,-E $CORE_LIBS"
+#fi
# for Cygwin
-ngx_feature="export symbols by default (--export-all-symbols)"
-ngx_feature_libs="-Wl,--export-all-symbols"
-ngx_feature_name=
-ngx_feature_run=no
-ngx_feature_incs="#include <stdio.h>"
-ngx_feature_path=
-ngx_feature_test='printf("hello");'
-
-. auto/feature
-
-if [ $ngx_found = yes ]; then
- CORE_LIBS="-Wl,--export-all-symbols $CORE_LIBS"
-fi
-
+#ngx_feature="export symbols by default (--export-all-symbols)"
+#ngx_feature_libs="-Wl,--export-all-symbols"
+#ngx_feature_name=
+#ngx_feature_run=no
+#ngx_feature_incs="#include <stdio.h>"
+#ngx_feature_path=
+#ngx_feature_test='printf("hello");'
+#
+#. auto/feature
+#
+#if [ $ngx_found = yes ]; then
+# CORE_LIBS="-Wl,--export-all-symbols $CORE_LIBS"
+#fi
+#
NGX_DTRACE_PROVIDERS="$NGX_DTRACE_PROVIDERS $ngx_addon_dir/dtrace/ngx_lua_provider.d"
NGX_TAPSET_SRCS="$NGX_TAPSET_SRCS $ngx_addon_dir/tapset/ngx_lua.stp"

net/nginx/patches-lua-nginx/101-no_by_lua_block.patch → net/nginx/patches-lua-nginx/100-no_by_lua_block.patch View File


Loading…
Cancel
Save