From f85e56496d3a371eafde4337d8df37e8e8ccbdef Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Sun, 10 Jun 2012 18:08:36 +0000 Subject: [PATCH] [packages] nginx: update to version 1.2.1 SVN-Revision: 32166 --- net/nginx/Config.in | 2 +- net/nginx/Makefile | 17 ++++++--------- net/nginx/files/nginx.init | 2 +- net/nginx/patches/101-feature_test_fix.patch | 22 ++++++++++---------- net/nginx/patches/102-sizeof_test_fix.patch | 12 +++++------ net/nginx/patches/103-sys_nerr.patch | 3 +-- net/nginx/patches/200-config.patch | 18 ++++++++++++++++ 7 files changed, 44 insertions(+), 32 deletions(-) create mode 100644 net/nginx/patches/200-config.patch diff --git a/net/nginx/Config.in b/net/nginx/Config.in index b24a3f307a..e4510379ab 100644 --- a/net/nginx/Config.in +++ b/net/nginx/Config.in @@ -1,5 +1,5 @@ # -# Copyright (C) 2010 OpenWrt.org +# Copyright (C) 2010-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/net/nginx/Makefile b/net/nginx/Makefile index 40347f98a8..3545bf9b56 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2011 OpenWrt.org +# Copyright (C) 2009-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nginx -PKG_VERSION:=1.0.15 +PKG_VERSION:=1.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://nginx.org/download/ -PKG_MD5SUM:=17da4802209b83d9bebb0f0edd975dfc +PKG_MD5SUM:=ceacae12d66d1f021bf3737a0269b6f4 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_CONFIG_DEPENDS:=\ +PKG_CONFIG_DEPENDS := \ CONFIG_NGINX_STUB_STATUS \ CONFIG_NGINX_FLV \ CONFIG_NGINX_SSL \ @@ -37,9 +37,8 @@ define Package/nginx endef define Package/nginx/description - Nginx is a free, open-source, high-performance HTTP server - and reverse proxy, as well as an IMAP/POP3 proxy server, - written by Igor Sysoev. + nginx is an HTTP and reverse proxy server, as well as a mail proxy server, + written by Igor Sysoev. endef define Package/nginx/config @@ -102,10 +101,6 @@ define Package/nginx/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/nginx $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/ - # make nginx bind on both IPv4 and IPv6 by default, when available - ifeq ($(CONFIG_IPV6),y) - $(SED) 's/listen\( \+\)80;/listen\1[::]:80;/' $(1)/etc/nginx/nginx.conf - endif $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx endef diff --git a/net/nginx/files/nginx.init b/net/nginx/files/nginx.init index cfda3c87a5..adf36b4427 100644 --- a/net/nginx/files/nginx.init +++ b/net/nginx/files/nginx.init @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009 OpenWrt.org +# Copyright (C) 2009-2012 OpenWrt.org START=50 NGINX_BIN=/usr/sbin/nginx diff --git a/net/nginx/patches/101-feature_test_fix.patch b/net/nginx/patches/101-feature_test_fix.patch index e5bef67e96..cb84d84691 100644 --- a/net/nginx/patches/101-feature_test_fix.patch +++ b/net/nginx/patches/101-feature_test_fix.patch @@ -1,6 +1,6 @@ --- a/auto/cc/name +++ b/auto/cc/name -@@ -6,7 +6,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then +@@ -7,7 +7,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then ngx_feature="C compiler" ngx_feature_name= @@ -11,7 +11,7 @@ ngx_feature_libs= --- a/auto/cc/conf +++ b/auto/cc/conf -@@ -148,7 +148,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then +@@ -149,7 +149,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then else ngx_feature="C99 variadic macros" ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS" @@ -20,7 +20,7 @@ ngx_feature_incs="#include #define var(dummy, ...) sprintf(__VA_ARGS__)" ngx_feature_path= -@@ -162,7 +162,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then +@@ -163,7 +163,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then ngx_feature="gcc variadic macros" ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS" @@ -31,7 +31,7 @@ ngx_feature_path= --- a/auto/os/linux +++ b/auto/os/linux -@@ -47,7 +47,7 @@ fi +@@ -48,7 +48,7 @@ fi ngx_feature="epoll" ngx_feature_name="NGX_HAVE_EPOLL" @@ -40,7 +40,7 @@ ngx_feature_incs="#include " ngx_feature_path= ngx_feature_libs= -@@ -72,7 +72,7 @@ fi +@@ -73,7 +73,7 @@ fi CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE" ngx_feature="sendfile()" ngx_feature_name="NGX_HAVE_SENDFILE" @@ -49,7 +49,7 @@ ngx_feature_incs="#include #include " ngx_feature_path= -@@ -93,7 +93,7 @@ fi +@@ -94,7 +94,7 @@ fi CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" ngx_feature="sendfile64()" ngx_feature_name="NGX_HAVE_SENDFILE64" @@ -58,7 +58,7 @@ ngx_feature_incs="#include #include " ngx_feature_path= -@@ -111,7 +111,7 @@ ngx_include="sys/prctl.h"; . auto/includ +@@ -112,7 +112,7 @@ ngx_include="sys/prctl.h"; . auto/includ ngx_feature="prctl(PR_SET_DUMPABLE)" ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE" @@ -69,7 +69,7 @@ ngx_feature_libs= --- a/auto/unix +++ b/auto/unix -@@ -555,7 +555,7 @@ ngx_feature_test="void *p; p = memalign( +@@ -618,7 +618,7 @@ ngx_feature_test="void *p; p = memalign( ngx_feature="mmap(MAP_ANON|MAP_SHARED)" ngx_feature_name="NGX_HAVE_MAP_ANON" @@ -78,7 +78,7 @@ ngx_feature_incs="#include " ngx_feature_path= ngx_feature_libs= -@@ -568,7 +568,7 @@ ngx_feature_test="void *p; +@@ -631,7 +631,7 @@ ngx_feature_test="void *p; ngx_feature='mmap("/dev/zero", MAP_SHARED)' ngx_feature_name="NGX_HAVE_MAP_DEVZERO" @@ -87,7 +87,7 @@ ngx_feature_incs="#include #include #include " -@@ -583,7 +583,7 @@ ngx_feature_test='void *p; int fd; +@@ -646,7 +646,7 @@ ngx_feature_test='void *p; int fd; ngx_feature="System V shared memory" ngx_feature_name="NGX_HAVE_SYSVSHM" @@ -96,7 +96,7 @@ ngx_feature_incs="#include #include " ngx_feature_path= -@@ -597,7 +597,7 @@ ngx_feature_test="int id; +@@ -660,7 +660,7 @@ ngx_feature_test="int id; ngx_feature="POSIX semaphores" ngx_feature_name="NGX_HAVE_POSIX_SEM" diff --git a/net/nginx/patches/102-sizeof_test_fix.patch b/net/nginx/patches/102-sizeof_test_fix.patch index bea1080c2a..0cd93cc4eb 100644 --- a/net/nginx/patches/102-sizeof_test_fix.patch +++ b/net/nginx/patches/102-sizeof_test_fix.patch @@ -1,21 +1,21 @@ --- a/auto/types/sizeof +++ b/auto/types/sizeof -@@ -23,8 +23,13 @@ $NGX_INCLUDE_UNISTD_H +@@ -25,8 +25,13 @@ $NGX_INCLUDE_UNISTD_H $NGX_INCLUDE_INTTYPES_H $NGX_INCLUDE_AUTO_CONFIG_H +char object_code_block[] = { -+ '\n', 'e', '4', 'V', 'A', -+ '0', 'x', ('0' + sizeof($ngx_type)), -+ 'Y', '3', 'p', 'M', '\n' ++ '\n', 'e', '4', 'V', 'A', ++ '0', 'x', ('0' + sizeof($ngx_type)), ++ 'Y', '3', 'p', 'M', '\n' +}; + int main() { -- printf("%d", sizeof($ngx_type)); +- printf("%d", (int) sizeof($ngx_type)); return 0; } -@@ -38,7 +43,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>& +@@ -40,7 +45,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>& if [ -x $NGX_AUTOTEST ]; then diff --git a/net/nginx/patches/103-sys_nerr.patch b/net/nginx/patches/103-sys_nerr.patch index b10b676645..5f5d106fed 100644 --- a/net/nginx/patches/103-sys_nerr.patch +++ b/net/nginx/patches/103-sys_nerr.patch @@ -1,13 +1,12 @@ --- a/src/os/unix/ngx_errno.c +++ b/src/os/unix/ngx_errno.c -@@ -7,6 +7,10 @@ +@@ -8,6 +8,9 @@ #include #include +#ifndef NGX_SYS_NERR +#define NGX_SYS_NERR 128 +#endif -+ /* * The strerror() messages are copied because: diff --git a/net/nginx/patches/200-config.patch b/net/nginx/patches/200-config.patch new file mode 100644 index 0000000000..f35009576a --- /dev/null +++ b/net/nginx/patches/200-config.patch @@ -0,0 +1,18 @@ +--- a/conf/nginx.conf ++++ b/conf/nginx.conf +@@ -1,5 +1,5 @@ + +-#user nobody; ++user nobody nogroup; + worker_processes 1; + + #error_log logs/error.log; +@@ -16,7 +16,7 @@ events { + + http { + include mime.types; +- default_type application/octet-stream; ++ #default_type application/octet-stream; + + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' -- 2.30.2