Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Enable the new YAML configuration in our packages #15065

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions builder-support/debian/dnsdist/debian-bookworm/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Priority: optional
Maintainer: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Uploaders: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Build-Depends: debhelper (>= 10),
clang,
libboost-all-dev,
libbpf-dev [linux-any],
libcap-dev,
Expand All @@ -22,7 +23,9 @@ Build-Depends: debhelper (>= 10),
libsystemd-dev [linux-any],
libwslay-dev,
libxdp-dev [linux-any],
lld,
pkg-config,
python3-yaml,
ragel,
systemd [linux-any]
Standards-Version: 4.1.5
Expand Down
7 changes: 7 additions & 0 deletions builder-support/debian/dnsdist/debian-bookworm/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ include /usr/share/dpkg/default.mk

# for atomic support on powerpc (automatic on mipsel)
LDFLAGS += -latomic
# We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
# build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
# and the --no-as-needed -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl
CC=clang
CXX=clang++

# Only enable systemd integration on Linux operating systems
ifeq ($(DEB_HOST_ARCH_OS),linux)
Expand Down Expand Up @@ -59,6 +65,7 @@ override_dh_auto_configure:
--enable-dns-over-tls \
--enable-dnscrypt \
--enable-dnstap \
--enable-yaml \
--with-ebpf \
--with-gnutls \
--with-h2o \
Expand Down
3 changes: 3 additions & 0 deletions builder-support/debian/dnsdist/debian-buster/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Priority: optional
Maintainer: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Uploaders: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Build-Depends: debhelper (>= 10),
clang,
libboost-all-dev,
libcap-dev,
libcdb-dev,
Expand All @@ -20,7 +21,9 @@ Build-Depends: debhelper (>= 10),
libssl-dev,
libsystemd-dev [linux-any],
libwslay-dev,
lld,
pkg-config,
python3-yaml,
ragel,
systemd [linux-any]
Standards-Version: 4.1.5
Expand Down
7 changes: 7 additions & 0 deletions builder-support/debian/dnsdist/debian-buster/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ include /usr/share/dpkg/default.mk

# for atomic support on powerpc (automatic on mipsel)
LDFLAGS += -latomic
# We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
# build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
# and the --no-as-needed -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl
CC=clang
CXX=clang++

# Only enable systemd integration on Linux operating systems
ifeq ($(DEB_HOST_ARCH_OS),linux)
Expand Down Expand Up @@ -52,6 +58,7 @@ override_dh_auto_configure:
--enable-dns-over-tls \
--enable-dnscrypt \
--enable-dnstap \
--enable-yaml \
--with-ebpf \
--with-gnutls \
--with-h2o \
Expand Down
3 changes: 1 addition & 2 deletions builder-support/dockerfiles/Dockerfile.dnsdist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:3.18 as dnsdist
ARG BUILDER_CACHE_BUSTER=

RUN apk add --no-cache gcc g++ make tar autoconf automake protobuf-dev lua-dev \
libtool file boost-dev ragel python3 git libedit-dev bash
libtool file boost-dev ragel python3 py3-yaml git libedit-dev bash

ADD builder/helpers/set-configure-ac-version.sh /dnsdist/builder/helpers/
ADD COPYING /dnsdist/
Expand All @@ -19,4 +19,3 @@ RUN /dnsdist/builder/helpers/set-configure-ac-version.sh && \
./configure --disable-dependency-tracking && \
make dist
RUN cp dnsdist-${BUILDER_VERSION}.tar.bz2 /sdist/

17 changes: 17 additions & 0 deletions builder-support/specs/dnsdist.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ BuildRequires: systemd-devel
BuildRequires: boost169-devel
%else
BuildRequires: boost-devel
BuildRequires: python3-pyyaml
%endif

%if 0%{?rhel} >= 8
BuildRequires: clang
BuildRequires: lld
%endif

%if 0%{?rhel} >= 7 || 0%{?amzn} == 2023
Expand Down Expand Up @@ -71,6 +77,14 @@ dnsdist is a high-performance DNS loadbalancer that is scriptable in Lua.
export CPPFLAGS=-I/usr/include/boost169
export LDFLAGS=-L/usr/lib64/boost169
%endif
%if 0%{?rhel} >= 8
# We need to build with LLVM/clang to be able to use LTO, since we are linking against a static Rust library built with LLVM
export CC=clang
export CXX=clang++
# build-id SHA1 prevents an issue with the debug symbols ("export: `-Wl,--build-id=sha1': not a valid identifier")
# and the --no-as-needed -ldl an issue with the dlsym not being found ("ld.lld: error: undefined symbol: dlsym eferenced by weak.rs:142 (library/std/src/sys/pal/unix/weak.rs:142) [...] in archive ./dnsdist-rust-lib/rust/libdnsdist_rust.a)
export LDFLAGS="-fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl"
%endif

export AR=gcc-ar
export RANLIB=gcc-ranlib
Expand Down Expand Up @@ -109,6 +123,9 @@ export RANLIB=gcc-ranlib
--enable-dns-over-quic \
--enable-dns-over-http3 \
--with-quiche \
%endif
%if 0%{?rhel} >= 8
--enable-yaml \
%endif
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/lib64/pkgconfig
%endif
Expand Down
1 change: 1 addition & 0 deletions pdns/dnsdistdist/test-dnsdistrules_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define BOOST_TEST_NO_MAIN

#include <thread>
#include <variant>
#include <boost/test/unit_test.hpp>

#include "dnsdist-rules.hh"
Expand Down
Loading