From: Jo-Philipp Wich Date: Sun, 5 Feb 2012 15:16:07 +0000 (+0000) Subject: [packages_10.03.2] haproxy: merge r28166, r28171, r28179, r28370, r28371, r28960... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6f887c04a2991fd543b7417fd08a031002777394;p=openwrt%2Fsvn-archive%2Farchive.git [packages_10.03.2] haproxy: merge r28166, r28171, r28179, r28370, r28371, r28960, r29097, r29702, r29703; drop Linux 2.4 support SVN-Revision: 30206 --- diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index ce6b152097..e9b2507d56 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010 OpenWrt.org +# Copyright (C) 2010-2011 OpenWrt.org # Copyright (C) 2009-2010 Thomas Heil # # This is free software, licensed under the GNU General Public License v2. @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haproxy -PKG_VERSION:=1.4.15 -PKG_RELEASE:=1 +PKG_VERSION:=1.4.19 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src -PKG_MD5SUM:=c1b4fc6028c6d8e23dde8c91ff47eabe +PKG_MD5SUM:=41392d738460dbf99295fd928031c6a4 include $(INCLUDE_DIR)/package.mk @@ -24,7 +24,8 @@ define Package/haproxy CATEGORY:=Network TITLE:=The Reliable, High Performance TCP/HTTP Load Balancer URL:=http://haproxy.1wt.eu/ - DEPENDS:=+libpcre +libltdl + DEPENDS:=@!LINUX_2_4 +libpcre +libltdl + MAINTAINER:=Thomas Heil endef define Package/haproxy/conffiles @@ -36,13 +37,13 @@ define Package/haproxy/description endef define Build/Compile - $(MAKE) TARGET=$(if $(CONFIG_LINUX_2_4),linux24,linux26) -C $(PKG_BUILD_DIR) \ + $(MAKE) TARGET=linux26 -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ CC="$(TARGET_CC)" \ CFLAGS="$(TARGET_CFLAGS)" \ LD="$(TARGET_CC)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ - SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 \ + SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 \ all install endef diff --git a/net/haproxy/files/haproxy.cfg b/net/haproxy/files/haproxy.cfg index 1c56884a62..a54f5f5ddb 100644 --- a/net/haproxy/files/haproxy.cfg +++ b/net/haproxy/files/haproxy.cfg @@ -29,6 +29,7 @@ global # Daemonize on startup daemon + nosplice # Enable debugging #debug @@ -41,8 +42,8 @@ global # Example HTTP proxy listener listen my_http_proxy - # Bind to port 80 and 443 on all interfaces (0.0.0.0) - bind :80,:443 + # Bind to port 81 and 444 on all interfaces (0.0.0.0) + bind :81,:444 # We're proxying HTTP here... mode http @@ -68,8 +69,8 @@ listen my_smtp_proxy # Disable this instance without commenting out the section. disabled - # Bind to port 25 and 587 on localhost - bind 127.0.0.1:25,127.0.0.1:587 + # Bind to port 26 and 588 on localhost + bind 127.0.0.1:26,127.0.0.1:588 # This is a TCP proxy mode tcp diff --git a/net/haproxy/files/haproxy.init b/net/haproxy/files/haproxy.init index 73a21e7830..1548e31dee 100644 --- a/net/haproxy/files/haproxy.init +++ b/net/haproxy/files/haproxy.init @@ -4,28 +4,21 @@ START=99 STOP=80 +SERVICE_USE_PID=1 + HAPROXY_BIN="/usr/sbin/haproxy" HAPROXY_CONFIG="/etc/haproxy.cfg" HAPROXY_PID="/var/run/haproxy.pid" -boot() { - - #Do nothing on boot - exit 0 -} - start() { - [ -x "$HAPROXY_BIN" ] || return 1 - - start-stop-daemon -S -x $HAPROXY_BIN -- \ - -f "$HAPROXY_CONFIG" -V -D -p "$HAPROXY_PID" + service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID" } stop() { - service_kill ${HAPROXY_BIN##*/} $HAPROXY_PID - rm -f $HAPROXY_PID + $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -st $(cat $HAPROXY_PID) + service_stop $HAPROXY_BIN } reload() { - $HAPROXY_BIN -f $HAPROXY_CONFIG -D -V -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) + $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID) }