[PATCH] CLEANUP: src/log.c: remove duplicate '!logline_rfc5424'
From: Ilya Shipitsin --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index ef999d13..7f966f19 100644 --- a/src/log.c +++ b/src/log.c @@ -1868,7 +1868,7 @@ int init_log_buffers() logheader_rfc5424_end = NULL; logline = my_realloc2(logline, global.max_syslog_len + 1); logline_rfc5424 = my_realloc2(logline_rfc5424, global.max_syslog_len + 1); - if (!logheader || !logline_rfc5424 || !logline || !logline_rfc5424) + if (!logheader || !logline_rfc5424 || !logline) return 0; return 1; } -- 2.20.1
[PATCH v2] BUILD: add sanitizers to travis-ci builds
From: Ilya Shipitsin full list of changes: use TARGET=osx instead of generic for osx builds, add USE_PCRE_JIT=1, USE_GETADDRINFO=1 to build matrix, enable address sanitizer for clang --- v2 skip sanitizer on linux-ppc64le .travis.yml | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 530d1682..9b724dfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ language: c env: global: -- FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_LUA=1 USE_OPENSSL=1" +- FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_GETADDRINFO=1" - SSL_LIB=${HOME}/opt/lib - SSL_INC=${HOME}/opt/include - TMPDIR=/tmp @@ -28,32 +28,32 @@ matrix: compiler: gcc env: TARGET=linux2628 OPENSSL_VERSION=1.1.1b LABEL="linux-ppc64le" - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.1.1b - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.1.0j - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.0.2r - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 LIBRESSL_VERSION=2.9.1 - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 LIBRESSL_VERSION=2.8.3 - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 BORINGSSL=yes - os: linux compiler: clang env: TARGET=linux2628 FLAGS= - os: osx compiler: clang -env: TARGET=generic FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b +env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b install: - git clone https://github.com/VTest/VTest.git ../vtest @@ -62,7 +62,8 @@ install: - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1) script: - - make CC=$CC V=1 TARGET=$TARGET $FLAGS + - if [ "${CC}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi + - make CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi - ./haproxy -vv -- 2.20.1
[PATCH] BUILD: add sanitizers to travis-ci builds
From: Ilya Shipitsin full list of changes: use TARGET=osx instead of generic for osx builds, add USE_PCRE_JIT=1, USE_GETADDRINFO=1 to build matrix, enable address sanitizer for clang --- .travis.yml | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 530d1682..9299cf13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ language: c env: global: -- FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_LUA=1 USE_OPENSSL=1" +- FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_GETADDRINFO=1" - SSL_LIB=${HOME}/opt/lib - SSL_INC=${HOME}/opt/include - TMPDIR=/tmp @@ -25,35 +25,35 @@ matrix: compiler: gcc env: TARGET=linux2628 FLAGS= - os: linux-ppc64le -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.1.1b LABEL="linux-ppc64le" - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.1.1b - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.1.0j - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 OPENSSL_VERSION=1.0.2r - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 LIBRESSL_VERSION=2.9.1 - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 LIBRESSL_VERSION=2.8.3 - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 - os: linux -compiler: gcc +compiler: clang env: TARGET=linux2628 BORINGSSL=yes - os: linux compiler: clang env: TARGET=linux2628 FLAGS= - os: osx compiler: clang -env: TARGET=generic FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b +env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b install: - git clone https://github.com/VTest/VTest.git ../vtest @@ -62,7 +62,8 @@ install: - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1) script: - - make CC=$CC V=1 TARGET=$TARGET $FLAGS + - if [ "${CC}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi + - make CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi - ./haproxy -vv -- 2.20.1
[PATCH] BUILD: make TMPDIR global variable in travis-ci in order to show reg-tests errors
From: Ilya Shipitsin v2, rebased to master --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c00725d8..530d1682 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: - FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_LUA=1 USE_OPENSSL=1" - SSL_LIB=${HOME}/opt/lib - SSL_INC=${HOME}/opt/include +- TMPDIR=/tmp addons: apt: @@ -67,11 +68,11 @@ script: - ./haproxy -vv - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi - - env TMPDIR=/tmp VTEST_PROGRAM=../vtest/vtest make reg-tests + - env VTEST_PROGRAM=../vtest/vtest make reg-tests after_failure: - | -for folder in ${TMPDIR:-/tmp}/*regtest*/vtc.*; do +for folder in ${TMPDIR}/*regtest*/vtc.*; do cat $folder/INFO cat $folder/LOG done -- 2.20.1
[PATCH] BUILD: make TMPDIR global variable in travis-ci in order to show reg-tests errors
From: Ilya Shipitsin --- .travis.yml | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9a13586..530d1682 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: - FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_LUA=1 USE_OPENSSL=1" - SSL_LIB=${HOME}/opt/lib - SSL_INC=${HOME}/opt/include +- TMPDIR=/tmp addons: apt: @@ -44,6 +45,9 @@ matrix: - os: linux compiler: gcc env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 + - os: linux +compiler: gcc +env: TARGET=linux2628 BORINGSSL=yes - os: linux compiler: clang env: TARGET=linux2628 FLAGS= @@ -64,11 +68,11 @@ script: - ./haproxy -vv - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi - - env TMPDIR=/tmp VTEST_PROGRAM=../vtest/vtest make reg-tests + - env VTEST_PROGRAM=../vtest/vtest make reg-tests after_failure: - | -for folder in ${TMPDIR:-/tmp}/*regtest*/vtc.*; do +for folder in ${TMPDIR}/*regtest*/vtc.*; do cat $folder/INFO cat $folder/LOG done -- 2.20.1
[PATCH] BUILD: add BoringSSL to travis-ci build matrix
From: Ilya Shipitsin --- .travis.yml | 3 +++ scripts/build-ssl.sh | 19 +++ 2 files changed, 22 insertions(+) diff --git a/.travis.yml b/.travis.yml index f9a13586..c00725d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,9 @@ matrix: - os: linux compiler: gcc env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 + - os: linux +compiler: gcc +env: TARGET=linux2628 BORINGSSL=yes - os: linux compiler: clang env: TARGET=linux2628 FLAGS= diff --git a/scripts/build-ssl.sh b/scripts/build-ssl.sh index a8863ed3..68312c63 100755 --- a/scripts/build-ssl.sh +++ b/scripts/build-ssl.sh @@ -66,4 +66,23 @@ if [ ! -z ${OPENSSL_VERSION+x} ]; then build_openssl fi +if [ ! -z ${BORINGSSL+x} ]; then + ( + git clone --depth=1 https://boringssl.googlesource.com/boringssl + cd boringssl + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=1 .. + make + + rm -rf ${SSL_LIB} || exit 0 + rm -rf ${SSL_INC} || exit 0 + + mkdir -p ${SSL_LIB} + cp crypto/libcrypto.so ssl/libssl.so ${SSL_LIB} + + mkdir -p ${SSL_INC} + mv ../include/* ${SSL_INC} + ) +fi -- 2.20.1
[PATCH 1/1] BUILD: travis-ci bugfixes and improvements
From: Ilya Shipitsin Call missing scripts/build-ssl.sh (which actually builds SSL variants) Enable OpenSSL, LibreSSL builds caching, it saves a bunch of time LibreSSL builds are not allowed to fail anymore Add openssl to osx builds --- .travis.yml | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87331fc2..f9a13586 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,11 @@ addons: apt: packages: [ liblua5.3-dev ] +cache: + directories: + - download-cache + - ${HOME}/opt + matrix: include: - os: linux @@ -44,22 +49,13 @@ matrix: env: TARGET=linux2628 FLAGS= - os: osx compiler: clang -env: TARGET=generic FLAGS= - allow_failures: - - os: linux -compiler: gcc -env: TARGET=linux2628 LIBRESSL_VERSION=2.9.1 - - os: linux -compiler: gcc -env: TARGET=linux2628 LIBRESSL_VERSION=2.8.3 - - os: linux -compiler: gcc -env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 +env: TARGET=generic FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b install: - git clone https://github.com/VTest/VTest.git ../vtest # Special flags due to: https://github.com/vtest/VTest/issues/12 - make -C ../vtest FLAGS="-O2 -s -Wall" + - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1) script: - make CC=$CC V=1 TARGET=$TARGET $FLAGS -- 2.20.1
[PATCH 0/1] travis-ci improvements and bugfixes
From: Ilya Shipitsin Added scripts/build-ssl.sh (without that script we were using openssl-1.0.2) LibreSSL builds are not allowed to fail anymore Enabled OpenSSL, LibreSSL build caching Enabled openssl for osx builds Ilya Shipitsin (1): BUILD: travis-ci bugfixes and improvements .travis.yml | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) -- 2.20.1