diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-01-17 18:01:31 +0000 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-01-17 18:01:31 +0000 |
commit | b209d37d8dc7bc89da287edbaa972ff9988d1bc4 (patch) | |
tree | 58ad8268cc8b064e719cb48491bdad5eb56cfe67 /dns/powerdns | |
parent | 20c51cce64776c9c08809b57987de7f044993e51 (diff) | |
download | ports-b209d37d8dc7bc89da287edbaa972ff9988d1bc4.tar.gz ports-b209d37d8dc7bc89da287edbaa972ff9988d1bc4.zip |
Notes
Diffstat (limited to 'dns/powerdns')
-rw-r--r-- | dns/powerdns/Makefile | 7 | ||||
-rw-r--r-- | dns/powerdns/distinfo | 6 | ||||
-rw-r--r-- | dns/powerdns/files/patch-configure | 4 | ||||
-rw-r--r-- | dns/powerdns/files/patch-fix_memleak_bindbackend | 80 |
4 files changed, 88 insertions, 9 deletions
diff --git a/dns/powerdns/Makefile b/dns/powerdns/Makefile index 6c3fef1c232e..fa32bd689d59 100644 --- a/dns/powerdns/Makefile +++ b/dns/powerdns/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= powerdns -DISTVERSION= 4.2.0 -PORTREVISION= 1 +DISTVERSION= 4.2.1 CATEGORIES= dns MASTER_SITES= https://downloads.powerdns.com/releases/ DISTNAME= pdns-${DISTVERSION} @@ -69,7 +68,7 @@ GEOIP_VARS= MODULES+=geoip LUABACKEND_VARS= MODULES+=lua2 -LUAJIT_LIB_DEPENDS= libluajit-5.1.so.2:lang/luajit +LUAJIT_LIB_DEPENDS= libluajit-5.1.so.2:lang/luajit-openresty LUAJIT_USES_OFF= lua LUAJIT_CONFIGURE_ON= --with-lua=luajit @@ -126,7 +125,7 @@ LIB_DEPENDS+= libdecaf.so:security/libdecaf \ post-install:: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - @${STAGEDIR}${LOCALBASE}/sbin/pdns_server --module-dir=${STAGEDIR}${LOCALBASE}/lib/pdns --launch="pipe bind ${MODULES}" --config > ${STAGEDIR}${EXAMPLESDIR}/pdns.conf + @${STAGEDIR}${PREFIX}/sbin/pdns_server --module-dir=${STAGEDIR}${PREFIX}/lib/pdns --launch="pipe bind ${MODULES}" --config > ${STAGEDIR}${EXAMPLESDIR}/pdns.conf @${REINPLACE_CMD} -e 's;${STAGEDIR};;' -i '' ${STAGEDIR}${EXAMPLESDIR}/pdns.conf .include <bsd.port.post.mk> diff --git a/dns/powerdns/distinfo b/dns/powerdns/distinfo index b11af8d2f674..b7431a3307d7 100644 --- a/dns/powerdns/distinfo +++ b/dns/powerdns/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1567076172 -SHA256 (pdns-4.2.0.tar.bz2) = 222007f25e25aad71ac7d8b7f1797a4bcb30781e456d74ed00396e53828a903a -SIZE (pdns-4.2.0.tar.bz2) = 1249282 +TIMESTAMP = 1575879679 +SHA256 (pdns-4.2.1.tar.bz2) = f65019986b8fcbb1c6fffebcded04b2b397b84395830f4c63e8d119bcfa1aa28 +SIZE (pdns-4.2.1.tar.bz2) = 1252829 diff --git a/dns/powerdns/files/patch-configure b/dns/powerdns/files/patch-configure index e07547e68394..b2c9c59bbe06 100644 --- a/dns/powerdns/files/patch-configure +++ b/dns/powerdns/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2019-03-22 11:48:09 UTC +--- configure.orig 2019-11-29 19:23:06 UTC +++ configure -@@ -18170,8 +18170,10 @@ fi +@@ -19757,8 +19757,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/files/patch-fix_memleak_bindbackend b/dns/powerdns/files/patch-fix_memleak_bindbackend new file mode 100644 index 000000000000..0da1f968f76d --- /dev/null +++ b/dns/powerdns/files/patch-fix_memleak_bindbackend @@ -0,0 +1,80 @@ +------------------------------------------------------------------------------------------ +bind backend: pthread_mutex_t should be inited and destroyed and not be copied #8350 + +To make our live easier, use a native C++ mutex. +Fixes #8161 + +https://github.com/PowerDNS/pdns/pull/8350 +------------------------------------------------------------------------------------------ +--- modules/bindbackend/bindbackend2.cc.orig 2019-11-29 15:11:44 UTC ++++ modules/bindbackend/bindbackend2.cc +@@ -80,6 +80,9 @@ pthread_mutex_t Bind2Backend::s_supermaster_config_loc + pthread_mutex_t Bind2Backend::s_startup_lock=PTHREAD_MUTEX_INITIALIZER; + string Bind2Backend::s_binddirectory; + ++template <typename T> ++std::mutex LookButDontTouch<T>::s_lock; ++ + BB2DomainInfo::BB2DomainInfo() + { + d_loaded=false; +--- modules/bindbackend/bindbackend2.hh.orig 2019-11-29 15:11:44 UTC ++++ modules/bindbackend/bindbackend2.hh +@@ -29,6 +29,7 @@ + #include <pthread.h> + #include <time.h> + #include <fstream> ++#include <mutex> + #include <boost/utility.hpp> + + #include <boost/tuple/tuple.hpp> +@@ -103,22 +104,18 @@ template <typename T> + class LookButDontTouch // : public boost::noncopyable + { + public: +- LookButDontTouch() ++ LookButDontTouch() + { +- pthread_mutex_init(&d_lock, 0); +- pthread_mutex_init(&d_swaplock, 0); + } + LookButDontTouch(shared_ptr<T> records) : d_records(records) + { +- pthread_mutex_init(&d_lock, 0); +- pthread_mutex_init(&d_swaplock, 0); + } + + shared_ptr<const T> get() + { + shared_ptr<const T> ret; + { +- Lock l(&d_lock); ++ std::lock_guard<std::mutex> lock(s_lock); + ret = d_records; + } + return ret; +@@ -128,22 +125,14 @@ class LookButDontTouch // : public boost::noncopyable + { + shared_ptr<T> ret; + { +- Lock l(&d_lock); ++ std::lock_guard<std::mutex> lock(s_lock); + ret = d_records; + } + return ret; + } + +- +- void swap(shared_ptr<T> records) +- { +- Lock l(&d_lock); +- Lock l2(&d_swaplock); +- d_records.swap(records); +- } +- pthread_mutex_t d_lock; +- pthread_mutex_t d_swaplock; + private: ++ static std::mutex s_lock; + shared_ptr<T> d_records; + }; + |