network/haproxy: Added PCRE2 JIT and QUIC support.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
103e41bdab
commit
b841b3c68e
|
@ -7,9 +7,5 @@ Note that a default configuration file is no longer provided at
|
|||
for some sample configuration files. The directory also contains
|
||||
example files for logging.
|
||||
|
||||
lua53 is an optional dependency for HAProxy.
|
||||
Pass LUA=yes to this script to enable lua support.
|
||||
|
||||
This HAProxy package is compiled with Perl Compatible
|
||||
Regular Expressions (PCRE) version 2 by default.
|
||||
If you want to use PCRE version 1, pass OLDPCRE=yes to this script.
|
||||
The script supports optional variables for Lua, PCRE and QUIC.
|
||||
See README.SLACKWARE for more information.
|
||||
|
|
|
@ -1,3 +1,43 @@
|
|||
--------
|
||||
Compiling, optional dependencies and variables
|
||||
--------
|
||||
|
||||
This SlackBuild script supports additional variables.
|
||||
|
||||
1) Lua support
|
||||
|
||||
Lua is an optional dependency. Pass LUA=yes to this script
|
||||
to enable Lua support.
|
||||
|
||||
2) Custom Perl Compatible Regular Expressions
|
||||
|
||||
Perl Compatible Regular Expressions version 2 without JIT
|
||||
support is enabled by default. You can change this by passing
|
||||
PCRE= to this script.
|
||||
|
||||
Currently supported settings are listed in the Makefile.
|
||||
|
||||
For example:
|
||||
* Use PCRE=PCRE2_JIT to use libpcre2 with JIT support.
|
||||
* Use PCRE=PCRE to use libpcre version 1.
|
||||
|
||||
You can also use the variables as they're written in the
|
||||
Makefile, such as PCRE=USE_PCRE_JIT or PCRE=USE_PCRE=1.
|
||||
The script will parse them correctly.
|
||||
|
||||
3) QUIC support (experimental)
|
||||
|
||||
Starting with version 2.6.0, HAProxy supports HTTP/3 over QUIC.
|
||||
The QUIC support is currently experimental and requires QUICTLS.
|
||||
OpenSSL package shipped with Slackware 15.0 is not compatible
|
||||
with QUIC.
|
||||
|
||||
Pass QUIC=yes to this script to enable HTTP/3 support.
|
||||
|
||||
Check out these links for more information:
|
||||
* https://github.com/quictls/
|
||||
* https://www.haproxy.com/blog/announcing-haproxy-2-6/
|
||||
|
||||
--------
|
||||
Logging
|
||||
--------
|
||||
|
@ -8,7 +48,7 @@ on how to enable logging and how to select which events to log.
|
|||
HAProxy log forwarding works fine with Slackware's sysklogd.
|
||||
|
||||
There are example files located in /usr/doc/haproxy-*/examples
|
||||
The files are called syslog.example and logrotate.example.
|
||||
The files are called syslog.example and logrotate.example.
|
||||
|
||||
You might want to add something like this to your haproxy.cfg file:
|
||||
|
||||
|
@ -16,7 +56,7 @@ global
|
|||
log /dev/log local0
|
||||
|
||||
Note that rotating logs does not require restarting HAProxy.
|
||||
Instead, logrotate script should send a HUP signal to syslogger
|
||||
Instead, logrotate script should send a HUP signal to syslogger
|
||||
when rotating. Example script is included in syslog.example.
|
||||
Rotating has been tested with sysklogd (Slackware default) and
|
||||
syslog-ng.
|
||||
|
@ -25,7 +65,7 @@ syslog-ng.
|
|||
Automatic starting/stopping upon system start/shutdown
|
||||
--------
|
||||
|
||||
To start HAProxy automatically when system is booted,
|
||||
To start HAProxy automatically when system is booted,
|
||||
add the following lines to /etc/rc.d/rc.local:
|
||||
|
||||
if [ -x /etc/rc.d/rc.haproxy ]; then
|
||||
|
@ -43,13 +83,12 @@ to /etc/rc.d/rc.local_shutdown
|
|||
Privileges
|
||||
--------
|
||||
|
||||
Like with the most rc scripts /etc/rc.d/rc.haproxy should be
|
||||
run as root. You can easily drop process privileges by specifying
|
||||
another user (and group) in the main configuration file.
|
||||
Like with the most rc scripts /etc/rc.d/rc.haproxy should be
|
||||
run as root. You can easily drop process privileges by specifying
|
||||
another user (and group) in the main configuration file.
|
||||
|
||||
Add something like this to haproxy.cfg:
|
||||
|
||||
global
|
||||
user nobody
|
||||
group nogroup
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PRGNAM=haproxy
|
||||
VERSION=${VERSION:-2.6.2}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -71,12 +71,14 @@ fi
|
|||
# use 'generic' instead
|
||||
TARGET=${TARGET:-linux-glibc}
|
||||
|
||||
# Include lua support? (Requires lua53)
|
||||
# Include lua support? (Requires lua)
|
||||
LUA=${LUA:-no}
|
||||
# Perl Compatible Regular Expressions version 2
|
||||
# is enabled by default. You can't compile both
|
||||
# PCRE and PCRE2 support.
|
||||
OLDPCRE=${OLDPCRE:-no}
|
||||
# Perl Compatible Regular Expressions version 2 is enabled by default.
|
||||
# You might want to use libpcre1 and/or JIT-enabled version instead.
|
||||
PCRE=${PCRE:-PCRE2}
|
||||
# Include QUIC (HTTP/3) support? (experimental).
|
||||
# This requires QUICTLS.
|
||||
QUIC=${QUIC:-no}
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -101,16 +103,23 @@ else
|
|||
fi
|
||||
|
||||
PCREOPT=""
|
||||
if [ "$OLDPCRE" == "yes" ]; then
|
||||
PCREOPT="USE_PCRE=1"
|
||||
if [ "$PCRE" != "PCRE2" ]; then
|
||||
PCREOPT=$(echo $PCRE | sed -e 's/USE_//' -e 's/=1//')
|
||||
else
|
||||
PCREOPT="USE_PCRE2=1"
|
||||
PCREOPT="PCRE2"
|
||||
fi
|
||||
|
||||
QUICOPT=""
|
||||
if [ "$QUIC" == "yes" ]; then
|
||||
LUAOPT="USE_QUIC=1"
|
||||
else
|
||||
LUAOPT="USE_QUIC="
|
||||
fi
|
||||
|
||||
make \
|
||||
TARGET=$TARGET \
|
||||
$PCREOPT \
|
||||
USE_$PCREOPT=1 \
|
||||
$QUICOPT \
|
||||
USE_OPENSSL=1 \
|
||||
USE_ENGINE=1 \
|
||||
USE_ZLIB=1 \
|
||||
|
|
Loading…
Reference in New Issue