From: bert hubert Date: Tue, 5 Feb 2019 16:41:50 +0000 (+0100) Subject: hook up lmdbbackend to configure, regression tests & travis X-Git-Tag: auth-4.2.0-beta1~37^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7453%2Fhead;p=thirdparty%2Fpdns.git hook up lmdbbackend to configure, regression tests & travis --- diff --git a/build-scripts/travis.sh b/build-scripts/travis.sh index aaae8a6787..55890e1d85 100755 --- a/build-scripts/travis.sh +++ b/build-scripts/travis.sh @@ -224,6 +224,10 @@ install_auth() { run "sudo apt-get -qq --no-install-recommends install \ libldap-dev" + # lmdb-backend + run "sudo apt-get -qq --no-install-recommends install \ + liblmdb-dev" + # opendbx-backend run "sudo apt-get -qq --no-install-recommends install \ libopendbx1-dev \ @@ -406,7 +410,7 @@ build_auth() { run "autoreconf -vi" run "./configure \ ${sanitizerflags} \ - --with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns godbc lua2' \ + --with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lmdb lua mydns opendbx pipe random remote tinydns godbc lua2' \ --with-modules='' \ --with-sqlite3 \ --with-libsodium \ @@ -417,7 +421,8 @@ build_auth() { --enable-backend-unit-tests \ --enable-fuzz-targets \ --disable-dependency-tracking \ - --disable-silent-rules" + --disable-silent-rules \ + --with-lmdb=/usr" run "make -k dist" run "make -k -j3" run "make -k install DESTDIR=/tmp/pdns-install-dir" @@ -560,6 +565,11 @@ test_auth() { run "./timestamp ./start-test-stop 5300 tinydns" + run "./timestamp ./start-test-stop 5300 lmdb-nodnssec-both" + run "./timestamp ./start-test-stop 5300 lmdb-both" + run "./timestamp ./start-test-stop 5300 lmdb-nsec3-both" + run "./timestamp ./start-test-stop 5300 lmdb-nsec3-optout-both" + run "rm tests/ent-asterisk/fail.nsec" run "cd ../modules/luabackend/test2" @@ -596,6 +606,11 @@ test_auth() { run "./timestamp ./start-test-stop 5300 lua2" run "./timestamp ./start-test-stop 5300 lua2-dnssec" + run "./timestamp ./start-test-stop 5300 lmdb-both" + run "./timestamp ./start-test-stop 5300 lmdb-nodnssec-both" + run "./timestamp ./start-test-stop 5300 lmdb-nsec3-both" + run "./timestamp ./start-test-stop 5300 lmdb-nsec3-optout-both" + run "cd .." ### api ### diff --git a/builder-support/debian/authoritative/debian-stretch/control b/builder-support/debian/authoritative/debian-stretch/control index d39fb13b4d..41f8e16083 100644 --- a/builder-support/debian/authoritative/debian-stretch/control +++ b/builder-support/debian/authoritative/debian-stretch/control @@ -24,6 +24,7 @@ Build-Depends: autoconf, libgeoip-dev, libkrb5-dev, libldap2-dev, + liblmdb-dev, libluajit-5.1-dev, libmaxminddb-dev, libopendbx1-dev, @@ -312,3 +313,17 @@ Description: tinydns compatibility backend for PowerDNS PowerDNS tries to emphasize speed and security. . This package contains the tinydns compatibility backend for PowerDNS. + +Package: pdns-backend-lmdb +Architecture: any +Depends: pdns-server (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Provides: pdns-backend +Description: LMDB backend for PowerDNS + PowerDNS is a versatile nameserver which supports a large number + of different backends ranging from simple zonefiles to relational + databases and load balancing/failover algorithms. + PowerDNS tries to emphasize speed and security. + . + This package contains the LMDB backend for PowerDNS. diff --git a/builder-support/debian/authoritative/debian-stretch/rules b/builder-support/debian/authoritative/debian-stretch/rules index 733e80c507..90b41e30a6 100755 --- a/builder-support/debian/authoritative/debian-stretch/rules +++ b/builder-support/debian/authoritative/debian-stretch/rules @@ -4,7 +4,7 @@ DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Backends -backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lua lua2 mydns remote random opendbx tinydns +backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lmdb lua lua2 mydns remote random opendbx tinydns # Disable systemd integration on non-linux archs ifeq ($(DEB_HOST_ARCH_OS),linux) diff --git a/configure.ac b/configure.ac index 6f00864e54..6325b06904 100644 --- a/configure.ac +++ b/configure.ac @@ -215,6 +215,10 @@ for a in $modules $dynmodules; do [AC_MSG_ERROR([${a} backend needs lua but we cannot find it])] ) ;; + lmdb) + PDNS_CHECK_LMDB + BOOST_SERIALIZATION + ;; esac done @@ -321,6 +325,7 @@ AC_CONFIG_FILES([ modules/gpgsqlbackend/Makefile modules/gsqlite3backend/Makefile modules/ldapbackend/Makefile + modules/lmdbbackend/Makefile modules/luabackend/Makefile modules/lua2backend/Makefile modules/mydnsbackend/Makefile diff --git a/modules/Makefile.am b/modules/Makefile.am index a5da8a5a65..65887fbc7b 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -9,6 +9,7 @@ DIST_SUBDIRS = \ gpgsqlbackend \ gsqlite3backend \ ldapbackend \ + lmdbbackend \ luabackend \ lua2backend \ mydnsbackend \ diff --git a/regression-tests/.gitignore b/regression-tests/.gitignore index 1f9ed7ecb0..be394d170c 100644 --- a/regression-tests/.gitignore +++ b/regression-tests/.gitignore @@ -30,3 +30,5 @@ /oracle.log /oracle2.log /remotebackend-access.log +/pdns.lmdb* +/pdns2.lmdb* diff --git a/regression-tests/backends/common b/regression-tests/backends/common index 2da721020c..1d0c16951d 100644 --- a/regression-tests/backends/common +++ b/regression-tests/backends/common @@ -35,6 +35,10 @@ start_master () source ./backends/gsqlite3-master ;; + lmdb*) + source ./backends/lmdb-master + ;; + mydns*) source ./backends/mydns-master ;; @@ -117,6 +121,10 @@ start_slave () source ./backends/gsqlite3-slave ;; + lmdb*) + source ./backends/lmdb-slave + ;; + oracle*) source ./backends/oracle-slave ;; diff --git a/regression-tests/runtests b/regression-tests/runtests index 019cef8b10..d20cca75cf 100755 --- a/regression-tests/runtests +++ b/regression-tests/runtests @@ -49,7 +49,9 @@ do testname=$(basename $a) export testname echo "$testname: " - cat $a/description + if [ "${PDNS_DEBUG}" = "YES" ]; then + cat $a/description + fi echo "$testname: " >> test-results cat $a/description >> test-results diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index 9eff25648c..6f4fca1c47 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -181,6 +181,7 @@ goracle-nodnssec goracle goracle-nsec3 goracle-nsec3-optout goracle-nsec3-narrow godbc_sqlite3-nodnssec godbc_sqlite3 godbc_sqlite3-nsec3 godbc_sqlite3-nsec3-optout godbc_sqlite3-narrow gpgsql-nodnssec gpgsql gpgsql-nsec3 gpgsql-nsec3-optout gpgsql-nsec3-narrow gsqlite3-nodnssec gsqlite3 gsqlite3-nsec3 gsqlite3-nsec3-optout gsqlite3-nsec3-narrow +lmdb-nodnssec lmdb mydns opendbx-sqlite3 oracle-nodnssec oracle oracle-nsec3