From: Remi Gacogne Date: Tue, 16 Jan 2024 10:42:45 +0000 (+0100) Subject: dnsdist: Install libbpf and libxdp in our CI image X-Git-Tag: dnsdist-1.9.0-rc1^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c184b26aed67aebb7b0f45ddeb3b77db17115fbc;p=thirdparty%2Fpdns.git dnsdist: Install libbpf and libxdp in our CI image --- diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 2b97fd36f3..7528f78352 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -626,7 +626,7 @@ jobs: name: dnsdist-full-${{ matrix.sanitizers }}-${{ env.normalized-branch-name }} path: /opt/dnsdist - run: inv install-clang-runtime - - run: inv install-dnsdist-test-deps + - run: inv install-dnsdist-test-deps 'with-xdp' - run: inv test-dnsdist - run: inv generate-coverage-info /opt/dnsdist/bin/dnsdist $GITHUB_WORKSPACE if: ${{ env.COVERAGE == 'yes' && matrix.sanitizers != 'tsan' }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 38a0d87b5b..ea0493e729 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -147,7 +147,7 @@ jobs: - name: Install dependencies for dnsdist if: matrix.product == 'dnsdist' run: | - inv install-dnsdist-build-deps + inv install-dnsdist-build-deps --skipXDP=True - name: Autoreconf dnsdist if: matrix.product == 'dnsdist' working-directory: ./pdns/dnsdistdist/ diff --git a/tasks.py b/tasks.py index 599f769056..d8f54a91b0 100644 --- a/tasks.py +++ b/tasks.py @@ -84,6 +84,10 @@ dnsdist_build_deps = [ 'libre2-dev', 'libsnmp-dev', ] +dnsdist_xdp_build_deps = [ + 'libbpf-dev', + 'libxdp-dev', +] auth_test_deps = [ # FIXME: we should be generating some of these from shlibdeps in build 'authbind', 'bc', @@ -294,26 +298,30 @@ def install_rec_test_deps(c): # FIXME: rename this, we do way more than apt-get c.sudo('chmod 755 /var/agentx') @task -def install_dnsdist_test_deps(c): # FIXME: rename this, we do way more than apt-get - c.sudo('apt-get install -y \ - libluajit-5.1-2 \ - libboost-all-dev \ - libcap2 \ - libcdb1 \ - libcurl4-openssl-dev \ - libfstrm0 \ - libgnutls30 \ - libh2o-evloop0.13 \ - liblmdb0 \ - libnghttp2-14 \ - "libre2-[1-9]+" \ - libssl-dev \ - libsystemd0 \ - libsodium23 \ - lua-socket \ - patch \ - protobuf-compiler \ - python3-venv snmpd prometheus') +def install_dnsdist_test_deps(c, xdp=True): # FIXME: rename this, we do way more than apt-get + deps = 'libluajit-5.1-2 \ + libboost-all-dev \ + libcap2 \ + libcdb1 \ + libcurl4-openssl-dev \ + libfstrm0 \ + libgnutls30 \ + libh2o-evloop0.13 \ + liblmdb0 \ + libnghttp2-14 \ + "libre2-[1-9]+" \ + libssl-dev \ + libsystemd0 \ + libsodium23 \ + lua-socket \ + patch \ + protobuf-compiler \ + python3-venv snmpd prometheus' + if xdp: + deps = deps + 'libbpf1 \ + libxdp1' + + c.sudo(f'apt-get install -y {deps}') c.run('sed "s/agentxperms 0700 0755 dnsdist/agentxperms 0777 0755/g" regression-tests.dnsdist/snmpd.conf | sudo tee /etc/snmp/snmpd.conf') c.sudo('/etc/init.d/snmpd restart') time.sleep(5) @@ -323,9 +331,9 @@ def install_dnsdist_test_deps(c): # FIXME: rename this, we do way more than apt- def install_rec_build_deps(c): c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + rec_build_deps)) -@task -def install_dnsdist_build_deps(c): - c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + dnsdist_build_deps)) +@task(optional=['skipXDP']) +def install_dnsdist_build_deps(c, skipXDP=False): + c.sudo('apt-get install -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + dnsdist_build_deps + dnsdist_xdp_build_deps if not skipXDP else [])) @task def ci_autoconf(c):