From 578ed45d424357908129005938b771a6e9f5e6b9 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Fri, 16 Mar 2018 09:52:22 +0100 Subject: [PATCH] Add Lua2 backend --- .../debian-jessie/config/pdns.local.lua2.conf | 10 +++++++++ .../authoritative/debian-jessie/control | 14 +++++++++++++ .../debian-jessie/pdns-backend-lua2.examples | 1 + .../debian-jessie/pdns-backend-lua2.install | 1 + .../debian-jessie/pdns-backend-lua2.postinst | 21 +++++++++++++++++++ .../debian-jessie/pdns-backend-lua2.prerm | 14 +++++++++++++ .../debian/authoritative/debian-jessie/rules | 2 +- .../config/pdns.local.lua2.conf | 10 +++++++++ .../authoritative/debian-stretch/control | 14 +++++++++++++ .../debian-stretch/pdns-backend-lua2.examples | 1 + .../debian-stretch/pdns-backend-lua2.install | 1 + .../debian-stretch/pdns-backend-lua2.postinst | 21 +++++++++++++++++++ .../debian-stretch/pdns-backend-lua2.prerm | 14 +++++++++++++ .../debian/authoritative/debian-stretch/rules | 2 +- .../ubuntu-trusty/config/pdns.local.lua2.conf | 10 +++++++++ .../authoritative/ubuntu-trusty/control | 14 +++++++++++++ .../ubuntu-trusty/pdns-backend-lua2.examples | 1 + .../ubuntu-trusty/pdns-backend-lua2.install | 1 + .../ubuntu-trusty/pdns-backend-lua2.postinst | 21 +++++++++++++++++++ .../ubuntu-trusty/pdns-backend-lua2.prerm | 14 +++++++++++++ .../debian/authoritative/ubuntu-trusty/rules | 2 +- .../dockerfiles/Dockerfile.target.centos-6 | 4 +++- builder-support/specs/pdns.spec | 12 +++++++++++ 23 files changed, 201 insertions(+), 4 deletions(-) create mode 100644 builder-support/debian/authoritative/debian-jessie/config/pdns.local.lua2.conf create mode 100644 builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.examples create mode 100644 builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.install create mode 100644 builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.postinst create mode 100644 builder-support/debian/authoritative/debian-jessie/pdns-backend-lua2.prerm create mode 100644 builder-support/debian/authoritative/debian-stretch/config/pdns.local.lua2.conf create mode 100644 builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.examples create mode 100644 builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.install create mode 100644 builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.postinst create mode 100644 builder-support/debian/authoritative/debian-stretch/pdns-backend-lua2.prerm create mode 100644 builder-support/debian/authoritative/ubuntu-trusty/config/pdns.local.lua2.conf create mode 100644 builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.examples create mode 100644 builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.install create mode 100644 builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.postinst create mode 100644 builder-support/debian/authoritative/ubuntu-trusty/pdns-backend-lua2.prerm 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 000000000..acf2016d0 --- /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 1b62af832..a39be1f3d 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 000000000..c762a0b95 --- /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 000000000..dcb8ce5e8 --- /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 000000000..dd662bc55 --- /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 000000000..3298654dd --- /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 bbd07d1e5..415321dd3 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 000000000..acf2016d0 --- /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 8911dadf9..f0daf1c20 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 000000000..c762a0b95 --- /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 000000000..dcb8ce5e8 --- /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 000000000..dd662bc55 --- /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 000000000..3298654dd --- /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 b87448cf4..fb25ebb38 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 000000000..acf2016d0 --- /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 c98085d27..c44df8d90 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 000000000..c762a0b95 --- /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 000000000..dcb8ce5e8 --- /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 000000000..dd662bc55 --- /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 000000000..3298654dd --- /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 6a093a9c8..ed0790b0d 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 0d53ed47b..a4e2554cb 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 ffdb7df7f..6a12122c5 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 -- 2.40.0