#!/bin/sh # This is the development version of haproxy with ssl, zlib, pcre. SRC_FETCH_PATH="http://git.formilux.org/?p=people/willy/haproxy-1.6.git;a=snapshot;h=v$PKGVER;sf=tgz" SRC_FETCH_METHOD="http" MAKEDEPENDS=( "pcre-*:::*.h *.so *.so.*" "openssl-*:::*.h *.so *.so.*" "libslz-*:::*.h *.a" "jemalloc-*:::*.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 above 1000 are aloha-specific or late backports. PATCH_LIST=" 0001-BUG-MINOR-http-fix-several-off-by-one-errors-in-the-.patch 0002-BUG-MINOR-http-Be-sure-to-process-all-the-data-recei.patch 0003-BUG-MINOR-chunk-make-chunk_dup-always-check-and-set-.patch 0004-MINOR-chunks-ensure-that-chunk_strcpy-adds-a-trailin.patch 0005-MINOR-chunks-add-chunk_strcat-and-chunk_newstr.patch 0006-MINOR-chunk-make-chunk_initstr-take-a-const-string.patch 0007-MINOR-lru-new-function-to-delete-nb-least-recently-u.patch 0008-DOC-add-Ben-Shillito-as-the-maintainer-of-51d.patch 0009-BUG-MINOR-51d-Ensures-a-unique-domain-for-each-confi.patch 0010-BUG-MINOR-51d-Aligns-Pattern-cache-implementation-wi.patch 0011-BUG-MINOR-51d-Releases-workset-back-to-pool.patch 0012-BUG-MINOR-51d-Aligned-const-pointers-to-changes-in-5.patch 0013-CLEANUP-51d-Aligned-if-statements-with-HAProxy-best-.patch 0014-DOC-fix-a-few-spelling-mistakes.patch 0015-DOC-fix-workaround-spelling.patch 0016-BUG-MINOR-examples-Fixing-haproxy.spec-to-remove-ref.patch 0017-MINOR-fix-the-return-type-for-dns_response_get_query.patch 0018-MINOR-server-state-missing-LF-n-on-error-message-pri.patch 0019-BUG-MEDIUM-dns-no-DNS-resolution-happens-if-no-ports.patch 0020-BUG-MAJOR-servers-state-server-port-is-erased-when-d.patch 0021-BUG-MEDIUM-servers-state-server-port-is-used-uniniti.patch 0022-BUG-MEDIUM-config-Adding-validation-to-stick-table-e.patch 0023-BUG-MEDIUM-sample-http_date-doesn-t-provide-the-righ.patch 0024-BUG-MEDIUM-channel-fix-miscalculation-of-available-b.patch 0025-MEDIUM-pools-add-a-new-flag-to-avoid-rounding-pool-s.patch 0026-BUG-MEDIUM-buffers-do-not-round-up-buffer-size-durin.patch 0027-BUG-MINOR-stream-don-t-force-retries-if-the-server-i.patch 0028-BUG-MINOR-counters-make-the-sc-inc-gpc0-and-sc-set-g.patch 0029-MINOR-unix-don-t-mention-free-ports-on-EAGAIN.patch 0030-BUG-CLEANUP-CLI-report-the-proper-field-states-in-sh.patch 0031-MINOR-stats-send-content-length-with-the-redirect-to.patch 0032-BUG-stream_interface-Reuse-connection-even-if-the-ou.patch 0033-DOC-remove-old-tunnel-mode-assumptions.patch 0034-BUG-MAJOR-http-reuse-fix-risk-of-orphaned-connection.patch 0035-BUG-MEDIUM-http-reuse-do-not-share-private-connectio.patch 0036-BUG-MINOR-ssl-Be-sure-to-use-unique-serial-for-regen.patch 0037-BUG-MINOR-stats-fix-missing-comma-in-stats-on-agent-.patch 0038-BUG-MINOR-lua-unsafe-initialization.patch 0039-DOC-lua-fix-somme-errors.patch 0040-DOC-add-server-name-at-rate-limit-sessions-example.patch 0041-BUG-MEDIUM-ssl-fix-off-by-one-in-ALPN-list-allocatio.patch 0042-BUG-MEDIUM-ssl-fix-off-by-one-in-NPN-list-allocation.patch 0043-DOC-LUA-fix-some-typos-and-syntax-errors.patch 0044-MINOR-cfgparse-warn-for-incorrect-timeout-retry-keyw.patch 0045-MINOR-mailers-increase-default-timeout-to-10-seconds.patch 0046-MINOR-mailers-use-CRLF-for-all-line-endings.patch " 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="-ljemalloc -lpthread -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 }-DDEFAULT_SSL_MAX_RECORD=2859" \ 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_SLZ=1 USE_NS=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 { # halog mkdir -p $ROOTDIR/usr/bin cp contrib/halog/halog $ROOTDIR/usr/bin/ mkdir -p $ROOTDIR/sbin/init.d cp $PKGDIR/add-ons/init.haproxy $ROOTDIR/sbin/init.d/haproxy chmod 755 $ROOTDIR/sbin/init.d/haproxy mkdir -p $ROOTDIR/usr/sbin cp haproxy $ROOTDIR/usr/sbin mkdir -p $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER cp doc/intro.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp doc/architecture.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp doc/management.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp doc/configuration.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp doc/network-namespaces.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp examples/debug2ansi examples/debug2html examples/debugfind $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ set_default_perm $ROOTDIR } function do_clean { $FLXMAKE clean rm -f contrib/halog/halog{,64} ( do_delpack ) return 0 }