unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#33026] [PATCH] gnu: Add pdns.
@ 2018-10-12 18:58 Tobias Geerinckx-Rice
  2018-10-15 20:08 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-10-12 18:58 UTC (permalink / raw)
  To: 33026

* 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

^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [bug#33020] [PATCH] gnu: Add nullmailer.
@ 2018-10-11 23:06 Tobias Geerinckx-Rice
  2018-10-15 20:01 ` Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: Tobias Geerinckx-Rice @ 2018-10-11 23:06 UTC (permalink / raw)
  To: 33020

* gnu/packages/mail.scm (nullmailer): New public variable.
---
 gnu/packages/mail.scm | 82 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 7348719ed..e7f5584b0 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -45,6 +45,7 @@
 
 (define-module (gnu packages mail)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages aspell)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
@@ -225,6 +226,87 @@ software.")
      ;; Libraries are under LGPLv3+, and programs under GPLv3+.
      (list gpl3+ lgpl3+))))
 
+(define-public nullmailer
+  (package
+    (name "nullmailer")
+    (version "2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (list
+             (string-append "https://untroubled.org/nullmailer/"
+                            "nullmailer-" version ".tar.gz")
+             ;; Previous releases are moved to this subdirectory.
+             (string-append "https://untroubled.org/nullmailer/archive/"
+                            "nullmailer-" version ".tar.gz")))
+       (sha256
+        (base32 "0gykh0qc86rk0knfvp8ndqkryal3pvqdfdya94wvb6n1cc8p3ild"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--enable-tls"
+             "--localstatedir=/var"
+             "--sysconfdir=/etc")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'patch-test-FHS-file-names
+           (lambda _
+             (with-directory-excursion "test"
+               (substitute* (list "functions.in"
+                                  "tests/send")
+                 ;; Fix some shebangs later generated on the fly.
+                 (("/bin/sh") (which "bash"))))
+             #t))
+         (add-before 'check 'pass-PATH-to-tests
+           ;; 'runtest' launches each test through 'env -', clearing $PATH. The
+           ;; tests then source 'functions', which first demands a working $PATH,
+           ;; and later clobbers it again. Pass our $PATH to the test environment
+           ;; and don't touch it after that.
+           (lambda _
+             (with-directory-excursion "test"
+               (substitute* "runtests"
+                 (("env - bash")
+                  (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
+               (substitute* "functions.in"
+                 (("export PATH=.*") "")))
+             #t))
+         (add-before 'check 'delete-failing-tests
+           (lambda _
+             (with-directory-excursion "test/tests"
+               (for-each delete-file
+                         (list
+                          ;; XXX 'nullmailer-inject: nullmailer-queue failed: 15'
+                          "inject/queue"
+                          ;; XXX This equires the not-yet-packaged tcpserver.
+                          "protocols")))
+             #t))
+         (add-before 'install 'skip-install-data-local
+           ;; Don't attempt to install run-time files outside of the store.
+           (lambda _
+             (substitute* "Makefile"
+               ((" install-data-local") ""))
+             #t)))))
+    (native-inputs
+     ;; For tests.
+     `(("daemontools" ,daemontools)))   ; for svc
+    (inputs
+     `(("gnutls" ,gnutls)))
+    (home-page "https://untroubled.org/nullmailer/")
+    (synopsis "Simple relay-only mail transport agent")
+    (description
+     "Nullmailer is a simple replacement Mail Transfer Agent (@dfn{MTA}) for
+hosts that receive no local mail and only relay mail to a fixed set of smart
+relays.  It's useful for systems such as Web servers that must be able to send
+email notifications, without having to run a full-blown MTA such as sendmail
+or qmail.
+
+Nullmailer is designed to be simple to configure, easy to extend, and secure.
+It requires little ongoing administration.  The included @command{sendmail}
+emulator front-end should allow most (if not all) sendmail-compatible programs
+to run without any changes.")
+    (license (list lgpl2.1+         ; lib/cli++/ (but some files lack headers)
+                   gpl2+))))        ; everything else
+
 (define-public fetchmail
   (package
     (name "fetchmail")
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-03-07 14:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12 18:58 [bug#33026] [PATCH] gnu: Add pdns Tobias Geerinckx-Rice
2018-10-15 20:08 ` 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

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).