dns/powerdns: fix pkg-plist, pidfile in rc.d script and more
- Add missing entries to pkg-plist - Add ixfrdist tool - Change pidfile back to ${name}.pid in the rc.d script - Pet portlint a bit (regenerate files/patch-configure and ran Makefile though portfmt) - Remove patch-dns_random.cc (only needed on 12.0, which is EoL) - Move upgrade instructions from pkg-install to pkg-message - Bump PORTREVISION - Upgrading the port now shows a message about required schema changes for several backends. PR: 246434 Submitted by: Ralf van der Enden <tremere@cainites.net> (maintainer) Reported by: Dominik Lisiak <dominik.lisiak@bemsoft.pl>
This commit is contained in:
parent
e2e8180e91
commit
cf34c31a93
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=535231
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= powerdns
|
||||
DISTVERSION= 4.3.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= dns
|
||||
MASTER_SITES= https://downloads.powerdns.com/releases/
|
||||
DISTNAME= pdns-${DISTVERSION}
|
||||
@ -11,7 +12,7 @@ COMMENT= Advanced DNS server with multiple backends including SQL
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
BROKEN_sparc64= Does not compile: error: to_string is not a member of std
|
||||
BROKEN_sparc64= Does not compile: error: to_string is not a member of std
|
||||
|
||||
LIB_DEPENDS= libboost_serialization.so:devel/boost-libs \
|
||||
libcurl.so:ftp/curl
|
||||
@ -36,8 +37,8 @@ SCRIPTS_ENV= CURDIR2="${.CURDIR}" DISTNAME="${DISTNAME}" MKDIR="${MKDIR}" \
|
||||
WRKDIRPREFIX="${WRKDIRPREFIX}"
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
OPTIONS_DEFINE= DOCS EXAMPLES GEOIP LMDB LUABACKEND LUAJIT \
|
||||
MYSQL OPENLDAP PGSQL PROTOBUF REMOTE \
|
||||
OPTIONS_DEFINE= DOCS EXAMPLES GEOIP IXFRDIST LMDB LUABACKEND \
|
||||
LUAJIT MYSQL OPENLDAP PGSQL PROTOBUF REMOTE \
|
||||
SQLITE3 TINYDNS TOOLS UNIXODBC
|
||||
OPTIONS_DEFAULT= LMDB MYSQL PGSQL SQLITE3
|
||||
OPTIONS_GROUP= GEOIPOPT REMOTEOPT
|
||||
@ -47,6 +48,7 @@ OPTIONS_SUB= yes
|
||||
|
||||
GEOIPOPT_DESC= GeoIP DB options
|
||||
GEOIP_DESC= GeoIP backend (GeoIP2 DB)
|
||||
IXFRDIST_DESC= Build ixfrdist
|
||||
LMDB_DESC= LMDB backend
|
||||
LUABACKEND_DESC= Lua2 backend
|
||||
LUAJIT_DESC= Use LuaJIT instead of Lua
|
||||
@ -65,9 +67,11 @@ GEOIP_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb \
|
||||
libyaml-cpp.so:devel/yaml-cpp
|
||||
GEOIP_VARS= MODULES+=geoip
|
||||
|
||||
IXFRDIST_CONFIGURE_ENABLE= ixfrdist
|
||||
|
||||
LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb
|
||||
LMDB_CONFIGURE_OFF= --without-lmdb
|
||||
LMDB_CONFIGURE_ON= --with-lmdb=${LOCALBASE}
|
||||
LMDB_CONFIGURE_OFF= --without-lmdb
|
||||
LMDB_VARS= MODULES+=lmdb
|
||||
|
||||
LUABACKEND_VARS= MODULES+=lua2
|
||||
@ -77,8 +81,8 @@ LUAJIT_USES_OFF= lua
|
||||
LUAJIT_CONFIGURE_ON= --with-lua=luajit
|
||||
|
||||
MYSQL_USES= mysql
|
||||
MYSQL_CONFIGURE_OFF= --without-mysql
|
||||
MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE}
|
||||
MYSQL_CONFIGURE_OFF= --without-mysql
|
||||
MYSQL_VARS= MODULES+=gmysql
|
||||
|
||||
OPENLDAP_USE= OPENLDAP=YES
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- configure.orig 2020-02-18 21:26:30.000000000 -0500
|
||||
+++ configure 2020-02-18 21:26:30.000000000 -0500
|
||||
@@ -19774,8 +19774,10 @@
|
||||
--- configure.orig 2020-04-06 12:51:03 UTC
|
||||
+++ configure
|
||||
@@ -19774,8 +19774,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
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- pdns/dns_random.cc.orig 2018-11-29 12:53:42 UTC
|
||||
+++ pdns/dns_random.cc
|
||||
@@ -40,7 +40,9 @@
|
||||
#include <openssl/rand.h>
|
||||
#endif
|
||||
#if defined(HAVE_GETRANDOM)
|
||||
+extern "C" {
|
||||
#include <sys/random.h>
|
||||
+}
|
||||
#endif
|
||||
|
||||
static enum DNS_RNG {
|
@ -28,7 +28,7 @@ pdns_conf=${pdns_conf:-"%%PREFIX%%/etc/pdns/pdns.conf"}
|
||||
|
||||
required_files=${pdns_conf}
|
||||
|
||||
pidfile=/var/run/pdns/pdns_server.pid
|
||||
pidfile=/var/run/pdns/${name}.pid
|
||||
|
||||
command=%%PREFIX%%/sbin/pdns_server
|
||||
command_args="--daemon --guardian"
|
||||
|
@ -1,32 +1,54 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
Enable PowerDNS in /etc/rc.conf(.local) or in
|
||||
/etc/rc.conf.d/pdns with the following line:
|
||||
Enable PowerDNS in /etc/rc.conf(.local) or in /etc/rc.conf.d/pdns with the following line:
|
||||
|
||||
pdns_enable="YES"
|
||||
|
||||
A configuration template is available in %%PREFIX%%/etc/pdns
|
||||
as pdns.conf-dist.
|
||||
A configuration template is available in %%PREFIX%%/etc/pdns as pdns.conf-dist.
|
||||
|
||||
A pdns.conf with all possible options is available in
|
||||
%%EXAMPLESDIR%%
|
||||
A pdns.conf with all possible options is available in %%EXAMPLESDIR%%
|
||||
|
||||
Initialization file(s) for your database backend(s) are available in %%DOCSDIR%% as "schema.X.sql"
|
||||
EOM
|
||||
}
|
||||
{ type: upgrade
|
||||
maximum_versio: 3.4
|
||||
maximum_version: "3.4.0"
|
||||
message: <<EOM
|
||||
-----------------------------------------------
|
||||
IMPORTANT: PowerDNS Authoritative Server 3.4.0+:
|
||||
-----------------------------------------------
|
||||
This version needs a mandatory schema change for the gmsyql,
|
||||
gpgsql and gsqlite3 backends. SQL statements are available in
|
||||
%%DOCSDIR%% or http://Doc.PowerDNS.com
|
||||
-----------------------------------------------
|
||||
IMPORTANT: PowerDNS Authoritative Server 4.3.0+:
|
||||
-----------------------------------------------
|
||||
MyDNS and OpenDBX backends removed
|
||||
https://Blog.PowerDNS.com/2019/10/17/backend-removals-in-the-upcoming-authoritative-server-release/
|
||||
This version needs a mandatory schema change for the gmsyql, gpgsql and gsqlite3 backends. SQL
|
||||
statements are available in %%DOCSDIR%% or https://doc.powerdns.com
|
||||
EOM
|
||||
}
|
||||
{ type: upgrade
|
||||
maximum_version: "4.2.0"
|
||||
mimimum_version: "4.0.0"
|
||||
message: <<EOM
|
||||
Autoserial support has been removed. The change_date column has been removed from the records table
|
||||
in all gsql backends, but leaving it in is harmless.
|
||||
The Generic PostgreSQL backend schema has changed: the notified_serial column type in the domains
|
||||
table has been changed from INT DEFAULT NULL to BIGINT
|
||||
DEFAULT NULL:
|
||||
ALTER TABLE domains ALTER notified_serial TYPE bigint USING CASE WHEN notified_serial >= 0 THEN
|
||||
notified_serial::bigint END;
|
||||
|
||||
This version needs a mandatory schema change for the gmsyql, godbc (mssql), gpgsql and gsqlite3
|
||||
backends. SQL statements are available in %%DOCSDIR%% or https://doc.powerdns.com
|
||||
EOM
|
||||
}
|
||||
{ type: upgrade
|
||||
minimum_version: "4.2.0"
|
||||
message: <<EOM
|
||||
MyDNS and OpenDBX backends removed
|
||||
https://Blog.PowerDNS.com/2019/10/17/backend-removals-in-the-upcoming-authoritative-server-release/
|
||||
|
||||
The new ‘unpublished DNSSEC keys’ feature' comes with a mandatory schema change for all database
|
||||
backends (including BIND with a DNSSEC database).
|
||||
|
||||
This version needs a mandatory schema change for the gmsyql, godbc(mssql), gpgsql and gsqlite3
|
||||
backends. SQL statements are available in %%DOCSDIR%% or https://doc.powerdns.com
|
||||
|
||||
For the LMDB backend, please review lmdb-schema-version
|
||||
(https://doc.powerdns.com/authoritative/backends/lmdb.html#setting-lmdb-schema-version)
|
||||
EOM
|
||||
}
|
||||
]
|
||||
|
@ -1,42 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
PATH=/bin:/usr/bin:/usr/sbin
|
||||
|
||||
securitywarning() {
|
||||
cat <<EOF
|
||||
|
||||
=== IMPORTANT FOR GPGSQL BACKEND USERS! ===
|
||||
The following only impacts anyone using the
|
||||
gpgsql (PostgreSQL) backend:
|
||||
|
||||
An issue has been found in PowerDNS
|
||||
Authoritative Server allowing an authorized
|
||||
user to cause the server to exit by
|
||||
inserting a crafted record in a MASTER type
|
||||
zone under their control. The issue is due
|
||||
to the fact that the Authoritative Server
|
||||
will exit when it tries to store the
|
||||
notified serial in the PostgreSQL database,
|
||||
if this serial cannot be represented in 31
|
||||
bits.
|
||||
|
||||
To fix the issue, run the following command
|
||||
against your PostgreSQL pdns database:
|
||||
|
||||
ALTER TABLE domains ALTER notified_serial
|
||||
TYPE bigint USING CASE WHEN notified_serial
|
||||
>= 0 THEN notified_serial::bigint END;
|
||||
|
||||
No software changes are required.
|
||||
===========================================
|
||||
EOF
|
||||
}
|
||||
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
securitywarning
|
||||
sleep 5
|
||||
;;
|
||||
esac
|
@ -14,6 +14,7 @@ sbin/pdns_server
|
||||
%%TOOLS%%bin/dnstcpbench
|
||||
%%TOOLS%%bin/dnswasher
|
||||
%%TOOLS%%bin/dumresp
|
||||
%%IXFRDIST%%bin/ixfrdist
|
||||
%%TOOLS%%bin/ixplore
|
||||
%%TOOLS%%bin/nproxy
|
||||
%%TOOLS%%bin/nsec3dig
|
||||
@ -40,6 +41,7 @@ lib/pdns/libpipebackend.so
|
||||
%%TOOLS%%man/man1/dnspcap2calidns.1.gz
|
||||
%%TOOLS%%man/man1/dnsscan.1.gz
|
||||
%%TOOLS%%man/man1/dumresp.1.gz
|
||||
%%IXFRDIST%%man/man1/ixfrdist.1.gz
|
||||
%%TOOLS%%man/man1/ixplore.1.gz
|
||||
%%TOOLS%%man/man1/nproxy.1.gz
|
||||
%%TOOLS%%man/man1/nsec3dig.1.gz
|
||||
@ -57,19 +59,26 @@ man/man1/zone2sql.1.gz
|
||||
%%TOOLS%%man/man1/dnsreplay.1.gz
|
||||
%%TOOLS%%man/man1/dnsscope.1.gz
|
||||
%%TOOLS%%man/man1/dnswasher.1.gz
|
||||
%%IXFRDIST%%man/man5/ixfrdist.yml.5.gz
|
||||
%%IXFRDIST%%etc/pdns/ixfrdist.example.yml
|
||||
@sample etc/pdns/pdns.conf-dist etc/pdns/pdns.conf
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pdns.conf
|
||||
%%PORTEXAMPLES%%@dir %%EXAMPLESDIR%%
|
||||
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/3.4.0_to_4.1.0_schema.mysql.sql
|
||||
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/3.4.0_to_4.1.0_schema.pgsql.sql
|
||||
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/3.4.0_to_4.0.0_schema.sqlite3.sql
|
||||
%%UNIXODBC%%%%PORTDOCS%%%%DOCSDIR%%/4.0.0_to_4.2.0_schema.mssql.sql
|
||||
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/4.0.0_to_4.2.0_schema.sqlite3.sql
|
||||
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/4.1.0_to_4.2.0_schema.mysql.sql
|
||||
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/4.1.0_to_4.2.0_schema.pgsql.sql
|
||||
%%UNIXODBC%%%%PORTDOCS%%%%DOCSDIR%%/4.2.0_to_4.3.0_schema.mssql.sql
|
||||
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/4.2.0_to_4.3.0_schema.mysql.sql
|
||||
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/4.2.0_to_4.3.0_schema.pgsql.sql
|
||||
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/4.2.0_to_4.3.0_schema.sqlite3.sql
|
||||
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/dnssec-3.x_to_3.4.0_schema.mysql.sql
|
||||
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/dnssec-3.x_to_3.4.0_schema.pgsql.sql
|
||||
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/dnssec-3.x_to_3.4.0_schema.sqlite3.sql
|
||||
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/enable-foreign-keys.mysql.sql
|
||||
%%MYSQL%%%%PORTDOCS%%%%DOCSDIR%%/nodnssec-3.x_to_3.4.0_schema.mysql.sql
|
||||
%%PGSQL%%%%PORTDOCS%%%%DOCSDIR%%/nodnssec-3.x_to_3.4.0_schema.pgsql.sql
|
||||
%%SQLITE3%%%%PORTDOCS%%%%DOCSDIR%%/nodnssec-3.x_to_3.4.0_schema.sqlite3.sql
|
||||
|
Loading…
Reference in New Issue
Block a user