Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into errno-review
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Jun 26, 2019
2 parents a2a81d4 + 28fecfe commit 001f57d
Show file tree
Hide file tree
Showing 84 changed files with 1,066 additions and 356 deletions.
128 changes: 127 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ commands:
steps:
- run:
name: Install Coverity tools
command: curl -s https://scan.coverity.com/download/linux64 --data "token=${COVERITY_TOKEN}&project=${COVERITY_PROJECT}" | gunzip | tar xvf /dev/stdin --strip-components=2 --no-same-owner -C /usr/local
command: curl -s https://scan.coverity.com/download/linux64 --data "token=${COVERITY_TOKEN}&project=${COVERITY_PROJECT}" | gunzip | tar xvf /dev/stdin --strip-components=1 --no-same-owner -C /usr/local

add-docs-upload-ssh:
description: Add ssh known_hosts fingerprints
Expand Down Expand Up @@ -173,6 +173,27 @@ commands:
default-libmysqlclient-dev \
unixodbc
install-dnsdist-deps:
description: "Install all libraries needed for testing dnsdist"
steps:
- run: apt-get update
- run:
command: |
apt-get install -qq -y \
libluajit-5.1 \
libboost-all-dev \
libcap2 \
libcurl4-openssl-dev \
libfstrm0 \
libh2o-evloop0.13 \
libre2-5 \
libssl-dev \
libsystemd0 \
libsodium23 \
libprotobuf17 \
protobuf-compiler \
virtualenv
install-auth-dev-deps:
description: Install all packages needed to build the auth
steps:
Expand Down Expand Up @@ -1113,6 +1134,107 @@ jobs:
--form description="master build" \
https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
build-dnsdist:
docker:
- image: debian:buster
environment:
UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
steps:
- restore-cache-ccache:
product: dnsdist
- run:
name: Install dependencies
command: |
apt-get update && apt-get -qq --no-install-recommends install \
autoconf \
automake \
g++ \
git \
libboost-all-dev \
libcap-dev \
libedit-dev \
libfstrm-dev \
libh2o-evloop-dev \
libluajit-5.1-dev \
libprotobuf-dev \
libre2-dev \
libsnmp-dev \
libsodium-dev \
libssl-dev \
libsystemd-dev \
libtool \
make \
pkg-config \
protobuf-compiler \
ragel \
virtualenv
- checkout-shallow
- run:
name: autoconf
command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
working_directory: ~/project/pdns/dnsdistdist
- run:
name: configure
command: |
CFLAGS="-O1 -Werror=vla" \
CXXFLAGS="-O1 -Werror=vla" \
./configure \
--enable-unit-tests \
--enable-dnstap \
--enable-dnscrypt \
--enable-dns-over-tls \
--enable-dns-over-https \
--prefix=/opt/dnsdist \
--with-libsodium \
--with-lua=luajit \
--with-libcap \
--with-protobuf=yes \
--with-re2 \
--enable-asan \
--enable-ubsan
working_directory: ~/project/pdns/dnsdistdist
- run:
name: build
command: make -j1 -k
working_directory: ~/project/pdns/dnsdistdist
- save-ccache-cache:
product: dnsdist
- run:
name: Run unit tests
command: make check || (cat test-suite.log; false)
working_directory: ~/project/pdns/dnsdistdist
- run:
name: Install resulting binaries
command: make install
working_directory: ~/project/pdns/dnsdistdist
- persist_to_workspace:
root: /opt
paths:
- dnsdist

test-dnsdist-regression:
docker:
- image: debian:buster
environment:
UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
steps:
- install-dnsdist-deps
- checkout-shallow
- run:
name: setup snmp
command: |
apt-get -qq --no-install-recommends install snmpd
sed "s/agentxperms 0700 0755 dnsdist/agentxperms 0700 0755/g" regression-tests.dnsdist/snmpd.conf > /etc/snmp/snmpd.conf
/etc/init.d/snmpd start
- attach_workspace:
at: /opt
- run:
name: Run dnsdist tests
workdir: ~/project/regression-tests.dnsdist
command: |
DNSDISTBIN="/opt/dnsdist/bin/dnsdist" \
./runtests
workflows:
version: 2
coverity:
Expand Down Expand Up @@ -1179,6 +1301,10 @@ workflows:
- test-recursor-api:
requires:
- build-recursor
- build-dnsdist
- test-dnsdist-regression:
requires:
- build-dnsdist

