#!/bin/sh # This is the development version of httpterm rebased on haproxy 1.6 to support # keep-alive and SSL. SRC_FETCH_PATH="http://haproxy.1wt.eu/download/1.6/src/snapshot/haproxy-ss-20141203.tar.gz" SRC_FETCH_METHOD="http" MAKEDEPENDS=( "pcre-*:::*.a *.h *.so *.so.*" "openssl-*:::*.h *.so *.so.*" "zlib-*:::*.h *.so *.so.*") # Note : PCRE is enabled. PCRE is statically built for x86_64 models # This pkg is built with smaller options allowing it to support a higher number # of simultaneous connections, typically 5000 with 256 MB memory including the # sockets and the system, or 40000 with 1 GB RAM. # Patches below 1000 are bugfixes and initial backports. # Patches in series 1000 are various improvements # Patches in series 2000 are dynamic buffer management # Patches in series 3000 are httpterm-specific PATCH_LIST=" 0001-BUG-MINOR-tcp-check-don-t-condition-data-polling-on-.patch 0002-BUG-MEDIUM-tcp-check-don-t-rely-on-random-memory-con.patch 0003-BUG-MEDIUM-tcp-checks-disable-quick-ack-unless-next-.patch 1000-add-dlmalloc.patch 1002-fix-dlmalloc-mremap.patch 2000-MINOR-buffers-reset-a-buffer-in-b_reset-and-not-chan.patch 2001-MEDIUM-buffers-use-b_alloc-to-allocate-and-initializ.patch 2002-MINOR-buffers-move-buffer-initialization-after-chann.patch 2003-MINOR-buffers-only-use-b_free-to-release-buffers.patch 2004-MEDIUM-buffers-always-assign-a-dummy-empty-buffer-to.patch 2005-MEDIUM-buffers-add-a-new-buf_wanted-dummy-buffer-to-.patch 2006-MEDIUM-channel-do-not-report-full-when-buf_empty-is-.patch 2007-MINOR-sessions-group-buffer-allocations-together.patch 2008-MEDIUM-buffer-implement-b_alloc_single-and-b_alloc_p.patch 2009-MEDIUM-session-implement-a-basic-atomic-buffer-alloc.patch 2010-MAJOR-session-implement-a-wait-queue-for-sessions-wh.patch 2011-MINOR-stream-int-retrieve-session-pointer-from-strea.patch 2012-MAJOR-session-only-allocate-buffers-when-needed.patch 2013-MAJOR-session-only-wake-up-as-many-sessions-as-avail.patch 2014-OPTIM-session-inline-the-fast-code-of-session_offer_.patch 2015-MINOR-stats-report-a-waiting-flags-for-sessions.patch 2016-MEDIUM-memory-improve-pool_refill_alloc-to-pass-a-re.patch 2017-MINOR-memory-implement-pool_fast_alloc2.patch 2018-MINOR-buffers-implement-b_fast_alloc.patch 2019-MEDIUM-buffers-make-b_alloc_single-use-b_fast_alloc.patch 3000-MAJOR-httpterm-create-a-listener-on-the-fly-on-L.patch 3001-MAJOR-httpterm-include-a-copy-paste-of-the-stats-app.patch 3002-MAJOR-httpterm-basic-header-only-features.patch 3003-MAJOR-httpterm-implement-adjustable-response-size.patch 3004-EXP-channel-implement-a-zero-copy-buffer-transfer.patch 3005-EXP-httpterm-implement-zero-copy-to-send-the-output-.patch 3006-EXP-support-splicing-all-the-time.patch 3007-MEDIUM-httpterm-simplify-the-cmdline-parser.patch 3008-MEDIUM-httpterm-enable-splicing-by-default-and-tune-.patch 3009-MEDIUM-stream-int-support-splicing-from-applets.patch 3010-OPTIM-stream-int-try-to-send-pending-spliced-data.patch " ### Mainline: f3d3482c984593b21a6d3de6d66a83a338316b85 (v1.6-dev0-152) FILE_LIST= HAPROXY_VERSION="${PKGVER}" HAPROXY_SUBVERS="-${DISTVER}_${VERSFX}" HAPROXY_DATE="$(date +%Y/%m/%d)" function do_compile_only { # halog ( cd contrib/halog $FLXMAKE CC=$CC halog ) # haproxy case "$FLX_ARCH_SMALL" in i?86) REGPARM=1 ; VSYSCALL=1 ; FUTEX=1 ;; x86*) REGPARM=1 ; VSYSCALL= ; FUTEX=1 ;; *) REGPARM= ; VSYSCALL= ; FUTEX= ;; esac # splice() was introduced in glibc-2.6 # accept4() was introduced in glibc-2.10 case "$(readlink $FLXROOTDIR/lib/libc.so.?)" in libc-2.[0-5].*) MY_SPLICE=1 ; MY_ACCEPT4=1 ;; libc-2.[6-9].*) MY_SPLICE= ; MY_ACCEPT4=1 ;; libc-2.1*.*) MY_SPLICE= ; MY_ACCEPT4= ;; *) MY_SPLICE= ;; esac if [ -z "${FLXARCH##arm*}" ]; then USE_ACCEPT4= else USE_ACCEPT4=implicit fi SYSTEM_MAXCONN= ; DEFAULT_MAXCONN=10000 ; MEMMAX= $FLXPMAKE CC="$CC" EXTRA= \ ADDLIB=-ldl LDFLAGS="\$(ARCH_FLAGS) -g" \ TARGET=linux2628 USE_PCRE=1 PCREDIR=$FLXROOTDIR/usr \ SMALL_OPTS="${SYSTEM_MAXCONN:+-DSYSTEM_MAXCONN=$SYSTEM_MAXCONN }${DEFAULT_MAXCONN:+-DDEFAULT_MAXCONN=$DEFAULT_MAXCONN }-DBUFSIZE=8030 -DMAXREWRITE=1030" \ USE_MY_SPLICE=${MY_SPLICE} USE_ACCEPT4=${USE_ACCEPT4} USE_MY_ACCEPT4=${MY_ACCEPT4} USE_TFO=1 \ USE_REGPARM=${REGPARM} USE_VSYSCALL=${VSYSCALL} \ USE_OPENSSL=1 USE_FUTEX=${FUTEX} USE_ZLIB=1 USE_DLMALLOC=1 \ SILENT_DEFINE="-DLISTEN_DEFAULT_CIPHERS=\"\\\"AES:RC4:ALL:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2\\\"\" \ -DCONNECT_DEFAULT_CIPHERS=\"\\\"AES:RC4:ALL:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2\\\"\"" } function do_prepack { mkdir -p $ROOTDIR/usr/sbin ; cp haproxy $ROOTDIR/usr/sbin/httpterm2 set_default_perm $ROOTDIR } function do_clean { $FLXMAKE clean rm -f contrib/halog/halog{,64} ( do_delpack ) return 0 }