pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/dnsdist net/dnsdist: Fix build on SunOS, clean up ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f0b01bc21ac5
branches:  trunk
changeset: 383706:f0b01bc21ac5
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Wed Aug 08 15:39:55 2018 +0000

description:
net/dnsdist: Fix build on SunOS, clean up args, disable optional SNMP.

diffstat:

 net/dnsdist/Makefile                        |   5 +-
 net/dnsdist/distinfo                        |   7 ++-
 net/dnsdist/patches/patch-devpollmplexer.cc |  14 +++++++
 net/dnsdist/patches/patch-dnsdist.cc        |  15 ++++++++
 net/dnsdist/patches/patch-iputils.hh        |   6 +--
 net/dnsdist/patches/patch-portsmplexer.cc   |  53 +++++++++++++++++++++++++++++
 6 files changed, 92 insertions(+), 8 deletions(-)

diffs (146 lines):

diff -r 657a8a033f50 -r f0b01bc21ac5 net/dnsdist/Makefile
--- a/net/dnsdist/Makefile      Wed Aug 08 14:10:47 2018 +0000
+++ b/net/dnsdist/Makefile      Wed Aug 08 15:39:55 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2018/08/04 21:40:53 minskim Exp $
+# $NetBSD: Makefile,v 1.8 2018/08/08 15:39:55 fhajny Exp $
 
 DISTNAME=      dnsdist-1.3.2
 CATEGORIES=    net
@@ -30,8 +30,9 @@
 
 CONFIGURE_ARGS+=       --enable-dnscrypt
 CONFIGURE_ARGS+=       --enable-libsodium
-CONFIGURE_ARGS+=       --enable-protobuf
 CONFIGURE_ARGS+=       --enable-re2
+CONFIGURE_ARGS+=       --with-protobuf
+CONFIGURE_ARGS+=       --without-net-snmp
 CONFIGURE_ENV+=                LIBEDIT_CFLAGS="-I${BUILDLINK_PREFIX.libedit}/include"
 CONFIGURE_ENV+=                LIBEDIT_LIBS="-L${BUILDLINK_PREFIX.libedit}/lib -ledit"
 
diff -r 657a8a033f50 -r f0b01bc21ac5 net/dnsdist/distinfo
--- a/net/dnsdist/distinfo      Wed Aug 08 14:10:47 2018 +0000
+++ b/net/dnsdist/distinfo      Wed Aug 08 15:39:55 2018 +0000
@@ -1,9 +1,12 @@
-$NetBSD: distinfo,v 1.5 2018/08/04 21:40:53 minskim Exp $
+$NetBSD: distinfo,v 1.6 2018/08/08 15:39:55 fhajny Exp $
 
 SHA1 (dnsdist-1.3.2.tar.bz2) = 6934250d90bb5de4a723cad3572ad2225be9211e
 RMD160 (dnsdist-1.3.2.tar.bz2) = 4b19dc9a1e6ba008a10be136385d1a297dbb1f87
 SHA512 (dnsdist-1.3.2.tar.bz2) = af7c360d6a5255bc9588622747b8939d30669e2d7d749275b30a9be8cf306a92768327057a93bfa901c44ac8a7572c9bb801a7f6ceca6d736f3e9c71f80f5726
 Size (dnsdist-1.3.2.tar.bz2) = 918200 bytes
+SHA1 (patch-devpollmplexer.cc) = f942ab6fc962496ac8d8e02c95fc4e0bf41d2f06
+SHA1 (patch-dnsdist.cc) = f79f73f6932bf88d25787d26c96da6556343b1ed
 SHA1 (patch-ext_json11_json11.cpp) = 9fb12578d80103b8b92e984a483cbda98fd83db8
-SHA1 (patch-iputils.hh) = 78ffc93b3062d18a02a9ea67e4c6d58d8df7bdbb
+SHA1 (patch-iputils.hh) = 09207cd894162d634cd832f12209e38a0c253624
+SHA1 (patch-portsmplexer.cc) = 9f1b0dc40d0baaa0bf7297d0c4c783abffb16c33
 SHA1 (patch-qtype.hh) = 4551be1e303a31d34030c363849398923f5ff987
