# this gives us the symbolizer, for symbols in asan/ubsan traces
c.sudo('apt-get -qq -y --no-install-recommends install clang-12')
+def install_libdecaf(c, product):
+ c.run('git clone https://git.code.sf.net/p/ed448goldilocks/code /tmp/libdecaf')
+ with c.cd('/tmp/libdecaf'):
+ c.run('git checkout 41f349')
+ c.run('cmake -B build '
+ '-DCMAKE_INSTALL_PREFIX=/usr/local '
+ '-DCMAKE_INSTALL_LIBDIR=lib '
+ '-DENABLE_STATIC=OFF '
+ '-DENABLE_TESTS=OFF '
+ '-DCMAKE_C_FLAGS="-Wno-sizeof-array-div -Wno-array-parameter" .')
+ c.run('make -C build')
+ c.run('sudo make -C build install')
+ c.sudo(f'mkdir -p /opt/{product}/libdecaf')
+ c.sudo(f'cp /usr/local/lib/libdecaf.so* /opt/{product}/libdecaf/.')
+
@task
def install_auth_build_deps(c):
c.sudo('apt-get install -qq -y --no-install-recommends ' + ' '.join(all_build_deps + git_build_deps + auth_build_deps))
+ install_libdecaf(c, 'pdns-auth')
def setup_authbind(c):
c.sudo('touch /etc/authbind/byport/53')
# FIXME we may want to start a background recursor here to make ALIAS tests more robust
setup_authbind(c)
+ # Copy libdecaf out
+ c.sudo('mkdir -p /usr/local/lib')
+ c.sudo('cp /opt/pdns-auth/libdecaf/libdecaf.so* /usr/local/lib/.')
+
@task
def install_rec_bulk_deps(c): # FIXME: rename this, we do way more than apt-get
c.sudo('apt-get --no-install-recommends -qq -y install ' + ' '.join(rec_bulk_deps))
./configure \
CC='clang-12' \
CXX='clang++-12' \
+ CPPFLAGS='-I/usr/local/include/decaf' \
+ LDFLAGS='-L/usr/local/lib -Wl,-rpath,/usr/local/lib' \
--enable-option-checking=fatal \
--with-modules='bind geoip gmysql godbc gpgsql gsqlite3 ldap lmdb lua2 pipe remote tinydns' \
--enable-systemd \
--enable-remotebackend-zeromq \
--with-lmdb=/usr \
--with-libsodium \
+ --with-libdecaf \
--prefix=/opt/pdns-auth \
--enable-ixfrdist \
--enable-asan \