From cff6d757e3ba609c08ef2aaa00f07e53551e5bf6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 3 Jun 2024 07:11:10 +0200 Subject: Adding upstream version 3.0.0. Signed-off-by: Daniel Baumann --- .github/workflows/aws-lc.yml | 2 +- .github/workflows/codespell.yml | 3 ++- .github/workflows/compliance.yml | 2 +- .github/workflows/fedora-rawhide.yml | 18 ++++++++----- .github/workflows/illumos.yml | 23 +++++++++++++++++ .github/workflows/musl.yml | 2 +- .github/workflows/netbsd.yml | 23 +++++++++++++++++ .github/workflows/vtest.yml | 49 +++++++++++++++++++++--------------- .github/workflows/windows.yml | 2 +- 9 files changed, 93 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/illumos.yml create mode 100644 .github/workflows/netbsd.yml (limited to '.github/workflows') diff --git a/.github/workflows/aws-lc.yml b/.github/workflows/aws-lc.yml index e590000..4384116 100644 --- a/.github/workflows/aws-lc.yml +++ b/.github/workflows/aws-lc.yml @@ -36,7 +36,7 @@ jobs: make -j$(nproc) CC=gcc TARGET=linux-glibc \ USE_OPENSSL_AWSLC=1 USE_QUIC=1 \ SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include \ - DEBUG="-DDEBUG_STRICT -DDEBUG_MEMORY_POOLS -DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY" \ ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" sudo make install - name: Show HAProxy version diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 3d66f29..385b698 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -17,4 +17,5 @@ jobs: - uses: codespell-project/actions-codespell@master with: skip: CHANGELOG,Makefile,*.fig,*.pem,./doc/design-thoughts,./doc/internals - ignore_words_list: ist,ists,hist,wan,ca,cas,que,ans,te,nd,referer,ot,uint,iif,fo,keep-alives,dosen,ifset,thrid,strack,ba,chck,hel,unx,mor,clen + ignore_words_list: ist,ists,hist,wan,ca,cas,que,ans,te,nd,referer,ot,uint,iif,fo,keep-alives,dosen,ifset,thrid,strack,ba,chck,hel,unx,mor,clen,collet,bu,htmp,siz,experim + uri_ignore_words_list: trafic,ressources diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index caf9624..29af0a9 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -34,7 +34,7 @@ jobs: ERR=1 \ TARGET=${{ matrix.TARGET }} \ CC=${{ matrix.CC }} \ - DEBUG="-DDEBUG_STRICT -DDEBUG_MEMORY_POOLS -DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY" \ USE_OPENSSL=1 sudo make install - name: Show HAProxy version diff --git a/.github/workflows/fedora-rawhide.yml b/.github/workflows/fedora-rawhide.yml index 1bb2745..3035219 100644 --- a/.github/workflows/fedora-rawhide.yml +++ b/.github/workflows/fedora-rawhide.yml @@ -11,8 +11,13 @@ jobs: build_and_test: strategy: matrix: - cc: [ gcc, clang ] - name: ${{ matrix.cc }} + platform: [ + { name: x64, cc: gcc, QUICTLS_EXTRA_ARGS: "", ADDLIB_ATOMIC: "", ARCH_FLAGS: "" }, + { name: x64, cc: clang, QUICTLS_EXTRA_ARGS: "", ADDLIB_ATOMIC: "", ARCH_FLAGS: "" }, + { name: x86, cc: gcc, QUICTLS_EXTRA_ARGS: "-m32 linux-generic32", ADDLIB_ATOMIC: "-latomic", ARCH_FLAGS: "-m32" }, + { name: x86, cc: clang, QUICTLS_EXTRA_ARGS: "-m32 linux-generic32", ADDLIB_ATOMIC: "-latomic", ARCH_FLAGS: "-m32" } + ] + name: ${{ matrix.platform.cc }}.${{ matrix.platform.name }} runs-on: ubuntu-latest if: ${{ github.repository_owner == 'haproxy' }} container: @@ -21,20 +26,21 @@ jobs: - uses: actions/checkout@v4 - name: Install dependencies run: | - dnf -y install git pcre-devel zlib-devel pcre2-devel 'perl(FindBin)' perl-IPC-Cmd 'perl(File::Copy)' 'perl(File::Compare)' lua-devel socat findutils systemd-devel clang + dnf -y install diffutils git pcre-devel zlib-devel pcre2-devel 'perl(FindBin)' perl-IPC-Cmd 'perl(File::Copy)' 'perl(File::Compare)' lua-devel socat findutils systemd-devel clang + dnf -y install 'perl(FindBin)' 'perl(File::Compare)' perl-IPC-Cmd 'perl(File::Copy)' glibc-devel.i686 lua-devel.i686 lua-devel.x86_64 systemd-devel.i686 zlib-ng-compat-devel.i686 pcre-devel.i686 libatomic.i686 - name: Install VTest run: scripts/build-vtest.sh - name: Install QuicTLS - run: QUICTLS=yes scripts/build-ssl.sh + run: QUICTLS=yes QUICTLS_EXTRA_ARGS="${{ matrix.platform.QUICTLS_EXTRA_ARGS }}" scripts/build-ssl.sh - name: Build contrib tools run: | make admin/halog/halog make dev/flags/flags make dev/poll/poll make dev/hpack/decode dev/hpack/gen-enc dev/hpack/gen-rht - - name: Compile HAProxy with ${{ matrix.cc }} + - name: Compile HAProxy with ${{ matrix.platform.cc }} run: | - make -j3 CC=${{ matrix.cc }} V=1 ERR=1 TARGET=linux-glibc USE_OPENSSL=1 USE_QUIC=1 USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_SYSTEMD=1 ADDLIB="-Wl,-rpath,${HOME}/opt/lib" SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include + make -j3 CC=${{ matrix.platform.cc }} V=1 ERR=1 TARGET=linux-glibc USE_OPENSSL=1 USE_QUIC=1 USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_SYSTEMD=1 ADDLIB="${{ matrix.platform.ADDLIB_ATOMIC }} -Wl,-rpath,${HOME}/opt/lib" SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include ARCH_FLAGS="${{ matrix.platform.ARCH_FLAGS }}" make install - name: Show HAProxy version id: show-version diff --git a/.github/workflows/illumos.yml b/.github/workflows/illumos.yml new file mode 100644 index 0000000..0259bf1 --- /dev/null +++ b/.github/workflows/illumos.yml @@ -0,0 +1,23 @@ +name: Illumos + +on: + schedule: + - cron: "0 0 25 * *" + +jobs: + gcc: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' }} + permissions: + contents: read + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + + - name: "Build on VM" + uses: vmactions/solaris-vm@v1 + with: + prepare: | + pkg install gcc make + run: | + gmake CC=gcc TARGET=solaris USE_OPENSSL=1 USE_PROMEX=1 diff --git a/.github/workflows/musl.yml b/.github/workflows/musl.yml index 930a22e..a54414f 100644 --- a/.github/workflows/musl.yml +++ b/.github/workflows/musl.yml @@ -26,7 +26,7 @@ jobs: - name: Install VTest run: scripts/build-vtest.sh - name: Build - run: make -j$(nproc) TARGET=linux-musl DEBUG_CFLAGS='-ggdb3' CC=cc V=1 USE_LUA=1 LUA_INC=/usr/include/lua5.3 LUA_LIB=/usr/lib/lua5.3 USE_OPENSSL=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_PROMEX=1 + run: make -j$(nproc) TARGET=linux-musl ARCH_FLAGS='-ggdb3' CC=cc V=1 USE_LUA=1 LUA_INC=/usr/include/lua5.3 LUA_LIB=/usr/lib/lua5.3 USE_OPENSSL=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_PROMEX=1 - name: Show version run: ./haproxy -vv - name: Show linked libraries diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml new file mode 100644 index 0000000..6514725 --- /dev/null +++ b/.github/workflows/netbsd.yml @@ -0,0 +1,23 @@ +name: NetBSD + +on: + schedule: + - cron: "0 0 25 * *" + +jobs: + gcc: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'haproxy' }} + permissions: + contents: read + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + + - name: "Build on VM" + uses: vmactions/netbsd-vm@v1 + with: + prepare: | + /usr/sbin/pkg_add gmake curl + run: | + gmake CC=gcc TARGET=netbsd USE_OPENSSL=1 USE_LUA=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_PROMEX=1 USE_ZLIB=1 diff --git a/.github/workflows/vtest.yml b/.github/workflows/vtest.yml index d0e4ec3..284bff7 100644 --- a/.github/workflows/vtest.yml +++ b/.github/workflows/vtest.yml @@ -42,13 +42,18 @@ jobs: # Configure a short TMPDIR to prevent failures due to long unix socket # paths. TMPDIR: /tmp - # Force ASAN output into asan.log to make the output more readable. - ASAN_OPTIONS: log_path=asan.log OT_CPP_VERSION: 1.6.0 steps: - uses: actions/checkout@v4 with: fetch-depth: 100 + + - name: Setup coredumps + if: ${{ startsWith(matrix.os, 'ubuntu-') }} + run: | + sudo sysctl -w fs.suid_dumpable=1 + sudo sysctl kernel.core_pattern=/tmp/core.%h.%e.%t + # # Github Action cache key cannot contain comma, so we calculate it based on job name # @@ -57,17 +62,6 @@ jobs: run: | echo "key=$(echo ${{ matrix.name }} | sha256sum | awk '{print $1}')" >> $GITHUB_OUTPUT - -# -# temporary hack -# should be revisited after https://github.com/actions/runner-images/issues/9491 is resolved -# - - - name: Setup enthropy - if: ${{ startsWith(matrix.os, 'ubuntu-') }} - run: | - sudo sysctl vm.mmap_rnd_bits=28 - - name: Cache SSL libs if: ${{ matrix.ssl && matrix.ssl != 'stock' && matrix.ssl != 'BORINGSSL=yes' && matrix.ssl != 'QUICTLS=yes' }} id: cache_ssl @@ -92,7 +86,8 @@ jobs: libpcre2-dev \ libsystemd-dev \ ninja-build \ - socat + socat \ + gdb - name: Install brew dependencies if: ${{ startsWith(matrix.os, 'macos-') }} run: | @@ -123,7 +118,7 @@ jobs: ERR=1 \ TARGET=${{ matrix.TARGET }} \ CC=${{ matrix.CC }} \ - DEBUG="-DDEBUG_STRICT -DDEBUG_MEMORY_POOLS -DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY" \ ${{ join(matrix.FLAGS, ' ') }} \ ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" sudo make install @@ -150,11 +145,16 @@ jobs: # This is required for macOS which does not actually allow to increase # the '-n' soft limit to the hard limit, thus failing to run. ulimit -n 65536 + ulimit -c unlimited make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel - name: Config syntax check memleak smoke testing if: ${{ contains(matrix.name, 'ASAN') }} run: | - ./haproxy -f .github/h2spec.config -c + ./haproxy -dI -f .github/h2spec.config -c + ./haproxy -dI -f examples/content-sw-sample.cfg -c + ./haproxy -dI -f examples/option-http_proxy.cfg -c + ./haproxy -dI -f examples/quick-test.cfg -c + ./haproxy -dI -f examples/transparent_proxy.cfg -c - name: Show VTest results if: ${{ failure() && steps.vtest.outcome == 'failure' }} run: | @@ -164,10 +164,19 @@ jobs: cat $folder/LOG echo "::endgroup::" done + exit 1 + + - name: Show coredumps + if: ${{ failure() && steps.vtest.outcome == 'failure' }} + run: | + failed=false shopt -s nullglob - for asan in asan.log*; do - echo "::group::$asan" - cat $asan + for file in /tmp/core.*; do + failed=true + printf "::group::" + gdb -ex 'thread apply all bt full' ./haproxy $file echo "::endgroup::" done - exit 1 + if [ "$failed" = true ]; then + exit 1; + fi diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b020d7c..29ad16f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -58,7 +58,7 @@ jobs: ERR=1 \ TARGET=${{ matrix.TARGET }} \ CC=${{ matrix.CC }} \ - DEBUG="-DDEBUG_STRICT -DDEBUG_MEMORY_POOLS -DDEBUG_POOL_INTEGRITY" \ + DEBUG="-DDEBUG_POOL_INTEGRITY" \ ${{ join(matrix.FLAGS, ' ') }} - name: Show HAProxy version id: show-version -- cgit v1.2.3