unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: 33026@debbugs.gnu.org
Subject: [bug#33026] [PATCH] gnu: Add pdns.
Date: Fri, 12 Oct 2018 20:58:54 +0200	[thread overview]
Message-ID: <20181012185854.9873-1-me@tobias.gr> (raw)

* 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

             reply	other threads:[~2018-10-12 19:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 18:58 Tobias Geerinckx-Rice [this message]
2018-10-15 20:08 ` [bug#33026] [PATCH] gnu: Add pdns Ludovic Courtès
2018-10-17 20:01   ` Tobias Geerinckx-Rice
2018-10-19  8:35     ` Ludovic Courtès
2019-03-04 16:19   ` [bug#33026] [PATCH v2 0/2] " Tobias Geerinckx-Rice
2019-03-04 16:19     ` [bug#33026] [PATCH v2 1/2] gnu: Add yahttp Tobias Geerinckx-Rice
2019-03-04 16:19     ` [bug#33026] [PATCH v2 2/2] gnu: Add pdns Tobias Geerinckx-Rice
2018-11-07 21:11 ` [bug#33026] [PATCH] " Leo Famulari
2019-02-19 23:07 ` [bug#33026] Progress Andreas Enge
2019-03-07 13:22   ` bug#33026: [bug#33020] Progress Andreas Enge
     [not found]     ` <87tvge7qjv.fsf@nckx>
2019-03-07 14:02       ` [bug#33026] " Andreas Enge
2019-03-07 14:08       ` Andreas Enge
2019-03-07 14:58         ` Tobias Geerinckx-Rice
  -- strict thread matches above, loose matches on Subject: below --
2018-10-11 23:06 [bug#33020] [PATCH] gnu: Add nullmailer Tobias Geerinckx-Rice
2018-10-15 20:01 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181012185854.9873-1-me@tobias.gr \
    --to=me@tobias.gr \
    --cc=33026@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).