unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27374] Update Knot DNS to 2.5.1.
@ 2017-06-15 10:05 Tobias Geerinckx-Rice
  2017-06-15 10:36 ` [bug#27374] [PATCH 1/3] gnu: lmdb: Expand description Tobias Geerinckx-Rice
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-06-15 10:05 UTC (permalink / raw)
  To: 27374


[-- Attachment #1.1: Type: text/plain, Size: 582 bytes --]

[Ack! It's been so long that I forgot how to list. This was meant for
guix-patches, not bug-guix, of course...]

Guix,

Knot DNS >=2.5 uses a new, LMDB-based (DNSSEC) key database format. It
ships a new ‘pykeymgr’ script to manually migrate keys from the older
JSON format.

These patches update Knot to 2.5.1, add the required python-lmdb
bindings, and throw in a real LMDB description for good measure.

I use Knot 2.5.1 & DNSSEC but haven't any 2.4-format key databases to
import. If you do, your feedback would be very welcome.

Kind regards,

T G-R




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 504 bytes --]

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

* [bug#27374] [PATCH 1/3] gnu: lmdb: Expand description.
  2017-06-15 10:05 [bug#27374] Update Knot DNS to 2.5.1 Tobias Geerinckx-Rice
@ 2017-06-15 10:36 ` Tobias Geerinckx-Rice
  2017-06-15 10:36   ` [bug#27374] [PATCH 2/3] gnu: Add python-lmdb Tobias Geerinckx-Rice
  2017-06-15 10:36   ` [bug#27374] [PATCH 3/3] gnu: knot: Update to 2.5.1 Tobias Geerinckx-Rice
  0 siblings, 2 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-06-15 10:36 UTC (permalink / raw)
  To: 27374

* gnu/packages/databases.scm (lmdb)[synopsis]: Capitalise.
[description]: Elaborate.
---
 gnu/packages/databases.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 2197814ad..3c9c29b4c 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1355,8 +1356,17 @@ trees (LSM), for sustained throughput under random insert workloads.")
                (("/usr/local") (assoc-ref outputs "out")))
             #t)))))
     (home-page "https://symas.com/products/lightning-memory-mapped-database")
