Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/powerdns-recursor net/powerdns-recursor: Update to...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c71f6fcf512d
branches:  trunk
changeset: 435174:c71f6fcf512d
user:      otis <otis%pkgsrc.org@localhost>
date:      Wed Jul 01 14:53:13 2020 +0000

description:
net/powerdns-recursor: Update to 4.3.2

Changes since 4.3.1:

* Released:
  - 1st of July 2020

* Improvements:
  - Defer the NOD lookup until after the response has been sent.
  - CNAME loop detection.

* Bug fixes:
  - Backport of CVE-2020-14196: Enforce webserver ACL.
  - Copy the negative cache entry before validating it.
  - Fix compilation of the ports event multiplexer.
  - Fix the handling of DS queries for the root.
  - Fix RPZ removals when an update has several deltas.
  - Fix compilation on systems that do not define HOST_NAME_MAX.
  - Fix build with gcc-10.Â

* misc.:
  - Correct depth increments.
  - Limit the TTL of RRSIG records as well

diffstat:

 net/powerdns-recursor/Makefile                      |   4 +-
 net/powerdns-recursor/distinfo                      |  14 +--
 net/powerdns-recursor/patches/patch-misc.cc         |  55 ------------
 net/powerdns-recursor/patches/patch-misc.hh         |  13 --
 net/powerdns-recursor/patches/patch-portsmplexer.cc |  93 ---------------------
 net/powerdns-recursor/patches/patch-rec-carbon.cc   |  31 -------
 6 files changed, 7 insertions(+), 203 deletions(-)

diffs (246 lines):

diff -r d0df361a1b94 -r c71f6fcf512d net/powerdns-recursor/Makefile
--- a/net/powerdns-recursor/Makefile    Wed Jul 01 14:51:43 2020 +0000
+++ b/net/powerdns-recursor/Makefile    Wed Jul 01 14:53:13 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.36 2020/06/17 22:55:11 otis Exp $
+# $NetBSD: Makefile,v 1.37 2020/07/01 14:53:13 otis Exp $
 
-DISTNAME=      pdns-recursor-4.3.1
+DISTNAME=      pdns-recursor-4.3.2
 PKGNAME=       ${DISTNAME:S/pdns/powerdns/}
 CATEGORIES=    net
 MASTER_SITES=  http://downloads.powerdns.com/releases/
diff -r d0df361a1b94 -r c71f6fcf512d net/powerdns-recursor/distinfo
--- a/net/powerdns-recursor/distinfo    Wed Jul 01 14:51:43 2020 +0000
+++ b/net/powerdns-recursor/distinfo    Wed Jul 01 14:53:13 2020 +0000
@@ -1,17 +1,13 @@
-$NetBSD: distinfo,v 1.32 2020/06/17 22:55:11 otis Exp $
+$NetBSD: distinfo,v 1.33 2020/07/01 14:53:13 otis Exp $
 
-SHA1 (pdns-recursor-4.3.1.tar.bz2) = 34d615b0bf4f321f16d54bbcb04fc850a4c789e8
-RMD160 (pdns-recursor-4.3.1.tar.bz2) = 363d74b92d7c609393269566c28d4ca25d7c0a69
-SHA512 (pdns-recursor-4.3.1.tar.bz2) = 49ae4957ef202f94ec87e6449dfa9c147689b5576ca1002e0155319099d698300c113e221571f6d41cb1cdc1649619621c2ccf8105620c25452ac30bd83e46b8
-Size (pdns-recursor-4.3.1.tar.bz2) = 1334817 bytes
+SHA1 (pdns-recursor-4.3.2.tar.bz2) = 1bbe98f8eb726a0468d274f6c6c6dc5dc373df77
+RMD160 (pdns-recursor-4.3.2.tar.bz2) = e1618a3901b34df1df477f889705b2d65516a7fe
+SHA512 (pdns-recursor-4.3.2.tar.bz2) = d1ca566dc8785fda3764838a0ea598acc4106b6261ebdbbe43fc6a6e4a82c375f7ef3f6d23fbd9b216067eb9cf56fcae6d460bfc7957ba4c201d466ad15d75d7
+Size (pdns-recursor-4.3.2.tar.bz2) = 1354549 bytes
 SHA1 (patch-dns.hh) = 7e9c1b10a066a605b74ebdbee2d894aed50f6c68
 SHA1 (patch-ext_json11_json11.cpp) = 2de8ea8b51556bd3e3c1a88f681697eff239ab1a
