#
-# 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.
#
-# 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.
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 \
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
$(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
#!/bin/sh /etc/rc.common
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2012 OpenWrt.org
START=50
NGINX_BIN=/usr/sbin/nginx
--- 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=
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"
ngx_feature_incs="#include <stdio.h>
#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"
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"
ngx_feature_incs="#include <sys/epoll.h>"
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"
ngx_feature_incs="#include <sys/sendfile.h>
#include <errno.h>"
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"
ngx_feature_incs="#include <sys/sendfile.h>
#include <errno.h>"
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"
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"
ngx_feature_incs="#include <sys/mman.h>"
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"
ngx_feature_incs="#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>"
-@@ -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"
ngx_feature_incs="#include <sys/ipc.h>
#include <sys/shm.h>"
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"
--- 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
--- a/src/os/unix/ngx_errno.c
+++ b/src/os/unix/ngx_errno.c
-@@ -7,6 +7,10 @@
+@@ -8,6 +8,9 @@
#include <ngx_config.h>
#include <ngx_core.h>
+#ifndef NGX_SYS_NERR
+#define NGX_SYS_NERR 128
+#endif
-+
/*
* The strerror() messages are copied because:
--- /dev/null
+--- 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" '