diff --git a/.gitignore b/.gitignore index ea23545..7d7aed6 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ pdns-2.9.22.tar.gz /pdns-4.5.1.tar.bz2 /pdns-4.5.2.tar.bz2 /pdns-4.5.3.tar.bz2 +/pdns-4.6.0.tar.bz2 diff --git a/pdns-openssl.patch b/pdns-openssl.patch new file mode 100644 index 0000000..0ca99e1 --- /dev/null +++ b/pdns-openssl.patch @@ -0,0 +1,38 @@ +From 1be568979e8ae740026bab44073a5274d43ed9ee Mon Sep 17 00:00:00 2001 +From: Remi Gacogne +Date: Mon, 17 Jan 2022 16:13:09 +0100 +Subject: [PATCH] Fix build with OpenSSL 3.0.0 + +(cherry picked from commit 8535f66672ec9d1eebf5835d3e53238973a80478) +--- + 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/pdns.spec b/pdns.spec index d1b5e77..1201558 100644 --- a/pdns.spec +++ b/pdns.spec @@ -2,13 +2,14 @@ %global backends %{nil} Name: pdns -Version: 4.5.3 +Version: 4.6.0 Release: 1%{?dist} Summary: A modern, advanced and high performance authoritative-only nameserver License: GPLv2 URL: http://powerdns.com Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2 Patch0: pdns-disable-secpoll.patch +Patch1: pdns-openssl.patch ExcludeArch: %{arm} %{ix86} Requires(pre): shadow-utils @@ -317,6 +318,9 @@ exit 0 %{_unitdir}/ixfrdist@.service %changelog +* Tue Jan 25 2022 Morten Stevens - 4.6.0-1 +- Update to 4.6.0 + * Sat Jan 22 2022 Morten Stevens - 4.5.3-1 - Update to 4.5.3 diff --git a/sources b/sources index 33c6428..f8943ae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pdns-4.5.3.tar.bz2) = 9708f69ed045c801e5cbc5d62f57532ad461f1e9e4574fe2b5d5f72e8534587cfc28f55afaaa1a52f59d7feb8331a683b3f5db7e896d01002996321598550607 +SHA512 (pdns-4.6.0.tar.bz2) = bbe64ad01fed0ea93cec90d47b2fe71228b9298999f14456dd4b5617929c0e370b5b7cb568deeb17cbf3fd42873bb8c986e655ddda8c7b93b4591361ddef2397