From 1189349ba4e4b4cf487d09d4479f51f7ea19c5cb Mon Sep 17 00:00:00 2001 From: Sander Hoentjen Date: Mon, 17 Jan 2022 14:06:06 +0100 Subject: [PATCH] Update to 1.7.0 (#2041478) --- .gitignore | 1 + dnsdist-1.7.0-openssl30.patch | 37 +++++++++++++++++++++++++++++++++++ dnsdist.spec | 15 ++++++++++++-- sources | 2 +- 4 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 dnsdist-1.7.0-openssl30.patch diff --git a/.gitignore b/.gitignore index ae529cf..683a9fc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /dnsdist-1.6.0-includes.patch /dnsdist-1.6.0.tar.bz2 /dnsdist-1.6.1.tar.bz2 +/dnsdist-1.7.0.tar.bz2 diff --git a/dnsdist-1.7.0-openssl30.patch b/dnsdist-1.7.0-openssl30.patch new file mode 100644 index 0000000..af1aacd --- /dev/null +++ b/dnsdist-1.7.0-openssl30.patch @@ -0,0 +1,37 @@ +From d0fe73a0910c52c5ad9a57fbebea260ef22f4be4 Mon Sep 17 00:00:00 2001 +From: Remi Gacogne +Date: Mon, 17 Jan 2022 15:44:01 +0100 +Subject: [PATCH] dnsdist-1.7.x: Fix compilation with OpenSSL 3.0.0 + +--- + pdns/credentials.cc | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/pdns/credentials.cc b/pdns/credentials.cc +index b3a09e5c819..d058a948ac1 100644 +--- a/pdns/credentials.cc ++++ b/pdns/credentials.cc +@@ -31,6 +31,7 @@ + #ifdef HAVE_EVP_PKEY_CTX_SET1_SCRYPT_SALT + #include + #include ++#include + #include + #endif + +@@ -105,8 +106,13 @@ static std::string hashPasswordInternal(const std::string& password, const std:: + throw std::runtime_error("Error intializing the scrypt context to hash the supplied password"); + } + +- // OpenSSL 3.0 changed the string arg to const unsigned char*, other versions use const char *, so cast to const void * to satisfy both +- if (EVP_PKEY_CTX_set1_pbe_pass(pctx.get(), reinterpret_cast(password.data()), password.size()) <= 0) { ++ // OpenSSL 3.0 changed the string arg to const unsigned char*, other versions use const char * ++#if OPENSSL_VERSION_MAJOR >= 3 ++ auto passwordData = reinterpret_cast(password.data()); ++#else ++ auto passwordData = reinterpret_cast(password.data()); ++#endif ++ if (EVP_PKEY_CTX_set1_pbe_pass(pctx.get(), passwordData, password.size()) <= 0) { + throw std::runtime_error("Error adding the password to the scrypt context to hash the supplied password"); + } + diff --git a/dnsdist.spec b/dnsdist.spec index e44c2b7..5621b7a 100644 --- a/dnsdist.spec +++ b/dnsdist.spec @@ -6,8 +6,8 @@ %endif Name: dnsdist -Version: 1.6.1 -Release: 3%{?dist} +Version: 1.7.0 +Release: 1%{?dist} Summary: Highly DNS-, DoS- and abuse-aware loadbalancer License: GPLv2 URL: https://dnsdist.org @@ -23,6 +23,7 @@ BuildRequires: gcc-c++ BuildRequires: libatomic BuildRequires: libcap-devel BuildRequires: libedit-devel +BuildRequires: libnghttp2-devel BuildRequires: libsodium-devel BuildRequires: lmdb-devel %ifarch %{ix86} x86_64 %{mips} aarch64 @@ -36,6 +37,7 @@ BuildRequires: re2-devel BuildRequires: readline-devel BuildRequires: systemd-devel BuildRequires: systemd-units +BuildRequires: tinycdb-devel %if 0%{?uglify} BuildRequires: uglify-js %endif @@ -44,6 +46,7 @@ Requires(post): systemd Requires(preun): shadow-utils Requires(preun): systemd Requires(postun): systemd +Patch0: dnsdist-1.7.0-openssl30.patch #https://github.com/PowerDNS/pdns/pull/11195 %description dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life @@ -66,6 +69,9 @@ sed -i '/^ExecStart/ s/dnsdist/dnsdist -u dnsdist -g dnsdist/' dnsdist.service.i --enable-dnscrypt \ --enable-dns-over-tls \ --enable-unit-tests \ + --with-cdb \ + --with-lmdb \ + --with-nghttp2 \ --with-re2 rm html/js/* @@ -113,6 +119,11 @@ exit 0 %changelog +* Mon Jan 17 2022 Sander Hoentjen - 1.7.0-1 +- Update to 1.7.0 (#2041478) +- enable cdb +- enable nghttp2 + * Sat Jan 08 2022 Miro HronĨok - 1.6.1-3 - Rebuilt for libre2.so.9 diff --git a/sources b/sources index f0949b8..ac14d62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dnsdist-1.6.1.tar.bz2) = 68e114eeb1a7ae8a4ce52a7de31095c46d0ba8f572676a8ef1e858b97da199c04ec88656c7642160ba07b7db325cc2a49cd91794da8dd2e81a5301d089c34f90 +SHA512 (dnsdist-1.7.0.tar.bz2) = abaed7aaa18f4acaf220dc938da6896e521373b1da3b6b9c4114467dd5d8b0e6cd9809534edbc6ba5b789ed8387fb47317c47bd4e00e66a6ccb035f6dd6068af