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

Collapse All | Expand All

(-)powerdns/Makefile (-15 / +11 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	powerdns
3
PORTNAME=	powerdns
4
DISTVERSION=	4.2.1
4
DISTVERSION=	4.3.0
5
PORTREVISION=	1
6
CATEGORIES=	dns
5
CATEGORIES=	dns
7
MASTER_SITES=	https://downloads.powerdns.com/releases/
6
MASTER_SITES=	https://downloads.powerdns.com/releases/
8
DISTNAME=	pdns-${DISTVERSION}
7
DISTNAME=	pdns-${DISTVERSION}
Lines 37-46 Link Here
37
		WRKDIRPREFIX="${WRKDIRPREFIX}"
36
		WRKDIRPREFIX="${WRKDIRPREFIX}"
38
SUB_FILES=	pkg-message
37
SUB_FILES=	pkg-message
39
38
40
OPTIONS_DEFINE=			DOCS EXAMPLES GEOIP LUABACKEND LUAJIT MYDNS \
39
OPTIONS_DEFINE=			DOCS EXAMPLES GEOIP LMDB LUABACKEND LUAJIT \
41
				MYSQL OPENDBX OPENLDAP PGSQL PROTOBUF REMOTE \
40
				MYSQL OPENLDAP PGSQL PROTOBUF REMOTE \
42
				SQLITE3 TINYDNS TOOLS UNIXODBC
41
				SQLITE3 TINYDNS TOOLS UNIXODBC
43
OPTIONS_DEFAULT=		MYSQL PGSQL SQLITE3
42
OPTIONS_DEFAULT=		LMDB MYSQL PGSQL SQLITE3
44
OPTIONS_GROUP=			GEOIPOPT REMOTEOPT
43
OPTIONS_GROUP=			GEOIPOPT REMOTEOPT
45
OPTIONS_GROUP_REMOTEOPT=	ZEROMQ
44
OPTIONS_GROUP_REMOTEOPT=	ZEROMQ
46
45
Lines 48-58 Link Here
48
47
49
GEOIPOPT_DESC=		GeoIP DB options
48
GEOIPOPT_DESC=		GeoIP DB options
50
GEOIP_DESC=		GeoIP backend (GeoIP2 DB)
49
GEOIP_DESC=		GeoIP backend (GeoIP2 DB)
50
LMDB_DESC=		LMDB backend
51
LUABACKEND_DESC=	Lua2 backend
51
LUABACKEND_DESC=	Lua2 backend
52
LUAJIT_DESC=		Use LuaJIT instead of Lua
52
LUAJIT_DESC=		Use LuaJIT instead of Lua
53
MYDNS_DESC=		MyDNS backend
54
MYSQL_DESC=		MySQL backend
53
MYSQL_DESC=		MySQL backend
55
OPENDBX_DESC=		OpenDBX backend
56
OPENLDAP_DESC=		OpenLDAP backend
54
OPENLDAP_DESC=		OpenLDAP backend
57
PGSQL_DESC=		PostgreSQL backend
55
PGSQL_DESC=		PostgreSQL backend
58
PROTOBUF_DESC=		Protobuf support
56
PROTOBUF_DESC=		Protobuf support
Lines 67-90 Link Here
67
			libyaml-cpp.so:devel/yaml-cpp
65
			libyaml-cpp.so:devel/yaml-cpp
68
GEOIP_VARS=		MODULES+=geoip
66
GEOIP_VARS=		MODULES+=geoip
69
67
68
LMDB_LIB_DEPENDS=	liblmdb.so:databases/lmdb
69
LMDB_CONFIGURE_OFF=	--without-lmdb
70
LMDB_CONFIGURE_ON=	--with-lmdb=${LOCALBASE}
71
LMDB_VARS=		MODULES+=lmdb
72
70
LUABACKEND_VARS=	MODULES+=lua2
73
LUABACKEND_VARS=	MODULES+=lua2
71
74
72
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so.2:lang/luajit-openresty
75
LUAJIT_LIB_DEPENDS=	libluajit-5.1.so.2:lang/luajit-openresty
73
LUAJIT_USES_OFF=	lua
76
LUAJIT_USES_OFF=	lua
74
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
77
LUAJIT_CONFIGURE_ON=	--with-lua=luajit
75
78
76
MYDNS_USES=		mysql
77
MYDNS_CONFIGURE_ON=	--with-mysql=${LOCALBASE}
78
MYDNS_VARS=		MODULES+=mydns
79
80
MYSQL_USES=		mysql
79
MYSQL_USES=		mysql
81
MYSQL_CONFIGURE_OFF=	--without-mysql
80
MYSQL_CONFIGURE_OFF=	--without-mysql
82
MYSQL_CONFIGURE_ON=	--with-mysql=${LOCALBASE}
81
MYSQL_CONFIGURE_ON=	--with-mysql=${LOCALBASE}
83
MYSQL_VARS=		MODULES+=gmysql
82
MYSQL_VARS=		MODULES+=gmysql
84
83
85
OPENDBX_LIB_DEPENDS=	libopendbx.so:databases/opendbx
86
OPENDBX_VARS=		MODULES+=opendbx
87
88
OPENLDAP_USE=		OPENLDAP=YES
84
OPENLDAP_USE=		OPENLDAP=YES
89
OPENLDAP_CXXFLAGS=	-DLDAP_DEPRECATED=1
85
OPENLDAP_CXXFLAGS=	-DLDAP_DEPRECATED=1
90
OPENLDAP_VARS=		MODULES+=ldap
86
OPENLDAP_VARS=		MODULES+=ldap
Lines 125-131 Link Here
125
.endif
121
.endif
126
122
127
post-install::
123
post-install::
128
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
124
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${STAGEDIR}/var/run/pdns
129
	@${STAGEDIR}${PREFIX}/sbin/pdns_server --module-dir=${STAGEDIR}${PREFIX}/lib/pdns --launch="pipe bind ${MODULES}" --config > ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
125
	@${STAGEDIR}${PREFIX}/sbin/pdns_server --module-dir=${STAGEDIR}${PREFIX}/lib/pdns --launch="pipe bind ${MODULES}" --config > ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
130
	@${REINPLACE_CMD} -e 's;${STAGEDIR};;' -i '' ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
126
	@${REINPLACE_CMD} -e 's;${STAGEDIR};;' -i '' ${STAGEDIR}${EXAMPLESDIR}/pdns.conf
131
127
(-)powerdns/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1575879679
1
TIMESTAMP = 1588788036
2
SHA256 (pdns-4.2.1.tar.bz2) = f65019986b8fcbb1c6fffebcded04b2b397b84395830f4c63e8d119bcfa1aa28
2
SHA256 (pdns-4.3.0.tar.bz2) = 6be2e70f100df6f32cb431d5f57ca0aabde1fba6c11d947eccc86d44bdf95d08
3
SIZE (pdns-4.2.1.tar.bz2) = 1252829
3
SIZE (pdns-4.3.0.tar.bz2) = 1211536
(-)powerdns/files/patch-configure (-3 / +3 lines)
Lines 1-6 Link Here
1
--- configure.orig	2019-11-29 19:23:06 UTC
1
--- configure.orig	2020-02-18 21:26:30.000000000 -0500
2
+++ configure
2
+++ configure	2020-02-18 21:26:30.000000000 -0500
3
@@ -19757,8 +19757,10 @@ fi
3
@@ -19774,8 +19774,10 @@
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
(-)powerdns/files/patch-dns_random.cc (+12 lines)
Line 0 Link Here
1
--- pdns/dns_random.cc.orig	2018-11-29 12:53:42 UTC
2
+++ pdns/dns_random.cc
3
@@ -40,7 +40,9 @@
4
 #include <openssl/rand.h>
5
 #endif
6
 #if defined(HAVE_GETRANDOM)
7
+extern "C" {
8
 #include <sys/random.h>
9
+}
10
 #endif
11
 
12
 static enum DNS_RNG {
(-)powerdns/files/patch-fix_memleak_bindbackend (-80 lines)
Lines 1-80 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
 
(-)powerdns/files/patch-pdns_dns__random.cc (-12 lines)
Lines 1-12 Link Here
1
--- pdns/dns_random.cc.orig	2018-11-29 12:53:42 UTC
2
+++ pdns/dns_random.cc
3
@@ -40,7 +40,9 @@
4
 #include <openssl/rand.h>
5
 #endif
6
 #if defined(HAVE_GETRANDOM)
7
+extern "C" {
8
 #include <sys/random.h>
9
+}
10
 #endif
11
 
12
 static enum DNS_RNG {
(-)powerdns/files/pdns.in (-6 / +6 lines)
Lines 21-37 Link Here
21
name=pdns
21
name=pdns
22
rcvar=pdns_enable
22
rcvar=pdns_enable
23
23
24
command=%%PREFIX%%/sbin/pdns_server
24
load_rc_config ${name}
25
25
26
# set defaults
27
28
pdns_enable=${pdns_enable:-"NO"}
26
pdns_enable=${pdns_enable:-"NO"}
29
pdns_conf=${pdns_conf:-"%%PREFIX%%/etc/pdns/pdns.conf"}
27
pdns_conf=${pdns_conf:-"%%PREFIX%%/etc/pdns/pdns.conf"}
30
pdns_flags=${pdns_flags:-"--daemon=yes --guardian=yes"}
31
28
32
load_rc_config ${name}
33
34
required_files=${pdns_conf}
29
required_files=${pdns_conf}
30
31
pidfile=/var/run/pdns/pdns_server.pid
32
33
command=%%PREFIX%%/sbin/pdns_server
34
command_args="--daemon --guardian"
35
35
36
monitor_cmd="${command} --daemon=no --guardian=no --control-console --loglevel=9"
36
monitor_cmd="${command} --daemon=no --guardian=no --control-console --loglevel=9"
37
extra_commands="monitor"
37
extra_commands="monitor"
(-)powerdns/files/pkg-message.in (-2 / +8 lines)
Lines 1-7 Link Here
1
[
1
[
2
{ type: install
2
{ type: install
3
  message: <<EOM
3
  message: <<EOM
4
 Enable powerdns in /etc/rc.conf with the following line:
4
 Enable PowerDNS in /etc/rc.conf(.local) or in
5
 /etc/rc.conf.d/pdns with the following line:
5
6
6
    pdns_enable="YES"
7
    pdns_enable="YES"
7
8
Lines 20-26 Link Here
20
 -----------------------------------------------
21
 -----------------------------------------------
21
 This version needs a mandatory schema change for the gmsyql,
22
 This version needs a mandatory schema change for the gmsyql,
22
 gpgsql and gsqlite3 backends. SQL statements are available in
23
 gpgsql and gsqlite3 backends. SQL statements are available in
23
 %%DOCSDIR%% or http://doc.powerdns.com
24
 %%DOCSDIR%% or http://Doc.PowerDNS.com
25
 -----------------------------------------------
26
 IMPORTANT: PowerDNS Authoritative Server 4.3.0+:
27
 -----------------------------------------------
28
 MyDNS and OpenDBX backends removed 
29
 https://Blog.PowerDNS.com/2019/10/17/backend-removals-in-the-upcoming-authoritative-server-release/
24
EOM
30
EOM
25
}
31
}
26
]
32
]
(-)powerdns/pkg-descr (-3 / +33 lines)
Lines 1-4 Link Here
1
PowerDNS is an advanced DNS server, which allows for several different
1
The PowerDNS Authoritative Server is the only solution that enables
2
backends. Current backends include MySQL, PostgreSQL, bind, etc.
2
authoritative DNS service from all major databases, including but
3
not limited to MySQL, PostgreSQL, SQLite3, LDAP and plain text files.
3
4
4
WWW: http://www.powerdns.com/
5
DNS answers can also be fully scripted using a variety of (scripting)
6
languages such as Lua, Java, Perl, Python, Ruby, C and C++. Such
7
scripting can be used for dynamic redirection, (spam) filtering or
8
real time intervention.
9
10
In addition, the PowerDNS Authoritative Server is the leading DNSSEC
11
implementation, hosting the majority of all DNSSEC domains worldwide.
12
The Authoritative Server hosts at least 30% of all domain names in
13
Europe, and around 90% of all DNSSEC domains in Europe.
14
15
 * IPv4, UDP/TCP
16
 * IPv6, UDP/TCP, 100% compliant
17
 * Remotely pollable statistics for real time graphing
18
 * MySQL, PostgreSQL, Oracle, Sybase, Microsoft SQL Server, LDAP, SQLite3
19
   - Including replication
20
 * Near instant start up time
21
 * Plain BIND zone files
22
   - Brief start up time
23
 * Migration tools from legacy DNS platforms (zone2sql)
24
 * Internal Lua-based scripted answer generation
25
 * External high-performance Script-based answer generation
26
 * Geographical load balancing
27
 * Full DNSSEC support including all standardized algorithms
28
 * TSIG for transaction signatures, AXFR authorization/requests
29
 * Master/Slave support
30
 * Built-in web server for statistics and limited direct control
31
 * API for direct control (pdns_control, pdnssec)
32
   - Local and remote access
33
34
WWW: https://www.PowerDNS.com/auth.html
(-)powerdns/pkg-plist (-3 / +2 lines)
Lines 24-33 Link Here
24
lib/pdns/libbindbackend.so
24
lib/pdns/libbindbackend.so
25
lib/pdns/libpipebackend.so
25
lib/pdns/libpipebackend.so
26
%%GEOIP%%lib/pdns/libgeoipbackend.so
26
%%GEOIP%%lib/pdns/libgeoipbackend.so
27
%%LMDB%%lib/pdns/liblmdbbackend.so
27
%%LUABACKEND%%lib/pdns/liblua2backend.so
28
%%LUABACKEND%%lib/pdns/liblua2backend.so
28
%%MYDNS%%lib/pdns/libmydnsbackend.so
29
%%MYSQL%%lib/pdns/libgmysqlbackend.so
29
%%MYSQL%%lib/pdns/libgmysqlbackend.so
30
%%OPENDBX%%lib/pdns/libopendbxbackend.so
31
%%OPENLDAP%%lib/pdns/libldapbackend.so
30
%%OPENLDAP%%lib/pdns/libldapbackend.so
32
%%OPENLDAP%%bin/zone2ldap
31
%%OPENLDAP%%bin/zone2ldap
33
%%PGSQL%%lib/pdns/libgpgsqlbackend.so
32
%%PGSQL%%lib/pdns/libgpgsqlbackend.so
Lines 75-82 Link Here
75
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/nodnssec-3.x_to_3.4.0_schema.sqlite3.sql
74
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/nodnssec-3.x_to_3.4.0_schema.sqlite3.sql
76
%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/dnsdomain2.schema
75
%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/dnsdomain2.schema
77
%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/pdns-domaininfo.schema
76
%%OPENLDAP%%%%PORTDOCS%%%%DOCSDIR%%/pdns-domaininfo.schema
78
%%MYDNS%%%%PORTDOCS%%%%DOCSDIR%%/schema.mydns.sql
79
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/schema.mysql.sql
77
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/schema.mysql.sql
80
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/schema.pgsql.sql
78
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/schema.pgsql.sql
81
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/schema.sqlite3.sql
79
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/schema.sqlite3.sql
82
%%UNIXODBC%%%%PORTDOCS%%%%DOCSDIR%%/schema.mssql.sql
80
%%UNIXODBC%%%%PORTDOCS%%%%DOCSDIR%%/schema.mssql.sql
81
@dir(root,wheel,0755) /var/run/pdns

Return to bug 246262