build-docs:
jobs:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
etc/powerdns/pdns.d
var/lib/powerdns
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ case "$1" in
adduser --quiet --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
echo "done"
fi
chown pdns:pdns /var/lib/powerdns || :
;;

triggered)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
etc/powerdns/pdns.d
var/lib/powerdns
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ case "$1" in
adduser --quiet --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
echo "done"
fi
chown pdns:pdns /var/lib/powerdns || :
;;

triggered)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
etc/powerdns/pdns.d
var/lib/powerdns
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ case "$1" in
adduser --quiet --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
echo "done"
fi
chown pdns:pdns /var/lib/powerdns || :
;;

triggered)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
etc/powerdns/pdns.d
var/lib/powerdns
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ case "$1" in
adduser --quiet --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
echo "done"
fi
chown pdns:pdns /var/lib/powerdns || :
;;

triggered)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DAEMON=/usr/sbin/$NAME
# Derive the socket-dir setting from /etc/powerdns/recursor.conf
# or fall back to the default /var/run if not specified there.
PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/powerdns/recursor.conf)
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run/pdns-recursor; mkdir -p $PIDDIR; fi
PIDFILE=$PIDDIR/$NAME.pid

# Gracefully exit if the package has been removed.
Expand Down
4 changes: 2 additions & 2 deletions builder-support/debian/recursor/debian-buster/rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ override_dh_auto_configure:
--with-protobuf=yes \
--without-net-snmp \
--disable-silent-rules \
--with-service-user=pdns \
--with-service-group=pdns \
$(CONFIGURE_ARGS)

override_dh_auto_install:
Expand All @@ -42,8 +44,6 @@ override_dh_auto_install:
-e 's!# config-dir=.*!config-dir=/etc/powerdns!' \
-e 's!# local-address=.*!local-address=127.0.0.1!' \
-e 's!# quiet=.*!quiet=yes!' \
-e 's!# setgid=.*!setgid=pdns!' \
-e 's!# setuid=.*!setuid=pdns!' \
-e 's!# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \
> debian/pdns-recursor/etc/powerdns/recursor.conf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DAEMON=/usr/sbin/$NAME
# Derive the socket-dir setting from /etc/powerdns/recursor.conf
# or fall back to the default /var/run if not specified there.
PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/powerdns/recursor.conf)
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run/pdns-recursor; mkdir -p $PIDDIR; fi
PIDFILE=$PIDDIR/$NAME.pid

# Gracefully exit if the package has been removed.
Expand Down
4 changes: 2 additions & 2 deletions builder-support/debian/recursor/debian-jessie/rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ override_dh_auto_configure:
--with-protobuf=yes \
--with-net-snmp \
--disable-silent-rules \
--with-service-user=pdns \
--with-service-group=pdns \
$(CONFIGURE_ARGS)

override_dh_auto_install:
Expand All @@ -42,8 +44,6 @@ override_dh_auto_install:
-e 's!# config-dir=.*!config-dir=/etc/powerdns!' \
-e 's!# local-address=.*!local-address=127.0.0.1!' \
-e 's!# quiet=.*!quiet=yes!' \
-e 's!# setgid=.*!setgid=pdns!' \
-e 's!# setuid=.*!setuid=pdns!' \
-e 's!# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \
> debian/tmp/etc/powerdns/recursor.conf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DAEMON=/usr/sbin/$NAME
# Derive the socket-dir setting from /etc/powerdns/recursor.conf
# or fall back to the default /var/run if not specified there.
PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/powerdns/recursor.conf)
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run/pdns-recursor; mkdir -p $PIDDIR; fi
PIDFILE=$PIDDIR/$NAME.pid

# Gracefully exit if the package has been removed.
Expand Down
4 changes: 2 additions & 2 deletions builder-support/debian/recursor/debian-stretch/rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ override_dh_auto_configure:
--with-protobuf=yes \
--without-net-snmp \
--disable-silent-rules \
--with-service-user=pdns \
--with-service-group=pdns \
$(CONFIGURE_ARGS)

override_dh_auto_install:
Expand All @@ -42,8 +44,6 @@ override_dh_auto_install:
-e 's!# config-dir=.*!config-dir=/etc/powerdns!' \
-e 's!# local-address=.*!local-address=127.0.0.1!' \
-e 's!# quiet=.*!quiet=yes!' \
-e 's!# setgid=.*!setgid=pdns!' \
-e 's!# setuid=.*!setuid=pdns!' \
-e 's!# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \
> debian/pdns-recursor/etc/powerdns/recursor.conf

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DAEMON=/usr/sbin/$NAME
# Derive the socket-dir setting from /etc/powerdns/recursor.conf
# or fall back to the default /var/run if not specified there.
PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/powerdns/recursor.conf)
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run/pdns-recursor; mkdir -p $PIDDIR; fi
PIDFILE=$PIDDIR/$NAME.pid

