PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://code.google.com/p/sha2/
+PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=02bd4bfdc806
PKG_LICENSE:=MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-dbi
-PKG_VERSION:=1.633
+PKG_VERSION:=1.634
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=b4fe13b9a51c1446c5f3cf93e69a2044
+PKG_MD5SUM:=4ad15a9c2cc9b68e3fe1f5cadf9cdb30
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-uri
-PKG_VERSION:=1.67
+PKG_VERSION:=1.71
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=d0ef53b6c63bcc02ba55f405c30741e3
+PKG_MD5SUM:=247c3da29a794f72730e01aa5a715daf
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-www-mechanize
-PKG_VERSION:=1.74
+PKG_VERSION:=1.75
PKG_RELEASE:=1
PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
-PKG_MD5SUM:=8ec615225037ac66a2d37f4e9693ef86
+PKG_MD5SUM:=9a4b9c8827f519908ef0a0d2b8ae96fa
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=5.6.17
+PKG_VERSION:=5.6.32
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>, Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=5e080e4b7df5db24f1b64313f8114bd8
+PKG_MD5SUM:=660cd5bc0f16eaad655b7815c757aadc
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
ftp \
gettext gd gmp \
hash \
- iconv \
+ iconv intl \
json \
ldap \
mbstring mcrypt mysql mysqli \
define Package/php5-cli
$(call Package/php5/Default)
+ DEPENDS+= +PACKAGE_php5-mod-intl:libstdcpp
TITLE+= (CLI)
endef
define Package/php5-cgi
$(call Package/php5/Default)
+ DEPENDS+= +PACKAGE_php5-mod-intl:libstdcpp
TITLE+= (CGI & FastCGI)
endef
CONFIGURE_ARGS+= --without-iconv
endif
+ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-intl),)
+ CONFIGURE_ARGS+= --enable-intl=shared
+else
+ CONFIGURE_ARGS+= --disable-intl
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-json),)
CONFIGURE_ARGS+= --enable-json=shared
else
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-mcrypt),)
- CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr"
+ CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr"
else
CONFIGURE_ARGS+= --without-mcrypt
endif
$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php5-mod-gmp:libgmp))
$(eval $(call BuildModule,hash,Hash))
$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
+$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php5-mod-intl:icu))
$(eval $(call BuildModule,json,JSON))
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php5-mod-ldap:libopenldap +PACKAGE_php5-mod-ldap:libsasl2))
$(eval $(call BuildModule,mbstring,MBString))
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
-@@ -18,8 +18,22 @@
-
- /* $Id$ */
+@@ -22,8 +22,22 @@
+ * THE SOFTWARE.
+ */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
#include <stdio.h>
#ifdef HAVE_LOCALE_H
-@@ -32,8 +46,12 @@
+@@ -36,8 +50,12 @@
#include <strings.h>
#endif
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
-@@ -55,6 +73,11 @@ static int read_preamble(const unsigned
+@@ -59,6 +77,11 @@ static int read_preamble(const unsigned
{
uint32_t version;
/* read ID */
version = (*tzf)[3] - '0';
*tzf += 4;
-@@ -298,7 +321,406 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -302,7 +325,406 @@ void timelib_dump_tzinfo(timelib_tzinfo
}
}
{
int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE
-@@ -337,21 +759,90 @@ static int seek_to_tz_position(const uns
+@@ -341,21 +763,90 @@ static int seek_to_tz_position(const uns
return 0;
}
}
static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -376,10 +867,12 @@ static void read_64bit_header(const unsi
+@@ -380,10 +871,12 @@ static void read_64bit_header(const unsi
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
tmp = timelib_tzinfo_ctor(timezone);
version = read_preamble(&tzf, tmp);
-@@ -393,7 +886,34 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -397,7 +890,34 @@ timelib_tzinfo *timelib_parse_tzfile(cha
skip_64bit_types(&tzf, tmp);
skip_posix_string(&tzf, tmp);
}
ext/opcache/config.m4 | 122 ++-----------------------------------------------
1 file changed, 4 insertions(+), 118 deletions(-)
-diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index b7e4835..7b6c0aa 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
@@ -11,127 +11,13 @@ if test "$PHP_OPCACHE" != "no"; then
AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
AC_TRY_RUN([
---
-1.7.10.4
-
+ AC_MSG_RESULT("no")
+])
- if test "$flock_type" == "unknown"; then
+ if test "$flock_type" = "unknown"; then
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://mirrors.ibiblio.org/apache/apr/
+PKG_SOURCE_URL:=https://archive.apache.org/dist/apr/
PKG_MD5SUM:=4e9769f3349fe11fc0a5e1b224c236aa
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=Apache License
PKG_VERSION:=1.12
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://libdnet.googlecode.com/files/
-PKG_MD5SUM:=9253ef6de1b5e28e9c9a62b882e44cc9
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/dugsong/libdnet/archive
+PKG_MD5SUM:=d2f1b72eac2a1070959667e9e61dcf20
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_LICENSE:=BSD
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
+
include $(INCLUDE_DIR)/package.mk
define Package/libdnet
#
-# Copyright (C) 2008-2015 OpenWrt.org
+# Copyright (C) 2008-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=libesmtp
PKG_VERSION:=1.0.6
-PKG_RELEASE:=2
-PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
+PKG_RELEASE:=3
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=LGPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/tru7/libesmtp.git
+PKG_SOURCE_VERSION=10e9a6df9f76da610941addf71b9a3cbf94f2e9f
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A Library for Posting Electronic Mail
- URL:=http://www.stafford.uklinux.net/libesmtp/
- DEPENDS:=+libpthread
+ URL:=https://github.com/tru7/libesmtp.git
+ DEPENDS:=+libpthread +libopenssl
endef
-CONFIGURE_ARGS += \
- --without-openssl
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(1)/usr/bin/
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2016 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:=libupnpp
-PKG_VERSION:=0.9.0
+PKG_VERSION:=0.14.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads
-PKG_MD5SUM:=ff218bbe2df6cf70b73843d951ef838e
+PKG_MD5SUM:=1b10905a365fc6277e1d8ced77278666
PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libupnpp $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp-$(PKG_VERSION).so* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.{so,la} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.la $(1)/usr/lib/
endef
define Package/libupnpp/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp-$(PKG_VERSION).so.* $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libupnpp))
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
+PKG_SOURCE_URL:=https://dist.libuv.org/dist/v$(PKG_VERSION)/
PKG_MD5SUM:=654bf6783ac7fc10435c84ec86720a6e
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2016 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:=mxml
-PKG_VERSION:=2.8
+PKG_VERSION:=2.10
PKG_RELEASE:=1
-PKG_MD5SUM:=d85ee6d30de053581242c4a86e79a5d2
+PKG_MD5SUM:=8804c961a24500a95690ef287d150abe
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.msweet.org/files/project3/
+PKG_SOURCE_URL:=https://github.com/michaelrsweet/mxml/releases/download/release-$(PKG_VERSION)/
PKG_FIXUP:=autoreconf
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=neon
-PKG_VERSION:=0.30.0
+PKG_VERSION:=0.30.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.webdav.org/neon
-PKG_MD5SUM:=fb60b3a124eeec441937a812c456fd94
+PKG_MD5SUM:=e28d77bf14032d7f5046b3930704ef41
PKG_INSTALL:=1
CATEGORY:=Libraries
TITLE:=HTTP and WebDAV client library
URL:=http://www.webdav.org/neon/
- DEPENDS:=+libopenssl +libexpat
+ DEPENDS:=+libopenssl +libexpat +zlib
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
endef
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=\
- http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v$(PKG_VERSION) \
- http://ftp.be.postgresql.org/postgresql/source/v$(PKG_VERSION) \
- ftp://ftp-archives.postgresql.org/pub/source/v$(PKG_VERSION)
+ https://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
+ http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
+ ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
PKG_MD5SUM:=1fe952c44ed26d7e6a335cf991a9c1c6
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_RELEASE:=1
PKG_LICENSE:=BSD-2-Clause
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/fdm
-PKG_MD5SUM:=aea0421571e8f3ec8f747a5d72c84348
+PKG_SOURCE:=$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://github.com/nicm/fdm/archive
+PKG_MD5SUM:=b4195f5503702b6b07714ad8417f531a
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=crtmpserver
-PKG_REV:=811
-PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=1
+PKG_REV:=b6fdcdb
+PKG_VERSION:=2012-07-18+git-$(PKG_REV)
+PKG_RELEASE:=2
PKG_BUILD_PARALLEL:=2
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-3.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/branches/1.0
+PKG_SOURCE_URL:=https://github.com/j0sh/crtmpserver.git
PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
-PKG_SOURCE_PROTO:=svn
+PKG_SOURCE_PROTO:=git
include $(INCLUDE_DIR)/package.mk
-e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
-e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
linux-openwrt-uclibc.mk)
+ (cd $(PKG_BUILD_DIR)/sources/common/include/; \
+ echo '#define CRTMPSERVER_VERSION_RELEASE_NUMBER "$(PKG_VERSION)\n"' > version.h; \
+ echo '#define CRTMPSERVER_VERSION_CODE_NAME "Git\n"' >> version.h)
endef
define Build/Compile
--- a/builders/make/compile.mk
+++ b/builders/make/compile.mk
-@@ -67,7 +67,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
+@@ -72,7 +72,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
#common
COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
-- It is optional. If not specified, it will be defaulted to:
-- <rootDirectory>/<name>/mediaFolder
- -- mediaFolder="/some/directory/where/media/files/are/stored"
-+ mediaFolder="/usr/share/crtmpserver/appselector",
++ mediaFolder="/media",
-- the application will also be known by that names. It is optional
--aliases=
--{
port=8080,
protocol="inboundRtmpt"
},
-@@ -105,7 +98,7 @@ configuration=
- description="FLV Playback Sample",
- name="flvplayback",
- protocol="dynamiclinklibrary",
-- mediaFolder="/Volumes/android/backup/media/",
-+ mediaFolder="/media/",
- aliases=
- {
- "simpleLive",
-@@ -183,6 +176,7 @@ configuration=
+@@ -184,6 +177,7 @@ configuration=
name="samplefactory",
description="asdsadasdsa",
protocol="dynamiclinklibrary",
-Index: crtmpserver-r726/builders/make/linux.mk
-===================================================================
---- crtmpserver-r726.orig/builders/make/linux.mk
-+++ crtmpserver-r726/builders/make/linux.mk
+--- a/builders/make/linux.mk
++++ b/builders/make/linux.mk
@@ -38,7 +38,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT
PLATFORM_DEFINES = \
-DLINUX \
--- a/builders/make/compile.mk
+++ b/builders/make/compile.mk
-@@ -43,17 +43,22 @@ FEATURES_DEFINES = \
- -DHAS_PROTOCOL_RTP \
- -DHAS_PROTOCOL_TS \
- -DHAS_PROTOCOL_VAR \
-+ -DHAS_PROTOCOL_CLI \
-+ -DHAS_PROTOCOL_HLS \
-+ -DHAS_PROTOCOL_RAWHTTPSTREAM \
- -DHAS_LUA \
- -DHAS_MEDIA_MP3 \
- -DHAS_MEDIA_MP4 \
-- -DHAS_MEDIA_FLV
-+ -DHAS_MEDIA_FLV \
-+ -DHAS_SYSLOG
-+
-
-
- DEFINES = $(PLATFORM_DEFINES) $(FEATURES_DEFINES)
+@@ -58,7 +58,7 @@ DEFINES = $(PLATFORM_DEFINES) $(FEATURES
#library paths
SSL_INCLUDE=-I$(SSL_BASE)/include
#lua
LUA_INCLUDE=-I$(PROJECT_BASE_PATH)/3rdparty/lua-dev
-@@ -67,25 +72,25 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
+@@ -72,25 +72,25 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
#common
COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
+
#include "utils/logging/fileloglocation.h"
#include "utils/lua/luautils.h"
-
+ #include "utils/misc/file.h"
#include <iostream>
#include <sstream>
+#include "lstate.h"
+ using namespace std;
// Help out windows:
- #if defined( _DEBUG ) && !defined( DEBUG )
--- /dev/null
+--- a/builders/make/apps.mk
++++ b/builders/make/apps.mk
+@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
+ %.vptests.o: %.cpp
+ $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
+
+-ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
+-ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
+-applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
++ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
++ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
++applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=git://r-w-x.org/oggfwd.git
+PKG_SOURCE_URL:=https://r-w-x.org/oggfwd.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://mirrors.ibiblio.org/apache/httpd/ \
- http://apache.imsam.info/httpd/
+ http://apache.imsam.info/httpd/ \
+ https://archive.apache.org/dist/httpd/
PKG_MD5SUM:=6c10e15835ab214464228a9beb7afba8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
#
# Copyright (C) 2006-2012 OpenWrt.org
-# 2014 Noah Meyerhans <frodo@morgul.net>
+# 2014-2016 Noah Meyerhans <frodo@morgul.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=bind
-PKG_VERSION:=9.9.8-P3
+PKG_VERSION:=9.11.2
PKG_RELEASE:=1
USERID:=bind=57:bind=57
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= \
- ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
- http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_MD5SUM:=30b9bf88a78eee783d3fef5257445788
+ http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
+ http://ftp.isc.org/isc/bind9/$(PKG_VERSION)
+PKG_MD5SUM:=efca7e5a63a07efba264da9be2fbb57f
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/bind-libs
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libopenssl
+ DEPENDS:=+libopenssl +zlib
TITLE:=bind shared libraries
URL:=https://www.isc.org/software/bind
endef
define Package/bind-dnssec
$(call Package/bind/Default)
- TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
+ TITLE+= administration tools (dnssec-keygen, dnssec-settime and dnssec-signzone only)
endef
define Package/bind-host
--disable-threads \
--disable-linux-caps \
--with-openssl="$(STAGING_DIR)/usr" \
+ --with-libjson=no \
--with-libtool \
--with-libxml2=no \
--enable-epoll=yes \
--with-gssapi=no \
--with-ecdsa=no \
--with-readline=no
+ --sysconfdir=/etc/bind
CONFIGURE_VARS += \
BUILD_CC="$(TARGET_CC)" \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
define Package/bind-dnssec/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-settime $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
endef
-
-; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
-;; global options: printcmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
-;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
-
-;; QUESTION SECTION:
-;. IN NS
-
-;; ANSWER SECTION:
-. 518400 IN NS A.ROOT-SERVERS.NET.
-. 518400 IN NS B.ROOT-SERVERS.NET.
-. 518400 IN NS C.ROOT-SERVERS.NET.
-. 518400 IN NS D.ROOT-SERVERS.NET.
-. 518400 IN NS E.ROOT-SERVERS.NET.
-. 518400 IN NS F.ROOT-SERVERS.NET.
-. 518400 IN NS G.ROOT-SERVERS.NET.
-. 518400 IN NS H.ROOT-SERVERS.NET.
-. 518400 IN NS I.ROOT-SERVERS.NET.
-. 518400 IN NS J.ROOT-SERVERS.NET.
-. 518400 IN NS K.ROOT-SERVERS.NET.
-. 518400 IN NS L.ROOT-SERVERS.NET.
-. 518400 IN NS M.ROOT-SERVERS.NET.
-
-;; ADDITIONAL SECTION:
-A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
-B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
-C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
-D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
-E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
-F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
-G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
-H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
-I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
-J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
-K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
-L.ROOT-SERVERS.NET. 3600000 IN A 199.7.83.42
-M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
-
-;; Query time: 81 msec
-;; SERVER: 198.41.0.4#53(a.root-servers.net.)
-;; WHEN: Sun Feb 1 11:27:14 2004
-;; MSG SIZE rcvd: 436
-
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: February 17, 2016
+; related version of root zone: 2016021701
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::b
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of file
logdir=/var/log/named/
cachedir=/var/cache/bind
libdir=/var/lib/bind
-config_file=/etc/bind/named.conf
fix_perms() {
for dir in $libdir $logdir $cachedir; do
-Index: bind-9.9.4/bin/Makefile.in
+Index: bind-9.10.4-P3/bin/Makefile.in
===================================================================
---- bind-9.9.4.orig/bin/Makefile.in
-+++ bind-9.9.4/bin/Makefile.in
-@@ -19,7 +19,7 @@ srcdir = @srcdir@
+--- bind-9.10.4-P3.orig/bin/Makefile.in
++++ bind-9.10.4-P3/bin/Makefile.in
+@@ -10,7 +10,7 @@ srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
--SUBDIRS = named rndc dig dnssec tools tests nsupdate \
-+SUBDIRS = named rndc dig dnssec tools nsupdate \
- check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@
+-SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \
++SUBDIRS = named rndc dig delv dnssec tools nsupdate \
+ check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
TARGETS =
-Index: bind-9.9.4/lib/Makefile.in
+Index: bind-9.10.4-P3/lib/Makefile.in
===================================================================
---- bind-9.9.4.orig/lib/Makefile.in
-+++ bind-9.9.4/lib/Makefile.in
-@@ -23,7 +23,7 @@ top_srcdir = @top_srcdir@
+--- bind-9.10.4-P3.orig/lib/Makefile.in
++++ bind-9.10.4-P3/lib/Makefile.in
+@@ -14,7 +14,7 @@ top_srcdir = @top_srcdir@
# Attempt to disable parallel processing.
.NOTPARALLEL:
.NO_PARALLEL:
--SUBDIRS = isc isccc dns isccfg bind9 lwres tests
-+SUBDIRS = isc isccc dns isccfg bind9 lwres
+-SUBDIRS = isc isccc dns isccfg bind9 lwres irs tests samples
++SUBDIRS = isc isccc dns isccfg bind9 lwres irs samples
TARGETS =
@BIND9_MAKE_RULES@
---- a/configure.in
-+++ b/configure.in
-@@ -93,26 +93,11 @@ esac
+Index: bind-9.10.4-P3/configure.in
+===================================================================
+--- bind-9.10.4-P3.orig/configure.in
++++ bind-9.10.4-P3/configure.in
+@@ -157,26 +157,11 @@ esac
#
AC_CONFIG_FILES([make/rules make/includes])
PKG_LICENSE:=Custom
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/
-PKG_MD5SUM:=ad1c5342d61f297c417a93133aeba65a
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/HewlettPackard/netperf.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=f46c031
+
+#PKG_MD5SUM:=ad1c5342d61f297c417a93133aeba65a
include $(INCLUDE_DIR)/package.mk
#
-# Copyright (C) 2010-2012 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
menu "Configuration"
depends on PACKAGE_nginx
-config NGINX_STUB_STATUS
- bool
- prompt "Enable stub status module"
- help
- Enable the stub status module which gives some status from the server.
-
-config NGINX_FLV
- bool
- prompt "Enable FLV module"
- help
- Provides the ability to seek within FLV (Flash) files using time-based offsets.
-
config NGINX_SSL
bool
prompt "Enable SSL module"
help
Enable HTTPS/SSL support.
+ default n
config NGINX_DAV
bool
prompt "Enable WebDAV module"
help
Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE.
+ default n
-config NGINX_LUA
+config NGINX_FLV
bool
- prompt "Enable LUA module"
+ prompt "Enable FLV module"
help
- Enable support for LUA scripts.
-
-config NGINX_PCRE
- bool
- prompt "Enable PCRE library usage"
- default y
+ Provides the ability to seek within FLV (Flash) files using time-based offsets.
+ default n
-config NGINX_HTTP_CACHE
+config NGINX_STUB_STATUS
bool
- prompt "Enable HTTP cache"
+ prompt "Enable stub status module"
+ help
+ Enable the stub status module which gives some status from the server.
+ default n
config NGINX_HTTP_CHARSET
bool
prompt "Enable HTTP auth basic"
default y
+config NGINX_HTTP_AUTH_REQUEST
+ bool
+ prompt "Enable HTTP auth request module"
+ default n
+
config NGINX_HTTP_AUTOINDEX
bool
prompt "Enable HTTP autoindex module"
prompt "Enable HTTP browser module"
default y
+config NGINX_HTTP_UPSTREAM_HASH
+ bool
+ prompt "Enable HTTP hash module"
+ default y
+
config NGINX_HTTP_UPSTREAM_IP_HASH
bool
prompt "Enable HTTP IP hash module"
default y
+config NGINX_HTTP_UPSTREAM_LEAST_CONN
+ bool
+ prompt "Enable HTTP least conn module"
+ default y
+
+config NGINX_HTTP_UPSTREAM_KEEPALIVE
+ bool
+ prompt "Enable HTTP keepalive module"
+ default y
+
+config NGINX_HTTP_CACHE
+ bool
+ prompt "Enable HTTP cache"
+ default y
+
+config NGINX_HTTP_V2
+ bool
+ prompt "Enable HTTP_V2 module"
+ default n
+
+config NGINX_PCRE
+ bool
+ prompt "Enable PCRE library usage"
+ default y
+
config NGINX_NAXSI
bool
prompt "Enable NAXSI module"
- select PACKAGE_nginx-naxsi
default y
- help
- Enable support for NAXSI WAF.
-config NGINX_PROXYPROTOCOL
+config NGINX_LUA
bool
- prompt "Enable HAProxy proxyprotocol"
- select PACKAGE_nginx-proxyprotocol
- select NGINX_SSL
+ prompt "Enable Lua module"
default n
- help
- Enable support for PROXY PROTOCOL
-config NGINX_SYSLOG
+config NGINX_HTTP_REAL_IP
bool
- prompt "Enable Syslog module"
- select PACKAGE_nginx-syslog
- default y
- help
- Provides the ability log to a remote destination
+ prompt "Enable HTTP real ip module"
+ default n
-config NGINX_HTTP_UPSTREAM_CHECK
+config NGINX_HTTP_SECURE_LINK
bool
- select NGINX_SSL
- prompt "Enable HTTP upstream check module"
+ prompt "Enable HTTP secure link module"
default n
endmenu
#
-# Copyright (C) 2009-2012 OpenWrt.org
+# Copyright (C) 2012-2016 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.4.7
-PKG_RELEASE:=2
+PKG_VERSION:=1.12.1
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nginx.org/download/
-PKG_MD5SUM:=aee151d298dcbfeb88b3f7dd3e7a4d17
+PKG_HASH:=8793bf426485a30f91021b6b945a9fd8a84d87d17b566562c3797aba8fac76fb
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=2-clause BSD-like license
+PKG_BUILD_DIR:=$(BUILD_DIR)/nginx-$(PKG_VERSION)
+
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS := \
- CONFIG_NGINX_STUB_STATUS \
- CONFIG_NGINX_FLV \
CONFIG_NGINX_SSL \
CONFIG_NGINX_DAV \
- CONFIG_NGINX_LUA \
- CONFIG_NGINX_PCRE \
- CONFIG_NGINX_HTTP_CACHE \
+ CONFIG_NGINX_FLV \
+ CONFIG_NGINX_STUB_STATUS \
CONFIG_NGINX_HTTP_CHARSET \
CONFIG_NGINX_HTTP_GZIP \
CONFIG_NGINX_HTTP_SSI \
CONFIG_NGINX_HTTP_USERID \
CONFIG_NGINX_HTTP_ACCESS \
CONFIG_NGINX_HTTP_AUTH_BASIC \
+ CONFIG_NGINX_HTTP_AUTH_REQUEST \
CONFIG_NGINX_HTTP_AUTOINDEX \
CONFIG_NGINX_HTTP_GEO \
CONFIG_NGINX_HTTP_MAP \
CONFIG_NGINX_HTTP_LIMIT_REQ \
CONFIG_NGINX_HTTP_EMPTY_GIF \
CONFIG_NGINX_HTTP_BROWSER \
- CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH
+ CONFIG_NGINX_HTTP_UPSTREAM_HASH \
+ CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH \
+ CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN \
+ CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE \
+ CONFIG_NGINX_HTTP_UPSTREAM_ZONE \
+ CONFIG_NGINX_HTTP_CACHE \
+ CONFIG_NGINX_HTTP_V2 \
+ CONFIG_NGINX_PCRE \
+ CONFIG_NGINX_NAXSI \
+ CONFIG_NGINX_LUA \
+ CONFIG_NGINX_HTTP_REAL_IP \
+ CONFIG_NGINX_HTTP_SECURE_LINK
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server
URL:=http://nginx.org/
- DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +libpthread +NGINX_LUA:liblua
+ DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread
MENU:=1
endef
source "$(SOURCE)/Config.in"
endef
-config_files=nginx.conf mime.types fastcgi_params koi-utf koi-win win-utf
+config_files=nginx.conf mime.types
define Package/nginx/conffiles
/etc/nginx/
ifeq ($(CONFIG_NGINX_NAXSI),y)
ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src
endif
+ifeq ($(CONFIG_NGINX_LUA),y)
+ ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
+endif
ifeq ($(CONFIG_IPV6),y)
ADDITIONAL_MODULES += --with-ipv6
endif
ifeq ($(CONFIG_NGINX_DAV),y)
ADDITIONAL_MODULES += --with-http_dav_module
endif
-ifeq ($(CONFIG_NGINX_LUA),y)
- ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx
-endif
ifneq ($(CONFIG_NGINX_HTTP_CACHE),y)
ADDITIONAL_MODULES += --without-http-cache
endif
endif
ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y)
ADDITIONAL_MODULES += --without-http_charset_module
+else
+ config_files += koi-utf koi-win win-utf
endif
ifneq ($(CONFIG_NGINX_HTTP_GZIP),y)
ADDITIONAL_MODULES += --without-http_gzip_module
ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y)
ADDITIONAL_MODULES += --without-http_auth_basic_module
endif
+ifeq ($(CONFIG_NGINX_HTTP_AUTH_REQUEST),y)
+ ADDITIONAL_MODULES += --with-http_auth_request_module
+endif
ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y)
ADDITIONAL_MODULES += --without-http_autoindex_module
endif
endif
ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y)
ADDITIONAL_MODULES += --without-http_fastcgi_module
+else
+ config_files += fastcgi_params
endif
ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y)
ADDITIONAL_MODULES += --without-http_uwsgi_module
ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y)
ADDITIONAL_MODULES += --without-http_browser_module
endif
+ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_HASH),y)
+ ADDITIONAL_MODULES += --without-http_upstream_hash_module
+endif
ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y)
ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module
endif
-ifeq ($(CONFIG_NGINX_PROXYPROTOCOL),y)
- ADDITIONAL_MODULES += --with-proxy-protocol
+ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN),y)
+ ADDITIONAL_MODULES += --without-http_upstream_least_conn_module
+endif
+ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y)
+ ADDITIONAL_MODULES += --without-http_upstream_keepalive_module
endif
-ifeq ($(CONFIG_NGINX_SYSLOG),y)
- ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-syslog
+ifeq ($(CONFIG_NGINX_HTTP_V2),y)
+ ADDITIONAL_MODULES += --with-http_v2_module
endif
-ifeq ($(CONFIG_NGINX_HTTP_UPSTREAM_CHECK),y)
- ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-upstream-check
+ifeq ($(CONFIG_NGINX_HTTP_REAL_IP),y)
+ ADDITIONAL_MODULES += --with-http_realip_module
endif
+ifeq ($(CONFIG_NGINX_HTTP_SECURE_LINK),y)
+ ADDITIONAL_MODULES += --with-http_secure_link_module
+endif
+
+TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK
+TARGET_LDFLAGS += -Wl,--gc-sections
define Build/Configure
- # TODO: fix --crossbuild
- (cd $(PKG_BUILD_DIR) ;\
+ ( cd $(PKG_BUILD_DIR) ; \
$(if $(CONFIG_NGINX_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \
./configure \
--crossbuild=Linux::$(ARCH) \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--with-cc="$(TARGET_CC)" \
--with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
- --with-ld-opt="$(TARGET_LDFLAGS)" )
+ --with-ld-opt="$(TARGET_LDFLAGS)" \
+ --without-http_upstream_zone_module \
+ )
endef
define Package/nginx/install
$(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx
+ifeq ($(CONFIG_NGINX_NAXSI),y)
+ $(INSTALL_DIR) $(1)/etc/nginx
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx
+ chmod 0640 $(1)/etc/nginx/naxsi_core.rules
+endif
+ $(if $(CONFIG_NGINX_NAXSI),$($(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx))
+ $(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules))
endef
define Build/Prepare
$(call Build/Prepare/Default)
- $(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx))
$(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi))
- $(if $(CONFIG_NGINX_SYSLOG),$(call Prepare/nginx-syslog))
- $(if $(CONFIG_NGINX_HTTP_UPSTREAM_CHECK),$(call Prepare/nginx-upstream-check))
-endef
-
-define Download/lua-nginx
- VERSION:=d3ab0edd45bffe1b9a36abdf5bff544de436ccee
- SUBDIR:=lua-nginx
- FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz
- URL:=https://github.com/chaoslawful/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 Download/nginx-upstream-check
- VERSION:=d40b9f956d9d978005bb15616d2f283d4e3d2031
- SUBDIR:=nginx-upstream-check
- FILE:=nginx-upstream-check-$(PKG_VERSION)-$$(VERSION).tar.gz
- URL:=https://github.com/yaoweibin/nginx_upstream_check_module.git
- PROTO:=git
-endef
-
-define Prepare/nginx-upstream-check
- $(eval $(call Download,nginx-upstream-check))
- gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
- $(call PatchDir,$(PKG_BUILD_DIR),./patches-nginx-upstream-check)
-endef
-
-
-define Package/nginx-naxsi
- MENU:=1
- $(call Package/nginx)
- TITLE:=nginx-naxsi
- DEPENDS:=nginx @NGINX_NAXSI
-endef
-
-define Package/nginx-naxsi/description
- NGINX WAF NAXSI
-endef
-
-define Package/nginx-proxyprotocol
- MENU:=1
- $(call Package/nginx)
- TITLE:=nginx
- DEPENDS:=nginx @NGINX_PROXYPROTOCOL
-endef
-
-define Package/nginx-proxyprotocol/description
- IMPLEMENT Proxy Protocol
-endef
-
-define Package/nginx-syslog
- MENU:=1
- $(call Package/nginx)
- TITLE:=nginx-syslog
- DEPENDS:=nginx @NGINX_SYSLOG
-endef
-
-define Package/nginx-syslog/description
- IMPLEMENT Syslog Protocol
+ $(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx))
endef
define Download/nginx-naxsi
- VERSION:=34dcb45fe4fdcb144c5258d83672f8e1e1c8db2e
+ VERSION:=cf73f9c8664127252c2a4958d2e169516d3845a1
SUBDIR:=nginx-naxsi
FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz
URL:=https://github.com/nbs-system/naxsi.git
gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
-define Package/nginx-naxsi/install
- $(INSTALL_DIR) $(1)/etc/nginx
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx
- chmod 0640 $(1)/etc/nginx/naxsi_core.rules
-endef
-
-define Download/nginx-syslog
- VERSION:=7abf48e52552c40a21463e1a8c608e0e575261cd
- SUBDIR:=nginx-syslog
- FILE:=nginx-syslog-module-$(PKG_VERSION)-$$(VERSION).tar.gz
- URL:=https://github.com/splitice/nginx_syslog_patch.git
+define Download/lua-nginx
+ VERSION:=cdd2ae921f67bf396c743406493127be496e57ce
+ 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/nginx-syslog
- $(eval $(call Download,nginx-syslog))
+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 Package/nginx-proxyprotocol/install
- $(INSTALL_DIR) $(1)/etc/nginx
- $(INSTALL_BIN) ./files/nginx.proxyprotocol.example $(1)/etc/nginx/nginx.conf.proxyprotocol
- chmod 0640 $(1)/etc/nginx/nginx.conf.proxyprotocol
-endef
-
-define Package/nginx-syslog/install
- $(INSTALL_DIR) $(1)/etc/nginx
- $(INSTALL_BIN) ./files/nginx.syslog.example $(1)/etc/nginx/nginx.conf.syslog
- chmod 0640 $(1)/etc/nginx/nginx.conf.syslog
-endef
-
-
$(eval $(call BuildPackage,nginx))
-$(eval $(call BuildPackage,nginx-naxsi))
-$(eval $(call BuildPackage,nginx-proxyprotocol))
-$(eval $(call BuildPackage,nginx-syslog))
-
#!/bin/sh /etc/rc.common
-# Copyright (C) 2009-2012 OpenWrt.org
+# Copyright (C) 2015 OpenWrt.org
-START=50
-NGINX_BIN=/usr/sbin/nginx
+START=80
-start() {
- mkdir -p /var/log/nginx
- mkdir -p /var/lib/nginx
- $NGINX_BIN
-}
+USE_PROCD=1
-stop() {
- $NGINX_BIN -s stop
-}
+start_service() {
+ [ -d /var/log/nginx ] || mkdir -p /var/log/nginx
+ [ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx
-reload() {
- $NGINX_BIN -s reload
+ procd_open_instance
+ procd_set_param command /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
+ procd_set_param file /etc/nginx/nginx.conf
+ procd_set_param respawn
+ procd_close_instance
}
-
-shutdown() {
- $NGINX_BIN -s quit
-}
-
+++ /dev/null
-worker_processes 1;
-pid /tmp/nginx.pid;
-daemon off;
-master_process off;
-error_log stderr debug_core;
-
-events {
- debug_connection <YOUR IPv4>;
- debug_connection <YOUR IPV6>;
- worker_connections 1024;
-}
-
-http {
- default_type application/octet-stream;
- client_body_temp_path /tmp/body 1;
-
- access_log /tmp/nginx_access.log;
-
- server {
-# listen 8082 ssl;
-# proxy protocol configuration for nginx 1.4.x:
- listen 8082 accept_proxy_protocol=on;
-# same with spdy enabled:
-# listen 8082 spdy ssl accept_proxy_protocol=on;
- listen [::]:8082 ipv6only=on;
- ssl_certificate /your/certificate;
- ssl_certificate_key /your/key;
- server_name localhost;
-# proxy protocol configuration for nginx 1.2.x:
-# accept_proxy_protocol on;
-
- location / {
- proxy_pass http://127.0.0.1:8084;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_connect_timeout 10s;
- proxy_read_timeout 10s;
- send_proxy_protocol on;
- }
- }
-}
+++ /dev/null
-worker_processes 1;
-
-syslog local6 nginx;
-
-events {
- worker_connections 1024;
-}
-
-http {
- include mime.types;
- default_type application/octet-stream;
-
- log_format main '$remote_addr - $remote_user [$time_local] $request '
- '"$status" $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
-
- server {
- listen 80;
- server_name localhost;
-
- #send the log to syslog and file.
- access_log syslog:notice|logs/host1.access.log main;
-
- # pre 1.5.x
- error_log syslog:notice|logs/host1.error.log;
-
- location / {
- root html;
- index index.html index.htm;
- }
- }
-
- server {
- listen 80;
- server_name www.example.com;
-
- access_log syslog:warn|logs/host2.access.log main;
- error_log syslog:warn|logs/host2.error.log;
-
- location / {
- root html;
- index index.html index.htm;
- }
- }
-
- server {
- listen 80;
- server_name www.test.com;
-
- #send the log just to syslog.
- access_log syslog:error main;
- error_log syslog:error;
-
- location / {
- root html;
- index index.html index.htm;
- }
- }
-}
--- /dev/null
+--- a/lua-nginx/src/ngx_http_lua_module.c
++++ b/lua-nginx/src/ngx_http_lua_module.c
+@@ -157,14 +157,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
+ NULL },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ { ngx_string("init_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+ ngx_http_lua_init_by_lua_block,
+ NGX_HTTP_MAIN_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_init_by_inline },
+-
++#endif
+ { ngx_string("init_by_lua"),
+ NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
+ ngx_http_lua_init_by_lua,
+@@ -178,14 +178,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_MAIN_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_init_by_file },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ { ngx_string("init_worker_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+ ngx_http_lua_init_worker_by_lua_block,
+ NGX_HTTP_MAIN_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_init_worker_by_inline },
+-
++#endif
+ { ngx_string("init_worker_by_lua"),
+ NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
+ ngx_http_lua_init_worker_by_lua,
+@@ -201,6 +201,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ (void *) ngx_http_lua_init_worker_by_file },
+
+ #if defined(NDK) && NDK
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* set_by_lua $res { inline Lua code } [$arg1 [$arg2 [...]]] */
+ { ngx_string("set_by_lua_block"),
+ NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -209,7 +210,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_filter_set_by_lua_inline },
+-
++#endif
+ /* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */
+ { ngx_string("set_by_lua"),
+ NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -237,7 +238,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_rewrite_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* rewrite_by_lua_block { <inline script> } */
+ { ngx_string("rewrite_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -246,7 +247,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_rewrite_handler_inline },
+-
++#endif
+ /* access_by_lua "<inline script>" */
+ { ngx_string("access_by_lua"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -255,7 +256,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_access_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* access_by_lua_block { <inline script> } */
+ { ngx_string("access_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -264,7 +265,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_access_handler_inline },
+-
++#endif
+ /* content_by_lua "<inline script>" */
+ { ngx_string("content_by_lua"),
+ NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
+@@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_content_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* content_by_lua_block { <inline script> } */
+ { ngx_string("content_by_lua_block"),
+ NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+@@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_content_handler_inline },
+-
++#endif
+ /* log_by_lua <inline script> */
+ { ngx_string("log_by_lua"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -289,7 +290,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_log_handler_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* log_by_lua_block { <inline script> } */
+ { ngx_string("log_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -298,7 +299,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_log_handler_inline },
+-
++#endif
+ { ngx_string("rewrite_by_lua_file"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+ |NGX_CONF_TAKE1,
+@@ -353,7 +354,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_header_filter_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* header_filter_by_lua_block { <inline script> } */
+ { ngx_string("header_filter_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -362,7 +363,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_header_filter_inline },
+-
++#endif
+ { ngx_string("header_filter_by_lua_file"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+ |NGX_CONF_TAKE1,
+@@ -378,7 +379,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_body_filter_inline },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ /* body_filter_by_lua_block { <inline script> } */
+ { ngx_string("body_filter_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+@@ -387,7 +388,7 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_body_filter_inline },
+-
++#endif
+ { ngx_string("body_filter_by_lua_file"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
+ |NGX_CONF_TAKE1,
+@@ -395,14 +396,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_body_filter_file },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ { ngx_string("balancer_by_lua_block"),
+ NGX_HTTP_UPS_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+ ngx_http_lua_balancer_by_lua_block,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_balancer_handler_inline },
+-
++#endif
+ { ngx_string("balancer_by_lua_file"),
+ NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
+ ngx_http_lua_balancer_by_lua,
+@@ -509,14 +510,14 @@ static ngx_command_t ngx_http_lua_cmds[]
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers),
+ NULL },
+-
++#ifndef NGX_LUA_NO_BY_LUA_BLOCK
+ { ngx_string("ssl_certificate_by_lua_block"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
+ ngx_http_lua_ssl_cert_by_lua_block,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ 0,
+ (void *) ngx_http_lua_ssl_cert_handler_inline },
+-
++#endif
+ { ngx_string("ssl_certificate_by_lua_file"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
+ ngx_http_lua_ssl_cert_by_lua,
+++ /dev/null
---- a/lua-nginx/config
-+++ b/lua-nginx/config
-@@ -1,5 +1,5 @@
- ngx_feature="Lua library"
--ngx_feature_libs="-llua -lm"
-+ngx_feature_libs="-llua -lm -ldl"
- ngx_feature_name=
- ngx_feature_run=no
- ngx_feature_incs="#include <lauxlib.h>"
-@@ -47,9 +47,9 @@ else
- ngx_feature="Lua library in $LUA_LIB and $LUA_INC (specified by the LUA_LIB and LUA_INC env)"
- ngx_feature_path="$LUA_INC"
- if [ $NGX_RPATH = YES ]; then
-- ngx_feature_libs="-R$LUA_LIB -L$LUA_LIB -llua -lm"
-+ ngx_feature_libs="-R$LUA_LIB -L$LUA_LIB -llua -lm -ldl"
- else
-- ngx_feature_libs="-L$LUA_LIB -llua -lm"
-+ ngx_feature_libs="-L$LUA_LIB -llua -lm -ldl"
- fi
-
- . auto/feature
+++ /dev/null
-diff --git a/src/http/modules/ngx_http_upstream_ip_hash_module.c b/src/http/modules/ngx_http_upstream_ip_hash_module.c
-index 89ccc2b..a552044 100644
---- a/src/http/modules/ngx_http_upstream_ip_hash_module.c
-+++ b/src/http/modules/ngx_http_upstream_ip_hash_module.c
-@@ -9,6 +9,10 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+#include "ngx_http_upstream_check_handler.h"
-+#endif
-+
-
- typedef struct {
- /* the round robin data must be first */
-@@ -208,6 +212,12 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
-
- if (!peer->down) {
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get ip_hash peer, check_index: %ui",
-+ peer->check_index);
-+ if (!ngx_http_check_peer_down(peer->check_index)) {
-+#endif
- if (peer->max_fails == 0 || peer->fails < peer->max_fails) {
- break;
- }
-@@ -216,6 +226,9 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
- peer->checked = now;
- break;
- }
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ }
-+#endif
- }
-
- iphp->rrp.tried[n] |= m;
-diff --git a/src/http/modules/ngx_http_upstream_least_conn_module.c b/src/http/modules/ngx_http_upstream_least_conn_module.c
-index 21156ae..c57393d 100644
---- a/src/http/modules/ngx_http_upstream_least_conn_module.c
-+++ b/src/http/modules/ngx_http_upstream_least_conn_module.c
-@@ -9,6 +9,10 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+#include "ngx_http_upstream_check_handler.h"
-+#endif
-+
-
- typedef struct {
- ngx_uint_t *conns;
-@@ -203,6 +207,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get least_conn peer, check_index: %ui",
-+ peer->check_index);
-+
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-@@ -256,6 +270,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get least_conn peer, check_index: %ui",
-+ peer->check_index);
-+
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (lcp->conns[i] * best->weight != lcp->conns[p] * peer->weight) {
- continue;
- }
-diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
-index 4b78cff..f077b46 100644
---- a/src/http/ngx_http_upstream_round_robin.c
-+++ b/src/http/ngx_http_upstream_round_robin.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+#include "ngx_http_upstream_check_handler.h"
-+#endif
-
- static ngx_int_t ngx_http_upstream_cmp_servers(const void *one,
- const void *two);
-@@ -87,7 +90,17 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peers->peer[n].weight = server[i].weight;
- peers->peer[n].effective_weight = server[i].weight;
- peers->peer[n].current_weight = 0;
-- n++;
-+
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (!server[i].down) {
-+ peers->peer[n].check_index =
-+ ngx_http_check_add_peer(cf, us, &server[i].addrs[j]);
-+ }
-+ else {
-+ peers->peer[n].check_index = (ngx_uint_t) NGX_ERROR;
-+ }
-+#endif
-+ n++;
- }
- }
-
-@@ -145,6 +158,17 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- backup->peer[n].max_fails = server[i].max_fails;
- backup->peer[n].fail_timeout = server[i].fail_timeout;
- backup->peer[n].down = server[i].down;
-+
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (!server[i].down) {
-+ backup->peer[n].check_index =
-+ ngx_http_check_add_peer(cf, us, &server[i].addrs[j]);
-+ }
-+ else {
-+ backup->peer[n].check_index = (ngx_uint_t) NGX_ERROR;
-+ }
-+#endif
-+
- n++;
- }
- }
-@@ -206,6 +230,9 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peers->peer[i].current_weight = 0;
- peers->peer[i].max_fails = 1;
- peers->peer[i].fail_timeout = 10;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ peers->peer[i].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- }
-
- us->peer.data = peers;
-@@ -323,6 +350,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
- peers->peer[0].current_weight = 0;
- peers->peer[0].max_fails = 1;
- peers->peer[0].fail_timeout = 10;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ peers->peer[0].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
-
- } else {
-
-@@ -356,6 +386,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
- peers->peer[i].current_weight = 0;
- peers->peer[i].max_fails = 1;
- peers->peer[i].fail_timeout = 10;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ peers->peer[i].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- }
- }
-
-@@ -434,6 +467,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
- goto failed;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ goto failed;
-+ }
-+#endif
-+
- } else {
-
- /* there are several peers */
-@@ -531,6 +570,12 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp)
- continue;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-diff --git a/src/http/ngx_http_upstream_round_robin.h b/src/http/ngx_http_upstream_round_robin.h
-index 3f8cbf8..1613168 100644
---- a/src/http/ngx_http_upstream_round_robin.h
-+++ b/src/http/ngx_http_upstream_round_robin.h
-@@ -30,6 +30,10 @@ typedef struct {
- ngx_uint_t max_fails;
- time_t fail_timeout;
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_uint_t check_index;
-+#endif
-+
- ngx_uint_t down; /* unsigned down:1; */
-
- #if (NGX_HTTP_SSL)
ngx_feature_libs=
--- a/auto/cc/conf
+++ b/auto/cc/conf
-@@ -155,7 +155,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
+@@ -200,7 +200,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=
-@@ -169,7 +169,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
+@@ -214,7 +214,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
-@@ -48,7 +48,7 @@ fi
+@@ -36,7 +36,7 @@ fi
ngx_feature="epoll"
ngx_feature_name="NGX_HAVE_EPOLL"
ngx_feature_incs="#include <sys/epoll.h>"
ngx_feature_path=
ngx_feature_libs=
-@@ -73,7 +73,7 @@ fi
+@@ -93,7 +93,7 @@ ngx_feature_test="int fd; struct stat sb
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=
-@@ -94,7 +94,7 @@ fi
+@@ -114,7 +114,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=
-@@ -112,7 +112,7 @@ ngx_include="sys/prctl.h"; . auto/includ
+@@ -132,7 +132,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
-@@ -618,7 +618,7 @@ ngx_feature_test="void *p; p = memalign(
+@@ -735,7 +735,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=
-@@ -631,7 +631,7 @@ ngx_feature_test="void *p;
+@@ -748,7 +748,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>"
-@@ -646,7 +646,7 @@ ngx_feature_test='void *p; int fd;
+@@ -763,7 +763,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=
-@@ -660,7 +660,7 @@ ngx_feature_test="int id;
+@@ -777,7 +777,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
-@@ -25,8 +25,13 @@ $NGX_INCLUDE_UNISTD_H
+@@ -25,8 +25,14 @@ $NGX_INCLUDE_UNISTD_H
$NGX_INCLUDE_INTTYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H
+ 'Y', '3', 'p', 'M', '\n'
+};
+
- int main() {
+ int main(void) {
- printf("%d", (int) sizeof($ngx_type));
++ printf("dummy use of object_code_block to avoid gc-section: %c", object_code_block[0]);
return 0;
}
+++ /dev/null
---- a/auto/endianness
-+++ b/auto/endianness
-@@ -21,7 +21,7 @@ int main() {
-
- END
-
--ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
-+ngx_test="$CC $NGX_CC_OPT $CC_TEST_FLAGS $CC_AUX_FLAGS \
- -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
-
- eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
---- a/auto/feature
-+++ b/auto/feature
-@@ -39,7 +39,7 @@ int main() {
- END
-
-
--ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
-+ngx_test="$CC $NGX_CC_OPT $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
- -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_TEST_LD_OPT $ngx_feature_libs"
-
- ngx_feature_inc_path=
---- a/auto/include
-+++ b/auto/include
-@@ -27,7 +27,7 @@ int main() {
- END
-
-
--ngx_test="$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
-+ngx_test="$CC $NGX_CC_OPT -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
-
- eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
-
--- /dev/null
+--- a/src/os/unix/ngx_process.h
++++ b/src/os/unix/ngx_process.h
+@@ -44,7 +44,7 @@ typedef struct {
+ } ngx_exec_ctx_t;
+
+
+-#define NGX_MAX_PROCESSES 1024
++#define NGX_MAX_PROCESSES 8
+
+ #define NGX_PROCESS_NORESPAWN -1
+ #define NGX_PROCESS_JUST_SPAWN -2
+++ /dev/null
-Index: nginx-1.4.7/auto/modules
-===================================================================
---- nginx-1.4.7.orig/auto/modules
-+++ nginx-1.4.7/auto/modules
-@@ -297,6 +297,10 @@ if [ $HTTP_SSL = YES ]; then
- HTTP_SRCS="$HTTP_SRCS $HTTP_SSL_SRCS"
- fi
-
-+if [ $PROXY_PROTOCOL = YES ]; then
-+ have=NGX_PROXY_PROTOCOL . auto/have
-+fi
-+
- if [ $HTTP_PROXY = YES ]; then
- have=NGX_HTTP_X_FORWARDED_FOR . auto/have
- #USE_MD5=YES
-Index: nginx-1.4.7/auto/options
-===================================================================
---- nginx-1.4.7.orig/auto/options
-+++ nginx-1.4.7/auto/options
-@@ -47,6 +47,8 @@ USE_THREADS=NO
- NGX_FILE_AIO=NO
- NGX_IPV6=NO
-
-+PROXY_PROTOCOL=NO
-+
- HTTP=YES
-
- NGX_HTTP_LOG_PATH=
-@@ -192,6 +194,8 @@ do
- --with-file-aio) NGX_FILE_AIO=YES ;;
- --with-ipv6) NGX_IPV6=YES ;;
-
-+ --with-proxy-protocol) PROXY_PROTOCOL=YES ;;
-+
- --without-http) HTTP=NO ;;
- --without-http-cache) HTTP_CACHE=NO ;;
-
-@@ -350,6 +354,8 @@ cat << END
- --with-file-aio enable file AIO support
- --with-ipv6 enable IPv6 support
-
-+ --with-proxy-protocol enable proxy protocol support
-+
- --with-http_ssl_module enable ngx_http_ssl_module
- --with-http_spdy_module enable ngx_http_spdy_module
- --with-http_realip_module enable ngx_http_realip_module
-Index: nginx-1.4.7/auto/sources
-===================================================================
---- nginx-1.4.7.orig/auto/sources
-+++ nginx-1.4.7/auto/sources
-@@ -36,7 +36,8 @@ CORE_DEPS="src/core/nginx.h \
- src/core/ngx_conf_file.h \
- src/core/ngx_resolver.h \
- src/core/ngx_open_file_cache.h \
-- src/core/ngx_crypt.h"
-+ src/core/ngx_crypt.h \
-+ src/core/ngx_proxy_protocol.h"
-
-
- CORE_SRCS="src/core/nginx.c \
-@@ -67,7 +68,8 @@ CORE_SRCS="src/core/nginx.c \
- src/core/ngx_conf_file.c \
- src/core/ngx_resolver.c \
- src/core/ngx_open_file_cache.c \
-- src/core/ngx_crypt.c"
-+ src/core/ngx_crypt.c \
-+ src/core/ngx_proxy_protocol.c"
-
-
- REGEX_MODULE=ngx_regex_module
-Index: nginx-1.4.7/src/core/ngx_connection.h
-===================================================================
---- nginx-1.4.7.orig/src/core/ngx_connection.h
-+++ nginx-1.4.7/src/core/ngx_connection.h
-@@ -63,6 +63,10 @@ struct ngx_listening_s {
- unsigned shared:1; /* shared between threads or processes */
- unsigned addr_ntop:1;
-
-+#if (NGX_PROXY_PROTOCOL)
-+ unsigned accept_proxy_protocol:2; /* proxy_protocol flag */
-+#endif
-+
- #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- unsigned ipv6only:1;
- #endif
-@@ -148,6 +152,10 @@ struct ngx_connection_s {
-
- ngx_uint_t requests;
-
-+#if (NGX_PROXY_PROTOCOL)
-+ ngx_uint_t proxy_protocol;
-+#endif
-+
- unsigned buffered:8;
-
- unsigned log_error:3; /* ngx_connection_log_error_e */
-Index: nginx-1.4.7/src/core/ngx_core.h
-===================================================================
---- nginx-1.4.7.orig/src/core/ngx_core.h
-+++ nginx-1.4.7/src/core/ngx_core.h
-@@ -77,6 +77,9 @@ typedef void (*ngx_connection_handler_pt
- #include <ngx_open_file_cache.h>
- #include <ngx_os.h>
- #include <ngx_connection.h>
-+#if (NGX_PROXY_PROTOCOL)
-+#include <ngx_proxy_protocol.h>
-+#endif
-
-
- #define LF (u_char) 10
-Index: nginx-1.4.7/src/core/ngx_proxy_protocol.c
-===================================================================
---- /dev/null
-+++ nginx-1.4.7/src/core/ngx_proxy_protocol.c
-@@ -0,0 +1,430 @@
-+
-+/*
-+ * Copyright (C) Baptiste Assmann
-+ * Copyright (C) Exceliance
-+ */
-+
-+
-+#include <ngx_config.h>
-+#include <ngx_core.h>
-+#include <ngx_event.h>
-+
-+#if (NGX_PROXY_PROTOCOL)
-+
-+int
-+ngx_recv_proxy_protocol(ngx_connection_t *c, u_char *buf, ssize_t n)
-+{
-+ u_char *end, *p, *t;
-+ size_t len;
-+ ssize_t s;
-+ int step = 0;
-+ ngx_proxy_protocol_t pp;
-+
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "processing proxy protocol");
-+
-+ /* 16 is the minimal length of the proxy protocol string */
-+ if (n < 18) {
-+ step = 1;
-+ goto fail;
-+ }
-+
-+ s = n;
-+ end = memchr(buf, '\n', n);
-+ if (end == NULL) {
-+ step = 2;
-+ goto fail;
-+ }
-+
-+ p = buf;
-+ if (memcmp(p, "PROXY ", 6) != 0) {
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
-+ "incorrect proxy protocol header string");
-+ step = 3;
-+ goto fail;
-+ }
-+ p += 6;
-+ s -= 6;
-+ if (s <= 0) {
-+ step = 4;
-+ goto fail;
-+ }
-+
-+ ngx_memzero(&pp, sizeof(ngx_proxy_protocol_t));
-+
-+ if (memcmp(p, "TCP4 ", 5) == 0) {
-+ struct sockaddr_in *sin_src;
-+ struct sockaddr_in *sin_dst;
-+
-+ pp.pp_proto = NGX_PP_PROTO_TCP4;
-+ pp.pp_src3.ss_family = AF_INET;
-+ pp.pp_dst3.ss_family = AF_INET;
-+ sin_src = (struct sockaddr_in *) &pp.pp_src3;
-+ sin_dst = (struct sockaddr_in *) &pp.pp_dst3;
-+
-+ p += 5;
-+ s -= 5;
-+ if (s <= 0) {
-+ step = 5;
-+ goto fail;
-+ }
-+
-+ /* l3 source address */
-+ if ( (t = (u_char *)memchr(p, ' ', s)) == NULL ) {
-+ step = 6;
-+ goto fail;
-+ }
-+ len = t - p;
-+ if ((sin_src->sin_addr.s_addr = ngx_inet_addr(p, len)) == INADDR_NONE) {
-+ step = 7;
-+ goto fail;
-+ }
-+ pp.pp_src3_text.data = ngx_pcalloc(c->pool, len + 1);
-+ ngx_memcpy(pp.pp_src3_text.data, p, len);
-+ pp.pp_src3_text.len = len;
-+
-+ p += (len + 1);
-+ s -= (len + 1);
-+ if (s <= 0) {
-+ step = 8;
-+ goto fail;
-+ }
-+
-+ /* l3 destination address */
-+ if ( (t = (u_char *)memchr(p, ' ', s)) == NULL ) {
-+ step = 9;
-+ goto fail;
-+ }
-+ len = t - p;
-+ if ((sin_dst->sin_addr.s_addr = ngx_inet_addr(p, len)) == INADDR_NONE) {
-+ step = 10;
-+ goto fail;
-+ }
-+// FIXME pointer shift ???
-+ pp.pp_dst3_text.data = ngx_pcalloc(c->pool, len + 1);
-+ ngx_memcpy(pp.pp_dst3_text.data, p, len);
-+ pp.pp_dst3_text.len = len;
-+
-+ p += (len + 1);
-+ s -= (len + 1);
-+ if (s <= 0) {
-+ step = 11;
-+ goto fail;
-+ }
-+
-+ /* l4 source port */
-+ if ( (t = (u_char *)memchr(p, ' ', s)) == NULL ) {
-+ step = 12;
-+ goto fail;
-+ }
-+ len = t - p;
-+ pp.pp_src4 = ngx_atoi(p, len);
-+ if ((pp.pp_src4 < 1024)
-+ || (pp.pp_src4 > 65535)) {
-+ step = 13;
-+ goto fail;
-+ }
-+ sin_src->sin_port = htons(pp.pp_src4);
-+
-+ p += (len + 1);
-+ s -= (len + 1);
-+ if (s <= 0) {
-+ step = 14;
-+ goto fail;
-+ }
-+
-+ /* l4 destination port */
-+ if ( (t = (u_char *)memchr(p, '\r', s)) == NULL ) {
-+ step = 15;
-+ goto fail;
-+ }
-+ len = t - p;
-+ pp.pp_dst4 = ngx_atoi(p, len);
-+ if (pp.pp_dst4 > 65535) {
-+ step = 16;
-+ goto fail;
-+ }
-+ sin_dst->sin_port = htons(pp.pp_dst4);
-+
-+ if (p[len + 1] != '\n') {
-+ step = 17;
-+ goto fail;
-+ }
-+
-+ p += (len + 2);
-+ s -= (len + 2);
-+
-+
-+ /* if we managed to get there, then we can safely replace the
-+ * information in the connection structure
-+ */
-+
-+ /* updating connection with source information provided by proxy protocol */
-+ if (pp.pp_src3_text.len > c->addr_text.len) {
-+ ngx_pfree(c->pool, c->addr_text.data);
-+ c->addr_text.data = ngx_pcalloc(c->pool, pp.pp_src3_text.len);
-+ } else {
-+ ngx_memzero(c->addr_text.data, c->addr_text.len);
-+ }
-+ ngx_memcpy(c->addr_text.data, pp.pp_src3_text.data, pp.pp_src3_text.len);
-+ c->addr_text.len = pp.pp_src3_text.len;
-+
-+ ngx_pfree(c->pool, c->sockaddr);
-+ c->socklen = NGX_SOCKADDRLEN;
-+ c->sockaddr = ngx_pcalloc(c->pool, c->socklen);
-+ ngx_memcpy(c->sockaddr, sin_src, c->socklen);
-+
-+ if (c->sockaddr->sa_family != AF_INET) {
-+ ngx_pfree(c->pool, c->sockaddr);
-+ c->socklen = NGX_SOCKADDRLEN;
-+ c->sockaddr = ngx_pcalloc(c->pool, c->socklen);
-+ } else {
-+ ngx_memzero(c->sockaddr, sizeof(struct sockaddr_in));
-+ c->socklen = NGX_SOCKADDRLEN;
-+ }
-+ ngx_memcpy(c->sockaddr, sin_src, c->socklen);
-+
-+ /* updating connection with destination information provided by proxy protocol */
-+ ngx_pfree(c->pool, c->local_sockaddr);
-+ c->local_sockaddr = ngx_pcalloc(c->pool, NGX_SOCKADDRLEN);
-+ ngx_memcpy(c->local_sockaddr, sin_dst, NGX_SOCKADDRLEN);
-+
-+ }
-+
-+#if (NGX_HAVE_INET6)
-+
-+ else if (memcmp(p, "TCP6 ", 5) == 0) {
-+
-+ struct sockaddr_in6 *sin6_src;
-+ struct sockaddr_in6 *sin6_dst;
-+
-+ pp.pp_proto = NGX_PP_PROTO_TCP6;
-+ pp.pp_src3.ss_family = AF_INET6;
-+ pp.pp_dst3.ss_family = AF_INET6;
-+ sin6_src = (struct sockaddr_in6 *) &pp.pp_src3;
-+ sin6_dst = (struct sockaddr_in6 *) &pp.pp_dst3;
-+
-+ p += 5;
-+ s -= 5;
-+ if (s <= 0) {
-+ step = 18;
-+ goto fail;
-+ }
-+
-+ /* l3 source address */
-+ if ( (t = (u_char *)memchr(p, ' ', s)) == NULL ) {
-+ step = 19;
-+ goto fail;
-+ }
-+ len = t - p;
-+ if (ngx_inet6_addr(p, len, sin6_src->sin6_addr.s6_addr) != NGX_OK) {
-+ step = 20;
-+ goto fail;
-+ }
-+ pp.pp_src3_text.data = ngx_pcalloc(c->pool, len + 1);
-+ ngx_memcpy(pp.pp_src3_text.data, p, len);
-+ pp.pp_src3_text.len = len;
-+
-+ p += (len + 1);
-+ s -= (len + 1);
-+ if (s <= 0) {
-+ step = 21;
-+ goto fail;
-+ }
-+
-+ /* l3 destination address */
-+ if ( (t = (u_char *)memchr(p, ' ', s)) == NULL ) {
-+ step = 22;
-+ goto fail;
-+ }
-+ len = t - p;
-+ if (ngx_inet6_addr(p, len, sin6_dst->sin6_addr.s6_addr) != NGX_OK) {
-+ step = 23;
-+ goto fail;
-+ }
-+ pp.pp_dst3_text.data = ngx_pcalloc(c->pool, len + 1);
-+ ngx_memcpy(pp.pp_dst3_text.data, p, len);
-+ pp.pp_dst3_text.len = len;
-+
-+ p += (len + 1);
-+ s -= (len + 1);
-+ if (s <= 0) {
-+ step = 24;
-+ goto fail;
-+ }
-+
-+ /* l4 source port */
-+ if ( (t = (u_char *)memchr(p, ' ', s)) == NULL ) {
-+ step = 25;
-+ goto fail;
-+ }
-+ len = t - p;
-+ pp.pp_src4 = ngx_atoi(p, len);
-+ if ((pp.pp_src4 < 1024)
-+ || (pp.pp_src4 > 65535)) {
-+ step = 26;
-+ goto fail;
-+ }
-+ sin6_src->sin6_port = htons(pp.pp_src4);
-+
-+ p += (len + 1);
-+ s -= (len + 1);
-+ if (s <= 0) {
-+ step = 27;
-+ goto fail;
-+ }
-+
-+ /* l4 destination port */
-+ if ( (t = (u_char *)memchr(p, '\r', s)) == NULL ) {
-+ step = 28;
-+ goto fail;
-+ }
-+ len = t - p;
-+ pp.pp_dst4 = ngx_atoi(p, len);
-+ if (pp.pp_dst4 > 65535) {
-+ step = 29;
-+ goto fail;
-+ }
-+ sin6_dst->sin6_port = htons(pp.pp_dst4);
-+
-+ if (p[len + 1] != '\n') {
-+ step = 30;
-+ goto fail;
-+ }
-+
-+ p += (len + 2);
-+ s -= (len + 2);
-+
-+ /* if we managed to get there, then we can safely replace the
-+ * information in the connection structure
-+ */
-+
-+ /* updating connection with source provided by proxy protocol */
-+ if (pp.pp_src3_text.len > c->addr_text.len) {
-+ ngx_pfree(c->pool, c->addr_text.data);
-+ c->addr_text.data = ngx_pcalloc(c->pool, pp.pp_src3_text.len);
-+ } else {
-+ ngx_memzero(c->addr_text.data, c->addr_text.len);
-+ }
-+ ngx_memcpy(c->addr_text.data, pp.pp_src3_text.data, pp.pp_src3_text.len);
-+ c->addr_text.len = pp.pp_src3_text.len;
-+
-+ ngx_pfree(c->pool, c->sockaddr);
-+ c->socklen = NGX_SOCKADDRLEN;
-+ c->sockaddr = ngx_pcalloc(c->pool, c->socklen);
-+ ngx_memcpy(c->sockaddr, sin6_src, c->socklen);
-+
-+ /* updating connection with destination provided by proxy protocol */
-+ if (c->sockaddr->sa_family != AF_INET6) {
-+ ngx_pfree(c->pool, c->local_sockaddr);
-+ c->local_sockaddr = ngx_pcalloc(c->pool, NGX_SOCKADDRLEN);
-+ } else {
-+ ngx_memzero(c->sockaddr, sizeof(struct sockaddr_in6));
-+ c->socklen = NGX_SOCKADDRLEN;
-+ }
-+// ngx_memcpy(c->local_sockaddr, sin6_dst, NGX_SOCKADDRLEN);
-+//FIXME must be finished here
-+
-+ }
-+
-+#endif
-+
-+ else {
-+ step = 31;
-+ goto fail;
-+ }
-+
-+ ngx_print_proxy_protocol(&pp, c->log);
-+
-+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
-+ "proxy_protocol, asking to remove %z chars",
-+ end + 1 - buf);
-+
-+ return (end + 1 - buf);
-+
-+fail:
-+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
-+ "proxy_protocol error at step: %d", step);
-+
-+ return 0;
-+
-+}
-+
-+
-+void
-+ngx_print_proxy_protocol(ngx_proxy_protocol_t *p, ngx_log_t *log)
-+{
-+ switch (p->pp_proto) {
-+ case NGX_PP_PROTO_TCP4:
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, proto: TCP4");
-+ break;
-+ case NGX_PP_PROTO_TCP6:
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, proto: TCP6");
-+ break;
-+ }
-+
-+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, string length: %d", ngx_proxy_protocol_string_length(p));
-+ ngx_log_debug2(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, src3: %s, %d", p->pp_src3_text.data, p->pp_src3_text.len);
-+ ngx_log_debug2(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, dst3: %s, %d", p->pp_dst3_text.data, p->pp_dst3_text.len);
-+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, src4: %d", p->pp_src4);
-+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, log, 0,
-+ "proxy_protocol, dst4: %d", p->pp_dst4);
-+}
-+
-+
-+int
-+ngx_proxy_protocol_string_length(ngx_proxy_protocol_t *p)
-+{
-+ int len = 0;
-+
-+ /* 'PROXY ' */
-+ len += (sizeof("PROXY ") - 1);
-+
-+ /* protocol version (TCP4 or TCP6) + space */
-+ len += (sizeof("TCP0 ") - 1);
-+
-+ /* src3 + space */
-+ len += p->pp_src3_text.len;
-+ len += 1;
-+
-+ /* dst3 + space */
-+ len += p->pp_dst3_text.len;
-+ len += 1;
-+
-+ /* src4 */
-+ if (p->pp_src4 < 10000)
-+ /* 4 digits + 1 space */
-+ len += (sizeof("0000 ") - 1);
-+ else
-+ /* 5 digits + 1 space */
-+ len += (sizeof("00000 ") - 1);
-+
-+ /* dst4 */
-+ if (p->pp_dst4 >= 10000)
-+ /* 5 digits */
-+ len += (sizeof("00000 ") - 1);
-+ else if (p->pp_dst4 >= 1000)
-+ /* 4 digits */
-+ len += (sizeof("0000 ") - 1);
-+ else if (p->pp_dst4 >= 100)
-+ /* 3 digits */
-+ len += (sizeof("000 ") - 1);
-+ else if (p->pp_dst4 >= 10)
-+ /* 2 digits */
-+ len += (sizeof("00 ") - 1);
-+ else
-+ /* 1 digit */
-+ len += (sizeof("0 ") - 1);
-+
-+ /* CRLF */
-+ len += (sizeof(CRLF) - 1);
-+
-+ return len - 1;
-+}
-+
-+#endif
-Index: nginx-1.4.7/src/core/ngx_proxy_protocol.h
-===================================================================
---- /dev/null
-+++ nginx-1.4.7/src/core/ngx_proxy_protocol.h
-@@ -0,0 +1,45 @@
-+
-+/*
-+ * Copyright (C) Baptiste Assmann
-+ * Copyright (C) Exceliance
-+ */
-+
-+
-+#ifndef _NGX_PROXY_PROTOCOL_H_INCLUDED_
-+#define _NGX_PROXY_PROTOCOL_H_INCLUDED_
-+
-+
-+#include <ngx_config.h>
-+#include <ngx_core.h>
-+
-+
-+#if (NGX_PROXY_PROTOCOL)
-+
-+typedef struct ngx_proxy_protocol_s ngx_proxy_protocol_t;
-+
-+typedef enum {
-+ NGX_PP_PROTO_TCP4 = 1,
-+ NGX_PP_PROTO_TCP6
-+} ngx_pp_proto;
-+
-+
-+struct ngx_proxy_protocol_s {
-+ unsigned int pp_proto; /* proxy protocol related information */
-+ struct sockaddr_storage pp_src3;
-+ ngx_str_t pp_src3_text;
-+ struct sockaddr_storage pp_dst3;
-+ ngx_str_t pp_dst3_text;
-+ unsigned int pp_src4;
-+ unsigned int pp_dst4;
-+};
-+
-+
-+int ngx_recv_proxy_protocol(ngx_connection_t *, u_char *, ssize_t);
-+void ngx_print_proxy_protocol(ngx_proxy_protocol_t *, ngx_log_t *);
-+int ngx_proxy_protocol_string_length(ngx_proxy_protocol_t *);
-+
-+
-+#endif
-+
-+#endif /* _NGX_CONNECTION_H_INCLUDED_ */
-+
-Index: nginx-1.4.7/src/http/modules/ngx_http_proxy_module.c
-===================================================================
---- nginx-1.4.7.orig/src/http/modules/ngx_http_proxy_module.c
-+++ nginx-1.4.7/src/http/modules/ngx_http_proxy_module.c
-@@ -8,7 +8,9 @@
- #include <ngx_config.h>
- #include <ngx_core.h>
- #include <ngx_http.h>
--
-+#if (NGX_PROXY_PROTOCOL)
-+#include <ngx_proxy_protocol.h>
-+#endif
-
- typedef struct ngx_http_proxy_rewrite_s ngx_http_proxy_rewrite_t;
-
-@@ -365,6 +367,17 @@ static ngx_command_t ngx_http_proxy_com
- offsetof(ngx_http_proxy_loc_conf_t, upstream.busy_buffers_size_conf),
- NULL },
-
-+#if (NGX_PROXY_PROTOCOL)
-+
-+ { ngx_string("send_proxy_protocol"),
-+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
-+ ngx_conf_set_flag_slot,
-+ NGX_HTTP_LOC_CONF_OFFSET,
-+ offsetof(ngx_http_proxy_loc_conf_t, upstream.send_proxy_protocol),
-+ NULL },
-+
-+#endif
-+
- #if (NGX_HTTP_CACHE)
-
- { ngx_string("proxy_cache"),
-@@ -2420,6 +2433,11 @@ ngx_http_proxy_create_loc_conf(ngx_conf_
- conf->upstream.pass_headers = NGX_CONF_UNSET_PTR;
-
- conf->upstream.intercept_errors = NGX_CONF_UNSET;
-+
-+#if (NGX_PROXY_PROTOCOL)
-+ conf->upstream.send_proxy_protocol = NGX_CONF_UNSET;
-+#endif
-+
- #if (NGX_HTTP_SSL)
- conf->upstream.ssl_session_reuse = NGX_CONF_UNSET;
- #endif
-@@ -2695,6 +2713,11 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t
- ngx_conf_merge_value(conf->upstream.intercept_errors,
- prev->upstream.intercept_errors, 0);
-
-+#if (NGX_PROXY_PROTOCOL)
-+ ngx_conf_merge_value(conf->upstream.send_proxy_protocol,
-+ prev->upstream.send_proxy_protocol, 0);
-+#endif
-+
- #if (NGX_HTTP_SSL)
- ngx_conf_merge_value(conf->upstream.ssl_session_reuse,
- prev->upstream.ssl_session_reuse, 1);
-Index: nginx-1.4.7/src/http/ngx_http.c
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http.c
-+++ nginx-1.4.7/src/http/ngx_http.c
-@@ -1228,6 +1228,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
- #if (NGX_HTTP_SPDY)
- ngx_uint_t spdy;
- #endif
-+#if (NGX_PROXY_PROTOCOL)
-+ ngx_uint_t accept_proxy_protocol;
-+#endif
-
- /*
- * we cannot compare whole sockaddr struct's as kernel
-@@ -1283,6 +1286,10 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
- #if (NGX_HTTP_SPDY)
- spdy = lsopt->spdy || addr[i].opt.spdy;
- #endif
-+#if (NGX_PROXY_PROTOCOL)
-+ accept_proxy_protocol = lsopt->accept_proxy_protocol
-+ || addr[i].opt.accept_proxy_protocol;
-+#endif
-
- if (lsopt->set) {
-
-@@ -1316,6 +1323,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
- #if (NGX_HTTP_SPDY)
- addr[i].opt.spdy = spdy;
- #endif
-+#if (NGX_PROXY_PROTOCOL)
-+ addr[i].opt.accept_proxy_protocol = accept_proxy_protocol;
-+#endif
-
- return NGX_OK;
- }
-@@ -1762,6 +1772,11 @@ ngx_http_add_listening(ngx_conf_t *cf, n
- ls->pool_size = cscf->connection_pool_size;
- ls->post_accept_timeout = cscf->client_header_timeout;
-
-+#if (NGX_PROXY_PROTOCOL)
-+// CLEANUP: ls->accept_proxy_protocol = cscf->accept_proxy_protocol;
-+ ls->accept_proxy_protocol = addr->opt.accept_proxy_protocol;
-+#endif
-+
- clcf = cscf->ctx->loc_conf[ngx_http_core_module.ctx_index];
-
- ls->logp = clcf->error_log;
-@@ -1840,6 +1855,9 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_h
- #if (NGX_HTTP_SPDY)
- addrs[i].conf.spdy = addr[i].opt.spdy;
- #endif
-+#if (NGX_PROXY_PROTOCOL)
-+ addrs[i].conf.accept_proxy_protocol = addr[i].opt.accept_proxy_protocol;
-+#endif
-
- if (addr[i].hash.buckets == NULL
- && (addr[i].wc_head == NULL
-@@ -1904,6 +1922,9 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_
- #if (NGX_HTTP_SPDY)
- addrs6[i].conf.spdy = addr[i].opt.spdy;
- #endif
-+#if (NGX_PROXY_PROTOCOL)
-+ addrs6[i].conf.accept_proxy_protocol = addr[i].opt.accept_proxy_protocol;
-+#endif
-
- if (addr[i].hash.buckets == NULL
- && (addr[i].wc_head == NULL
-Index: nginx-1.4.7/src/http/ngx_http_core_module.c
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_core_module.c
-+++ nginx-1.4.7/src/http/ngx_http_core_module.c
-@@ -4090,6 +4090,15 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx
- continue;
- }
-
-+#if (NGX_PROXY_PROTOCOL)
-+ if (ngx_strncmp(value[n].data, "accept_proxy_protocol=on", 24) == 0) {
-+ lsopt.accept_proxy_protocol = 1;
-+ lsopt.set = 1;
-+ lsopt.bind = 1;
-+ continue;
-+ }
-+#endif
-+
- if (ngx_strncmp(value[n].data, "ipv6only=o", 10) == 0) {
- #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- struct sockaddr *sa;
-Index: nginx-1.4.7/src/http/ngx_http_core_module.h
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_core_module.h
-+++ nginx-1.4.7/src/http/ngx_http_core_module.h
-@@ -78,6 +78,11 @@ typedef struct {
- #if (NGX_HTTP_SPDY)
- unsigned spdy:1;
- #endif
-+
-+#if (NGX_PROXY_PROTOCOL)
-+ unsigned accept_proxy_protocol:2;
-+#endif
-+
- #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
- unsigned ipv6only:1;
- #endif
-@@ -234,6 +239,10 @@ struct ngx_http_addr_conf_s {
-
- ngx_http_virtual_names_t *virtual_names;
-
-+#if (NGX_PROXY_PROTOCOL)
-+ ngx_flag_t accept_proxy_protocol;
-+#endif
-+
- #if (NGX_HTTP_SSL)
- unsigned ssl:1;
- #endif
-Index: nginx-1.4.7/src/http/ngx_http_request.c
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_request.c
-+++ nginx-1.4.7/src/http/ngx_http_request.c
-@@ -63,6 +63,9 @@ static void ngx_http_ssl_handshake(ngx_e
- static void ngx_http_ssl_handshake_handler(ngx_connection_t *c);
- #endif
-
-+#if (NGX_PROXY_PROTOCOL)
-+static void ngx_http_proxy_protocol(ngx_event_t *rev);
-+#endif
-
- static char *ngx_http_client_errors[] = {
-
-@@ -343,6 +346,14 @@ ngx_http_init_connection(ngx_connection_
- }
- #endif
-
-+#if (NGX_PROXY_PROTOCOL)
-+ {
-+ if (hc->addr_conf->accept_proxy_protocol) {
-+ rev->handler = ngx_http_proxy_protocol;
-+ }
-+ }
-+#endif
-+
- if (rev->ready) {
- /* the deferred accept(), rtsig, aio, iocp */
-
-@@ -364,7 +375,6 @@ ngx_http_init_connection(ngx_connection_
- }
- }
-
--
- static void
- ngx_http_wait_request_handler(ngx_event_t *rev)
- {
-@@ -469,6 +479,12 @@ ngx_http_wait_request_handler(ngx_event_
- }
-
- rev->handler = ngx_http_process_request_line;
-+
-+#if (NGX_PROXY_PROTOCOL)
-+ if (hc->addr_conf->accept_proxy_protocol)
-+ rev->handler = ngx_http_proxy_protocol;
-+#endif
-+
- ngx_http_process_request_line(rev);
- }
-
-@@ -582,6 +598,67 @@ ngx_http_create_request(ngx_connection_t
- return r;
- }
-
-+#if (NGX_PROXY_PROTOCOL)
-+
-+static void
-+ngx_http_proxy_protocol(ngx_event_t *rev)
-+{
-+ ssize_t n;
-+ size_t size = 1024;
-+ u_char tmpbuf[size];
-+ ngx_connection_t *c;
-+ ngx_http_connection_t *hc;
-+
-+ c = rev->data;
-+ hc = c->data;
-+ rev->handler = ngx_http_wait_request_handler;
-+
-+#if (NGX_HTTP_SPDY)
-+ {
-+ if (hc->addr_conf->spdy) {
-+ rev->handler = ngx_http_spdy_init;
-+ }
-+ }
-+#endif
-+
-+#if (NGX_HTTP_SSL)
-+ {
-+ if (hc->addr_conf->ssl) {
-+ rev->handler = ngx_http_ssl_handshake;
-+ }
-+ }
-+#endif
-+
-+ n = recv(c->fd, tmpbuf, size, MSG_PEEK);
-+
-+ if ((n <= 0) && (c->listening)
-+ && (hc->addr_conf->accept_proxy_protocol)
-+ && (!c->proxy_protocol)) {
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http_proxy_protocol: pp required but not found");
-+ return;
-+ }
-+ if ((n > 0) && (c->listening)
-+ && (hc->addr_conf->accept_proxy_protocol)
-+ && (!c->proxy_protocol)) {
-+ ssize_t m;
-+ if (!(m = ngx_recv_proxy_protocol(c, tmpbuf, n))) {
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http_proxy_protocol: pp required but not found");
-+ ngx_http_close_connection(c);
-+ return;
-+ }
-+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "ngx_http_proxy_protocol: pp required and found");
-+
-+ c->proxy_protocol = 1;
-+
-+ /* strip the proxy protocol string from the buffer */
-+ recv(c->fd, tmpbuf, m, 0);
-+ }
-+
-+ rev->handler(rev);
-+}
-+
-+#endif
-+
-
- #if (NGX_HTTP_SSL)
-
-Index: nginx-1.4.7/src/http/ngx_http_upstream.c
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_upstream.c
-+++ nginx-1.4.7/src/http/ngx_http_upstream.c
-@@ -31,6 +31,10 @@ static ngx_int_t ngx_http_upstream_reini
- ngx_http_upstream_t *u);
- static void ngx_http_upstream_send_request(ngx_http_request_t *r,
- ngx_http_upstream_t *u);
-+#if (NGX_PROXY_PROTOCOL)
-+static void ngx_http_upstream_send_proxy_protocol(ngx_http_request_t *r,
-+ ngx_http_upstream_t *u);
-+#endif
- static void ngx_http_upstream_send_request_handler(ngx_http_request_t *r,
- ngx_http_upstream_t *u);
- static void ngx_http_upstream_process_header(ngx_http_request_t *r,
-@@ -1255,6 +1259,13 @@ ngx_http_upstream_connect(ngx_http_reque
-
- u->request_sent = 0;
-
-+#if (NGX_PROXY_PROTOCOL)
-+ if (u->conf->send_proxy_protocol && !(u->ssl && c->ssl == NULL)) {
-+ ngx_http_upstream_send_proxy_protocol(r, u);
-+ return;
-+ }
-+#endif
-+
- if (rc == NGX_AGAIN) {
- ngx_add_timer(c->write, u->conf->connect_timeout);
- return;
-@@ -1498,6 +1509,228 @@ ngx_http_upstream_send_request(ngx_http_
- }
-
-
-+#if (NGX_PROXY_PROTOCOL)
-+
-+static void
-+ngx_http_upstream_send_proxy_protocol(ngx_http_request_t *r, ngx_http_upstream_t *u)
-+{
-+ size_t len;
-+ ngx_int_t rc;
-+ ngx_connection_t *uc;
-+ ngx_connection_t *cc;
-+ ngx_chain_t *pp_string;
-+ ngx_proxy_protocol_t pp;
-+ ngx_buf_t *b;
-+ char port[6];
-+ u_char *addr;
-+ struct sockaddr_storage sa_src;
-+ struct sockaddr_storage sa_dst;
-+ socklen_t addrlen = NGX_SOCKADDRLEN;
-+ struct sockaddr_in *sin_src;
-+ struct sockaddr_in *sin_dst;
-+
-+#if (NGX_HAVE_INET6)
-+
-+ struct sockaddr_in6 *sin6_src;
-+ struct sockaddr_in6 *sin6_dst;
-+
-+#endif
-+
-+
-+ uc = u->peer.connection;
-+ cc = r->connection;
-+
-+ if ( !(u->conf->send_proxy_protocol) ) {
-+ return;
-+ }
-+
-+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, uc->log, 0,
-+ "http upstream send proxy protocol");
-+
-+ if (!u->request_sent && ngx_http_upstream_test_connect(uc) != NGX_OK) {
-+ ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
-+ return;
-+ }
-+
-+ uc->log->action = "sending proxy protocol to upstream";
-+
-+ len = 0;
-+
-+ if (r->connection->proxy_protocol) {
-+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, uc->log, 0,
-+ "PP: got proxy-protocol from client connection");
-+
-+ switch (cc->sockaddr->sa_family) {
-+
-+#if (NGX_HAVE_INET6)
-+
-+ case AF_INET6:
-+
-+ pp.pp_proto = NGX_PP_PROTO_TCP6;
-+ sin6_dst = (struct sockaddr_in6 *) cc->local_sockaddr;
-+ sin6_src = (struct sockaddr_in6 *) cc->sockaddr;
-+
-+ break;
-+
-+#endif
-+
-+ default:
-+ pp.pp_proto = NGX_PP_PROTO_TCP4;
-+ sin_dst = (struct sockaddr_in *) cc->local_sockaddr;
-+ sin_src = (struct sockaddr_in *) cc->sockaddr;
-+
-+ }
-+
-+ } else {
-+
-+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, uc->log, 0,
-+ "PP: collecting information from socket fd");
-+
-+ getsockname(cc->fd, (struct sockaddr *) &sa_dst, &addrlen);
-+
-+ switch (sa_dst.ss_family) {
-+
-+#if (NGX_HAVE_INET6)
-+
-+ case AF_INET6:
-+
-+ pp.pp_proto = NGX_PP_PROTO_TCP6;
-+ sin6_dst = (struct sockaddr_in6 *) &sa_dst;
-+
-+ getpeername(cc->fd, (struct sockaddr *) &sa_src, &addrlen);
-+ sin6_src = (struct sockaddr_in6 *) &sa_src;
-+
-+ break;
-+
-+#endif
-+
-+ default:
-+
-+ pp.pp_proto = NGX_PP_PROTO_TCP4;
-+ sin_dst = (struct sockaddr_in *) &sa_dst;
-+ getpeername(cc->fd, (struct sockaddr *) &sa_src, &addrlen);
-+ sin_src = (struct sockaddr_in *) &sa_src;
-+ }
-+
-+
-+ }
-+
-+ switch (pp.pp_proto) {
-+
-+#if (NGX_HAVE_INET6)
-+
-+ case NGX_PP_PROTO_TCP6:
-+
-+ /* dst3 and dst4 */
-+ addr = ngx_pcalloc(r->pool, NGX_INET6_ADDRSTRLEN);
-+ ngx_inet_ntop(AF_INET6, &sin6_dst->sin6_addr, addr, NGX_INET6_ADDRSTRLEN);
-+ pp.pp_dst3_text.data = ngx_pcalloc(r->pool, NGX_INET6_ADDRSTRLEN);
-+ pp.pp_dst3_text.len = ngx_strlen(addr);
-+ ngx_memcpy(pp.pp_dst3_text.data, addr, pp.pp_dst3_text.len);
-+ pp.pp_dst4 = htons(sin6_dst->sin6_port);
-+
-+ ngx_memzero(addr, NGX_INET6_ADDRSTRLEN);
-+
-+ /* src3 and src4 */
-+ ngx_inet_ntop(AF_INET6, &sin6_src->sin6_addr, addr, NGX_INET6_ADDRSTRLEN);
-+ pp.pp_src3_text.data = ngx_pcalloc(r->pool, NGX_INET6_ADDRSTRLEN);
-+ pp.pp_src3_text.len = ngx_strlen(addr);
-+ ngx_memcpy(pp.pp_src3_text.data, addr, pp.pp_src3_text.len);
-+ pp.pp_src4 = htons(sin6_src->sin6_port);
-+
-+ break;
-+
-+#endif
-+
-+ default:
-+
-+ /* dst3 and dst4 */
-+ addr = ngx_pcalloc(r->pool, NGX_INET_ADDRSTRLEN);
-+ ngx_inet_ntop(AF_INET, &sin_dst->sin_addr, addr, NGX_INET_ADDRSTRLEN);
-+ pp.pp_dst3_text.data = ngx_pcalloc(r->pool, NGX_INET_ADDRSTRLEN);
-+ pp.pp_dst3_text.len = ngx_strlen(addr);
-+ ngx_memcpy(pp.pp_dst3_text.data, addr, pp.pp_dst3_text.len);
-+ pp.pp_dst4 = htons(sin_dst->sin_port);
-+
-+ ngx_memzero(addr, NGX_INET_ADDRSTRLEN);
-+
-+ /* src3 and src4 */
-+ ngx_inet_ntop(AF_INET, &sin_src->sin_addr, addr, NGX_INET_ADDRSTRLEN);
-+ pp.pp_src3_text.data = ngx_pcalloc(r->pool, NGX_INET_ADDRSTRLEN);
-+ pp.pp_src3_text.len = ngx_strlen(addr);
-+ ngx_memcpy(pp.pp_src3_text.data, addr, pp.pp_src3_text.len);
-+ pp.pp_src4 = htons(sin_src->sin_port);
-+
-+ }
-+
-+ len += ngx_proxy_protocol_string_length(&pp);
-+
-+ ngx_print_proxy_protocol(&pp, uc->log);
-+
-+ b = ngx_create_temp_buf(uc->pool, len);
-+ if (b == NULL) {
-+ return;
-+ }
-+
-+ pp_string = ngx_alloc_chain_link(uc->pool);
-+ if (pp_string == NULL) {
-+ return;
-+ }
-+
-+ pp_string->buf = b;
-+ pp_string->next = NULL;
-+
-+ b->last = ngx_cpymem(b->last, "PROXY ", sizeof("PROXY ") - 1);
-+
-+ switch (pp.pp_proto) {
-+ case NGX_PP_PROTO_TCP4:
-+ b->last = ngx_cpymem(b->last, "TCP4 ", sizeof("TCP4 ") - 1);
-+ break;
-+ case NGX_PP_PROTO_TCP6:
-+ b->last = ngx_cpymem(b->last, "TCP6 ", sizeof("TCP6 ") - 1);
-+ break;
-+ }
-+
-+ /* src3 */
-+ b->last = ngx_cpymem(b->last, pp.pp_src3_text.data, pp.pp_src3_text.len);
-+ b->last = ngx_cpymem(b->last, " ", 1);
-+
-+ /* dst3 */
-+ b->last = ngx_cpymem(b->last, pp.pp_dst3_text.data, pp.pp_dst3_text.len);
-+ b->last = ngx_cpymem(b->last, " ", 1);
-+
-+ /* src4 */
-+ ngx_memzero(port, 6);
-+ sprintf(port,"%d", pp.pp_src4);
-+ b->last = ngx_cpymem(b->last, port, strlen(port));
-+ b->last = ngx_cpymem(b->last, " ", 1);
-+
-+ /* dst4 */
-+ ngx_memzero(port, 6);
-+ sprintf(port,"%d", pp.pp_dst4);
-+ b->last = ngx_cpymem(b->last, port, strlen(port));
-+
-+ /* CRLF */
-+ b->last = ngx_cpymem(b->last, CRLF, sizeof(CRLF) - 1);
-+
-+ ngx_log_debug3(NGX_LOG_DEBUG_HTTP, uc->log, 0,
-+ "http upstream send proxy protocol: %d -%*s-",
-+ ngx_proxy_protocol_string_length(&pp),
-+ ngx_proxy_protocol_string_length(&pp) - 2,
-+ b->start);
-+
-+ rc = ngx_output_chain(&u->output, pp_string);
-+
-+ if (rc == NGX_ERROR) {
-+ ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
-+ return;
-+ }
-+
-+}
-+
-+#endif
-+
-+
- static void
- ngx_http_upstream_send_request_handler(ngx_http_request_t *r,
- ngx_http_upstream_t *u)
-Index: nginx-1.4.7/src/http/ngx_http_upstream.h
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_upstream.h
-+++ nginx-1.4.7/src/http/ngx_http_upstream.h
-@@ -188,6 +188,10 @@ typedef struct {
- unsigned intercept_404:1;
- unsigned change_buffering:1;
-
-+#if (NGX_PROXY_PROTOCOL)
-+ ngx_flag_t send_proxy_protocol;
-+#endif
-+
- #if (NGX_HTTP_SSL)
- ngx_ssl_t *ssl;
- ngx_flag_t ssl_session_reuse;
-Index: nginx-1.4.7/auto/cc/gcc
-===================================================================
---- nginx-1.4.7.orig/auto/cc/gcc
-+++ nginx-1.4.7/auto/cc/gcc
-@@ -168,7 +168,7 @@ esac
-
-
- # stop on warning
--CFLAGS="$CFLAGS -Werror"
-+CFLAGS="$CFLAGS"
-
- # debug
- CFLAGS="$CFLAGS -g"
-Index: nginx-1.4.7/auto/cc/icc
-===================================================================
---- nginx-1.4.7.orig/auto/cc/icc
-+++ nginx-1.4.7/auto/cc/icc
-@@ -115,7 +115,7 @@ case "$NGX_ICC_VER" in
- esac
-
- # stop on warning
--CFLAGS="$CFLAGS -Werror"
-+CFLAGS="$CFLAGS "
-
- # debug
- CFLAGS="$CFLAGS -g"
+++ /dev/null
-Index: nginx-1.4.7/src/core/ngx_cycle.c
-===================================================================
---- nginx-1.4.7.orig/src/core/ngx_cycle.c
-+++ nginx-1.4.7/src/core/ngx_cycle.c
-@@ -85,6 +85,12 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
- cycle->pool = pool;
- cycle->log = log;
- cycle->new_log.log_level = NGX_LOG_ERR;
-+#if (NGX_ENABLE_SYSLOG)
-+ cycle->new_log.facility = SYSLOG_FACILITY;
-+ cycle->new_log.facility = ERR_SYSLOG_PRIORITY;
-+ cycle->new_log.syslog_on = 0;
-+ cycle->new_log.syslog_set = 0;
-+#endif
- cycle->old_cycle = old_cycle;
-
- cycle->conf_prefix.len = old_cycle->conf_prefix.len;
-Index: nginx-1.4.7/src/core/ngx_log.c
-===================================================================
---- nginx-1.4.7.orig/src/core/ngx_log.c
-+++ nginx-1.4.7/src/core/ngx_log.c
-@@ -10,6 +10,15 @@
-
-
- static char *ngx_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
-+#if (NGX_ENABLE_SYSLOG)
-+static char *ngx_set_syslog(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
-+void log_exit(ngx_cycle_t *cycle);
-+
-+typedef struct{
-+ ngx_str_t name;
-+ ngx_int_t macro;
-+} ngx_string_to_macro_t;
-+#endif
-
-
- static ngx_command_t ngx_errlog_commands[] = {
-@@ -21,6 +30,15 @@ static ngx_command_t ngx_errlog_command
- 0,
- NULL},
-
-+#if (NGX_ENABLE_SYSLOG)
-+ {ngx_string("syslog"),
-+ NGX_MAIN_CONF|NGX_CONF_TAKE12,
-+ ngx_set_syslog,
-+ 0,
-+ 0,
-+ NULL},
-+#endif
-+
- ngx_null_command
- };
-
-@@ -43,7 +61,11 @@ ngx_module_t ngx_errlog_module = {
- NULL, /* init thread */
- NULL, /* exit thread */
- NULL, /* exit process */
-- NULL, /* exit master */
-+#if (NGX_ENABLE_SYSLOG)
-+ log_exit, /* exit master */
-+#else
-+ NULL,
-+#endif
- NGX_MODULE_V1_PADDING
- };
-
-@@ -52,6 +74,48 @@ static ngx_log_t ngx_log;
- static ngx_open_file_t ngx_log_file;
- ngx_uint_t ngx_use_stderr = 1;
-
-+#if (NGX_ENABLE_SYSLOG)
-+static ngx_string_to_macro_t ngx_syslog_facilities[] = {
-+ {ngx_string("auth"), LOG_AUTH},
-+#if !(NGX_SOLARIS)
-+ {ngx_string("authpriv"), LOG_AUTHPRIV},
-+#endif
-+ {ngx_string("cron"), LOG_CRON},
-+ {ngx_string("daemon"), LOG_DAEMON},
-+#if !(NGX_SOLARIS)
-+ {ngx_string("ftp"), LOG_FTP},
-+#endif
-+ {ngx_string("kern"), LOG_KERN},
-+ {ngx_string("local0"), LOG_LOCAL0},
-+ {ngx_string("local1"), LOG_LOCAL1},
-+ {ngx_string("local2"), LOG_LOCAL2},
-+ {ngx_string("local3"), LOG_LOCAL3},
-+ {ngx_string("local4"), LOG_LOCAL4},
-+ {ngx_string("local5"), LOG_LOCAL5},
-+ {ngx_string("local6"), LOG_LOCAL6},
-+ {ngx_string("local7"), LOG_LOCAL7},
-+ {ngx_string("lpr"), LOG_LPR},
-+ {ngx_string("mail"), LOG_MAIL},
-+ {ngx_string("news"), LOG_NEWS},
-+ {ngx_string("syslog"), LOG_SYSLOG},
-+ {ngx_string("user"), LOG_USER},
-+ {ngx_string("uucp"), LOG_UUCP},
-+ { ngx_null_string, 0}
-+};
-+
-+static ngx_string_to_macro_t ngx_syslog_priorities[] = {
-+ {ngx_string("emerg"), LOG_EMERG},
-+ {ngx_string("alert"), LOG_ALERT},
-+ {ngx_string("crit"), LOG_CRIT},
-+ {ngx_string("error"), LOG_ERR},
-+ {ngx_string("err"), LOG_ERR},
-+ {ngx_string("warn"), LOG_WARNING},
-+ {ngx_string("notice"),LOG_NOTICE},
-+ {ngx_string("info"), LOG_INFO},
-+ {ngx_string("debug"), LOG_DEBUG},
-+ { ngx_null_string, 0}
-+};
-+#endif
-
- static ngx_str_t err_levels[] = {
- ngx_null_string,
-@@ -89,11 +153,16 @@ ngx_log_error_core(ngx_uint_t level, ngx
- va_list args;
- #endif
- u_char *p, *last, *msg;
-+#if (NGX_ENABLE_SYSLOG)
-+ u_char *errstr_syslog;
-+#endif
- u_char errstr[NGX_MAX_ERROR_STR];
-
-+#if !(NGX_ENABLE_SYSLOG)
- if (log->file->fd == NGX_INVALID_FILE) {
- return;
- }
-+#endif
-
- last = errstr + NGX_MAX_ERROR_STR;
-
-@@ -102,6 +171,10 @@ ngx_log_error_core(ngx_uint_t level, ngx
-
- p = errstr + ngx_cached_err_log_time.len;
-
-+#if (NGX_ENABLE_SYSLOG)
-+ errstr_syslog = p;
-+#endif
-+
- p = ngx_slprintf(p, last, " [%V] ", &err_levels[level]);
-
- /* pid#tid */
-@@ -140,11 +213,27 @@ ngx_log_error_core(ngx_uint_t level, ngx
-
- ngx_linefeed(p);
-
-+#if (NGX_ENABLE_SYSLOG)
-+ if (log->file != NULL && log->file->name.len != 0) {
- (void) ngx_write_fd(log->file->fd, errstr, p - errstr);
-+ }
-+
-+ /* Don't send the debug level info to syslog */
-+ if (log->syslog_on && level < NGX_LOG_DEBUG) {
-+ /* write to syslog */
-+ syslog(log->priority, "%.*s", (int)(p - errstr_syslog), errstr_syslog);
-+ }
-+#else
-+ (void) ngx_write_fd(log->file->fd, errstr, p - errstr);
-+#endif
-
- if (!ngx_use_stderr
- || level > NGX_LOG_WARN
-+#if (NGX_ENABLE_SYSLOG)
-+ || (log->file != NULL && log->file->fd == ngx_stderr))
-+#else
- || log->file->fd == ngx_stderr)
-+#endif
- {
- return;
- }
-@@ -367,6 +456,50 @@ ngx_log_create(ngx_cycle_t *cycle, ngx_s
- }
-
-
-+#if (NGX_ENABLE_SYSLOG)
-+ngx_int_t
-+ngx_log_get_priority(ngx_conf_t *cf, ngx_str_t *priority)
-+{
-+ ngx_int_t p = 0;
-+ ngx_uint_t n, match = 0;
-+
-+ for (n = 0; ngx_syslog_priorities[n].name.len != 0; n++) {
-+ if (ngx_strncmp(priority->data, ngx_syslog_priorities[n].name.data,
-+ ngx_syslog_priorities[n].name.len) == 0) {
-+ p = ngx_syslog_priorities[n].macro;
-+ match = 1;
-+ }
-+ }
-+
-+ if (!match) {
-+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-+ "invalid syslog priority \"%V\"", priority);
-+ return -1;
-+ }
-+
-+ return p;
-+}
-+
-+
-+char *
-+ngx_log_set_priority(ngx_conf_t *cf, ngx_str_t *priority, ngx_log_t *log)
-+{
-+ log->priority = ERR_SYSLOG_PRIORITY;
-+
-+ if (priority->len == 0) {
-+ return NGX_CONF_OK;
-+ }
-+
-+ log->priority = ngx_log_get_priority(cf, priority);
-+ if (log->priority == (-1)) {
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ return NGX_CONF_OK;
-+}
-+#endif
-+
-+
- char *
- ngx_log_set_levels(ngx_conf_t *cf, ngx_log_t *log)
- {
-@@ -429,6 +562,13 @@ static char *
- ngx_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
- {
- ngx_str_t *value, name;
-+#if (NGX_ENABLE_SYSLOG)
-+ u_char *off = NULL;
-+ ngx_str_t priority;
-+
-+ ngx_str_null(&name);
-+ ngx_str_null(&priority);
-+#endif
-
- if (cf->cycle->new_log.file) {
- return "is duplicate";
-@@ -436,7 +576,44 @@ ngx_error_log(ngx_conf_t *cf, ngx_comman
-
- value = cf->args->elts;
-
-+#if (NGX_ENABLE_SYSLOG)
-+ if (ngx_strncmp(value[1].data, "syslog", sizeof("syslog") - 1) == 0) {
-+ if (!cf->cycle->new_log.syslog_set) {
-+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-+ "You must set the syslog directive and enable it first.");
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ cf->cycle->new_log.syslog_on = 1;
-+
-+ if (value[1].data[sizeof("syslog") - 1] == ':') {
-+ priority.len = value[1].len - sizeof("syslog");
-+ priority.data = value[1].data + sizeof("syslog");
-+
-+ off = (u_char *)ngx_strchr(priority.data, (int) '|');
-+ if (off != NULL) {
-+ priority.len = off - priority.data;
-+
-+ off++;
-+ name.len = value[1].data + value[1].len - off;
-+ name.data = off;
-+ }
-+ }
-+ else {
-+ if (value[1].len > sizeof("syslog")) {
-+ name.len = value[1].len - sizeof("syslog");
-+ name.data = value[1].data + sizeof("syslog");
-+ }
-+ }
-+
-+ if (ngx_log_set_priority(cf, &priority, &cf->cycle->new_log) == NGX_CONF_ERROR) {
-+ return NGX_CONF_ERROR;
-+ }
-+ }
-+ else if (ngx_strcmp(value[1].data, "stderr") == 0) {
-+#else
- if (ngx_strcmp(value[1].data, "stderr") == 0) {
-+#endif
- ngx_str_null(&name);
-
- } else {
-@@ -457,3 +634,63 @@ ngx_error_log(ngx_conf_t *cf, ngx_comman
-
- return ngx_log_set_levels(cf, &cf->cycle->new_log);
- }
-+
-+
-+#if (NGX_ENABLE_SYSLOG)
-+
-+#define SYSLOG_IDENT_NAME "nginx"
-+
-+static char *
-+ngx_set_syslog(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
-+{
-+ char *program;
-+ ngx_str_t *value;
-+ ngx_int_t facility, match = 0;
-+ ngx_uint_t n;
-+
-+ value = cf->args->elts;
-+
-+ if (cf->cycle->new_log.syslog_set) {
-+ return "is duplicate";
-+ }
-+
-+ cf->cycle->new_log.syslog_set = 1;
-+
-+ for (n = 0; ngx_syslog_facilities[n].name.len != 0; n++) {
-+ if (ngx_strncmp(value[1].data, ngx_syslog_facilities[n].name.data,
-+ ngx_syslog_facilities[n].name.len) == 0) {
-+ facility = ngx_syslog_facilities[n].macro;
-+ match = 1;
-+ break;
-+ }
-+ }
-+
-+ if (match) {
-+ cf->cycle->new_log.facility = facility;
-+ cf->cycle->new_log.priority = ERR_SYSLOG_PRIORITY;
-+ }
-+ else {
-+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-+ "invalid syslog facility \"%V\"", &value[1]);
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ program = SYSLOG_IDENT_NAME;
-+ if (cf->args->nelts > 2) {
-+ program = (char *) value[2].data;
-+ }
-+
-+ openlog(program, LOG_ODELAY, facility);
-+
-+ return NGX_CONF_OK;
-+}
-+
-+
-+void log_exit(ngx_cycle_t *cycle)
-+{
-+ if (cycle->new_log.syslog_set) {
-+ closelog();
-+ }
-+}
-+#endif
-+
-Index: nginx-1.4.7/src/core/ngx_log.h
-===================================================================
---- nginx-1.4.7.orig/src/core/ngx_log.h
-+++ nginx-1.4.7/src/core/ngx_log.h
-@@ -12,6 +12,13 @@
- #include <ngx_config.h>
- #include <ngx_core.h>
-
-+#if (NGX_ENABLE_SYSLOG)
-+#include <syslog.h>
-+
-+#define SYSLOG_FACILITY LOG_LOCAL5
-+#define ERR_SYSLOG_PRIORITY LOG_ERR
-+#endif
-+
-
- #define NGX_LOG_STDERR 0
- #define NGX_LOG_EMERG 1
-@@ -61,6 +68,13 @@ struct ngx_log_s {
- */
-
- char *action;
-+
-+#if (NGX_ENABLE_SYSLOG)
-+ ngx_int_t priority;
-+ ngx_int_t facility;
-+ unsigned syslog_on:1; /* unsigned :1 syslog_on */
-+ unsigned syslog_set:1; /*unsigned :1 syslog_set */
-+#endif
- };
-
-
-@@ -221,6 +235,10 @@ void ngx_cdecl ngx_log_debug_core(ngx_lo
-
- ngx_log_t *ngx_log_init(u_char *prefix);
- ngx_log_t *ngx_log_create(ngx_cycle_t *cycle, ngx_str_t *name);
-+#if (NGX_ENABLE_SYSLOG)
-+ngx_int_t ngx_log_get_priority(ngx_conf_t *cf, ngx_str_t *priority);
-+char * ngx_log_set_priority(ngx_conf_t *cf, ngx_str_t *priority, ngx_log_t *log);
-+#endif
- char *ngx_log_set_levels(ngx_conf_t *cf, ngx_log_t *log);
- void ngx_cdecl ngx_log_abort(ngx_err_t err, const char *fmt, ...);
- void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...);
-Index: nginx-1.4.7/src/http/modules/ngx_http_log_module.c
-===================================================================
---- nginx-1.4.7.orig/src/http/modules/ngx_http_log_module.c
-+++ nginx-1.4.7/src/http/modules/ngx_http_log_module.c
-@@ -13,6 +13,11 @@
- #include <zlib.h>
- #endif
-
-+#if (NGX_ENABLE_SYSLOG)
-+#include <syslog.h>
-+
-+#define HTTP_SYSLOG_PRIORITY LOG_NOTICE
-+#endif
-
- typedef struct ngx_http_log_op_s ngx_http_log_op_t;
-
-@@ -67,6 +72,11 @@ typedef struct {
- time_t disk_full_time;
- time_t error_log_time;
- ngx_http_log_fmt_t *format;
-+
-+#if (NGX_ENABLE_SYSLOG)
-+ ngx_int_t priority;
-+ unsigned syslog_on:1; /* unsigned :1 syslog_on */
-+#endif
- } ngx_http_log_t;
-
-
-@@ -348,6 +358,14 @@ ngx_http_log_write(ngx_http_request_t *r
- time_t now;
- ssize_t n;
- ngx_err_t err;
-+
-+#if (NGX_ENABLE_SYSLOG)
-+ n = 0;
-+ if (log->syslog_on) {
-+ syslog(log->priority, "%.*s", (int)len, buf);
-+ }
-+#endif
-+
- #if (NGX_ZLIB)
- ngx_http_log_buf_t *buffer;
- #endif
-@@ -355,6 +373,9 @@ ngx_http_log_write(ngx_http_request_t *r
- if (log->script == NULL) {
- name = log->file->name.data;
-
-+#if (NGX_ENABLE_SYSLOG)
-+ if (name != NULL) {
-+#endif
- #if (NGX_ZLIB)
- buffer = log->file->data;
-
-@@ -367,7 +388,11 @@ ngx_http_log_write(ngx_http_request_t *r
- #else
- n = ngx_write_fd(log->file->fd, buf, len);
- #endif
--
-+#if (NGX_ENABLE_SYSLOG)
-+ } else {
-+ n = len;
-+ }
-+#endif
- } else {
- name = NULL;
- n = ngx_http_log_script_write(r, log->script, &name, buf, len);
-@@ -1068,6 +1093,10 @@ ngx_http_log_merge_loc_conf(ngx_conf_t *
- log->script = NULL;
- log->disk_full_time = 0;
- log->error_log_time = 0;
-+#if (NGX_ENABLE_SYSLOG)
-+ log->priority = HTTP_SYSLOG_PRIORITY;
-+ log->syslog_on = 0;
-+#endif
-
- lmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_log_module);
- fmt = lmcf->formats.elts;
-@@ -1096,6 +1125,13 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
- ngx_http_log_main_conf_t *lmcf;
- ngx_http_script_compile_t sc;
-
-+#if (NGX_ENABLE_SYSLOG)
-+ u_char *off;
-+ ngx_str_t priority;
-+ ngx_uint_t syslog_on = 0;
-+ name = priority = (ngx_str_t)ngx_null_string;
-+#endif
-+
- value = cf->args->elts;
-
- if (ngx_strcmp(value[1].data, "off") == 0) {
-@@ -1108,6 +1144,38 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
- "invalid parameter \"%V\"", &value[2]);
- return NGX_CONF_ERROR;
- }
-+#if (NGX_ENABLE_SYSLOG)
-+ else if (ngx_strncmp(value[1].data, "syslog", sizeof("syslog") - 1) == 0) {
-+ if (!cf->cycle->new_log.syslog_set) {
-+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-+ "You must set the syslog directive and enable it first.");
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ syslog_on = 1;
-+ if (value[1].data[sizeof("syslog") - 1] == ':') {
-+ priority.len = value[1].len - sizeof("syslog");
-+ priority.data = value[1].data + sizeof("syslog");
-+
-+ off = (u_char*) ngx_strchr(priority.data, '|');
-+ if (off != NULL) {
-+ priority.len = off - priority.data;
-+
-+ off++;
-+ name.len = value[1].data + value[1].len - off;
-+ name.data = off;
-+ }
-+ }
-+ else {
-+ if (value[1].len > sizeof("syslog")) {
-+ name.len = value[1].len - sizeof("syslog");
-+ name.data = value[1].data + sizeof("syslog");
-+ }
-+ }
-+ } else {
-+ name = value[1];
-+ }
-+#endif
-
- if (llcf->logs == NULL) {
- llcf->logs = ngx_array_create(cf->pool, 2, sizeof(ngx_http_log_t));
-@@ -1125,6 +1193,52 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
-
- ngx_memzero(log, sizeof(ngx_http_log_t));
-
-+#if (NGX_ENABLE_SYSLOG)
-+ log->syslog_on = syslog_on;
-+
-+ if (priority.len == 0) {
-+ log->priority = HTTP_SYSLOG_PRIORITY;
-+ }
-+ else {
-+ log->priority = ngx_log_get_priority(cf, &priority);
-+ }
-+
-+ if (name.len != 0) {
-+ n = ngx_http_script_variables_count(&name);
-+
-+ if (n == 0) {
-+ log->file = ngx_conf_open_file(cf->cycle, &name);
-+ if (log->file == NULL) {
-+ return NGX_CONF_ERROR;
-+ }
-+ } else {
-+ if (ngx_conf_full_name(cf->cycle, &name, 0) != NGX_OK) {
-+ return NGX_CONF_ERROR;
-+ }
-+ log->script = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_script_t));
-+ if (log->script == NULL) {
-+ return NGX_CONF_ERROR;
-+ }
-+ ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));
-+ sc.cf = cf;
-+ sc.source = &name;
-+ sc.lengths = &log->script->lengths;
-+ sc.values = &log->script->values;
-+ sc.variables = n;
-+ sc.complete_lengths = 1;
-+ sc.complete_values = 1;
-+ if (ngx_http_script_compile(&sc) != NGX_OK) {
-+ return NGX_CONF_ERROR;
-+ }
-+ }
-+ }
-+ else {
-+ log->file = ngx_conf_open_file(cf->cycle, &name);
-+ if (log->file == NULL) {
-+ return NGX_CONF_ERROR;
-+ }
-+ }
-+#else
- n = ngx_http_script_variables_count(&value[1]);
-
- if (n == 0) {
-@@ -1157,6 +1271,7 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
- return NGX_CONF_ERROR;
- }
- }
-+#endif
-
- if (cf->args->nelts >= 3) {
- name = value[2];
-Index: nginx-1.4.7/src/http/ngx_http_core_module.c
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_core_module.c
-+++ nginx-1.4.7/src/http/ngx_http_core_module.c
-@@ -1462,6 +1462,9 @@ ngx_http_update_location_config(ngx_http
-
- if (r == r->main) {
- ngx_http_set_connection_log(r->connection, clcf->error_log);
-+#if (NGX_ENABLE_SYSLOG)
-+ r->connection->log->priority = clcf->error_log->priority;
-+#endif
- }
-
- if ((ngx_io.flags & NGX_IO_SENDFILE) && clcf->sendfile) {
-@@ -4901,6 +4904,15 @@ ngx_http_core_error_log(ngx_conf_t *cf,
-
- ngx_str_t *value, name;
-
-+#if (NGX_ENABLE_SYSLOG)
-+ u_char *off = NULL;
-+ ngx_int_t syslog_on = 0;
-+ ngx_str_t priority;
-+
-+ name = priority = (ngx_str_t) ngx_null_string;
-+#endif
-+
-+
- if (clcf->error_log) {
- return "is duplicate";
- }
-@@ -4910,6 +4922,36 @@ ngx_http_core_error_log(ngx_conf_t *cf,
- if (ngx_strcmp(value[1].data, "stderr") == 0) {
- ngx_str_null(&name);
-
-+#if (NGX_ENABLE_SYSLOG)
-+ } else if (ngx_strncmp(value[1].data, "syslog", sizeof("syslog") - 1) == 0) {
-+ if (!cf->cycle->new_log.syslog_set) {
-+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-+ "You must set the syslog directive and enable it first.");
-+ return NGX_CONF_ERROR;
-+ }
-+
-+ syslog_on = 1;
-+
-+ if (value[1].data[sizeof("syslog") - 1] == ':') {
-+ priority.len = value[1].len - sizeof("syslog");
-+ priority.data = value[1].data + sizeof("syslog");
-+
-+ off = (u_char*) ngx_strchr(priority.data, '|');
-+ if (off != NULL) {
-+ priority.len = off - priority.data;
-+
-+ off++;
-+ name.len = value[1].data + value[1].len - off;
-+ name.data = off;
-+ }
-+ }
-+ else {
-+ if (value[1].len > sizeof("syslog")) {
-+ name.len = value[1].len - sizeof("syslog");
-+ name.data = value[1].data + sizeof("syslog");
-+ }
-+ }
-+#endif
- } else {
- name = value[1];
- }
-@@ -4919,6 +4961,17 @@ ngx_http_core_error_log(ngx_conf_t *cf,
- return NGX_CONF_ERROR;
- }
-
-+#if (NGX_ENABLE_SYSLOG)
-+ if (syslog_on) {
-+ clcf->error_log->syslog_on = 1;
-+ if (ngx_log_set_priority(cf, &priority, clcf->error_log) == NGX_CONF_ERROR) {
-+ return NGX_CONF_ERROR;
-+ }
-+ }
-+
-+ clcf->error_log->log_level = 0;
-+#endif
-+
- if (cf->args->nelts == 2) {
- clcf->error_log->log_level = NGX_LOG_ERR;
- return NGX_CONF_OK;
-Index: nginx-1.4.7/src/http/ngx_http_request.c
-===================================================================
---- nginx-1.4.7.orig/src/http/ngx_http_request.c
-+++ nginx-1.4.7/src/http/ngx_http_request.c
-@@ -533,6 +533,9 @@ ngx_http_create_request(ngx_connection_t
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
- ngx_http_set_connection_log(r->connection, clcf->error_log);
-+#if (NGX_ENABLE_SYSLOG)
-+ c->log->priority = clcf->error_log->priority;
-+#endif
-
- r->header_in = hc->nbusy ? hc->busy[0] : c->buffer;
-
-@@ -872,6 +875,9 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *
- clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, ngx_http_core_module);
-
- ngx_http_set_connection_log(c, clcf->error_log);
-+#if (NGX_ENABLE_SYSLOG)
-+ c->log->priority = clcf->error_log->priority;
-+#endif
-
- sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_ssl_module);
-
-@@ -2077,6 +2083,9 @@ ngx_http_set_virtual_server(ngx_http_req
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
- ngx_http_set_connection_log(r->connection, clcf->error_log);
-+#if (NGX_ENABLE_SYSLOG)
-+ r->connection->log->priority = clcf->error_log->priority;
-+#endif
-
- return NGX_OK;
- }
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
+PKG_SOURCE_URL:=https://www.snort.org/downloads/archive/snort/ \
@SF/$(PKG_NAME)
PKG_MD5SUM:=b01e9964827394c39194a0147bc15705
include $(TOPDIR)/rules.mk
PKG_NAME:=sshfs
-PKG_VERSION:=2.5
+PKG_VERSION:=2.10
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
-PKG_SOURCE:=$(PKG_NAME)-fuse-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/fuse
-PKG_MD5SUM:=17494910db8383a366b1301e5f5148a9
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/libfuse/sshfs/releases/download/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MD5SUM:=c99a1bcf3934d45e4a6342113669df4b
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-fuse-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
PKG_VERSION:=v1.17
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://rutschle.net/tech/
-PKG_MD5SUM:=1fc3ada4bafaca5a9786cc1431f48ed4
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/yrutschle/sslh.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=3550cbe
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=stunnel
-PKG_VERSION:=5.14
+PKG_VERSION:=5.20
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
-PKG_SOURCE_URL:=http://stunnel.cybermirror.org/archive/5.x/
+PKG_SOURCE_URL:=\
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/5.x/ \
+ http://www.usenix.org.uk/mirrors/stunnel/archive/5.x/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=e716501960dc6856d80f92547298f724
+PKG_MD5SUM:=3264375026c2b496b5d258e243222de8
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
define Package/stunnel
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libopenssl
+ DEPENDS:=+libopenssl +zlib
TITLE:=SSL TCP Wrapper
URL:=http://www.stunnel.org/
endef
+++ /dev/null
---- a/src/prototypes.h
-+++ b/src/prototypes.h
-@@ -590,7 +590,7 @@ extern GETNAMEINFO s_getnameinfo;
-
- #endif /* USE_WIN32 */
-
--int getnameinfo(const struct sockaddr *, int, char *, int, char *, int, int);
-+int getnameinfo(const struct sockaddr *, socklen_t, char *, socklen_t, char *, socklen_t, unsigned int);
-
- #endif /* !defined HAVE_GETNAMEINFO */
-
---- a/src/resolver.c
-+++ b/src/resolver.c
-@@ -538,8 +538,9 @@ const char *s_gai_strerror(int err) {
- /* implementation is limited to functionality needed by stunnel */
-
- #ifndef HAVE_GETNAMEINFO
--int getnameinfo(const struct sockaddr *sa, int salen,
-- char *host, int hostlen, char *serv, int servlen, int flags) {
-+int getnameinfo(const struct sockaddr *sa, socklen_t salen,
-+ char *host, socklen_t hostlen, char *serv, socklen_t servlen,
-+ unsigned int flags) {
-
- #if defined(USE_WIN32) && !defined(_WIN32_WCE)
- if(s_getnameinfo)
--- /dev/null
+Index: stunnel-5.20/src/cron.c
+===================================================================
+--- stunnel-5.20.orig/src/cron.c
++++ stunnel-5.20/src/cron.c
+@@ -46,6 +46,9 @@ NOEXPORT void cron_thread(void *arg);
+ #endif
+ #if defined(USE_PTHREAD) || defined(USE_WIN32)
+ NOEXPORT void cron_worker(void);
++#endif
++
++#ifndef OPENSSL_NO_DH
+ NOEXPORT void cron_dh_param(void);
+ #endif
+
#
-# Copyright (C) 2008-2014 OpenWrt.org
+# Copyright (C) 2008-2016 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:=tor
-PKG_VERSION:=0.2.7.6
+PKG_VERSION:=0.2.9.11
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.torproject.org/dist \
+PKG_SOURCE_URL:=https://dist.torproject.org/ \
https://archive.torproject.org/tor-package-archive
-PKG_MD5SUM:=cc19107b57136a68e8c563bf2d35b072
+PKG_MD5SUM:=763ae964e916c2a7a4c5015d351fcf8b
+PKG_HASH:=c1959bebff9a546a54cbedb58c8289a42441991af417d2d16f7b336be8903221
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_DEPENDS:=libminiupnpc libnatpmp
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/tor
$(call Package/tor/Default)
TITLE:=An anonymous Internet communication system
- DEPENDS:=+libevent2 +libopenssl +libpthread +librt
+ DEPENDS:=+libevent2 +libopenssl +libpthread +librt +zlib +libcap
endef
define Package/tor/description
This package contains the tor daemon.
endef
-define Package/tor-fw-helper
+define Package/tor-gencert
$(call Package/tor/Default)
- TITLE:=Firewall helper for tor
- DEPENDS:=+tor +libminiupnpc +libnatpmp
+ TITLE:=Tor certificate generation
+ DEPENDS:=+tor
endef
-define Package/tor-fw-helper/description
+define Package/tor-gencert/description
$(call Package/tor/Default/description)
- This package contains a helper for automatically configuring port forwarding.
+ Generate certs and keys for Tor directory authorities
+endef
+
+define Package/tor-resolve
+$(call Package/tor/Default)
+ TITLE:=tor hostname resolve
+ DEPENDS:=+tor
+endef
+
+define Package/tor-resolve/description
+$(call Package/tor/Default/description)
+ Resolve a hostname to an IP address via tor
endef
define Package/tor-geoip
define Package/tor/conffiles
/etc/tor/torrc
+/var/lib/tor/fingerprint
+/var/lib/tor/keys/*
endef
CONFIGURE_ARGS += \
--with-libevent-dir="$(STAGING_DIR)/usr" \
--with-ssl-dir="$(STAGING_DIR)/usr" \
- --enable-upnp \
- --with-libminiupnpc-dir="$(STAGING_DIR)/usr" \
- --enable-nat-pmp \
- --with-libnatpmp-dir="$(STAGING_DIR)/usr" \
+ --with-openssl-dir="$(STAGING_DIR)/usr" \
+ --with-zlib-dir="$(STAGING_DIR)/usr" \
--disable-asciidoc \
- --disable-seccomp
+ --disable-seccomp \
+ --disable-libscrypt \
+ --disable-unittests \
+ --disable-largefile \
+ --with-tor-user=tor \
+ --with-tor-group=tor
+
+EXTRA_CFLAGS += -std=gnu99
ifneq ($(CONFIG_SSP_SUPPORT),y)
CONFIGURE_ARGS += \
--disable-gcc-hardening
- MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
else
- MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) -fPIC -std=gnu99"
+ EXTRA_CFLAGS += -fPIC
endif
CONFIGURE_VARS += \
define Package/tor/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torify $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor
$(INSTALL_DIR) $(1)/etc/tor
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc
endef
-define Package/tor-fw-helper/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-fw-helper $(1)/usr/bin/
+define Package/tor-gencert/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-gencert $(1)/usr/sbin/
+endef
+
+define Package/tor-resolve/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-resolve $(1)/usr/sbin/
endef
define Package/tor-geoip/install
$(INSTALL_DIR) $(1)/usr/share/tor
$(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip6 $(1)/usr/share/tor/
endef
$(eval $(call BuildPackage,tor))
-$(eval $(call BuildPackage,tor-fw-helper))
+$(eval $(call BuildPackage,tor-gencert))
+$(eval $(call BuildPackage,tor-resolve))
$(eval $(call BuildPackage,tor-geoip))
--- a/src/config/torrc.sample.in
+++ b/src/config/torrc.sample.in
-@@ -45,11 +45,11 @@
- ## Uncomment this to start the process in the background... or use
- ## --runasdaemon 1 on the command line. This is ignored on Windows;
- ## see the FAQ entry if you want Tor to run as an NT service.
--#RunAsDaemon 1
-+RunAsDaemon 1
+@@ -39,7 +39,7 @@
+ ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
+ #Log debug file @LOCALSTATEDIR@/log/tor/debug.log
+ ## Use the system log instead of Tor's logfiles
+-#Log notice syslog
++Log notice syslog
+ ## To send all messages to stderr:
+ #Log debug stderr
+
+@@ -50,7 +50,7 @@
## The directory for keeping all the keys/etc. By default, we store
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
## The port on which Tor will listen for local connections from Tor
## controller applications, as documented in control-spec.txt.
-@@ -190,3 +190,4 @@
+@@ -204,3 +204,4 @@
## address manually to your friends, uncomment this line:
#PublishServerDescriptor 0
include $(TOPDIR)/rules.mk
PKG_NAME:=wifidog
-PKG_VERSION:=1.2.1
+PKG_VERSION:=1.3.0
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/wifidog/wifidog-gateway.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=1.2.1
+PKG_SOURCE_VERSION:=1.3.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=pianod
-PKG_VERSION:=173
-PKG_RELEASE:=3
+PKG_VERSION:=174
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://deviousfish.com/Downloads/pianod/
-PKG_MD5SUM:=be0cec19ea6df1c4bc6c1cac8e253445
+PKG_MD5SUM:=cca2143e4a5301dea8c0cb9fcbd20881
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+++ /dev/null
---- a/src/libwaitress/waitress.c
-+++ b/src/libwaitress/waitress.c
-@@ -805,34 +805,37 @@ static WaitressReturn_t WaitressConnect
- int pollres;
-
- /* we need shorter timeouts for connect() */
-- fcntl (sock, F_SETFL, O_NONBLOCK);
-+ pollres = fcntl (sock, F_SETFL, O_NONBLOCK);
-+ assert (pollres != -1);
-
-- /* increase socket receive buffer */
-- const int sockopt = 256*1024;
-- setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &sockopt,
-- sizeof (sockopt));
--
-- /* non-blocking connect will return immediately */
-- connect (sock, gacurr->ai_addr, gacurr->ai_addrlen);
--
-- pollres = WaitressPollLoop (sock, POLLOUT, waith->timeout);
-- if (pollres == 0) {
-- ret = WAITRESS_RET_TIMEOUT;
-- } else if (pollres == -1) {
-- ret = WAITRESS_RET_ERR;
-- } else {
-- /* check connect () return value */
-- socklen_t pollresSize = sizeof (pollres);
-- getsockopt (sock, SOL_SOCKET, SO_ERROR, &pollres,
-- &pollresSize);
-- if (pollres != 0) {
-- ret = WAITRESS_RET_CONNECT_REFUSED;
-+ if (connect (sock, gacurr->ai_addr, gacurr->ai_addrlen) != -1) {
-+ /* working */
-+ waith->request.sockfd = sock;
-+ break;
-+ } else if (errno == EINPROGRESS) {
-+ /* wait for connect to succeed */
-+ pollres = WaitressPollLoop (sock, POLLOUT, waith->timeout);
-+ if (pollres == 0) {
-+ ret = WAITRESS_RET_TIMEOUT;
-+ } else if (pollres == -1) {
-+ ret = WAITRESS_RET_ERR;
- } else {
-- /* this one is working */
-- waith->request.sockfd = sock;
-- break;
-+ /* check connect () return value */
-+ socklen_t pollresSize = sizeof (pollres);
-+ getsockopt (sock, SOL_SOCKET, SO_ERROR, &pollres,
-+ &pollresSize);
-+ if (pollres != 0) {
-+ ret = WAITRESS_RET_CONNECT_REFUSED;
-+ } else {
-+ /* this one is working */
-+ waith->request.sockfd = sock;
-+ break;
-+ }
- }
-+ } else {
-+ ret = WAITRESS_RET_ERR;
- }
-+
- close (sock);
- }
- }
---- a/src/libfootball/fb_service.c
-+++ b/src/libfootball/fb_service.c
-@@ -111,6 +111,8 @@ static bool fb_setup_socket (FB_SERVICE
- service->socket [which] = 0;
- } else {
- fb_perror ("socket");
-+ // Element must be zero (not -1)
-+ service->socket [which] = 0;
- };
- return false;
- }
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,7 +3,7 @@
+
+ AC_PREREQ([2.69])
+ AC_INIT([pianod],
+- m4_esyscmd([svn info http://svn.deviousfish.com/pianod | grep Revision: | awk '{print $2}' | tr -d '\n']),
++ 174-OpenWrt,
+ [pianod@lists.deviousfish.com],
+ ,[http://deviousfish.com/pianod])
+ AM_INIT_AUTOMAKE([foreign -Wall -Werror])
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
-@@ -918,14 +918,14 @@ static WaitressReturn_t WaitressSendRequ
+@@ -922,14 +922,14 @@ static WaitressReturn_t WaitressSendRequ
if (WaitressProxyEnabled (waith) && !waith->url.tls) {
snprintf (buf, WAITRESS_BUFFER_SIZE,
"%s http://%s:%s/%s HTTP/" WAITRESS_HTTP_VERSION "\r\n"
return WAITRESS_RET_OK;
}
-@@ -876,6 +947,12 @@ static WaitressReturn_t WaitressConnect
+@@ -880,6 +951,12 @@ static WaitressReturn_t WaitressConnect
}
}
/* Ignore return code as connection will likely still succeed */
gnutls_server_name_set (waith->request.tlsSession, GNUTLS_NAME_DNS,
waith->url.host, strlen (waith->url.host));
-@@ -883,14 +960,15 @@ static WaitressReturn_t WaitressConnect
+@@ -887,14 +964,15 @@ static WaitressReturn_t WaitressConnect
if (gnutls_handshake (waith->request.tlsSession) != GNUTLS_E_SUCCESS) {
return WAITRESS_RET_TLS_HANDSHAKE_ERR;
}
}
return WAITRESS_RET_OK;
-@@ -1116,6 +1194,21 @@ WaitressReturn_t WaitressFetchCall (Wait
+@@ -1120,6 +1198,21 @@ WaitressReturn_t WaitressFetchCall (Wait
waith->request.contentLengthKnown = false;
if (waith->url.tls) {
gnutls_init (&waith->request.tlsSession, GNUTLS_CLIENT);
gnutls_set_default_priority (waith->request.tlsSession);
-@@ -1133,6 +1226,7 @@ WaitressReturn_t WaitressFetchCall (Wait
+@@ -1137,6 +1230,7 @@ WaitressReturn_t WaitressFetchCall (Wait
WaitressPollRead);
gnutls_transport_set_push_function (waith->request.tlsSession,
WaitressPollWrite);
}
/* buffer is required for connect already */
-@@ -1144,15 +1238,22 @@ WaitressReturn_t WaitressFetchCall (Wait
+@@ -1148,15 +1242,22 @@ WaitressReturn_t WaitressFetchCall (Wait
if ((wRet = WaitressSendRequest (waith)) == WAITRESS_RET_OK) {
wRet = WaitressReceiveResponse (waith);
}
--- /dev/null
+config PACKAGE_UPMPDCLI_SCCTL
+ bool "scctl command for configuring SongCast receivers"
+ default no
+ depends on PACKAGE_upmpdcli
+ help
+ Installs the scctl command. See the following link for more info:
+ http://www.lesbonscomptes.com/upmpdcli/scmulti.html
+
+config PACKAGE_UPMPDCLI_SC_WEB_INTERFACE
+ bool "SongCast web server and associated files (depends on python)"
+ default no
+ depends on PACKAGE_upmpdcli
+ select PACKAGE_python
+ select PACKAGE_UPMPDCLI_SCCTL
+ help
+ Installs the SongCast web interface and web server. See the following
+ link for more info: http://www.lesbonscomptes.com/upmpdcli/scmulti.html
#
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 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:=upmpdcli
-PKG_VERSION:=0.9.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads
-PKG_MD5SUM:=0e7b86037f19ea3a08067409af6f6902
+PKG_MD5SUM:=de9f232d6d5f746ec81ec239e11bdda4
PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
DEPENDS+= +libupnpp +libmpdclient
TITLE:=A UPnP front-end to MPD, the Music Player Daemon
USERID:=upmpdcli=89:upmpdcli=89
+ MENU:=1
endef
define Package/upmpdcli/description
upmpdcli implements an UPnP Media Renderer, using MPD to perform the real work.
endef
+define Package/upmpdcli/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Package/upmpdcli/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/upmpdcli.conf $(1)/etc/
$(INSTALL_CONF) ./files/upmpdcli.config $(1)/etc/config/upmpdcli
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upmpdcli $(1)/usr/bin/
+ifeq ($(CONFIG_PACKAGE_UPMPDCLI_SCCTL),y)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scctl $(1)/usr/bin/
+endif
$(INSTALL_DIR) $(1)/usr/share/upmpdcli
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/upmpdcli/* $(1)/usr/share/upmpdcli/
+ifneq ($(CONFIG_PACKAGE_UPMPDCLI_SC_WEB_INTERFACE),y)
+ $(RM) -rf $(PKG_INSTALL_DIR)/usr/share/upmpdcli/web
+endif
+ $(CP) -r $(PKG_INSTALL_DIR)/usr/share/upmpdcli $(1)/usr/share/
$(INSTALL_DATA) ./files/upmpdcli.png $(1)/usr/share/upmpdcli/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/upmpdcli.init $(1)/etc/init.d/upmpdcli
---- a/src/upmpdcli.conf
-+++ b/src/upmpdcli.conf
-@@ -53,3 +53,6 @@ ohmetapersist = 1
- # Path to the sc2mpd if it is not in /usr/bin and the location is not in
- # the PATH for the init scripts.
- #sc2mpd = /usr/bin/sc2mpd
-+
-+# Icon for MPD UPnP interface
-+iconpath = /usr/share/upmpdcli/upmpdcli.png
+--- a/src/upmpdcli.conf-dist
++++ b/src/upmpdcli.conf-dist
+@@ -24,7 +24,7 @@
+
+ # You can set a path to an icon here. The icon will be displayed by a control
+ # point. The icon will only be read once, when upmpdcli starts up.
+-# iconpath = /usr/share/upmpdcli/icon.png
++iconpath = /usr/share/upmpdcli/icon.png
+
+ # You can set a path to an html file here, to replace the default
+ # presentation page. The page will only be read once, when upmpdcli starts
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2016 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:=rtklib
-PKG_VERSION:=2.4.2_p9
+PKG_VERSION:=2.4.3_b24
PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/tomojitakasu/RTKLIB.git
-PKG_SOURCE_VERSION:=5592bb575ceb27f2ce0f0f5a84eda38497006c15
+PKG_SOURCE_VERSION:=1cec90a9ffa424908ad1a4ca3d52f33f9b94d1f7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://releases.stm32flash.googlecode.com/git
+PKG_SOURCE_URL:=@SF/stm32flash
PKG_MD5SUM:=ec9b5c8bae67f9a489786546d088bd14
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
include $(TOPDIR)/rules.mk
PKG_NAME:=taskwarrior
-PKG_VERSION:=2.4.1
+PKG_VERSION:=2.4.4
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_SOURCE:=task-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.taskwarrior.org/download/
-PKG_MD5SUM:=f250f3fb3922e4153c6ad1b1270dceb8
+PKG_MD5SUM:=517450c4a23a5842df3e9905b38801b3
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
PKG_BUILD_DIR:=$(BUILD_DIR)/task-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=tracertools
-PKG_VERSION:=20150916
+PKG_VERSION:=20160118
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dangowrt/tracertools.git
-PKG_SOURCE_VERSION:=7dba3342fedfd04eb7b0d9941971726fde948ec0
+PKG_SOURCE_VERSION:=253e73fd379714239b51d5b0fd719b7c2d65f379
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz