View | Details | Raw Unified | Return to bug 242519 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +3 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	powerdns
3
PORTNAME=	powerdns
4
DISTVERSION=	4.2.0
4
DISTVERSION=	4.2.1
5
CATEGORIES=	dns
5
CATEGORIES=	dns
6
MASTER_SITES=	https://downloads.powerdns.com/releases/
6
MASTER_SITES=	https://downloads.powerdns.com/releases/
7
DISTNAME=	pdns-${DISTVERSION}
7
DISTNAME=	pdns-${DISTVERSION}
Lines 68-74 Link Here
68
68
69
LUABACKEND_VARS=	MODULES+=lua2
69
LUABACKEND_VARS=	MODULES+=lua2
70
70
71
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so.2:lang/luajit
71
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so.2:lang/luajit-openresty
72
LUAJIT_USES_OFF=	lua
72
LUAJIT_USES_OFF=	lua
73
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
73
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
74
74
Lines 125-131 Link Here
125
125
126
post-install::
126
post-install::
127
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
127
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
128
	@${STAGEDIR}${LOCALBASE}/sbin/pdns_server --module-dir=${STAGEDIR}${LOCALBASE}/lib/pdns --launch="pipe bind ${MODULES}" --config > ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
128
	@${STAGEDIR}${PREFIX}/sbin/pdns_server --module-dir=${STAGEDIR}${PREFIX}/lib/pdns --launch="pipe bind ${MODULES}" --config > ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
129
	@${REINPLACE_CMD} -e 's;${STAGEDIR};;' -i '' ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
129
	@${REINPLACE_CMD} -e 's;${STAGEDIR};;' -i '' ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
130
130
131
.include <bsd.port.post.mk>
131
.include <bsd.port.post.mk>
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1567076172
1
TIMESTAMP = 1575879679
2
SHA256 (pdns-4.2.0.tar.bz2) = 222007f25e25aad71ac7d8b7f1797a4bcb30781e456d74ed00396e53828a903a
2
SHA256 (pdns-4.2.1.tar.bz2) = f65019986b8fcbb1c6fffebcded04b2b397b84395830f4c63e8d119bcfa1aa28
3
SIZE (pdns-4.2.0.tar.bz2) = 1249282
3
SIZE (pdns-4.2.1.tar.bz2) = 1252829
(-)files/patch-configure (-2 / +2 lines)
Lines 1-6 Link Here
1
--- configure.orig	2019-03-22 11:48:09 UTC
1
--- configure.orig	2019-11-29 19:23:06 UTC
2
+++ configure
2
+++ configure
3
@@ -18170,8 +18170,10 @@ fi
3
@@ -19757,8 +19757,10 @@ fi
4
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/crypto.h in $ssldir" >&5
4
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/crypto.h in $ssldir" >&5
5
 $as_echo_n "checking for openssl/crypto.h in $ssldir... " >&6; }
5
 $as_echo_n "checking for openssl/crypto.h in $ssldir... " >&6; }
6
             if test -f "$ssldir/include/openssl/crypto.h"; then
6
             if test -f "$ssldir/include/openssl/crypto.h"; then
(-)files/patch-fix_memleak_bindbackend (+80 lines)
Line 0 Link Here
1
------------------------------------------------------------------------------------------
2
bind backend: pthread_mutex_t should be inited and destroyed and not be copied #8350
3
4
To make our live easier, use a native C++ mutex.
5
Fixes #8161
6
7
https://github.com/PowerDNS/pdns/pull/8350
8
------------------------------------------------------------------------------------------
9
--- modules/bindbackend/bindbackend2.cc.orig	2019-11-29 15:11:44 UTC
10
+++ modules/bindbackend/bindbackend2.cc
11
@@ -80,6 +80,9 @@ pthread_mutex_t Bind2Backend::s_supermaster_config_loc
12
 pthread_mutex_t Bind2Backend::s_startup_lock=PTHREAD_MUTEX_INITIALIZER;
13
 string Bind2Backend::s_binddirectory;  
14
 
15
+template <typename T>
16
+std::mutex LookButDontTouch<T>::s_lock;
17
+
18
 BB2DomainInfo::BB2DomainInfo()
19
 {
20
   d_loaded=false;
21
--- modules/bindbackend/bindbackend2.hh.orig	2019-11-29 15:11:44 UTC
22
+++ modules/bindbackend/bindbackend2.hh
23
@@ -29,6 +29,7 @@
24
 #include <pthread.h>
25
 #include <time.h>
26
 #include <fstream>
27
+#include <mutex>
28
 #include <boost/utility.hpp>
29
 
30
 #include <boost/tuple/tuple.hpp>
31
@@ -103,22 +104,18 @@ template <typename T>
32
 class LookButDontTouch //  : public boost::noncopyable
33
 {
34
 public:
35
-  LookButDontTouch() 
36
+  LookButDontTouch()
37
   {
38
-    pthread_mutex_init(&d_lock, 0);
39
-    pthread_mutex_init(&d_swaplock, 0);
40
   }
41
   LookButDontTouch(shared_ptr<T> records) : d_records(records)
42
   {
43
-    pthread_mutex_init(&d_lock, 0);
44
-    pthread_mutex_init(&d_swaplock, 0);
45
   }
46
 
47
   shared_ptr<const T> get()
48
   {
49
     shared_ptr<const T> ret;
50
     {
51
-      Lock l(&d_lock);
52
+      std::lock_guard<std::mutex> lock(s_lock);
53
       ret = d_records;
54
     }
55
     return ret;
56
@@ -128,22 +125,14 @@ class LookButDontTouch //  : public boost::noncopyable
57
   {
58
     shared_ptr<T> ret;
59
     {
60
-      Lock l(&d_lock);
61
+      std::lock_guard<std::mutex> lock(s_lock);
62
       ret = d_records;
63
     }
64
     return ret;
65
   }
66
 
67
-
68
-  void swap(shared_ptr<T> records)
69
-  {
70
-    Lock l(&d_lock);
71
-    Lock l2(&d_swaplock);
72
-    d_records.swap(records);
73
-  }
74
-  pthread_mutex_t d_lock;
75
-  pthread_mutex_t d_swaplock;
76
 private:
77
+  static std::mutex s_lock;
78
   shared_ptr<T> d_records;
79
 };
80
 

Return to bug 242519