# Gracefully exit if the package has been removed.
Expand Down
3 changes: 1 addition & 2 deletions builder-support/specs/pdns-recursor.init
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
RETVAL=0

PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/pdns-recursor/recursor.conf)
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
mkdir -p "$PIDDIR"
if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; mkdir -p $PIDDIR; fi

start() {
echo -n $"Starting pdns-recursor: "
Expand Down
13 changes: 13 additions & 0 deletions builder-support/specs/pdns.spec
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ This package contains the geoip backend for %{name}
It allows different answers to DNS queries coming from different
IP address ranges or based on the geoipgraphic location

%package backend-lmdb
Summary: LMDB backend for %{name}
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: lmdb-devel
%global backends %{backends} lmdb

%description backend-lmdb
This package contains the lmdb backend for %{name}

%package backend-tinydns
Summary: TinyDNS backend for %{name}
Group: System Environment/Daemons
Expand Down Expand Up @@ -408,6 +418,9 @@ fi
%files backend-geoip
%{_libdir}/%{name}/libgeoipbackend.so

%files backend-lmdb
%{_libdir}/%{name}/liblmdbbackend.so

%files backend-tinydns
%{_libdir}/%{name}/libtinydnsbackend.so

Expand Down
26 changes: 23 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ PDNS_CHECK_VIRTUALENV
PDNS_FROM_GIT

dnl Checks for library functions.
AC_CHECK_FUNCS_ONCE([strcasestr localtime_r recvmmsg getrandom arc4random])
AC_CHECK_FUNCS_ONCE([strcasestr localtime_r recvmmsg sched_setscheduler getrandom arc4random])

AM_CONDITIONAL([HAVE_RECVMMSG], [test "x$ac_cv_func_recvmmsg" = "xyes"])

Expand Down Expand Up @@ -350,8 +350,19 @@ AC_MSG_NOTICE([LDFLAGS: $LDFLAGS])
AC_MSG_NOTICE([LIBS: $LIBS])
AC_MSG_NOTICE([BOOST_CPPFLAGS: $BOOST_CPPFLAGS])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Features enabled])
AC_MSG_NOTICE([----------------])
AC_MSG_NOTICE([Extras enabled])
AC_MSG_NOTICE([--------------])
AS_IF([test "x$enable_tools" = "xyes"],
[AC_MSG_NOTICE([Tools: yes])],
[AC_MSG_NOTICE([Tools: no])]
)
AS_IF([test "x$enable_ixfrdist" = "xyes"],
[AC_MSG_NOTICE([ixfrdist: yes])],
[AC_MSG_NOTICE([ixfrdist: no])]
)
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Server Features enabled])
AC_MSG_NOTICE([-----------------------])
AC_MSG_NOTICE([Built-in modules: $modules])
AC_MSG_NOTICE([Dynamic modules: $dynmodules])
AC_MSG_NOTICE([])
Expand Down Expand Up @@ -383,11 +394,20 @@ AS_IF([test "x$enable_experimental_pkcs11" = "xyes"],
AS_IF([test "x$enable_experimental_gss_tsig" = "xyes"],
[AC_MSG_NOTICE([GSS-TSIG: yes])]
)
AS_IF([test "x$enable_lua_records" = "xyes"],
[AC_MSG_NOTICE([LUA records: yes])]
)
AS_IF([test "x$systemd" != "xn"],
[AC_MSG_NOTICE([systemd: yes])],
[AC_MSG_NOTICE([systemd: no])]
)
AS_IF([test "x$enable_remotebackend_zeromq" != "xno"],
[AC_MSG_NOTICE([ZeroMQ connector for remotebackend: yes])]
)
AS_IF([test -n "$GEOIP_LIBS"],
[AC_MSG_NOTICE([libgeoip for geoipbackend: yes])]
)
AS_IF([test -n "$MMDB_LIBS"],
[AC_MSG_NOTICE([libmaxminddb for geoipbackend: yes])]
)
AC_MSG_NOTICE([])
Loading

0 comments on commit 001f57d

Please sign in to comment.