Index: head/dns/powerdns-recursor/Makefile =================================================================== --- head/dns/powerdns-recursor/Makefile (revision 541028) +++ head/dns/powerdns-recursor/Makefile (revision 541029) @@ -1,63 +1,62 @@ # Created by: sten@blinkenlights.nl # $FreeBSD$ PORTNAME= recursor -DISTVERSION= 4.3.1 -PORTREVISION= 1 +DISTVERSION= 4.3.2 CATEGORIES= dns MASTER_SITES= http://downloads.powerdns.com/releases/ PKGNAMEPREFIX= powerdns- DISTNAME= pdns-${PORTNAME}-${DISTVERSION} MAINTAINER= tremere@cainites.net COMMENT= Advanced DNS recursor LICENSE= GPLv2 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_FreeBSD_12_powerpc64= fails to compile: Assembler messages: unaligned opcodes detected in executable segment BUILD_DEPENDS= ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs LIB_DEPENDS= libboost_context.so:devel/boost-libs \ libprotobuf.so:devel/protobuf USES= compiler:c++11-lib cpe gmake localbase:ldflags pkgconfig ssl \ tar:bzip2 CPE_VENDOR= powerdns USE_RC_SUBR= pdns-recursor GNU_CONFIGURE= YES CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/pdns \ --with-protobuf \ --without-net-snmp SUB_FILES= pkg-message USERS= pdns_recursor GROUPS= pdns OPTIONS_DEFINE= LUAJIT LUAJIT_DESC= Use LuaJIT instead of Lua LUAJIT_LIB_DEPENDS= libluajit-5.1.so.2:lang/luajit-openresty LUAJIT_USES_OFF= lua LUAJIT_CONFIGURE_ON= --with-lua=luajit .include .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200085 && ${SSL_DEFAULT} != openssl CONFIGURE_ARGS+= --enable-libdecaf \ --enable-libsodium LIB_DEPENDS+= libdecaf.so:security/libdecaf \ libsodium.so:security/libsodium .endif post-install: @${MKDIR} ${STAGEDIR}/var/run/pdns-recursor .include Index: head/dns/powerdns-recursor/distinfo =================================================================== --- head/dns/powerdns-recursor/distinfo (revision 541028) +++ head/dns/powerdns-recursor/distinfo (revision 541029) @@ -1,3 +1,3 @@ -TIMESTAMP = 1589879472 -SHA256 (pdns-recursor-4.3.1.tar.bz2) = 54230852fcad3c6291651069c383f7ea88c5d29ce3c561decb2f40a063f52fd9 -SIZE (pdns-recursor-4.3.1.tar.bz2) = 1334817 +TIMESTAMP = 1593680318 +SHA256 (pdns-recursor-4.3.2.tar.bz2) = fcaeba94d5005ec3b973c1800d22eee686f785d3e635ad495d6f44067a4561e1 +SIZE (pdns-recursor-4.3.2.tar.bz2) = 1354549 Index: head/dns/powerdns-recursor/files/patch-hostnamemax =================================================================== --- head/dns/powerdns-recursor/files/patch-hostnamemax (revision 541028) +++ head/dns/powerdns-recursor/files/patch-hostnamemax (nonexistent) @@ -1,90 +0,0 @@ -diff --git misc.cc misc.cc -index f9248af42a..5cb4dbe812 100644 ---- misc.cc -+++ misc.cc -@@ -57,6 +57,7 @@ - #include - #include - #include -+#include - #ifdef __FreeBSD__ - # include - #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(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& cpus); - - std::vector 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"; Property changes on: head/dns/powerdns-recursor/files/patch-hostnamemax ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property