gnu: python-lmdb: Update to 0.93.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
index cc08994..991bb3d 100644 (file)
@@ -5,17 +5,21 @@
 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
-;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
+;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; 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>
+;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages language)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages python)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ruby)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages valgrind)
   #:use-module (gnu packages xml)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -72,6 +81,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system ruby)
   #:use-module (guix build-system cmake)
   #:use-module (guix utils)
   #:use-module (srfi srfi-26)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-before 'configure 'generate-configure
+         (add-after 'unpack 'generate-configure
            (lambda _
-             (zero? (system* "./autogen.sh")))))))
+             (zero? (system* "sh" "autogen.sh")))))))
     ;; http://www.4store.org has been down for a while now.
     (home-page "https://github.com/garlik/4store")
     (synopsis "Clustered RDF storage and query engine")
@@ -125,14 +135,14 @@ either single machines or networked clusters.")
 (define-public gdbm
   (package
     (name "gdbm")
-    (version "1.12")
+    (version "1.13")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gdbm/gdbm-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1smwz4x5qa4js0zf1w3asq6z7mh20zlgwbh2bk5dczw6xrk22yyr"))))
+                "0lx201q20dvc70f8a3c9s7s18z15inlxvbffph97ngvrgnyjq9cx"))))
     (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
     (build-system gnu-build-system)
     (home-page "http://www.gnu.org.ua/software/gdbm")
@@ -147,14 +157,14 @@ and provides interfaces to the traditional file format.")
 (define-public bdb
   (package
     (name "bdb")
-    (version "6.2.23")
+    (version "6.2.32")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.oracle.com/berkeley-db/db-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7"))))
+                "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
     (build-system gnu-build-system)
     (outputs '("out"                             ; programs, libraries, headers
                "doc"))                           ; 94 MiB of HTML docs
@@ -162,34 +172,33 @@ and provides interfaces to the traditional file format.")
      '(#:tests? #f                            ; no check target available
        #:disallowed-references ("doc")
        #:phases
-       (alist-replace
-        'configure
-        (lambda* (#:key outputs #:allow-other-keys)
-          (let ((out (assoc-ref outputs "out"))
-                (doc (assoc-ref outputs "doc")))
-            ;; '--docdir' is not honored, so we need to patch.
-            (substitute* "dist/Makefile.in"
-              (("docdir[[:blank:]]*=.*")
-               (string-append "docdir = " doc "/share/doc/bdb")))
-
-            (zero?
-             (system* "./dist/configure"
-                      (string-append "--prefix=" out)
-                      (string-append "CONFIG_SHELL=" (which "bash"))
-                      (string-append "SHELL=" (which "bash"))
-
-                      ;; Remove 7 MiB of .a files.
-                      "--disable-static"
-
-                      ;; The compatibility mode is needed by some packages,
-                      ;; notably iproute2.
-                      "--enable-compat185"
-
-                      ;; The following flag is needed so that the inclusion
-                      ;; of db_cxx.h into C++ files works; it leads to
-                      ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
-                      "--enable-cxx"))))
-                 %standard-phases)))
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc")))
+               ;; '--docdir' is not honored, so we need to patch.
+               (substitute* "dist/Makefile.in"
+                 (("docdir[[:blank:]]*=.*")
+                  (string-append "docdir = " doc "/share/doc/bdb")))
+
+               (zero?
+                (system* "./dist/configure"
+                         (string-append "--prefix=" out)
+                         (string-append "CONFIG_SHELL=" (which "bash"))
+                         (string-append "SHELL=" (which "bash"))
+
+                         ;; Remove 7 MiB of .a files.
+                         "--disable-static"
+
+                         ;; The compatibility mode is needed by some packages,
+                         ;; notably iproute2.
+                         "--enable-compat185"
+
+                         ;; The following flag is needed so that the inclusion
+                         ;; of db_cxx.h into C++ files works; it leads to
+                         ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
+                         "--enable-cxx"))))))))
     (synopsis "Berkeley database")
     (description
      "Berkeley DB is an embeddable database allowing developers the choice of
@@ -217,39 +226,77 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
      `(#:tests? #f                            ; no check target available
        #:disallowed-references ("doc")
        #:phases
-       (alist-replace
-        'configure
-        (lambda* (#:key outputs #:allow-other-keys)
-          (let ((out (assoc-ref outputs "out"))
-                (doc (assoc-ref outputs "doc")))
-            ;; '--docdir' is not honored, so we need to patch.
-            (substitute* "dist/Makefile.in"
-              (("docdir[[:blank:]]*=.*")
-               (string-append "docdir = " doc "/share/doc/bdb")))
-
-            (zero?
-             (system* "./dist/configure"
-                      (string-append "--prefix=" out)
-                      (string-append "CONFIG_SHELL=" (which "bash"))
-                      (string-append "SHELL=" (which "bash"))
-
-                      ;; Bdb doesn't recognize aarch64 as an architecture.
-                      ,@(if (string=? "aarch64-linux" (%current-system))
-                            '("--build=aarch64-unknown-linux-gnu")
-                            '())
-
-                      ;; Remove 7 MiB of .a files.
-                      "--disable-static"
-
-                      ;; The compatibility mode is needed by some packages,
-                      ;; notably iproute2.
-                      "--enable-compat185"
-
-                      ;; The following flag is needed so that the inclusion
-                      ;; of db_cxx.h into C++ files works; it leads to
-                      ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
-                      "--enable-cxx"))))
-                 %standard-phases)))))
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc")))
+               ;; '--docdir' is not honored, so we need to patch.
+               (substitute* "dist/Makefile.in"
+                 (("docdir[[:blank:]]*=.*")
+                  (string-append "docdir = " doc "/share/doc/bdb")))
+
+               (zero?
+                (system* "./dist/configure"
+                         (string-append "--prefix=" out)
+                         (string-append "CONFIG_SHELL=" (which "bash"))
+                         (string-append "SHELL=" (which "bash"))
+
+                         ;; Bdb doesn't recognize aarch64 as an architecture.
+                         ,@(if (string=? "aarch64-linux" (%current-system))
+                               '("--build=aarch64-unknown-linux-gnu")
+                               '())
+
+                         ;; Remove 7 MiB of .a files.
+                         "--disable-static"
+
+                         ;; The compatibility mode is needed by some packages,
+                         ;; notably iproute2.
+                         "--enable-compat185"
+
+                         ;; The following flag is needed so that the inclusion
+                         ;; of db_cxx.h into C++ files works; it leads to
+                         ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
+                         "--enable-cxx"))))))))))
+
+(define-public es-dump-restore
+  (package
+    (name "es-dump-restore")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "es_dump_restore" version))
+       (sha256
+        (base32
+         "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f ;; No testsuite.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-bin-es_dump_restore
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/es_dump_restore")
+               `("GEM_PATH" ":" prefix (,(string-append
+                                          (getenv "GEM_PATH")
+                                          ":"
+                                          (getenv "GEM_HOME")))))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-httpclient" ,ruby-httpclient)
+       ("ruby-multi-json" ,ruby-multi-json)
+       ("ruby-progress_bar" ,ruby-progress_bar)
+       ("ruby-rubyzip" ,ruby-rubyzip)
+       ("ruby-thor" ,ruby-thor)))
+    (synopsis "Utility for dumping and restoring ElasticSearch indexes")
+    (description
+     "This package provides a utility for dumping the contents of an
+ElasticSearch index to a compressed file and restoring the dumpfile back to an
+ElasticSearch server")
+    (home-page "https://github.com/patientslikeme/es_dump_restore")
+    (license license:expat)))
 
 (define-public leveldb
   (package
@@ -289,10 +336,124 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
 mapping from string keys to string values.")
     (license license:bsd-3)))
 
