aboutsummaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorHiroki Tagato <tagattie@FreeBSD.org>2020-05-27 12:11:01 +0000
committerHiroki Tagato <tagattie@FreeBSD.org>2020-05-27 12:11:01 +0000
commit1a0a41c91a7b078176d8e3ba75e5899e96277fae (patch)
treec7448c00dd7ed59cbf24b6930a2d4c85bf7d7227 /dns
parent3c1c02fbf49a32b1f15bcc3c9ea091da4a6f236c (diff)
downloadports-1a0a41c91a7b078176d8e3ba75e5899e96277fae.tar.gz
ports-1a0a41c91a7b078176d8e3ba75e5899e96277fae.zip
- Update to 4.3.1
- Mark broken on i386 - Updated hostnamemax patch PR: 246655 Submitted by: Ralf van der Enden <tremere@cainites.net> (maintainer) Approved by: ehaupt (mentor) MFH: 2020Q2 (blanket, security fixes) Security: f9c5a410-9b4e-11ea-ac3f-6805ca2fa271 Changelog: https://doc.powerdns.com/recursor/changelog/4.3.html#change-4.3.1
Notes
Notes: svn path=/head/; revision=536690
Diffstat (limited to 'dns')
-rw-r--r--dns/powerdns-recursor/Makefile3
-rw-r--r--dns/powerdns-recursor/distinfo6
-rw-r--r--dns/powerdns-recursor/files/patch-configure6
-rw-r--r--dns/powerdns-recursor/files/patch-dns_random.cc12
-rw-r--r--dns/powerdns-recursor/files/patch-dnsname.hh6
-rw-r--r--dns/powerdns-recursor/files/patch-hostnamemax90
-rw-r--r--dns/powerdns-recursor/files/patch-pdns_recursor.cc6
7 files changed, 104 insertions, 25 deletions
diff --git a/dns/powerdns-recursor/Makefile b/dns/powerdns-recursor/Makefile
index 0235d7727e5a..b3181f351e50 100644
--- a/dns/powerdns-recursor/Makefile
+++ b/dns/powerdns-recursor/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= recursor
-DISTVERSION= 4.3.0
+DISTVERSION= 4.3.1
CATEGORIES= dns
MASTER_SITES= http://downloads.powerdns.com/releases/
PKGNAMEPREFIX= powerdns-
@@ -16,6 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BROKEN_armv6= fails to compile: use of overloaded operator << is ambiguous
BROKEN_armv7= fails to compile: use of overloaded operator << is ambiguous
+BROKEN_i386= crashes on startup (SIGSEGV)
BROKEN_sparc64= fails to compile: json11.cpp: undefined reference to std::__throw_out_of_range_fmt
BUILD_DEPENDS= ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs
diff --git a/dns/powerdns-recursor/distinfo b/dns/powerdns-recursor/distinfo
index 9a88375d02e5..d58170fcbdd9 100644
--- a/dns/powerdns-recursor/distinfo
+++ b/dns/powerdns-recursor/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1583454090
-SHA256 (pdns-recursor-4.3.0.tar.bz2) = 2bc130f287dfdb32e03d0b38a4ac24baf1117f96eca9b407611c847fa08a628f
-SIZE (pdns-recursor-4.3.0.tar.bz2) = 1349359
+TIMESTAMP = 1589879472
+SHA256 (pdns-recursor-4.3.1.tar.bz2) = 54230852fcad3c6291651069c383f7ea88c5d29ce3c561decb2f40a063f52fd9
+SIZE (pdns-recursor-4.3.1.tar.bz2) = 1334817
diff --git a/dns/powerdns-recursor/files/patch-configure b/dns/powerdns-recursor/files/patch-configure
index cab7763dd981..fa0470671ce0 100644
--- a/dns/powerdns-recursor/files/patch-configure
+++ b/dns/powerdns-recursor/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2020-03-02 07:50:20.000000000 -0500
-+++ configure 2020-03-02 07:50:20.000000000 -0500
-@@ -21139,8 +21139,10 @@
+--- configure.orig 2020-05-08 09:56:25 UTC
++++ configure
+@@ -21467,8 +21467,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/crypto.h in $ssldir" >&5
$as_echo_n "checking for openssl/crypto.h in $ssldir... " >&6; }
if test -f "$ssldir/include/openssl/crypto.h"; then
diff --git a/dns/powerdns-recursor/files/patch-dns_random.cc b/dns/powerdns-recursor/files/patch-dns_random.cc
deleted file mode 100644
index 036f430f6906..000000000000
--- a/dns/powerdns-recursor/files/patch-dns_random.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- dns_random.cc.orig 2018-11-29 12:53:42 UTC
-+++ dns_random.cc
-@@ -40,7 +40,9 @@
- #include <openssl/rand.h>
- #endif
- #if defined(HAVE_GETRANDOM)
-+extern "C" {
- #include <sys/random.h>
-+}
- #endif
-
- static enum DNS_RNG {
diff --git a/dns/powerdns-recursor/files/patch-dnsname.hh b/dns/powerdns-recursor/files/patch-dnsname.hh
index c5f31e7147cc..a60e11872fa1 100644
--- a/dns/powerdns-recursor/files/patch-dnsname.hh
+++ b/dns/powerdns-recursor/files/patch-dnsname.hh
@@ -1,5 +1,5 @@
---- dnsname.hh.orig 2020-03-02 07:49:54.000000000 -0500
-+++ dnsname.hh 2020-03-02 07:49:54.000000000 -0500
+--- dnsname.hh.orig 2020-05-08 09:31:59 UTC
++++ dnsname.hh
@@ -33,7 +33,7 @@
#include <boost/version.hpp>
@@ -9,7 +9,7 @@
#include <boost/container/string.hpp>
#endif
-@@ -138,7 +138,7 @@
+@@ -138,7 +138,7 @@ class DNSName (public)
inline bool canonCompare(const DNSName& rhs) const;
bool slowCanonCompare(const DNSName& rhs) const;
diff --git a/dns/powerdns-recursor/files/patch-hostnamemax b/dns/powerdns-recursor/files/patch-hostnamemax
new file mode 100644
index 000000000000..38beefb1026d
--- /dev/null
+++ b/dns/powerdns-recursor/files/patch-hostnamemax
@@ -0,0 +1,90 @@
+diff --git misc.cc misc.cc
+index f9248af42a..5cb4dbe812 100644
+--- misc.cc
++++ misc.cc
+@@ -57,6 +57,7 @@
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <limits.h>
+ #ifdef __FreeBSD__
+ # include <pthread_np.h>
+ #endif
+@@ -1563,3 +1564,39 @@ bool setPipeBufferSize(int fd, size_t size)
+ return false;
+ #endif /* F_SETPIPE_SZ */
+ }
++
++static size_t getMaxHostNameSize()
++{
++#if defined(HOST_NAME_MAX)
++ return HOST_NAME_MAX;
++#endif
++
++#if defined(_SC_HOST_NAME_MAX)
++ auto tmp = sysconf(_SC_HOST_NAME_MAX);
++ if (tmp != -1) {
++ return tmp;
++ }
++#endif
++
++ /* _POSIX_HOST_NAME_MAX */
++ return 255;
++}
++
++std::string getCarbonHostName()
++{
++ std::string hostname;
++ hostname.resize(getMaxHostNameSize() + 1, 0);
++
++ if (gethostname(const_cast<char*>(hostname.c_str()), hostname.size()) != 0) {
++ throw std::runtime_error(stringerror());
++ }
++
++ auto pos = hostname.find(".");
++ if (pos != std::string::npos) {
++ hostname.resize(pos);
++ }
++
++ boost::replace_all(hostname, ".", "_");
++
++ return hostname;
++}
+diff --git misc.hh misc.hh
+index 4bd9439a87..795e8ec855 100644
+--- misc.hh
++++ misc.hh
+@@ -607,3 +607,5 @@ bool isSettingThreadCPUAffinitySupported();
+ int mapThreadToCPUList(pthread_t tid, const std::set<int>& cpus);
+
+ std::vector<ComboAddress> getResolvers(const std::string& resolvConfPath);
++
++std::string getCarbonHostName();
+diff --git rec-carbon.cc rec-carbon.cc
+index 4e0cedb00f..458a25d5ca 100644
+--- rec-carbon.cc
++++ rec-carbon.cc
+@@ -32,17 +32,13 @@ try
+ if(namespace_name.empty()) {
+ namespace_name="pdns";
+ }
+- if(hostname.empty()) {
+- char tmp[HOST_NAME_MAX+1];
+- memset(tmp, 0, sizeof(tmp));
+- if (gethostname(tmp, sizeof(tmp)) != 0) {
+- throw std::runtime_error("The 'carbon-ourname' setting has not been set and we are unable to determine the system's hostname: " + stringerror());
++ if (hostname.empty()) {
++ try {
++ hostname = getCarbonHostName();
++ }
++ catch(const std::exception& e) {
++ throw std::runtime_error(std::string("The 'carbon-ourname' setting has not been set and we are unable to determine the system's hostname: ") + e.what());
+ }
+- char *p = strchr(tmp, '.');
+- if(p) *p=0;
+-
+- hostname=tmp;
+- boost::replace_all(hostname, ".", "_");
+ }
+ if(instance_name.empty()) {
+ instance_name="recursor";
diff --git a/dns/powerdns-recursor/files/patch-pdns_recursor.cc b/dns/powerdns-recursor/files/patch-pdns_recursor.cc
index 89d90a308788..0fbc96f172e0 100644
--- a/dns/powerdns-recursor/files/patch-pdns_recursor.cc
+++ b/dns/powerdns-recursor/files/patch-pdns_recursor.cc
@@ -1,6 +1,6 @@
---- pdns_recursor.cc.orig 2020-03-02 07:49:54.000000000 -0500
-+++ pdns_recursor.cc 2020-03-02 07:49:54.000000000 -0500
-@@ -4639,12 +4639,12 @@
+--- pdns_recursor.cc.orig 2020-05-08 09:31:59 UTC
++++ pdns_recursor.cc
+@@ -4640,12 +4640,12 @@ int main(int argc, char **argv)
#define SYSTEMD_SETID_MSG ". When running inside systemd, use the User and Group settings in the unit-file!"
SYSTEMD_SETID_MSG
#endif