diff -r 657a8a033f50 -r f0b01bc21ac5 net/dnsdist/patches/patch-devpollmplexer.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-devpollmplexer.cc       Wed Aug 08 15:39:55 2018 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-devpollmplexer.cc,v 1.1 2018/08/08 15:39:55 fhajny Exp $
+
+This include is not distributed anymore.
+
+--- devpollmplexer.cc.orig     2018-07-10 12:43:20.000000000 +0000
++++ devpollmplexer.cc
+@@ -33,7 +33,6 @@
+ #include <iostream>
+ #include <unistd.h>
+ #include "misc.hh"
+-#include "syncres.hh"
+ 
+ #include "namespaces.hh"
+ 
diff -r 657a8a033f50 -r f0b01bc21ac5 net/dnsdist/patches/patch-dnsdist.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-dnsdist.cc      Wed Aug 08 15:39:55 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-dnsdist.cc,v 1.3 2018/08/08 15:39:55 fhajny Exp $
+
+Bring arg in sync with the code.
+
+--- dnsdist.cc.orig    2018-07-10 12:43:20.000000000 +0000
++++ dnsdist.cc
+@@ -2523,7 +2523,7 @@ try
+ #ifdef SO_REUSEPORT
+       SSetsockopt(cs->tcpFD, SOL_SOCKET, SO_REUSEPORT, 1);
+ #else
+-      warnlog("SO_REUSEPORT has been configured on local address '%s' but is not supported", cs.local.toStringWithPort());
++      warnlog("SO_REUSEPORT has been configured on local address '%s' but is not supported", cs->local.toStringWithPort());
+ #endif
+     }
+     if(cs->local.sin4.sin_family == AF_INET6) {
diff -r 657a8a033f50 -r f0b01bc21ac5 net/dnsdist/patches/patch-iputils.hh
--- a/net/dnsdist/patches/patch-iputils.hh      Wed Aug 08 14:10:47 2018 +0000
+++ b/net/dnsdist/patches/patch-iputils.hh      Wed Aug 08 15:39:55 2018 +0000
@@ -1,8 +1,6 @@
-$NetBSD: patch-iputils.hh,v 1.2 2017/08/22 17:00:35 fhajny Exp $
+$NetBSD: patch-iputils.hh,v 1.3 2018/08/08 15:39:55 fhajny Exp $
 
-- Do not use IP_PKTINFO on NetBSD, the structure is not as expected.
-- Backport fix for SunOS segfault problem, see:
-  https://github.com/PowerDNS/pdns/pull/4877
+Do not use IP_PKTINFO on NetBSD, the structure is not as expected.
 
 --- iputils.hh.orig    2017-01-17 08:43:49.000000000 +0000
 +++ iputils.hh
diff -r 657a8a033f50 -r f0b01bc21ac5 net/dnsdist/patches/patch-portsmplexer.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/dnsdist/patches/patch-portsmplexer.cc Wed Aug 08 15:39:55 2018 +0000
@@ -0,0 +1,53 @@
+$NetBSD: patch-portsmplexer.cc,v 1.1 2018/08/08 15:39:55 fhajny Exp $
+
+Fix stale code and add missing getAvailableFDs() implementation.
+
+--- portsmplexer.cc.orig       2018-07-10 12:43:20.000000000 +0000
++++ portsmplexer.cc
+@@ -24,10 +24,11 @@ public:
+   }
+ 
+   virtual int run(struct timeval* tv, int timeout=500);
++  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);
+   virtual void removeFD(callbackmap_t& cbmap, int fd);
+-  string getName()
++  string getName() const override
+   {
+     return "solaris completion ports";
+   }
+@@ -78,6 +79,22 @@ 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);
++
++  if(ret < 0 && errno!=EINTR)
++    throw FDMultiplexerException("ports returned error: "+stringerror());
++
++  for(int n=0; n < ret; ++n) {
++    fds.push_back(d_pevents[n].portev_object);
++  }
++}
++
+ int PortsFDMultiplexer::run(struct timeval* now, int timeout)
+ {
+   if(d_inrun) {
+@@ -85,8 +102,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);
+   



Home | Main Index | Thread Index | Old Index