From patchwork Mon Mar 4 16:19:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Geerinckx-Rice X-Patchwork-Id: 1325 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 139B316CFA; Mon, 4 Mar 2019 16:31:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B450916CF8 for ; Mon, 4 Mar 2019 16:31:47 +0000 (GMT) Received: from localhost ([127.0.0.1]:56854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0qVH-0002PT-Aq for patchwork@mira.cbaines.net; Mon, 04 Mar 2019 11:31:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0qKz-0002ul-S3 for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0qKv-0005lO-GB for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0qKs-0005fN-F4 for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h0qKs-00083Q-Ah for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33026] [PATCH v2 1/2] gnu: Add yahttp. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Mar 2019 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33026 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33026@debbugs.gnu.org Received: via spool by 33026-submit@debbugs.gnu.org id=B33026.155171641730871 (code B ref 33026); Mon, 04 Mar 2019 16:21:02 +0000 Received: (at 33026) by debbugs.gnu.org; 4 Mar 2019 16:20:17 +0000 Received: from localhost ([127.0.0.1]:60104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0qK8-00081m-SX for submit@debbugs.gnu.org; Mon, 04 Mar 2019 11:20:17 -0500 Received: from tobias.gr ([80.241.217.52]:59964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0qK7-00081P-Mz for 33026@debbugs.gnu.org; Mon, 04 Mar 2019 11:20:16 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 6066eddc; Mon, 4 Mar 2019 16:20:11 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id b120b615 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 4 Mar 2019 16:20:09 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Mon, 4 Mar 2019 17:19:54 +0100 Message-Id: <20190304161955.12712-2-somebody@not-sent-or-endorsed-by.tobias.gr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304161955.12712-1-somebody@not-sent-or-endorsed-by.tobias.gr> References: <8736t7c6rv.fsf@gnu.org> <20190304161955.12712-1-somebody@not-sent-or-endorsed-by.tobias.gr> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Tobias Geerinckx-Rice * gnu/packages/web.scm (yahttp): New public variable. --- gnu/packages/web.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index b0ee78b92b..95099e450e 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -66,6 +66,7 @@ #:use-module (gnu packages admin) #:use-module (gnu packages adns) #:use-module (gnu packages apr) + #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages documentation) #:use-module (gnu packages docbook) @@ -86,6 +87,7 @@ #:use-module (gnu packages gnupg) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gperf) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) @@ -4907,6 +4909,46 @@ and xinetd usually launches another daemon to handle the request. It can be used to start services with both privileged and non-privileged port numbers.") (license (l:fsf-free "file://COPYRIGHT")))) +(define-public yahttp + (package + (name "yahttp") + (version "0.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cmouse/yahttp.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "09pxykgby8hlyvaff106p6m847idg6nkprahx62kr05ks5r6i77v")))) + ;; Separate the ~7.5 MiB of HTML documentation from the rest (~700 KiB). + ;; Installing the package without it would require patching Makefiles. + (outputs (list "out" "doc")) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--htmldir=" (assoc-ref %outputs "doc") + "/share/doc/" ,name "-" ,version)))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + + ;; For creating the documentation. + ("doxygen" ,doxygen) + ("graphviz" ,graphviz))) + (inputs + `(("boost" ,boost))) + (home-page "https://github.com/cmouse/yahttp") + (synopsis "Small-footprint HTTP request/response parser") + (description + "@acronym{YaHTTP, Yet Another HTTP Library} aims to be purely an HTTP +request/response parser with no input/output ties. It is intended to be used in +small-footprint applications and other utilities that want to use HTTP over +something else than network I/O.") + (license l:expat))) + (define-public tidy-html (package (name "tidy-html") From patchwork Mon Mar 4 16:19:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Geerinckx-Rice X-Patchwork-Id: 1326 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3DA7B16CFA; Mon, 4 Mar 2019 16:31:52 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 9F5AA16CF8 for ; Mon, 4 Mar 2019 16:31:51 +0000 (GMT) Received: from localhost ([127.0.0.1]:56856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0qVL-0002Uk-7w for patchwork@mira.cbaines.net; Mon, 04 Mar 2019 11:31:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0qKz-0002uj-S3 for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0qKv-0005lN-Fx for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0qKs-0005gM-UV for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h0qKs-00083m-Pp for guix-patches@gnu.org; Mon, 04 Mar 2019 11:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33026] [PATCH v2 2/2] gnu: Add pdns. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Mar 2019 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33026 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33026@debbugs.gnu.org Received: via spool by 33026-submit@debbugs.gnu.org id=B33026.155171641830885 (code B ref 33026); Mon, 04 Mar 2019 16:21:02 +0000 Received: (at 33026) by debbugs.gnu.org; 4 Mar 2019 16:20:18 +0000 Received: from localhost ([127.0.0.1]:60106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0qKA-000824-8c for submit@debbugs.gnu.org; Mon, 04 Mar 2019 11:20:18 -0500 Received: from tobias.gr ([80.241.217.52]:59964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0qK8-00081P-G3 for 33026@debbugs.gnu.org; Mon, 04 Mar 2019 11:20:17 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id f6a78c0c; Mon, 4 Mar 2019 16:20:11 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 91f7a2e2 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 4 Mar 2019 16:20:09 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Mon, 4 Mar 2019 17:19:55 +0100 Message-Id: <20190304161955.12712-3-somebody@not-sent-or-endorsed-by.tobias.gr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304161955.12712-1-somebody@not-sent-or-endorsed-by.tobias.gr> References: <8736t7c6rv.fsf@gnu.org> <20190304161955.12712-1-somebody@not-sent-or-endorsed-by.tobias.gr> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Tobias Geerinckx-Rice * gnu/packages/dns.scm (pdns): New public variable. --- gnu/packages/dns.scm | 176 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 9cc707e5b4..b929f8b426 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -32,9 +32,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) @@ -44,6 +46,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) @@ -51,6 +54,8 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages ruby) + #:use-module (gnu packages sqlite) #:use-module (gnu packages swig) #:use-module (gnu packages tls) #:use-module (gnu packages web) @@ -403,6 +408,177 @@ 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.6") + (source + (origin + (method url-fetch) + (uri + (string-append "https://downloads.powerdns.com/releases/pdns-" + version ".tar.bz2")) + (sha256 + (base32 "0ggpcvzj90a31qf71m8788ql0hbxnkb9y6c3wgqr9l0qwv8dsgpm")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete (free) back ends for a non-free database. This also + ;; side-steps some licence confusion where modules/oraclebackend's + ;; README says ‘MIT’ but the actual file headers state GPL2 [only]. + (for-each + (lambda (back-end) + (with-directory-excursion "modules" + (delete-file-recursively back-end)) + (substitute* "configure" + (((format " modules/~a/Makefile" back-end)) + "")) + (substitute* "modules/Makefile.in" + (((format ".*~a.*" back-end)) ; delete the whole line + ""))) + (list "goraclebackend" + "oraclebackend")) + #t)))) + (build-system gnu-build-system) + ;; Keep the extra tools from littering the user's profile unless desired. + ;; 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 double-checked 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" + "--enable-unit-tests" + + ;; XXX The 'core' (sbin/pdns_server) retains references to some + ;; dependencies (e.g. luajit, sqlite) but not all of them (e.g. + ;; postgresql). Moving backend modules to their own output (or + ;; package?) might reduce the closure size significantly and/or + ;; allow us to build more (all?) of them. Something to consider. + (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" ; for logging DNS query information + "--with-sqlite3" ; include the sqlite3 driver + + (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 'use-packaged-yahttp + (lambda* (#:key inputs #:allow-other-keys) + (let ((yahttp (assoc-ref inputs "yahttp"))) + (delete-file-recursively "ext/yahttp") + (substitute* "configure" + (("\\$\\(top_builddir\\)/ext/yahttp/yahttp") + (string-append yahttp "/lib")) + (("ext/(yahttp/)+Makefile") "")) + (substitute* "ext/Makefile.in" + (("yahttp ") "")) + #t))) + (add-after 'unpack 'omit-PDNS_CONFIG_ARGS + ;; Avoid ‘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 + ;; Move tools (and their documentation) to a separate output. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tools (assoc-ref outputs "tools")) + (move (lambda (file) + (let ((target (string-append tools "/" file))) + (mkdir-p (dirname target)) + (rename-file file target))))) + (with-directory-excursion out + (for-each (lambda (tool) + (move (string-append "bin/" tool)) + (move (string-append "share/man/man1/" + tool ".1"))) + (list "calidns" + "dnsbulktest" + "dnsgram" + "dnsreplay" + "dnsscan" + "dnsscope" + "dnstcpbench" + "dnswasher" + "dumresp" + "ixplore" + "nproxy" + "nsec3dig" + "pdns_notify" + "saxfr" + "sdig")) + + ;; This one weird tool doesn't have a man page. + (move "bin/stubquery") + #t))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + + ;; For tests. + ("curl" ,curl) + ("perl" ,perl) + ("ruby" ,ruby))) + (inputs + `(("boost" ,boost) + ("libsodium" ,libsodium) + ("luajit" ,luajit) + ("openssl" ,openssl) + ("postgresql" ,postgresql) + ("protobuf" ,protobuf) + ("sqlite" ,sqlite) + ("yahttp" ,yahttp) + ("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 +@acronym{DNS, Domain Name System} that supports a wide variety of storage back +ends. + +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 back ends 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 @acronym{DNSSEC, +Domain Name System Security Extensions}. 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} + ;; pdns/{ssqlite3,tcpreceiver,test-tsig,zone2ldap}.* and + ;; modules/ldapbackend are GPL2-only. + license:gpl2 + license:gpl3+)))) ; the rest is GPL[23]+ + (define-public unbound (package (name "unbound")