]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - tasks.py
Merge pull request #14032 from rgacogne/ddist-192-changelog-secpoll
[thirdparty/pdns.git] / tasks.py
index 9c5fe5b305bdebc8ada9d59bb0530512cd040de1..f3144ed2c03959fdc4f51e16c8548e1d37f611c3 100644 (file)
--- a/tasks.py
+++ b/tasks.py
@@ -1,6 +1,7 @@
 from invoke import task
 from invoke.exceptions import Failure, UnexpectedExit
 
+import json
 import os
 import sys
 import time
@@ -8,8 +9,6 @@ import time
 auth_backend_ip_addr = os.getenv('AUTH_BACKEND_IP_ADDR', '127.0.0.1')
 
 clang_version = os.getenv('CLANG_VERSION', '13')
-quiche_version = '0.20.0'
-quiche_hash = '7125bc82ddcf38fbfbc69882ccb2723bfb4d5bfeb42718b8291d26ec06042e38'
 
 all_build_deps = [
     'ccache',
@@ -48,8 +47,7 @@ auth_build_deps = [    # FIXME: perhaps we should be stealing these from the deb
     'libsqlite3-dev',
     'libyaml-cpp-dev',
     'libzmq3-dev',
-    'ruby-bundler',
-    'ruby-dev',
+    'python3-venv',
     'sqlite3',
     'unixodbc-dev',
     'cmake',
@@ -118,8 +116,7 @@ auth_test_deps = [   # FIXME: we should be generating some of these from shlibde
     'libzmq3-dev',
     'lmdb-utils',
     'prometheus',
-    'ruby-bundler',
-    'ruby-dev',
+    'python3-venv',
     'socat',
     'softhsm2',
     'unbound-host',
@@ -174,7 +171,8 @@ def install_clang_runtime(c):
 
 @task
 def ci_install_rust(c, repo):
-    c.sudo(f'{repo}/builder-support/helpers/install_rust.sh')
+    with c.cd(f'{repo}/builder-support/helpers/'):
+        c.run('sudo sh install_rust.sh')
 
 def install_libdecaf(c, product):
     c.run('git clone https://git.code.sf.net/p/ed448goldilocks/code /tmp/libdecaf')
@@ -490,20 +488,40 @@ def ci_auth_configure(c):
 
 
 @task
-def ci_rec_configure(c):
+def ci_rec_configure(c, features):
     unittests = get_unit_tests()
 
-    configure_cmd = " ".join([
-        get_base_configure_cmd(),
-        "--enable-nod",
-        "--prefix=/opt/pdns-recursor",
-        "--with-lua=luajit",
-        "--with-libcap",
-        "--with-net-snmp",
-        "--enable-dns-over-tls",
-        "--enable-verbose-logging",
-        unittests,
-    ])
+    if features == 'full':
+        configure_cmd = " ".join([
+            get_base_configure_cmd(),
+            "--prefix=/opt/pdns-recursor",
+            "--enable-option-checking",
+            "--enable-verbose-logging",
+            "--enable-dns-over-tls",
+            "--enable-nod",
+            "--with-libcap",
+            "--with-lua=luajit",
+            "--with-net-snmp",
+            unittests,
+        ])
+    else:
+        configure_cmd = " ".join([
+            get_base_configure_cmd(),
+            "--prefix=/opt/pdns-recursor",
+            "--enable-option-checking",
+            "--enable-verbose-logging",
+            "--disable-dns-over-tls",
+            "--disable-dnstap",
+            "--disable-nod",
+            "--disable-systemd",
+            "--with-lua=luajit",
+            "--without-libcap",
+            "--without-libcurl",
+            "--without-libdecaf",
+            "--without-libsodium",
+            "--without-net-snmp",
+            unittests,
+        ])
     res = c.run(configure_cmd, warn=True)
     if res.exited != 0:
         c.run('cat config.log')
@@ -622,9 +640,6 @@ def ci_dnsdist_make_bear(c):
 
 @task
 def ci_auth_install_remotebackend_test_deps(c):
-    with c.cd('modules/remotebackend'):
-      # c.run('bundle config set path vendor/bundle')
-      c.run('sudo ruby -S bundle install')
     c.sudo('apt-get install -y socat')
 
 @task
@@ -632,7 +647,7 @@ def ci_auth_run_unit_tests(c):
     res = c.run('make check', warn=True)
     if res.exited != 0:
       c.run('cat pdns/test-suite.log', warn=True)
-      c.run('cat modules/remotebackend/test-suite.log', warn=True)
+      c.run('more modules/remotebackend/*.log', warn=True)
       raise UnexpectedExit(res)
 
 @task
@@ -923,7 +938,12 @@ def coverity_upload(c, email, project, tarball):
             https://scan.coverity.com/builds?project={project}', hide=True)
 
 @task
-def ci_build_and_install_quiche(c):
+def ci_build_and_install_quiche(c, repo):
+    with open(f'{repo}/builder-support/helpers/quiche.json') as quiche_json:
+        quiche_data = json.load(quiche_json)
+        quiche_version = quiche_data['version']
+        quiche_hash = quiche_data['SHA256SUM']
+
     # we have to pass -L because GitHub will do a redirect, sadly
     c.run(f'curl -L -o quiche-{quiche_version}.tar.gz https://github.com/cloudflare/quiche/archive/{quiche_version}.tar.gz')
     # Line below should echo two spaces between digest and name