+(define-public memcached
+  (package
+    (name "memcached")
+    (version "1.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://memcached.org/files/memcached-" version ".tar.gz"))
+       (sha256
+        (base32 "0chwc0g7wfvcad36z8pf2jbgygdnm9nm1l6pwjsn3d2b089gh0f0"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libevent" ,libevent)
+       ("cyrus-sasl" ,cyrus-sasl)))
+    (home-page "https://memcached.org/")
+    (synopsis "In memory caching service")
+    (description "Memcached is a in memory key value store.  It has a small
+and generic API, and was originally intended for use with dynamic web
+applications.")
+    (license license:bsd-3)))
+
+(define-public mongodb
+  (package
+    (name "mongodb")
+    (version "3.4.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/mongodb/mongo/archive/r"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32 "0gidwyvh3bdwmk2pccgkqkaln4ysgn8iwa7ihjzllsq0rdg95045"))
+              (patches
+               (list
+                (search-patch "mongodb-support-unknown-linux-distributions.patch")))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("openssl" ,openssl)
+       ("pcre" ,pcre)
+       ("yaml-cpp" ,yaml-cpp)
+       ("zlib" ,zlib)
+       ("snappy" ,snappy)
+       ("boost" ,boost)))
+    (native-inputs
+     `(("scons" ,scons)
+       ("python" ,python-2)
+       ("valgrind" ,valgrind)
+       ("perl" ,perl)))
+    (arguments
+     `(#:phases
+       (let ((common-options
+              `(;; "--use-system-tcmalloc" TODO: Missing gperftools
+                "--use-system-pcre"
+                ;; TODO
+                ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
+                ;; --use-system-boost
+                "--use-system-snappy"
+                "--use-system-zlib"
+                "--use-system-valgrind"
+                ;; "--use-system-stemmer" TODO: Missing relevant package
+                "--use-system-yaml"
+                "--disable-warnings-as-errors"
+                ,(format #f "--jobs=~a" (parallel-job-count))
+                "--ssl")))
+         (modify-phases %standard-phases
+           (delete 'configure) ; There is no configure phase
+           (add-after 'unpack 'scons-propagate-environment
+             (lambda _
+               ;; Modify the SConstruct file to arrange for
+               ;; environment variables to be propagated.
+               (substitute* "SConstruct"
+                 (("^env = Environment\\(")
+                  "env = Environment(ENV=os.environ, "))
+               #t))
+           (add-after 'unpack 'create-version-file
+             (lambda _
+               (call-with-output-file "version.json"
+                 (lambda (port)
+                   (display ,(simple-format #f "{
+    \"version\": \"~A\"
+}" version) port)))
+               #t))
+           (replace 'build
+             (lambda _
+               (zero? (apply system*
+                             `("scons"
+                               ,@common-options
+                               "mongod" "mongo" "mongos")))))
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (or (not tests?)
+                   (zero? (apply system*
+                                 `("scons"
+                                   ,@common-options
+                                   "dbtest" "unittests"))))))
+           (replace 'install
+             (lambda _
+               (let ((bin  (string-append (assoc-ref %outputs "out") "/bin")))
+                 (install-file "mongod" bin)
+                 (install-file "mongos" bin)
+                 (install-file "mongo" bin))
+               #t))))))
+    (home-page "https://www.mongodb.org/")
+    (synopsis "High performance and high availability document database")
+    (description
+     "Mongo is a high-performance, high availability, schema-free
+document-oriented database.  A key goal of MongoDB is to bridge the gap
+between key/value stores (which are fast and highly scalable) and traditional
+RDBMS systems (which are deep in functionality).")
+    (license (list license:agpl3
+                   ;; Some parts are licensed under the Apache License
+                   license:asl2.0))))
+
 (define-public mysql
   (package
     (name "mysql")
-    (version "5.7.18")
+    (version "5.7.20")
     (source (origin
              (method url-fetch)
              (uri (list (string-append
@@ -304,7 +465,7 @@ mapping from string keys to string values.")
                           name "-" version ".tar.gz")))
              (sha256
               (base32
-               "18m1mr55k9zmvnyqs0wr50csqsz3scs09fykh60wsml6c3np2p8b"))))
+               "11v4g3igigv3zvknv67qml8in6fjrbs2vnr3q6bg6f62nydm95sk"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
@@ -346,12 +507,7 @@ mapping from string keys to string values.")
                        (for-each delete-file
                                  (find-files (string-append out "/bin")
                                              "_embedded$"))
-                       #t))))
-       ;; On aarch64 the test suite runs out of memory and fails.
-       ,@(if (string-prefix? "aarch64-linux"
-                             (or (%current-target-system) (%current-system)))
-           '(#:tests? #f)
-           '())))
+                       #t))))))
     (native-inputs
      `(("bison" ,bison)
        ("perl" ,perl)))
@@ -372,7 +528,7 @@ Language.")
 (define-public mariadb
   (package
     (name "mariadb")
-    (version "10.1.22")
+    (version "10.1.26")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://downloads.mariadb.org/f/"
@@ -380,11 +536,20 @@ Language.")
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1kk674mx2bf22yivvzv1al5gdg9kyxar47m282bylb6kg8p5gc5w"))))
+                "0ggpdcal0if9y6h9hp1yv2q65cbkjfl4p8rqk68a5pk7k75v325s"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
        '("-DBUILD_CONFIG=mysql_release"
+         ;; Linking with libarchive fails, like this:
+
+         ;; ld: /gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
+         ;; relocation R_X86_64_32 against `.bss' can not be used when
+         ;; making a shared object; recompile with -fPIC
+
+         ;; For now, disable the features that that use libarchive (xtrabackup).
+         "-DWITH_LIBARCHIVE=OFF"
+
          "-DDEFAULT_CHARSET=utf8"
          "-DDEFAULT_COLLATION=utf8_general_ci"
          "-DMYSQL_DATADIR=/var/lib/mysql"
@@ -440,17 +605,18 @@ as a drop-in replacement of MySQL.")
 (define-public postgresql
   (package
     (name "postgresql")
-    (version "9.6.2")
+    (version "10.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://ftp.postgresql.org/pub/source/v"
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "1jahzqqw5inyvmacic2ihhj5f8z50lapci2fwws91h719ccbb1q1"))))
+                "1lbzwpmdxmk5bh0ix0rn72qbd52dq5cb55nzajscb0bvwa95abvi"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
+     `(#:configure-flags '("--with-uuid=e2fs")
+       #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'patch-/bin/sh
                      (lambda _
@@ -458,9 +624,16 @@ as a drop-in replacement of MySQL.")
                        (substitute* '("src/bin/pg_ctl/pg_ctl.c"
                                       "src/bin/psql/command.c")
                          (("/bin/sh") (which "sh")))
-                       #t)))))
+                       #t))
+         (add-after 'build 'build-contrib
+           (lambda _
+             (zero? (system* "make" "-C" "contrib"))))
+         (add-after 'install 'install-contrib
+           (lambda _
+             (zero? (system* "make" "-C" "contrib" "install")))))))
     (inputs
      `(("readline" ,readline)
+       ("libuuid" ,util-linux)
        ("zlib" ,zlib)))
     (home-page "https://www.postgresql.org/")
     (synopsis "Powerful object-relational database system")
@@ -473,6 +646,19 @@ TIMESTAMP.  It also supports storage of binary large objects, including
 pictures, sounds, or video.")
     (license (license:x11-style "file://COPYRIGHT"))))
 
+(define-public postgresql-9.6
+  (package
+    (inherit postgresql)
+    (name "postgresql")
+    (version "9.6.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://ftp.postgresql.org/pub/source/v"
+                                  version "/postgresql-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0k3ls2x182jz6djjiqj9kycddabdl2gk1y1ajq1vipnxwfki5nh6"))))))
+
 (define-public qdbm
   (package
     (name "qdbm")
@@ -577,9 +763,15 @@ types are supported, as is encryption.")
                   #t))))
     (build-system gnu-build-system)
     (arguments
-     '(#:make-flags (list "CC=gcc"
+     `(#:make-flags (list "CC=gcc"
                           (string-append "INSTALL_PATH="
                                          (assoc-ref %outputs "out")))
+       ;; Many tests fail on 32-bit platforms. There are multiple reports about
+       ;; this upstream, but it's not going to be supported any time soon.
+       #:tests? (let ((system ,(or (%current-target-system)
+                                   (%current-system))))
+                  (or (string-prefix? "x86_64-linux" system)
+                      (string-prefix? "aarch64-linux" system)))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-Makefile
@@ -592,6 +784,13 @@ types are supported, as is encryption.")
                (("#!/bin/sh") (string-append "#!" (which "sh"))))
              #t))
          (delete 'configure)
+         ;; The default target is only needed for tests and built on demand.
+         (delete 'build)
+         (add-before 'check 'disable-optimizations
+           (lambda _
+             ;; Prevent the build from passing '-march=native' to the compiler.
+             (setenv "PORTABLE" "1")
+             #t))
          (add-before 'check 'disable-failing-tests
            (lambda _
              (substitute* "Makefile"
@@ -608,8 +807,6 @@ types are supported, as is encryption.")
            ;; targets for release builds so we build them here for clarity.
            ;; TODO: Add debug output.
            (lambda* (#:key (make-flags '()) #:allow-other-keys)
-             ;; Prevent the build from adding machine-specific optimizations.
-             (setenv "PORTABLE" "1")
              (zero? (apply system* "make" "shared_lib" make-flags)))))))
     (native-inputs
      `(("parallel" ,parallel)
@@ -701,7 +898,7 @@ for example from a shell script.")
 (define-public sqlite
   (package
    (name "sqlite")
-   (version "3.17.0")
+   (version "3.19.3")
    (source (origin
             (method url-fetch)
             (uri (let ((numeric-version
@@ -717,7 +914,7 @@ for example from a shell script.")
                                   numeric-version ".tar.gz")))
             (sha256
              (base32
-              "0k472gq0p706jq4529p60znvw02hdf172qxgbdv59q0n7anqbr54"))))
+              "00b3l2qglpl1inx21fckiwxnfq5xf6441flc79rqg7zdvh1rq4h6"))))
    (build-system gnu-build-system)
    (inputs `(("readline" ,readline)))
    (arguments
@@ -740,14 +937,14 @@ is in the public domain.")
 (define-public tdb
   (package
     (name "tdb")
-    (version "1.3.11")
+    (version "1.3.15")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.samba.org/ftp/tdb/tdb-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0i1l38h0vyck6zkcj4fn2l03spadlmyr1qa1xpdp9dy2ccbm3s1r"))))
+                "0a37jhpij8wr4f4pjqdlwnffy2l6a2vkqdpz1bqxj6v06cwbz8dl"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -790,7 +987,7 @@ extremely small.")
     (synopsis "Database independent interface for Perl")
     (description "This package provides an database interface for Perl.")
     (home-page "http://search.cpan.org/dist/DBI")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbix-class
   (package
@@ -808,6 +1005,7 @@ extremely small.")
     (native-inputs
      `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
        ("perl-file-temp" ,perl-file-temp)
+       ("perl-module-install" ,perl-module-install)
        ("perl-package-stash" ,perl-package-stash)
        ("perl-test-deep" ,perl-test-deep)
        ("perl-test-exception" ,perl-test-exception)
@@ -844,7 +1042,7 @@ still providing access to as many of the capabilities of the database as
 possible, including retrieving related records from multiple tables in a
 single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
 \"ORDER BY\" and \"HAVING\" support.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbix-class-cursor-cached
   (package
@@ -861,7 +1059,8 @@ single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
     (build-system perl-build-system)
     (native-inputs
      `(("perl-cache-cache" ,perl-cache-cache)
-       ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
+       ("perl-dbd-sqlite" ,perl-dbd-sqlite)
+       ("perl-module-install" ,perl-module-install)))
     (propagated-inputs
      `(("perl-carp-clan" ,perl-carp-clan)
        ("perl-dbix-class" ,perl-dbix-class)))
@@ -869,7 +1068,7 @@ single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
     (synopsis "Cursor with built-in caching support")
     (description "DBIx::Class::Cursor::Cached provides a cursor class with
 built-in caching support.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbix-class-introspectablem2m
   (package
@@ -884,6 +1083,8 @@ built-in caching support.")
         (base32
          "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
     (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-install" ,perl-module-install)))
     (propagated-inputs
      `(("perl-dbix-class" ,perl-dbix-class)))
     (home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
@@ -894,7 +1095,7 @@ relationships are actually just a collection of convenience methods installed
 to bridge two relationships.  This DBIx::Class component can be used to store
 all relevant information about these non-relationships so they can later be
 introspected and examined.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbix-class-schema-loader
   (package
@@ -914,6 +1115,7 @@ introspected and examined.")
        ("perl-config-general" ,perl-config-general)
        ("perl-dbd-sqlite" ,perl-dbd-sqlite)
        ("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
+       ("perl-module-install" ,perl-module-install)
        ("perl-moose" ,perl-moose)
        ("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
        ("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
@@ -949,7 +1151,7 @@ introspected and examined.")
     (description "DBIx::Class::Schema::Loader automates the definition of a
 DBIx::Class::Schema by scanning database table definitions and setting up the
 columns, primary keys, unique constraints and relationships.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbd-pg
   (package
@@ -973,12 +1175,12 @@ columns, primary keys, unique constraints and relationships.")
     (synopsis "DBI PostgreSQL interface")
     (description "This package provides a PostgreSQL driver for the Perl5
 @dfn{Database Interface} (DBI).")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbd-mysql
   (package
     (name "perl-dbd-mysql")
-    (version "4.041")
+    (version "4.043")
     (source
      (origin
        (method url-fetch)
@@ -986,7 +1188,8 @@ columns, primary keys, unique constraints and relationships.")
                            "DBD-mysql-" version ".tar.gz"))
        (sha256
         (base32
-         "0h4h6zwzj8fwh9ljb8svnsa0a3ch4p10hp59kpdibdb4qh8xwxs7"))))
+         "16bg7l28n65ngi1abjxvwk906a80i2vd5vzjn812dx8phdg8d7v2"))
+       (patches (search-patches "perl-dbd-mysql-CVE-2017-10788.patch"))))
     (build-system perl-build-system)
     ;; Tests require running MySQL server
     (arguments `(#:tests? #f))
@@ -997,7 +1200,7 @@ columns, primary keys, unique constraints and relationships.")
     (synopsis "DBI MySQL interface")
     (description "This package provides a MySQL driver for the Perl5
 @dfn{Database Interface} (DBI).")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-dbd-sqlite
   (package
@@ -1019,7 +1222,7 @@ columns, primary keys, unique constraints and relationships.")
 the entire thing in the distribution.  So in order to get a fast transaction
 capable RDBMS working for your Perl project you simply have to install this
 module, and nothing else.")
-    (license (package-license perl))
+    (license license:perl-license)
     (home-page "http://search.cpan.org/~ishigaki/DBD-SQLite/lib/DBD/SQLite.pm")))
 
 (define-public perl-sql-abstract
@@ -1036,7 +1239,8 @@ module, and nothing else.")
          "17sgwq3mvqjhv3b77cnvrq60xgp8harjhlnvpwmxc914rqc5ckaz"))))
     (build-system perl-build-system)
     (native-inputs
-     `(("perl-test-deep" ,perl-test-deep)
+     `(("perl-module-install" ,perl-module-install)
+       ("perl-test-deep" ,perl-test-deep)
        ("perl-test-exception" ,perl-test-exception)
        ("perl-test-warn" ,perl-test-warn)))
     (propagated-inputs
@@ -1052,7 +1256,7 @@ been modified to make the SQL easier to generate from Perl data structures.
 The underlying idea is for this module to do what you mean, based on the data
 structures you provide it, so that you don't have to modify your code every
 time your data changes.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-sql-splitstatement
   (package
@@ -1078,7 +1282,7 @@ time your data changes.")
     (synopsis "Split SQL code into atomic statements")
     (description "This module tries to split any SQL code, even including
 non-standard extensions, into the atomic statements it is composed of.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public perl-sql-tokenizer
   (package
@@ -1098,7 +1302,7 @@ non-standard extensions, into the atomic statements it is composed of.")
     (description "SQL::Tokenizer is a tokenizer for SQL queries.  It does not
 claim to be a parser or query verifier.  It just creates sane tokens from a
 valid SQL query.")
-    (license (package-license perl))))
+    (license license:perl-license)))
 
 (define-public unixodbc
   (package
@@ -1150,14 +1354,14 @@ similar to BerkeleyDB, LevelDB, etc.")
 (define-public redis
   (package
     (name "redis")
-    (version "3.2.4")
+    (version "4.0.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.redis.io/releases/redis-"
                                   version".tar.gz"))
               (sha256
                (base32
-                "1wb9jd692a0y52bkkxr6815kk4g039mirjdrvqx24265lv2l5l1a"))))
+                "14bm8lkhylc93r4dgl7kkzzpw2xq7gr6w6h80n3jazqnx5mcsj90"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ; tests related to master/slave and replication fail
@@ -1190,6 +1394,7 @@ sets, bitmaps and hyperloglogs.")
     (arguments
      `(#:configure-flags
        (list
+        "--disable-opt" ;"-march=native". XXX this also turns off -O0.
         (string-append "LDFLAGS=-Wl,-rpath="
                        (assoc-ref %outputs "out") "/lib"))))
     (inputs `(("zlib" ,zlib)))
@@ -1301,19 +1506,19 @@ trees (LSM), for sustained throughput under random insert workloads.")
     "Perl5 access to Berkeley DB version 1.x")
   (description
     "The DB::File module provides Perl bindings to the Berkeley DB version 1.x.")
-  (license (package-license perl))))
+  (license license:perl-license)))
 
 (define-public lmdb
   (package
     (name "lmdb")
-    (version "0.9.18")
+    (version "0.9.21")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/LMDB/lmdb/archive/"
                                   "LMDB_" version ".tar.gz"))
               (sha256
                (base32
-                "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx"))))
+                "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -1327,8 +1532,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
@@ -1368,14 +1582,14 @@ on another machine, accessed via TCP/IP.")
 (define-public python-peewee
   (package
     (name "python-peewee")
-    (version "2.8.3")
+    (version "2.10.2")
       (source
         (origin
         (method url-fetch)
         (uri (pypi-uri "peewee" version))
         (sha256
          (base32
-          "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
+          "10f2mrd5hw6rjklrzaix2lsxlgc8vx3xak54arcy6yd791zhchi3"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ; Fails to import test data
@@ -1498,7 +1712,7 @@ for ODBC.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-before 'configure 'autoreconf
+         (add-after 'unpack 'autoreconf
            (lambda _
              (zero? (system* "autoreconf" "-vfi")))))))
     (home-page "http://mdbtools.sourceforge.net/")
@@ -1510,3 +1724,129 @@ 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.93")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "lmdb" version))
+              (sha256
+               (base32
+                "0xdpb298fyl68acadbwv5801wcwfpnhc7sm4bnrq1x4bd5dhhsql"))
+              (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
+     (list license:openldap2.8
+           ;; ‘lib/win32/inttypes.h’ and ‘lib/win32-stdint/stdint.h’ are BSD-3,
+           ;; but not actually needed on platforms currently supported by Guix.
+           license:bsd-3))))
+
+(define-public python2-lmdb
+  (package-with-python2 python-lmdb))
+
+(define-public python-orator
+  (package
+    (name "python-orator")
+    (version "0.9.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "orator" version))
+              (sha256
+               (base32
+                "14r58z64fdp76ixnvmi4lni762b405ynmsx6chr1qihs3yl9zn6c"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'loosen-dependencies
+           ;; Tests are not actually run since they are not included with the
+           ;; distributed package, but dependencies are checked.
+           (lambda _
+             (substitute* "setup.py"
+               ((",<.*'") "'")
+               (("flexmock==0.9.7") "flexmock")
+               ;; The pytest-mock package is out of date, so we remove minimum
+               ;; version requirement.
+               (("pytest-mock.*'") "pytest-mock'"))
+             #t)))))
+    (native-inputs
+     `(("python-pytest-mock" ,python-pytest-mock)
+       ("python-pytest" ,python-pytest-3.0)
+       ("python-flexmock" ,python-flexmock)))
+    (propagated-inputs
+     `(("python-backpack" ,python-backpack)
+       ("python-blinker" ,python-blinker)
+       ("python-cleo" ,python-cleo)
+       ("python-faker" ,python-faker)
+       ("python-inflection" ,python-inflection)
+       ("python-lazy-object-proxy" ,python-lazy-object-proxy)
+       ("python-pendulum" ,python-pendulum)
+       ("python-pyaml" ,python-pyaml)
+       ("python-pygments" ,python-pygments)
+       ("python-simplejson" ,python-simplejson)
+       ("python-six" ,python-six)
+       ("python-wrapt" ,python-wrapt)))
+    (home-page "https://orator-orm.com/")
+    (synopsis "ActiveRecord ORM for Python")
+    (description
+     "Orator provides a simple ActiveRecord-like Object Relational Mapping
+implementation for Python.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-orator))))))
+
+(define-public python2-orator
+  (package-with-python2 (strip-python2-variant python-orator)))
+
+(define-public virtuoso-ose
+  (package
+    (name "virtuoso-ose")
+    (version "7.2.4.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/openlink/virtuoso-opensource/releases/"
+             "download/v" version "/virtuoso-opensource-" version ".tar.gz"))
+       (sha256
+        (base32 "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f)) ; Tests require a network connection.
+    (inputs
+     `(("openssl" ,openssl)
+       ("net-tools" ,net-tools)))
+    (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/")
+    (synopsis "Multi-model database system")
+    (description "Virtuoso is a scalable cross-platform server that combines
+relational, graph, and document data management with web application server
+and web services platform functionality.")
+    ;; configure: error: ... can only be build on 64bit platforms
+    (supported-systems '("x86_64-linux" "mips64el-linux" "aarch64-linux"))
+    (license license:gpl2)))