-    (synopsis "Lightning memory-mapped database library")
-    (description "Lightning memory-mapped database library.")
+    (synopsis "Lightning Memory-Mapped Database library")
+    (description
+     "The @dfn{Lightning Memory-Mapped Database} (LMDB) is a high-performance
+transactional database.  Unlike more complex relational databases, LMDB handles
+only key-value pairs (stored as arbitrary byte arrays) and relies on the
+underlying operating system for caching and locking, keeping the code small and
+simple.
+The use of ‘zero-copy’ memory-mapped files combines the persistence of classic
+disk-based databases with high read performance that scales linearly over
+multiple cores.  The size of each database is limited only by the size of the
+virtual address space — not physical RAM.")
     (license license:openldap2.8)))
 
 (define-public libpqxx
-- 
2.12.2

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

* [bug#27374] [PATCH 2/3] gnu: Add python-lmdb.
  2017-06-15 10:36 ` [bug#27374] [PATCH 1/3] gnu: lmdb: Expand description Tobias Geerinckx-Rice
@ 2017-06-15 10:36   ` Tobias Geerinckx-Rice
  2017-06-15 10:48     ` Tobias Geerinckx-Rice
  2017-06-15 10:36   ` [bug#27374] [PATCH 3/3] gnu: knot: Update to 2.5.1 Tobias Geerinckx-Rice
  1 sibling, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-06-15 10:36 UTC (permalink / raw)
  To: 27374

* gnu/packages/databases.scm (python-lmdb, python2-lmdb): New variables.
---
 gnu/packages/databases.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 3c9c29b4c..861b0c48a 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1548,3 +1548,45 @@ file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
 etc., and an SQL engine for performing simple SQL queries.")
     (license (list license:lgpl2.0
                    license:gpl2+))))
+
+(define-public python-lmdb
+  (package
+    (name "python-lmdb")
+    (version "0.92")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "lmdb" version))
+              (sha256
+               (base32
+                "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Delete bundled lmdb source files.
+               '(for-each delete-file (list "lib/lmdb.h"
+                                            "lib/mdb.c"
+                                            "lib/midl.c"
+                                            "lib/midl.h")))))
+    (build-system python-build-system)
+    (inputs
+     `(("lmdb" ,lmdb)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'use-system-lmdb
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((lmdb (assoc-ref inputs "lmdb")))
+               (setenv "LMDB_FORCE_SYSTEM" "set")
+               (setenv "LMDB_INCLUDEDIR" (string-append lmdb "/include"))
+               (setenv "LMDB_LIBDIR" (string-append lmdb "/lib"))
+               #t))))
+       ;; Tests fail with: ‘lmdb.tool: Please specify environment (--env)’.
+       #:tests? #f))
+    (home-page "https://github.com/dw/py-lmdb")
+    (synopsis "Python binding for the ‘Lightning’ database (LMDB)")
+    (description
+     "python-lmdb or py-lmdb is a Python binding for the @dfn{Lightning
+Memory-Mapped Database} (LMDB), a high-performance key-value store.")
+    (license license:openldap2.8)))
+
+(define-public python2-lmdb
+  (package-with-python2 python-lmdb))
-- 
2.12.2

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

* [bug#27374] [PATCH 3/3] gnu: knot: Update to 2.5.1.
  2017-06-15 10:36 ` [bug#27374] [PATCH 1/3] gnu: lmdb: Expand description Tobias Geerinckx-Rice
  2017-06-15 10:36   ` [bug#27374] [PATCH 2/3] gnu: Add python-lmdb Tobias Geerinckx-Rice
@ 2017-06-15 10:36   ` Tobias Geerinckx-Rice
  1 sibling, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-06-15 10:36 UTC (permalink / raw)
  To: 27374

* gnu/packages/dns.scm (knot): Update to 2.5.1.
[inputs]: Add python-2 and python2-lmdb.
[arguments]: Adapt #:configure-flags.  Add ‘wrap-python-scripts’ phase.
---
 gnu/packages/dns.scm | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 7f1d18f2b..c69905abb 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -42,6 +42,7 @@
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -321,14 +322,14 @@ Extensions} (DNSSEC).")
 (define-public knot
   (package
     (name "knot")
-    (version "2.4.4")
+    (version "2.5.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://secure.nic.cz/files/knot-dns/"
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0g2n5r2n03bqz322xlwdw4bqhj8l4n8q0hzrqngi4rgmk4rp97ly"))
+                "1643q2pj5sjhgv19jp8r2bhvqyk6mmlajdmr6qhjcbhql30cs23c"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -353,7 +354,11 @@ Extensions} (DNSSEC).")
        ("liburcu" ,liburcu)
        ("lmdb" ,lmdb)
        ("ncurses" ,ncurses)
-       ("nettle" ,nettle)))
+       ("nettle" ,nettle)
+
+       ;; For ‘pykeymgr’, needed to migrate keys from versions <= 2.4.
+       ("python" ,python-2)
+       ("python-lmdb" ,python2-lmdb)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -370,11 +375,18 @@ Extensions} (DNSSEC).")
                (zero?
                 (system* "make"
                          (string-append "config_dir=" etc)
-                         "install"))))))
+                         "install")))))
+         (add-after 'install 'wrap-python-scripts
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (path (getenv "PYTHONPATH")))
+               (wrap-program (string-append out "/sbin/pykeymgr")
+                 `("PYTHONPATH" ":" prefix (,path))))
+             #t)))
        #:configure-flags
        (list "--sysconfdir=/etc"
              "--localstatedir=/var"
-             "--enable-rosedb"          ; serve static records from a database
+             "--with-module-rosedb=yes" ; serve static records from a database
              (string-append "--with-bash-completions="
                             (assoc-ref %outputs "out")
                             "/etc/bash_completion.d"))))
-- 
2.12.2

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

* [bug#27374] [PATCH 2/3] gnu: Add python-lmdb.
  2017-06-15 10:36   ` [bug#27374] [PATCH 2/3] gnu: Add python-lmdb Tobias Geerinckx-Rice
@ 2017-06-15 10:48     ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-06-15 10:48 UTC (permalink / raw)
  To: 27374


[-- Attachment #1.1: Type: text/plain, Size: 339 bytes --]

On 15/06/17 12:36, Tobias Geerinckx-Rice wrote:
> +    (license license:openldap2.8)))

‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are straight
BSD-3. Not sure whether to add it to the list or just delete the files
since they'll never be used under GNU. I'll do the former by default.

Kind regards,

T G-R


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 504 bytes --]

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

end of thread, other threads:[~2017-06-15 10:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 10:05 [bug#27374] Update Knot DNS to 2.5.1 Tobias Geerinckx-Rice
2017-06-15 10:36 ` [bug#27374] [PATCH 1/3] gnu: lmdb: Expand description Tobias Geerinckx-Rice
2017-06-15 10:36   ` [bug#27374] [PATCH 2/3] gnu: Add python-lmdb Tobias Geerinckx-Rice
2017-06-15 10:48     ` Tobias Geerinckx-Rice
2017-06-15 10:36   ` [bug#27374] [PATCH 3/3] gnu: knot: Update to 2.5.1 Tobias Geerinckx-Rice

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