From: Pieter Lexis Date: Fri, 16 Mar 2018 08:52:22 +0000 (+0100) Subject: Add Lua2 backend X-Git-Tag: dnsdist-1.3.3~83^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=578ed45d424357908129005938b771a6e9f5e6b9;p=thirdparty%2Fpdns.git Add Lua2 backend --- diff --git a/builder-support/debian/authoritative/debian-jessie/config/pdns.local.lua2.conf b/builder-support/debian/authoritative/debian-jessie/config/pdns.local.lua2.conf new file mode 100644 index 0000000000..acf2016d02 --- /dev/null +++ b/builder-support/debian/authoritative/debian-jessie/config/pdns.local.lua2.conf @@ -0,0 +1,10 @@ +#launch+=lua2 + +## lua2-api Lua backend API version +#lua2-api=2 + +## lua2-filename Filename of the script for lua backend +#lua2-filename=powerdns-luabackend.lua + +## lua2-query-logging Logging of the Lua2 Backend +#lua2-query-logging=no diff --git a/builder-support/debian/authoritative/debian-jessie/control b/builder-support/debian/authoritative/debian-jessie/control index 1b62af8323..a39be1f3d5 100644 --- a/builder-support/debian/authoritative/debian-jessie/control +++ b/builder-support/debian/authoritative/debian-jessie/control @@ -224,6 +224,20 @@ Description: Lua backend for PowerDNS . This package contains the Lua backend for PowerDNS. +Package: pdns-backend-lua2 +Architecture: any +Depends: pdns-server (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Provides: pdns-backend +Description: Lua 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 Lua2 backend for PowerDNS. + Package: pdns-backend-remote Architecture: any Depends: pdns-server (= ${binary:Version}), diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.examples b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.examples new file mode 100644 index 0000000000..c762a0b955 --- /dev/null +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.examples @@ -0,0 +1 @@ +debian/config/pdns.local.lua2.conf diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.install b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.install new file mode 100644 index 0000000000..dcb8ce5e83 --- /dev/null +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.install @@ -0,0 +1 @@ +usr/lib/*/pdns/liblua2backend.so* diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.postinst b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.postinst new file mode 100644 index 0000000000..dd662bc55a --- /dev/null +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.postinst @@ -0,0 +1,21 @@ +#!/bin/sh +# +# postinst script for pdns-backend-lua2 + +set -e + +if [ -n "$PDNSDEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +# Activate trigger +dpkg-trigger pdns-server + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.prerm b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.prerm new file mode 100644 index 0000000000..3298654dde --- /dev/null +++ b/builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.prerm @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Add call to init script to actually stop pdns. + +set -e + +if [ -x "/etc/init.d/pdns" ]; then + invoke-rc.d pdns stop || exit $? +fi + +#DEBHELPER# + +exit 0 + diff --git a/builder-support/debian/authoritative/debian-jessie/rules b/builder-support/debian/authoritative/debian-jessie/rules index bbd07d1e53..415321dd3b 100755 --- a/builder-support/debian/authoritative/debian-jessie/rules +++ b/builder-support/debian/authoritative/debian-jessie/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 mydns remote random opendbx tinydns +backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lua lua2 mydns remote random opendbx tinydns # Disable systemd integration on non-linux archs ifeq ($(DEB_HOST_ARCH_OS),linux) diff --git a/builder-support/debian/authoritative/debian-stretch/config/pdns.local.lua2.conf b/builder-support/debian/authoritative/debian-stretch/config/pdns.local.lua2.conf new file mode 100644 index 0000000000..acf2016d02 --- /dev/null +++ b/builder-support/debian/authoritative/debian-stretch/config/pdns.local.lua2.conf @@ -0,0 +1,10 @@ +#launch+=lua2 + +## lua2-api Lua backend API version +#lua2-api=2 + +## lua2-filename Filename of the script for lua backend +#lua2-filename=powerdns-luabackend.lua + +## lua2-query-logging Logging of the Lua2 Backend +#lua2-query-logging=no diff --git a/builder-support/debian/authoritative/debian-stretch/control b/builder-support/debian/authoritative/debian-stretch/control index 8911dadf95..f0daf1c20a 100644 --- a/builder-support/debian/authoritative/debian-stretch/control +++ b/builder-support/debian/authoritative/debian-stretch/control @@ -224,6 +224,20 @@ Description: Lua backend for PowerDNS . This package contains the Lua backend for PowerDNS. +Package: pdns-backend-lua2 +Architecture: any +Depends: pdns-server (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Provides: pdns-backend +Description: Lua 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 Lua2 backend for PowerDNS. + Package: pdns-backend-remote Architecture: any Depends: pdns-server (= ${binary:Version}), diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.examples b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.examples new file mode 100644 index 0000000000..c762a0b955 --- /dev/null +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.examples @@ -0,0 +1 @@ +debian/config/pdns.local.lua2.conf diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.install b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.install new file mode 100644 index 0000000000..dcb8ce5e83 --- /dev/null +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.install @@ -0,0 +1 @@ +usr/lib/*/pdns/liblua2backend.so* diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.postinst b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.postinst new file mode 100644 index 0000000000..dd662bc55a --- /dev/null +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.postinst @@ -0,0 +1,21 @@ +#!/bin/sh +# +# postinst script for pdns-backend-lua2 + +set -e + +if [ -n "$PDNSDEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +# Activate trigger +dpkg-trigger pdns-server + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.prerm b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.prerm new file mode 100644 index 0000000000..3298654dde --- /dev/null +++ b/builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.prerm @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Add call to init script to actually stop pdns. + +set -e + +if [ -x "/etc/init.d/pdns" ]; then + invoke-rc.d pdns stop || exit $? +fi + +#DEBHELPER# + +exit 0 + diff --git a/builder-support/debian/authoritative/debian-stretch/rules b/builder-support/debian/authoritative/debian-stretch/rules index b87448cf45..fb25ebb388 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 mydns remote random opendbx tinydns +backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lua lua2 mydns remote random opendbx tinydns # Disable systemd integration on non-linux archs ifeq ($(DEB_HOST_ARCH_OS),linux) diff --git a/builder-support/debian/authoritative/ubuntu-trusty/config/pdns.local.lua2.conf b/builder-support/debian/authoritative/ubuntu-trusty/config/pdns.local.lua2.conf new file mode 100644 index 0000000000..acf2016d02 --- /dev/null +++ b/builder-support/debian/authoritative/ubuntu-trusty/config/pdns.local.lua2.conf @@ -0,0 +1,10 @@ +#launch+=lua2 + +## lua2-api Lua backend API version +#lua2-api=2 + +## lua2-filename Filename of the script for lua backend +#lua2-filename=powerdns-luabackend.lua + +## lua2-query-logging Logging of the Lua2 Backend +#lua2-query-logging=no diff --git a/builder-support/debian/authoritative/ubuntu-trusty/control b/builder-support/debian/authoritative/ubuntu-trusty/control index c98085d276..c44df8d900 100644 --- a/builder-support/debian/authoritative/ubuntu-trusty/control +++ b/builder-support/debian/authoritative/ubuntu-trusty/control @@ -221,6 +221,20 @@ Description: Lua backend for PowerDNS . This package contains the Lua backend for PowerDNS. +Package: pdns-backend-lua2 +Architecture: any +Depends: pdns-server (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Provides: pdns-backend +Description: Lua 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 Lua2 backend for PowerDNS. + Package: pdns-backend-remote Architecture: any Depends: pdns-server (= ${binary:Version}), diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.examples b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.examples new file mode 100644 index 0000000000..c762a0b955 --- /dev/null +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.examples @@ -0,0 +1 @@ +debian/config/pdns.local.lua2.conf diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.install b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.install new file mode 100644 index 0000000000..dcb8ce5e83 --- /dev/null +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.install @@ -0,0 +1 @@ +usr/lib/*/pdns/liblua2backend.so* diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.postinst b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.postinst new file mode 100644 index 0000000000..dd662bc55a --- /dev/null +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.postinst @@ -0,0 +1,21 @@ +#!/bin/sh +# +# postinst script for pdns-backend-lua2 + +set -e + +if [ -n "$PDNSDEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +# Activate trigger +dpkg-trigger pdns-server + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.prerm b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.prerm new file mode 100644 index 0000000000..3298654dde --- /dev/null +++ b/builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.prerm @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Add call to init script to actually stop pdns. + +set -e + +if [ -x "/etc/init.d/pdns" ]; then + invoke-rc.d pdns stop || exit $? +fi + +#DEBHELPER# + +exit 0 + diff --git a/builder-support/debian/authoritative/ubuntu-trusty/rules b/builder-support/debian/authoritative/ubuntu-trusty/rules index 6a093a9c81..ed0790b0d4 100755 --- a/builder-support/debian/authoritative/ubuntu-trusty/rules +++ b/builder-support/debian/authoritative/ubuntu-trusty/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 mydns remote random opendbx tinydns +backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lua lua2 mydns remote random opendbx tinydns # Use new build system diff --git a/builder-support/dockerfiles/Dockerfile.target.centos-6 b/builder-support/dockerfiles/Dockerfile.target.centos-6 index 0d53ed47b6..a4e2554cb5 100644 --- a/builder-support/dockerfiles/Dockerfile.target.centos-6 +++ b/builder-support/dockerfiles/Dockerfile.target.centos-6 @@ -4,7 +4,9 @@ # This defines the dstribution base layer # Put only the bare minimum of common commands here, without dev tools FROM centos:6 as dist-base -RUN yum install -y epel-release centos-release-scl-rh && \ +RUN which yum +RUN yum clean all +RUN yum install -y --verbose epel-release centos-release-scl-rh && \ yum install -y --nogpgcheck devtoolset-3-gcc-c++ # Do the actual rpm build diff --git a/builder-support/specs/pdns.spec b/builder-support/specs/pdns.spec index ffdb7df7f3..6a12122c5c 100644 --- a/builder-support/specs/pdns.spec +++ b/builder-support/specs/pdns.spec @@ -111,6 +111,15 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description backend-lua This package contains the lua backend for %{name} +%package backend-lua2 +Summary: Lua backend for %{name} +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +%global backends %{backends} lua2 + +%description backend-lua2 +This package contains the lua2 backend for %{name} + %package backend-sqlite Summary: SQLite backend for %{name} Group: System Environment/Daemons @@ -351,6 +360,9 @@ fi %files backend-lua %{_libdir}/%{name}/libluabackend.so +%files backend-lua2 +%{_libdir}/%{name}/liblua2backend.so + %files backend-sqlite %doc modules/gsqlite3backend/schema.sqlite3.sql %doc modules/gsqlite3backend/dnssec-3.x_to_3.4.0_schema.sqlite3.sql