pdns: add package

Maintainer: me

Compile tested: armv7l, OpenWRT SDK
Run tested: armv7l Linksys WRT1900ACS, OpenWrt SNAPSHOT, r9987-655fff1571 -
confirmed PowerDNS server links correctly against libraries. I'm unable to test
all the backend modules as I don't have suitable backing stores set up for each.

Description:
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 commit includes the authoritative nameserver, backends and additional tools

https://www.powerdns.com/auth.html

Signed-off-by: James Taylor <james@jtaylor.id.au>
This commit is contained in:
James Taylor
2019-06-08 01:52:23 +10:00
parent 290e23ac61
commit 6320a3b9cb
6 changed files with 968 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
--- a/pdns/Makefile.am
+++ b/pdns/Makefile.am
@@ -54,7 +54,8 @@
bindparser.h \
named.conf.parsertest \
delaypipe.hh delaypipe.cc \
- pdns.service.in
+ pdns.service.in \
+ lua_hpp.mk
BUILT_SOURCES = \
bind-dnssec.schema.sqlite3.sql.h \
@@ -109,6 +108,12 @@
endif
+if !HAVE_LUA_HPP
+BUILT_SOURCES += lua.hpp
+nodist_pdns_server_SOURCES = lua.hpp
+CLEANFILES += lua.hpp
+endif
+
EXTRA_PROGRAMS = \
calidns \
comfun \
@@ -1303,3 +1305,7 @@
pdns.service \
pdns@.service
endif
+
+if !HAVE_LUA_HPP
+include lua_hpp.mk
+endif
--- /dev/null
+++ b/pdns/lua_hpp.mk
@@ -0,0 +1,6 @@
+lua.hpp:
+ $(AM_V_GEN)echo 'extern "C" {' > $@
+ @echo '#include "lua.h"' >> $@
+ @echo '#include "lualib.h"' >> $@
+ @echo '#include "lauxlib.h"' >> $@
+ @echo '}' >> $@
--- a/modules/luabackend/Makefile.am
+++ b/modules/luabackend/Makefile.am
@@ -15,5 +15,15 @@
slave.cc \
supermaster.cc
+if !HAVE_LUA_HPP
+BUILT_SOURCES = lua.hpp
+nodist_libluabackend_la_SOURCES = lua.hpp
+CLEANFILES = lua.hpp
+endif
+
libluabackend_la_LDFLAGS = -module -avoid-version
libluabackend_la_LIBADD = $(LUA_LIBS)
+
+if !HAVE_LUA_HPP
+include ../../pdns/lua_hpp.mk
+endif
@@ -0,0 +1,25 @@
--- a/pdns/Makefile.am
+++ b/pdns/Makefile.am
@@ -68,11 +68,9 @@
backends/gsql/gsqlbackend.gcda \
backends/gsql/gsqlbackend.gcno \
backends/gsql/gsqlbackend.gcov \
- dnsmessage.pb.cc dnsmessage.pb.h \
- pdns.conf-dist
+ dnsmessage.pb.cc dnsmessage.pb.h
noinst_SCRIPTS = pdns.init
-sysconf_DATA = pdns.conf-dist
sbin_PROGRAMS = pdns_server
bin_PROGRAMS = \
@@ -1124,9 +1122,6 @@
endif
endif
-pdns.conf-dist: pdns_server
- $(AM_V_GEN)./pdns_server --no-config --config 2>/dev/null > $@
-
testrunner_SOURCES = \
arguments.cc \
auth-caches.cc auth-caches.hh \
@@ -0,0 +1,34 @@
--- a/m4/pdns_check_os.m4
+++ b/m4/pdns_check_os.m4
@@ -35,16 +35,21 @@
AM_CONDITIONAL([HAVE_LINUX], [test "x$have_linux" = "xyes"])
AM_CONDITIONAL([HAVE_SOLARIS], [test "x$have_solaris" = "xyes"])
- case "$host" in
- mips* | powerpc-* )
- AC_MSG_CHECKING([whether the linker accepts -latomic])
- LDFLAGS="-latomic $LDFLAGS"
- AC_LINK_IFELSE([m4_default([],[AC_LANG_PROGRAM()])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_ERROR([Unable to link against libatomic, cannot continue])]
- )
- ;;
- esac
+ AC_MSG_CHECKING([whether -latomic is needed for __atomic builtins])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>]],
+ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
+ )],
+ [AC_MSG_RESULT([no])],
+ [LIBS="$LIBS -latomic"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>]],
+ [[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]]
+ )],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_FAILURE([libatomic needed, but linking with -latomic failed, cannot continue])]
+ )]
+ )
AC_SUBST(THREADFLAGS)
AC_SUBST([DYNLINKFLAGS], [-export-dynamic])