diff options
author | wen <wen@FreeBSD.org> | 2010-03-16 09:39:45 +0800 |
---|---|---|
committer | wen <wen@FreeBSD.org> | 2010-03-16 09:39:45 +0800 |
commit | 6656d3bcdcb4adb7b32a6f3b77e97beed968e86a (patch) | |
tree | 8552d98848a7d4d5eb2522555771593c372e0fb8 /net/haproxy | |
parent | 295b2ceef7583911316c60b763d2876763c9404f (diff) | |
download | freebsd-ports-gnome-6656d3bcdcb4adb7b32a6f3b77e97beed968e86a.tar.gz freebsd-ports-gnome-6656d3bcdcb4adb7b32a6f3b77e97beed968e86a.tar.zst freebsd-ports-gnome-6656d3bcdcb4adb7b32a6f3b77e97beed968e86a.zip |
- Update to 1.4.1
- Pass maintainer to submitter
PR: ports/144331
Submitted by: Ross West <freebsd@linepoint.com> (new maintainer)
Diffstat (limited to 'net/haproxy')
-rw-r--r-- | net/haproxy/Makefile | 53 | ||||
-rw-r--r-- | net/haproxy/distinfo | 6 | ||||
-rw-r--r-- | net/haproxy/files/haproxy.in | 99 | ||||
-rw-r--r-- | net/haproxy/files/haproxy.sh.in | 50 | ||||
-rw-r--r-- | net/haproxy/files/patch-Makefile.bsd | 85 | ||||
-rw-r--r-- | net/haproxy/files/pkg-message.in | 12 | ||||
-rw-r--r-- | net/haproxy/pkg-descr | 10 | ||||
-rw-r--r-- | net/haproxy/pkg-message | 3 | ||||
-rw-r--r-- | net/haproxy/pkg-plist | 65 |
9 files changed, 203 insertions, 180 deletions
diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 87986dc1c91b..45d480187b79 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -6,54 +6,43 @@ # PORTNAME= haproxy -PORTVERSION= 1.2.18 +PORTVERSION= 1.4.1 CATEGORIES= net www -MASTER_SITES= http://haproxy.1wt.eu/download/1.2/src/ +MASTER_SITES= http://haproxy.1wt.eu/download/1.4/src/ -MAINTAINER= ports@FreeBSD.org -COMMENT= High-performance and highly-robust TCP/HTTP load balancer +MAINTAINER= freebsd@linepoint.com +COMMENT= The Reliable, High Performance TCP/HTTP Load Balancer -USE_RC_SUBR= haproxy.sh +USE_RC_SUBR= haproxy +USE_GMAKE= YES +SUB_FILES= pkg-message +MAN1= haproxy.1 -STATS_INTERVAL?= 0 -CFLAGS+= -DSTATTIME=${STATS_INTERVAL} +OPTIONS= PCRE "Use PCRE regex library" On\ + STATIC_PCRE "Use static PCRE regex library" Off -.if defined(WITH_TPROXY) -CFLAGS+= -DTPROXY -.endif +.include <bsd.port.options.mk> + +MAKE_ARGS= "TARGET=freebsd" .if defined(WITH_PCRE) -PKGNAMESUFFIX= -pcre LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre -MAKE_ENV+= "REGEX=pcre" -CFLAGS+= -DUSE_PCRE -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -lpcreposix -lpcre +MAKE_ARGS+= "USE_PCRE=1" .endif -.if defined(WITH_SMALLOPTS) -CFLAGS+= -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024 +.if defined(WITH_STATIC_PCRE) +LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre +MAKE_ARGS+= "USE_STATIC_PCRE=1" .endif -MAKEFILE= Makefile.bsd - -pre-everything:: - @${ECHO_MSG} "" - @${ECHO_MSG} "Available options:" - @${ECHO_MSG} "WITH_PCRE: Use pcre regex engine" - @${ECHO_MSG} "WITH_TPROXY: Enable Transparent proxy support" - @${ECHO_MSG} "WITH_SMALLOPTS: Enable low memory footprint support" - @${ECHO_MSG} "STATS_INTERVAL=###: Statistics interval in milliseconds," - @${ECHO_MSG} " (default to 0, disabled)" - @${ECHO_MSG} "" - do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin + @${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin/ + @${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${MAN1PREFIX}/man/man1 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} + (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${DOCSDIR}) @${MKDIR} ${EXAMPLESDIR} - @${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \ - ${EXAMPLESDIR}/haproxy.cfg + (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}) .endif post-install: diff --git a/net/haproxy/distinfo b/net/haproxy/distinfo index 8196520b3649..aa84ef756e40 100644 --- a/net/haproxy/distinfo +++ b/net/haproxy/distinfo @@ -1,3 +1,3 @@ -MD5 (haproxy-1.2.18.tar.gz) = aa1884cbbb22fab2e8ff0beb37db1f8b -SHA256 (haproxy-1.2.18.tar.gz) = e0ef06180fae5e3a96712b86486788a0f961459640fd94d99389548df50aa9c0 -SIZE (haproxy-1.2.18.tar.gz) = 206287 +MD5 (haproxy-1.4.1.tar.gz) = 7f27c2dec3d67fce1b113be5fe878c33 +SHA256 (haproxy-1.4.1.tar.gz) = 7f13346d9790c07e64133d3c6eccf72817c627da29aaba67814b6defea6cf1b3 +SIZE (haproxy-1.4.1.tar.gz) = 757025 diff --git a/net/haproxy/files/haproxy.in b/net/haproxy/files/haproxy.in new file mode 100644 index 000000000000..69991093ed52 --- /dev/null +++ b/net/haproxy/files/haproxy.in @@ -0,0 +1,99 @@ +#!/bin/sh + +# PROVIDE: haproxy +# REQUIRE: DAEMON +# KEYWORD: shutdown + +####### +# +# Add the following lines to /etc/rc.conf to enable haproxy: +# +# haproxy_enable (bool): default: "NO" +# Set to "YES" to enable haproxy +# haproxy_pidfile (str): default: /var/run/${name}.pid +# Set to the full path of the pid file +# haproxy_config (str): default: /usr/local/etc/${name}.conf +# Set to the full path of the config file +# haproxy_flags (str): default: Autogenerated using pidfile and config options +# Set to override with your own options +# +####### +# +# rc.d Script Runtime Options: +# +# start - starts application normally +# stop - (softstop) stops all proxies and exits once all sessions are closed +# forcestop - (immediate) stops all proxies and kills active sessions +# reload - hot-reconfig using "-sf" option (active sessions kept) +# forcereload - hot-reconfig using "-st" option (active sessions killed) +# restart - equiv to "stop" then "start" +# checkconfig - checks configuration file defined in haproxy_config +# +####### + +. %%RC_SUBR%% + +name="haproxy" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/haproxy" + +# Load Configs/Set Defaults +load_rc_config $name +: ${haproxy_enable:="NO"} +: ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} +: ${haproxy_pidfile:="/var/run/${name}.pid"} +: ${haproxy_flags="-q -f ${haproxy_config} -p ${haproxy_pidfile}"} + +# Update the globals +pidfile=${haproxy_pidfile} +required_files=${haproxy_config} + +# Commands: start, stop, restart, reload, checkconfig +extra_commands="reload checkconfig" + +checkconfig_cmd="haproxy_checkconfig" +reload_cmd="haproxy_reload" + +haproxy_reload() +{ + # Check configuration file quietly first + ${command} -q -c -f ${haproxy_config} + if [ $? -ne 0 ]; then + echo "Error found in ${haproxy_config} - not reloading current process!" + return + fi + rc_pid=$(check_pidfile ${haproxy_pidfile} ${command}) + if [ $rc_pid ]; then + if [ $rc_force ]; then + ${command} ${haproxy_flags} -st ${rc_pid} + else + ${command} ${haproxy_flags} -sf ${rc_pid} + fi + else + echo "No process found. Maybe $command isn't running?" + fi +} + +haproxy_checkconfig() +{ + ${command} -c -f ${haproxy_config} +} + +haproxy_prestart() +{ + ${command} -q -c -f ${haproxy_config} + rc_flags=${haproxy_flags} +} + +haproxy_prestop() +{ + # SIGUSR1 = softstop, SIGTERM = faststop + if [ $rc_force ]; then + sig_stop="SIGTERM" + else + sig_stop="SIGUSR1" + fi +} + + +run_rc_command "$1" diff --git a/net/haproxy/files/haproxy.sh.in b/net/haproxy/files/haproxy.sh.in deleted file mode 100644 index 17682a730f73..000000000000 --- a/net/haproxy/files/haproxy.sh.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net/haproxy/files/Attic/haproxy.sh.in,v 1.1 2006-11-01 14:42:14 clement Exp $ -# - -# PROVIDE: haproxy -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable haproxy: -# haproxy_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable haproxy -# haproxylimits_enable (bool):Set to "NO" by default. -# Set it to yes to run `limits $limits_args` -# just before haproxy starts. -# haproxy_flags (str): Set to "" by default. -# Extra flags passed to start command -# haproxylimits_args (str): Default to "-e -C daemon" -# Arguments of pre-start limits run. -# -. %%RC_SUBR%% - -name="haproxy" -rcvar=`set_rcvar` - -command="%%PREFIX%%/sbin/haproxy" -pidfile="/var/run/haproxy.pid" -required_files=%%PREFIX%%/etc/haproxy.conf - -[ -z "$haproxy_enable" ] && haproxy_enable="NO" -[ -z "$haproxy_flags" ] && haproxy_flags="-p ${pidfile} -f /usr/local/etc/haproxy.conf" -[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO" -[ -z "$haproxylimits_args" ] && haproxylimits_args="-e -C daemon" - -load_rc_config $name - -checkyesno haproxylimits_enable && \ - start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null" - -sig_gracefulstop=SIGUSR1 - -haproxy_gracefulstop() { - echo "Gracefully shutdown haproxy ($rc_pid)" - kill -${sig_gracefulstop} ${rc_pid} - } - -extra_commands="gracefulstop" -run_rc_command "$1" diff --git a/net/haproxy/files/patch-Makefile.bsd b/net/haproxy/files/patch-Makefile.bsd deleted file mode 100644 index eaeaca8a9e43..000000000000 --- a/net/haproxy/files/patch-Makefile.bsd +++ /dev/null @@ -1,85 +0,0 @@ ---- ./Makefile.bsd.orig 2007-03-18 05:04:39.000000000 +0800 -+++ ./Makefile.bsd 2007-07-24 20:38:01.803049803 +0800 -@@ -5,22 +5,22 @@ - TARGET = openbsd - - # pass CPU=<cpu_name> to make to optimize for a particular CPU --CPU = generic -+#CPU = generic - #CPU = i586 - #CPU = i686 - #CPU = ultrasparc - - # By default, we use libc's regex. WARNING! On Solaris 8/Sparc, group - # references seem broken using libc ! Use pcre instead. --REGEX=libc -+REGEX?=libc - #REGEX=pcre - #REGEX=static-pcre - - # tools options --CC = gcc --LD = gcc -+CC?= gcc -+LD?= gcc - --PCREDIR=/usr/local -+PCREDIR=${LOCALBASE} - - # This is for OpenBSD 3.0 - COPTS.openbsd = -DENABLE_POLL -@@ -46,7 +46,7 @@ - - # you can enable debug arguments with "DEBUG=-g" or disable them with "DEBUG=" - #DEBUG = -g -DDEBUG_MEMORY -DDEBUG_FULL --DEBUG = -g -+#DEBUG = -g - - # if small memory footprint is required, you can reduce the buffer size. There - # are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB memory -@@ -54,7 +54,7 @@ - # will avoid the additionnal paramters to overflow a page. 8030 bytes is - # exactly 5.5 TCP segments of 1460 bytes. - #SMALL_OPTS = --SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024 -+#SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024 - - # redefine this if you want to add some special PATH to include/libs - ADDINC = -@@ -65,7 +65,7 @@ - # - use -DSTATTIME=0 to disable statistics, else specify an interval in - # milliseconds. - # - use -DTPROXY to compile with transparent proxy support. --DEFINE = -DSTATTIME=0 -DTPROXY -+#DEFINE = -DSTATTIME=0 -DTPROXY - - # global options - TARGET_OPTS=$(COPTS.$(TARGET)) -@@ -75,14 +75,14 @@ - COPTS=-I. $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(DEFINE) - LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB) - --CFLAGS = -Wall $(COPTS) $(DEBUG) --LDFLAGS = -g -+CFLAGS+= -Wall $(COPTS) -+LDFLAGS+= #-g /lib/crt0.o -lc - - all: haproxy - - haproxy: src/list.o src/chtbl.o src/hashpjw.o haproxy.o src/base64.o \ - src/uri_auth.o src/rbtree.o -- $(LD) $(LDFLAGS) -o $@ $> $(LIBS) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $> $(LIBS) - - src/base64.o: src/base64.c - $(CC) $(CFLAGS) -c -o $@ $< -@@ -99,6 +99,9 @@ - src/hashpjw.o: src/hashpjw.c - $(CC) $(CFLAGS) -c -o $@ $< - -+src/rbtree.o: src/rbtree.c -+ $(CC) $(CFLAGS) -c -o $@ $< -+ - haproxy.o: haproxy.c - $(CC) $(CFLAGS) -c -o $@ $< - diff --git a/net/haproxy/files/pkg-message.in b/net/haproxy/files/pkg-message.in new file mode 100644 index 000000000000..c4209088e6c7 --- /dev/null +++ b/net/haproxy/files/pkg-message.in @@ -0,0 +1,12 @@ + +************************************************* +* Congratulations! Haproxy is now installed. * +************************************************* + +Check the following directories for further info: + documentation: '%%DOCSDIR%%/haproxy' + examples: '%%EXAMPLESDIR%%/haproxy' + +rc.conf variables listing can be found in: + '%%PREFIX%%/etc/rc.d/haproxy' + diff --git a/net/haproxy/pkg-descr b/net/haproxy/pkg-descr index 4da1ab8c8502..607f0c92039b 100644 --- a/net/haproxy/pkg-descr +++ b/net/haproxy/pkg-descr @@ -1,8 +1,6 @@ -HAproxy is a high-performance and highly-robust TCP/HTTP load balancer which -provides cookie-based persistence, automatic failover, header insertion, -deletion, modification on the fly, advanced logging contents to help trouble- -shooting buggy applications and/or networks, and a few other features. It uses -its own state machine to achieve up to ten thousands hits per second on modern -hardware, even with thousands simultaneous connections. +HAProxy is a free, very fast and reliable solution offering high +availability, load balancing, and proxying for TCP and HTTP-based +applications. It is particularly suited for web sites crawling under +very high loads while needing persistence or Layer7 processing. WWW: http://haproxy.1wt.eu/ diff --git a/net/haproxy/pkg-message b/net/haproxy/pkg-message deleted file mode 100644 index 4cb845b4df81..000000000000 --- a/net/haproxy/pkg-message +++ /dev/null @@ -1,3 +0,0 @@ -===> BE CAREFULL HOW TO BOOT on 1.1.28 or after: - To run haproxy from startup, add haproxy_enable="YES" in your - /etc/rc.conf. diff --git a/net/haproxy/pkg-plist b/net/haproxy/pkg-plist index 6431f584ff60..36004c5920d0 100644 --- a/net/haproxy/pkg-plist +++ b/net/haproxy/pkg-plist @@ -1,7 +1,70 @@ sbin/haproxy +%%PORTDOCS%%%%DOCSDIR%%/acl.fig %%PORTDOCS%%%%DOCSDIR%%/architecture.txt +%%PORTDOCS%%%%DOCSDIR%%/configuration.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends-v0.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/be-fe-changes.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/buffers.fig +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/config-language.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/cttproxy-changes.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/how-it-works.txt +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http_load_time.url +%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/sess_par_sec.txt +%%PORTDOCS%%%%DOCSDIR%%/gpl.txt %%PORTDOCS%%%%DOCSDIR%%/haproxy-en.txt %%PORTDOCS%%%%DOCSDIR%%/haproxy-fr.txt -%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.cfg +%%PORTDOCS%%%%DOCSDIR%%/haproxy.1 +%%PORTDOCS%%%%DOCSDIR%%/internals/connect-status.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/connection-header.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/connection-scale.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/header-parser-speed.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/header-tree.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/http-docs.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/http-parsing.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/naming.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/repartition-be-fe-fi.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/stats-v2.txt +%%PORTDOCS%%%%DOCSDIR%%/internals/stream-sock-states.fig +%%PORTDOCS%%%%DOCSDIR%%/internals/todo.cttproxy +%%PORTDOCS%%%%DOCSDIR%%/lgpl.txt +%%PORTDOCS%%%%DOCSDIR%%/queuing.fig +%%PORTDOCS%%@dirrm %%DOCSDIR%%/internals +%%PORTDOCS%%@dirrm %%DOCSDIR%%/design-thoughts %%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PORTDOCS%%%%EXAMPLESDIR%%/acl-content-sw.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/auth.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/build.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/check +%%PORTDOCS%%%%EXAMPLESDIR%%/check.conf +%%PORTDOCS%%%%EXAMPLESDIR%%/config.rc.haproxy +%%PORTDOCS%%%%EXAMPLESDIR%%/content-sw-sample.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/cttproxy-src.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/debug2ansi +%%PORTDOCS%%%%EXAMPLESDIR%%/debug2html +%%PORTDOCS%%%%EXAMPLESDIR%%/debugfind +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/400.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/403.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/408.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/500.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/502.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/503.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/504.http +%%PORTDOCS%%%%EXAMPLESDIR%%/errorfiles/README +%%PORTDOCS%%%%EXAMPLESDIR%%/examples.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy-1.1.21-flx.1.pkg +%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.init +%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.spec +%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.vim +%%PORTDOCS%%%%EXAMPLESDIR%%/init.haproxy +%%PORTDOCS%%%%EXAMPLESDIR%%/init.haproxy.flx0 +%%PORTDOCS%%%%EXAMPLESDIR%%/linux-2.4.21-40.EL-custom.diff +%%PORTDOCS%%%%EXAMPLESDIR%%/option-http_proxy.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/rc.highsock +%%PORTDOCS%%%%EXAMPLESDIR%%/stats_haproxy.sh +%%PORTDOCS%%%%EXAMPLESDIR%%/tarpit.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/test-section-kw.cfg +%%PORTDOCS%%%%EXAMPLESDIR%%/url-switching.cfg +%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/errorfiles %%PORTDOCS%%@dirrm %%EXAMPLESDIR%% |