-SHA1 (patch-misc.cc) = d404dbb0c08b1f055abd52fcee7eae6cc96b1d9c
-SHA1 (patch-misc.hh) = d6f33a0dd530526dac0669739785ea53ddd8fb2c
 SHA1 (patch-pdns__recursor.cc) = 69bb4aa20e691e557f9a8cac3a3ebf30c52febef
-SHA1 (patch-portsmplexer.cc) = 3e5232e0fc0a4e57aa74b6ebd594291598e7eb66
 SHA1 (patch-qtype.hh) = f14eb9ad7efc7dd4a0ce220c1f93044ef69e99c2
-SHA1 (patch-rec-carbon.cc) = 443be1a7e7aad3e55fd9de2ae3a3359bb025f9a2
 SHA1 (patch-rec__control.cc) = 876a4527c871c4df05e0f14a2ea858e411ffefbd
 SHA1 (patch-version.cc) = 26226a02198edd9d8890a5199ee5a8051334fe41
 SHA1 (patch-webserver.cc) = 2b34430b990c8398daf565d4811fd12848234c6a
diff -r d0df361a1b94 -r c71f6fcf512d net/powerdns-recursor/patches/patch-misc.cc
--- a/net/powerdns-recursor/patches/patch-misc.cc       Wed Jul 01 14:51:43 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-$NetBSD: patch-misc.cc,v 1.1 2020/06/17 22:55:11 otis Exp $
-
-backport changes based on PR #9127 from
-https://github.com/PowerDNS/pdns/pull/9127
-
---- misc.cc.orig       2020-05-08 09:31:59.000000000 +0000
-+++ 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 si
-   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 -r d0df361a1b94 -r c71f6fcf512d net/powerdns-recursor/patches/patch-misc.hh
--- a/net/powerdns-recursor/patches/patch-misc.hh       Wed Jul 01 14:51:43 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-misc.hh,v 1.1 2020/06/17 22:55:11 otis Exp $
-
-backport changes based on PR #9127 from
-https://github.com/PowerDNS/pdns/pull/9127
-
---- misc.hh.orig       2020-05-08 09:31:59.000000000 +0000
-+++ 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 -r d0df361a1b94 -r c71f6fcf512d net/powerdns-recursor/patches/patch-portsmplexer.cc
--- a/net/powerdns-recursor/patches/patch-portsmplexer.cc       Wed Jul 01 14:51:43 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-$NetBSD: patch-portsmplexer.cc,v 1.2 2020/04/16 13:09:28 jperkin Exp $
-
-Pull in upstream patch from https://github.com/PowerDNS/pdns/pull/9031
-
---- portsmplexer.cc.orig       2020-04-16 12:54:40.155420464 +0000
-+++ portsmplexer.cc
-@@ -23,11 +23,12 @@ public:
-     close(d_portfd);
-   }
- 
--  virtual int run(struct timeval* tv, int timeout=500);
-+  virtual int run(struct timeval* tv, int timeout=500) override;
-+  virtual void getAvailableFDs(std::vector<int>& fds, int timeout) override;
- 
--  virtual void addFD(callbackmap_t& cbmap, int fd, callbackfunc_t toDo, const boost::any& parameter, const struct timeval* ttd=nullptr);
--  virtual void removeFD(callbackmap_t& cbmap, int fd);
--  string getName()
-+  virtual void addFD(callbackmap_t& cbmap, int fd, callbackfunc_t toDo, const boost::any& parameter, const struct timeval* ttd=nullptr) override;
-+  virtual void removeFD(callbackmap_t& cbmap, int fd) override;
-+  string getName() const override
-   {
-     return "solaris completion ports";
-   }
-@@ -78,6 +79,58 @@ void PortsFDMultiplexer::removeFD(callba
-     throw FDMultiplexerException("Removing fd from port set: "+stringerror());
- }
- 
-+void PortsFDMultiplexer::getAvailableFDs(std::vector<int>& fds, int timeout)
-+{
-+  struct timespec timeoutspec;
-+  timeoutspec.tv_sec = timeout / 1000;
-+  timeoutspec.tv_nsec = (timeout % 1000) * 1000000;
-+  unsigned int numevents = 1;
-+  int ret = port_getn(d_portfd, d_pevents.get(), min(PORT_MAX_LIST, s_maxevents), &numevents, &timeoutspec);
-+
-+  /* port_getn has an unusual API - (ret == -1, errno == ETIME) can
-+     mean partial success; you must check (*numevents) in this case
-+     and process anything in there, otherwise you'll never see any
-+     events from that object again. We don't care about pure timeouts
-+     (ret == -1, errno == ETIME, *numevents == 0) so we don't bother
-+     with that case. */
-+  if (ret == -1 && errno != ETIME) {
-+    if (errno != EINTR) {
-+      throw FDMultiplexerException("completion port_getn returned error: " + stringerror());
-+    }
-+
-+    // EINTR is not really an error
-+    return;
-+  }
-+
-+  if (numevents == 0) {
-+    // nothing
-+    return;
-+  }
-+
-+  fds.reserve(numevents);
-+
-+  for (unsigned int n = 0; n < numevents; ++n) {
-+    const auto fd = d_pevents[n].portev_object;
-+
-+    /* we need to re-associate the FD */
-+    if (d_readCallbacks.count(fd)) {
-+      if (port_associate(d_portfd, PORT_SOURCE_FD, fd, POLLIN, 0) < 0) {
-+        throw FDMultiplexerException("Unable to add fd back to ports (read): " + stringerror());
-+      }
-+    }
-+    else if (d_writeCallbacks.count(fd)) {
-+      if (port_associate(d_portfd, PORT_SOURCE_FD, fd, POLLOUT, 0) < 0) {
-+        throw FDMultiplexerException("Unable to add fd back to ports (write): " + stringerror());
-+      }
-+    } else {
-+      /* not registered, this is unexpected */
-+      continue;
-+    }
-+
-+    fds.push_back(fd);
-+  }
-+}
-+
- int PortsFDMultiplexer::run(struct timeval* now, int timeout)
- {
-   if(d_inrun) {
-@@ -85,8 +138,8 @@ int PortsFDMultiplexer::run(struct timev
-   }
-   
-   struct timespec timeoutspec;
--  timeoutspec.tv_sec = time / 1000;
--  timeoutspec.tv_nsec = (time % 1000) * 1000000;
-+  timeoutspec.tv_sec = timeout / 1000;
-+  timeoutspec.tv_nsec = (timeout % 1000) * 1000000;
-   unsigned int numevents=1;
-   int ret= port_getn(d_portfd, d_pevents.get(), min(PORT_MAX_LIST, s_maxevents), &numevents, &timeoutspec);
-   
diff -r d0df361a1b94 -r c71f6fcf512d net/powerdns-recursor/patches/patch-rec-carbon.cc
--- a/net/powerdns-recursor/patches/patch-rec-carbon.cc Wed Jul 01 14:51:43 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-$NetBSD: patch-rec-carbon.cc,v 1.1 2020/06/17 22:55:11 otis Exp $
-
-backport changes based on PR #9127 from
-https://github.com/PowerDNS/pdns/pull/9127
-
---- rec-carbon.cc.orig 2020-06-17 21:27:18.582569489 +0000
-+++ 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";



Home | Main Index | Thread Index | Old Index