]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - tasks.py
Merge pull request #13101 from romeroalx/add-make-distdir
[thirdparty/pdns.git] / tasks.py
index 426a428f3b2eefb019651754ca941c2c5472c088..bfac782ce84bcd05ea7e3a3fa3ebc12fbe371472 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -8,6 +8,7 @@ import time
 auth_backend_ip_addr = os.getenv('AUTH_BACKEND_IP_ADDR', '127.0.0.1')
 
 clang_version = os.getenv('CLANG_VERSION', '13')
+rust_version = 'rust-1.72.0-x86_64-unknown-linux-gnu'
 
 all_build_deps = [
     'ccache',
@@ -90,7 +91,6 @@ auth_test_deps = [   # FIXME: we should be generating some of these from shlibde
     'curl',
     'default-jre-headless',
     'dnsutils',
-    'docker-compose',
     'faketime',
     'gawk',
     'krb5-user',
@@ -170,6 +170,10 @@ def install_clang_runtime(c):
     # this gives us the symbolizer, for symbols in asan/ubsan traces
     c.sudo(f'apt-get -y --no-install-recommends install clang-{clang_version}')
 
+@task
+def ci_install_rust(c, repo):
+    c.sudo(f'{repo}/builder-support/helpers/install_rust.sh {rust_version}')
+
 def install_libdecaf(c, product):
     c.run('git clone https://git.code.sf.net/p/ed448goldilocks/code /tmp/libdecaf')
     with c.cd('/tmp/libdecaf'):
@@ -300,7 +304,7 @@ def install_dnsdist_build_deps(c):
 
 @task
 def ci_autoconf(c):
-    c.run('BUILDER_VERSION=0.0.0-git1 autoreconf -vfi')
+    c.run('autoreconf -vfi')
 
 @task
 def ci_docs_build(c):
@@ -459,9 +463,11 @@ def ci_dnsdist_configure(c, features):
                       --enable-systemd \
                       --prefix=/opt/dnsdist \
                       --with-gnutls \
+                      --with-h2o \
                       --with-libsodium \
                       --with-lua=luajit \
                       --with-libcap \
+                      --with-net-snmp \
                       --with-nghttp2 \
                       --with-re2 '
     else:
@@ -472,6 +478,7 @@ def ci_dnsdist_configure(c, features):
                       --without-cdb \
                       --without-ebpf \
                       --without-gnutls \
+                      --without-h2o \
                       --without-libedit \
                       --without-libsodium \
                       --without-lmdb \
@@ -510,6 +517,7 @@ def ci_dnsdist_configure(c, features):
                           -DDISABLE_FALSE_SHARING_PADDING \
                           -DDISABLE_NPN'
     unittests = ' --enable-unit-tests' if os.getenv('UNIT_TESTS') == 'yes' else ''
+    fuzztargets = '--enable-fuzz-targets' if os.getenv('FUZZING_TARGETS') == 'yes' else ''
     sanitizers = ' '.join('--enable-'+x for x in os.getenv('SANITIZERS').split('+')) if os.getenv('SANITIZERS') != '' else ''
     cflags = '-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Werror=string-plus-int'
     cxxflags = cflags + ' -Wp,-D_GLIBCXX_ASSERTIONS ' + additional_flags
@@ -524,7 +532,7 @@ def ci_dnsdist_configure(c, features):
                      --enable-fortify-source=auto \
                      --enable-auto-var-init=pattern \
                      --enable-lto=thin \
-                     --prefix=/opt/dnsdist %s %s %s''' % (cflags, cxxflags, features_set, sanitizers, unittests), warn=True)
+                     --prefix=/opt/dnsdist %s %s %s %s''' % (cflags, cxxflags, features_set, sanitizers, unittests, fuzztargets), warn=True)
     if res.exited != 0:
         c.run('cat config.log')
         raise UnexpectedExit(res)
@@ -586,6 +594,10 @@ def ci_dnsdist_run_unit_tests(c):
       c.run('cat test-suite.log')
       raise UnexpectedExit(res)
 
+@task
+def ci_make_distdir(c):
+    res = c.run('make distdir')
+
 @task
 def ci_make_install(c):
     res = c.run('make install') # FIXME: this builds auth docs - again
@@ -776,7 +788,6 @@ def test_auth_backend(c, backend):
         if os.getenv('SKIP_IPV6_TESTS'):
             pdns_auth_env_vars += ' context=noipv6'
         with c.cd('regression-tests.nobackend'):
-            c.run(f'echo {pdns_auth_env_vars}')
             c.run(f'{pdns_auth_env_vars} ./runtests')
         c.run('/opt/pdns-auth/bin/pdnsutil test-algorithms')
         return