From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB2fM-0001IF-8s for guix-patches@gnu.org; Fri, 12 Oct 2018 15:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gB2fK-0005Fx-KP for guix-patches@gnu.org; Fri, 12 Oct 2018 15:00:04 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gB2fK-0005Ex-Fo for guix-patches@gnu.org; Fri, 12 Oct 2018 15:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gB2fK-0004Wm-BW for guix-patches@gnu.org; Fri, 12 Oct 2018 15:00:02 -0400 Subject: [bug#33026] [PATCH] gnu: Add pdns. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB2eb-0000yr-LA for guix-patches@gnu.org; Fri, 12 Oct 2018 14:59:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gB2ea-0004Nf-FU for guix-patches@gnu.org; Fri, 12 Oct 2018 14:59:17 -0400 Received: from tobias.gr ([2001:470:7405::1]:46190) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gB2eY-0004E7-4P for guix-patches@gnu.org; Fri, 12 Oct 2018 14:59:14 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 14251f7b for ; Fri, 12 Oct 2018 18:59:10 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 8f4e4f5e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 12 Oct 2018 18:59:09 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Fri, 12 Oct 2018 20:58:54 +0200 Message-Id: <20181012185854.9873-1-me@tobias.gr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33026@debbugs.gnu.org * gnu/packages/dns.scm (pdns): New public variable. --- The p stands for power. gnu/packages/dns.scm | 133 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index ad1a8638b..b91a7d77c 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -31,9 +31,11 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages boost) #:use-module (gnu packages databases) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) + #:use-module (gnu packages curl) #:use-module (gnu packages datastructures) #:use-module (gnu packages flex) #:use-module (gnu packages glib) @@ -43,6 +45,7 @@ #:use-module (gnu packages libevent) #:use-module (gnu packages libidn) #:use-module (gnu packages linux) + #:use-module (gnu packages lua) #:use-module (gnu packages ncurses) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) @@ -360,6 +363,136 @@ run in a @code{chroot} jail, thus making any security flaws in NSD less likely to result in system-wide compromise.") (license (list license:bsd-3)))) +(define-public pdns + (package + (name "pdns") + (version "4.1.4") + (source + (origin + (method url-fetch) + (uri + (string-append "https://downloads.powerdns.com/releases/pdns-" + version ".tar.bz2")) + (sha256 + (base32 "1m9yhzrxh315gv855c590b2qc8bx31rrnl72pqxrnlix701qch79")))) + (build-system gnu-build-system) + ;; There's no make target or other way to cleanly separate the tools from + ;; the core. We have to rely on a hard-coded list below, which needs to + ;; be kept up to date when changing the package version or configuration. + (outputs (list "out" "tools")) + (arguments + `(#:configure-flags + (list "--enable-libsodium" ; ed25519 (DNSSEC algorithm 15) + ;; "--enable-libdecaf" ; ed25519 & Ed448 (XXX unpackaged) + "--enable-reproducible" + "--enable-tools" ; not the default, so we split them off + "--enable-unit-tests" + + ;; /sbin/pdns_server retains references to 'optional' dependencies + ;; like PostgreSQL, so packaging backends separately saves nothing. + (string-append + "--with-dynmodules=" ; build dynamic modules... + (string-join + (list "bind" ; BIND-style zone files + "gpgsql" ; generic PostgreSQL + "gsqlite3" ; generic Sqlite + "lua" ; Lua scripting + "pipe" ; simple stdin/stdout pipe + "remote") ; generic JSON/RPC connector + " ")) + "--with-modules=" ; ...and no static modules + + "--with-luajit" ; use JIT variant for Lua backend + "--with-protobuf" ; log DNS query information + "--with-sqlite3" + + (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/" + ,name "-" ,version) + "--sysconfdir=/etc/powerdns" + "--with-socketdir=/run") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'omit-PDNS_CONFIG_ARGS + ;; Stop 'pdns_server --version' printing build-time details, like + ;; PKG_CONFIG_PATH, which embed references to almost every input. + (lambda _ + (substitute* "configure" + (("#define PDNS_CONFIG_ARGS.*") "")) + #t)) + (replace 'install + ;; Don't try to install configuration files to /etc. + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "sysconfdir=$(docdir)/examples" "install" + make-flags))) + (add-after 'install 'move-tools + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tools (assoc-ref outputs "tools")) + (files + (list "bin/calidns" "share/man/man1/calidns.1" + "bin/dnsbulktest" "share/man/man1/dnsbulktest.1" + "bin/dnsgram" "share/man/man1/dnsgram.1" + "bin/dnsreplay" "share/man/man1/dnsreplay.1" + "bin/dnsscan" "share/man/man1/dnsscan.1" + "bin/dnsscope" "share/man/man1/dnsscope.1" + "bin/dnstcpbench" "share/man/man1/dnstcpbench.1" + "bin/dnswasher" "share/man/man1/dnswasher.1" + "bin/dumresp" "share/man/man1/dumresp.1" + "bin/ixplore" "share/man/man1/ixplore.1" + "bin/nproxy" "share/man/man1/nproxy.1" + "bin/nsec3dig" "share/man/man1/nsec3dig.1" + "bin/pdns_notify" "share/man/man1/pdns_notify.1" + "bin/saxfr" "share/man/man1/saxfr.1" + "bin/sdig" "share/man/man1/sdig.1" + "bin/stubquery"))) + (with-directory-excursion out + (for-each (lambda (file) + (let ((target (string-append tools "/" file))) + (mkdir-p (dirname target)) + (rename-file file target))) + files)) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config) + + ;; For tests. + ("curl" ,curl))) + (inputs + `(("boost" ,boost) + ("libsodium" ,libsodium) + ("luajit" ,luajit) + ("openssl" ,openssl) + ("postgresql" ,postgresql) + ("protobuf" ,protobuf) + ("sqlite" ,sqlite) + ("zlib" ,zlib))) + (home-page "https://www.powerdns.com/") + (synopsis "Authoritative DNS name server with dynamic back-ends") + (description + "This is the PowerDNS Authoritative Server, a versatile name server for the +Domain Name System (@dfn{DNS}) that supports a wide variety of storage methods. + +The core server (@command{pdns_server}) handles all packet processing and DNS +intelligence, while retrieving and updating the actual DNS records (and any +additional metadata) through one or more of numerous loadable backends. + +Included backends range from simple BIND-style zone files and relational +databases to (geographical) load-balancing, JSON APIs, and entire scripting +languages. Records can be transparently signed for use with the @dfn{Domain Name +System Security Extensions} (DNSSEC). Automated key management is available. + +Real-time statistics can be exported to different formats, or through an optional +built-in Web server and API that allow for basic remote administration.") + (license + (list license:bsd-3 ; ext/luawrapper/include/LuaContext.* + license:expat ; ext/{json11,yahttp} + license:lgpl2.1+ ; m4/pdns* + ;; modules/oraclebackend/README says MIT, actual headers state GPL2, + ;; as do pdns/{ssqlite3,tcpreceiver,test-tsig,zone2ldap}.* and + ;; modules/ldapbackend. + license:gpl2 + license:gpl3+)))) ; the rest is GPL[23]+ + (define-public unbound (package (name "unbound") -- 2.18.0