]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
hook up lmdbbackend to configure, regression tests & travis 7453/head
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 5 Feb 2019 16:41:50 +0000 (17:41 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 5 Feb 2019 16:47:25 +0000 (17:47 +0100)
build-scripts/travis.sh
builder-support/debian/authoritative/debian-stretch/control
builder-support/debian/authoritative/debian-stretch/rules
configure.ac
modules/Makefile.am
regression-tests/.gitignore
regression-tests/backends/common
regression-tests/runtests
regression-tests/start-test-stop

index aaae8a6787099090609bf51dc32c76cef94fd981..55890e1d85be1241bac3a8b7cc162dd6e439b4a8 100755 (executable)
@@ -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 ###
index d39fb13b4dae932dbbb82b366fcb51fbd6907fd3..41f8e1608302e9bcd8842e91946583833b7c2568 100644 (file)
@@ -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.
index 733e80c5078c9754572e6043d9789b5f158a47f4..90b41e30a6ff84b561649c40b19719f49e1b540d 100755 (executable)
@@ -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)
index 6f00864e54ad13fbd180e72c78971de490d39917..6325b069041bae0c0c3c4dc268e0d0ff8e06ce5a 100644 (file)
@@ -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
index a5da8a5a65e69c56c121c5064999dbb1535a7f28..65887fbc7bf02d916dc35a3ad3f57b78d9ff92a0 100644 (file)
@@ -9,6 +9,7 @@ DIST_SUBDIRS = \
        gpgsqlbackend \
        gsqlite3backend \
        ldapbackend \
+       lmdbbackend \
        luabackend \
        lua2backend \
        mydnsbackend \
index 1f9ed7ecb0045d8254b66352dacd2dacecf79a54..be394d170cf948792b5c564e6fcc1349d56729bd 100644 (file)
@@ -30,3 +30,5 @@
 /oracle.log
 /oracle2.log
 /remotebackend-access.log
+/pdns.lmdb*
+/pdns2.lmdb*
index 2da721020c10643a69ee5cded248816dc29eb800..1d0c16951dcf483b97c1cdb8e75306f1c8112546 100644 (file)
@@ -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
                        ;;
index 019cef8b1083057e0c97417902518be60a9805bb..d20cca75cf38f1bc5a4b4b0c3de5441e69c80222 100755 (executable)
@@ -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
index 9eff25648c1f43b1f734a4dfe9b867b3fba13118..6f4fca1c47820d1e994dc74299a15bd80b4f9f72 100755 (executable)
@@ -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