Merge pull request #164116 from NickCao/powerdns
This commit is contained in:
commit
0165645499
@ -10,6 +10,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|||||||
services.powerdns.extraConfig = ''
|
services.powerdns.extraConfig = ''
|
||||||
launch=gmysql
|
launch=gmysql
|
||||||
gmysql-user=pdns
|
gmysql-user=pdns
|
||||||
|
zone-cache-refresh-interval=0
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.mysql = {
|
services.mysql = {
|
||||||
|
@ -1,44 +1,43 @@
|
|||||||
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, nixosTests
|
{ lib, stdenv, fetchurl, pkg-config, nixosTests
|
||||||
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
|
, boost, libyamlcpp, libsodium, sqlite, protobuf, openssl, systemd
|
||||||
, mysql57, postgresql, lua, openldap, geoip, curl, unixODBC
|
, mariadb-connector-c, postgresql, lua, openldap, geoip, curl, unixODBC, lmdb, tinycdb
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "powerdns";
|
pname = "powerdns";
|
||||||
version = "4.3.1";
|
version = "4.6.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
|
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
|
||||||
sha256 = "0if27znz528sir52y9i4gcfhdsym7yxiwjgffy9lpscf1426q56m";
|
sha256 = "sha256-eRKxSIfWKEUYX3zktH21gOqnuLiX3LHJVV3+D6xe+uM=";
|
||||||
};
|
};
|
||||||
|
# redact configure flags from version output to reduce closure size
|
||||||
patches = [
|
patches = [ ./version.patch ];
|
||||||
(fetchpatch { # remove for >= 4.4.0
|
|
||||||
name = "gcc-10_undefined-reference.diff";
|
|
||||||
url = "https://github.com/PowerDNS/pdns/commit/05c9dd77b28.diff";
|
|
||||||
sha256 = "1m9szbi02h9kcabgw3kb8k9qrb54d34z0qzizrlfiw3hxs6c2zql";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost mysql57.connector-c postgresql lua openldap sqlite protobuf geoip
|
boost mariadb-connector-c postgresql lua openldap sqlite protobuf geoip
|
||||||
libyamlcpp libsodium curl unixODBC openssl systemd
|
libyamlcpp libsodium curl unixODBC openssl systemd lmdb tinycdb
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--disable-silent-rules"
|
||||||
|
"--enable-dns-over-tls"
|
||||||
|
"--enable-unit-tests"
|
||||||
|
"--enable-reproducible"
|
||||||
|
"--enable-tools"
|
||||||
|
"--enable-ixfrdist"
|
||||||
|
"--enable-systemd"
|
||||||
|
"--with-libsodium"
|
||||||
|
"--with-sqlite3"
|
||||||
|
"--with-libcrypto=${openssl.dev}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# nix destroy with-modules arguments, when using configureFlags
|
# nix destroy with-modules arguments, when using configureFlags
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
configureFlagsArray=(
|
configureFlagsArray+=(
|
||||||
"--with-modules=bind gmysql geoip godbc gpgsql gsqlite3 ldap lua2 pipe random remote"
|
"--with-modules="
|
||||||
--with-sqlite3
|
"--with-dynmodules=bind geoip gmysql godbc gpgsql gsqlite3 ldap lmdb lua2 pipe remote tinydns"
|
||||||
--with-libcrypto=${openssl.dev}
|
|
||||||
--with-libsodium
|
|
||||||
--enable-tools
|
|
||||||
--disable-dependency-tracking
|
|
||||||
--disable-silent-rules
|
|
||||||
--enable-reproducible
|
|
||||||
--enable-unit-tests
|
|
||||||
--enable-systemd
|
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -55,6 +54,6 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.isDarwin;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ mic92 disassembler ];
|
maintainers = with maintainers; [ mic92 disassembler nickcao ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
13
pkgs/servers/dns/powerdns/version.patch
Normal file
13
pkgs/servers/dns/powerdns/version.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/pdns/version.cc b/pdns/version.cc
|
||||||
|
index d8f5d40..1368481 100644
|
||||||
|
--- a/pdns/version.cc
|
||||||
|
+++ b/pdns/version.cc
|
||||||
|
@@ -155,7 +155,7 @@ void showBuildConfiguration()
|
||||||
|
#ifdef PDNS_CONFIG_ARGS
|
||||||
|
#define double_escape(s) #s
|
||||||
|
#define escape_quotes(s) double_escape(s)
|
||||||
|
- g_log<<Logger::Warning<<"Configured with: "<<escape_quotes(PDNS_CONFIG_ARGS)<<endl;
|
||||||
|
+ g_log<<Logger::Warning<<"Configured with: "<<"redacted"<<endl;
|
||||||
|
#undef escape_quotes
|
||||||
|
#undef double_escape
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user