summaryrefslogtreecommitdiff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm312
1 files changed, 192 insertions, 120 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index de161e1864..e11efaf152 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -748,7 +748,7 @@ Language.")
(define-public mariadb
(package
(name "mariadb")
- (version "10.5.8")
+ (version "10.5.12")
(source (origin
(method url-fetch)
(uri (string-append "https://downloads.mariadb.com/MariaDB"
@@ -756,7 +756,7 @@ Language.")
version ".tar.gz"))
(sha256
(base32
- "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
+ "1gg4h9ahmk78cx01zyw0fqr6hhd78fsyhs0s34p3gi9hkak1qkxb"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -775,9 +775,7 @@ Language.")
(unless (string-suffix? "CMakeLists.txt" file)
(delete-file file)))
(append (find-files "extra/wolfssl")
- (find-files "zlib")))
- #t))))
- (replacement mariadb/fixed)
+ (find-files "zlib")))))))
(build-system cmake-build-system)
(outputs '("out" "lib" "dev"))
(arguments
@@ -832,6 +830,10 @@ Language.")
"/share/mysql/support-files")
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
"-DINSTALL_SHAREDIR=share")
+ ;; The test suite has spurious failures (mostly timeouts) if run in
+ ;; parallel on various machines. Only enable parallel tests on
+ ;; architectures which are likely to not have this issue.
+ #:parallel-tests? ,(target-x86-64?)
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'adjust-output-references
@@ -859,37 +861,32 @@ Language.")
"${INSTALL_INCLUDEDIR}"))
(substitute* "cmake/mariadb_connector_c.cmake"
(("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
- "${INSTALL_BINDIR}"))
- #t))
+ "${INSTALL_BINDIR}"))))
(add-after 'unpack 'adjust-tests
(lambda _
(let ((disabled-tests
'(;; These fail because root@hostname == root@localhost in
;; the build environment, causing a user count mismatch.
;; See <https://jira.mariadb.org/browse/MDEV-7761>.
- "funcs_1.is_columns_mysql"
- "main.join_cache"
"main.explain_non_select"
- "main.stat_tables"
- "main.stat_tables_innodb"
"main.upgrade_MDEV-19650"
"roles.acl_statistics"
+ ;; Probably same as above, test failure reported upstream:
+ ;; <https://jira.mariadb.org/browse/MDEV-26320>.
+ "main.selectivity_no_engine"
+
;; FIXME: This test checks various table encodings and
;; fails because Guix defaults to UTF8 instead of the
;; upstream default latin1_swedish_ci. It's not easily
;; substitutable because several encodings are tested.
- "main.sp2"
+ "main.system_mysql_db"
;; XXX: This test occasionally fails on i686-linux:
;; <https://jira.mariadb.org/browse/MDEV-24458>
,@(if (string-prefix? "i686" (%current-system))
'("main.myisampack")
- '())
-
- ;; This file contains a time bomb which makes it fail after
- ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
- "main.mysqldump"))
+ '())))
;; This file contains a list of known-flaky tests for this
;; release. Append our own items.
@@ -913,8 +910,7 @@ Language.")
(substitute* "mysql-test/mysql-test-run.pl"
(("/bin/ls") (which "ls"))
- (("/bin/sh") (which "sh")))
- #t)))
+ (("/bin/sh") (which "sh"))))))
(add-before 'configure 'disable-plugins
(lambda _
(let ((disable-plugin (lambda (name)
@@ -925,24 +921,25 @@ Language.")
(format port "\n")))))
(disabled-plugins '(;; XXX: Causes a test failure.
"disks")))
- (for-each disable-plugin disabled-plugins)
- #t)))
+ (for-each disable-plugin disabled-plugins))))
(replace 'check
- (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (lambda* (#:key (tests? #t) parallel-tests? #:allow-other-keys)
(if tests?
(with-directory-excursion "mysql-test"
(invoke "./mtr" "--verbose"
"--retry=3"
+ "--suite=main"
"--testcase-timeout=40"
"--suite-timeout=600"
- "--parallel" (number->string (parallel-job-count))
+ "--parallel" (number->string (if parallel-tests?
+ (parallel-job-count)
+ 1))
;; Skip the replication tests: they are very I/O
;; intensive and frequently causes indeterministic
;; failures even on powerful hardware.
"--skip-rpl"
"--skip-test-list=unstable-tests"))
- (format #t "test suite not run~%"))
- #t))
+ (format #t "test suite not run~%"))))
(add-after
'install 'post-install
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -987,9 +984,7 @@ Language.")
(substitute* (list (string-append dev "/bin/mysql_config")
(string-append dev "/lib/pkgconfig/mariadb.pc"))
(("-lssl -lcrypto" all)
- (string-append "-L" openssl "/lib " all)))
-
- #t))))))
+ (string-append "-L" openssl "/lib " all)))))))))
(native-inputs
`(("bison" ,bison)
("perl" ,perl)))
@@ -1013,13 +1008,6 @@ Language.")
as a drop-in replacement of MySQL.")
(license license:gpl2)))
-(define mariadb/fixed
- (package
- (inherit mariadb)
- (source (origin
- (inherit (package-source mariadb))
- (patches (search-patches "mariadb-CVE-2021-27928.patch"))))))
-
(define-public mariadb-connector-c
(package
(name "mariadb-connector-c")
@@ -1074,15 +1062,14 @@ and high-availability (HA).")
(define-public postgresql-13
(package
(name "postgresql")
- (replacement postgresql-13.3)
- (version "13.1")
+ (version "13.4")
(source (origin
(method url-fetch)
(uri (string-append "https://ftp.postgresql.org/pub/source/v"
version "/postgresql-" version ".tar.bz2"))
(sha256
(base32
- "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
+ "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za"))
(patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
(build-system gnu-build-system)
(arguments
@@ -1101,6 +1088,12 @@ and high-availability (HA).")
"src/bin/psql/command.c")
(("/bin/sh") (which "sh")))
#t))
+ (add-before 'configure 'set-socket-dir
+ (lambda _
+ (substitute* '("src/include/pg_config_manual.h")
+ (("DEFAULT_PGSOCKET_DIR[^\n]*")
+ "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))
+ #t))
(add-after 'build 'build-contrib
(lambda _
(invoke "make" "-C" "contrib")))
@@ -1123,20 +1116,6 @@ TIMESTAMP. It also supports storage of binary large objects, including
pictures, sounds, or video.")
(license (license:x11-style "file://COPYRIGHT"))))
-(define-public postgresql-13.3
- (package
- (inherit postgresql-13)
- (name "postgresql")
- (version "13.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://ftp.postgresql.org/pub/source/v"
- version "/postgresql-" version ".tar.bz2"))
- (sha256
- (base32
- "18dliq7h2l8irffhyyhdmfwx3si515q6gds3cxdjb9n7m17lbn9w"))
- (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
-
(define-public postgresql-11
(package
(inherit postgresql-13)
@@ -1374,7 +1353,7 @@ including field and record folding.")))
(define-public rocksdb
(package
(name "rocksdb")
- (version "6.11.4")
+ (version "6.25.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1383,35 +1362,37 @@ including field and record folding.")))
(file-name (git-file-name name version))
(sha256
(base32
- "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
+ "14150kd7hk8jjwpm28bf3a0agrhyapbq9lgnl00l385vfb73wnzl"))
(modules '((guix build utils)))
(snippet
'(begin
;; TODO: unbundle gtest.
(delete-file "build_tools/gnu_parallel")
(substitute* "Makefile"
- (("build_tools/gnu_parallel") "parallel"))
- #t))))
+ (("build_tools/gnu_parallel") "parallel"))))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags (list "CC=gcc" "V=1"
+ `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
;; Ceph requires that RTTI is enabled.
"USE_RTTI=1"
- "date=1970-01-01" ; build reproducibly
- (string-append "INSTALL_PATH="
- (assoc-ref %outputs "out"))
+ ;; Don't pass '-march=native' to the compiler.
+ "PORTABLE=1"
+ ;; Use a deterministic date stamp.
+ "build_date=1970-01-01"
;; Running the full test suite takes hours and require
;; a lot of disk space. Instead we only run a subset
- ;; (see .travis.yml and Makefile).
- "ROCKSDBTESTS_END=db_tailing_iter_test")
+ ;; that exercises platform-specific functionality.
+ "ROCKSDBTESTS_PLATFORM_DEPENDENT=only")
#:test-target "check_some"
;; 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)))
+ #:tests? ,(if (%current-target-system)
+ #f
+ (let ((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
@@ -1419,9 +1400,8 @@ including field and record folding.")))
(substitute* "Makefile"
;; Don't depend on the static library when installing.
(("install: install-static")
- "install: install-shared")
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
- #t))
+ "install:")
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))))
(delete 'configure)
;; The default target is only needed for tests and built on demand.
(delete 'build)
@@ -1434,33 +1414,31 @@ including field and record folding.")))
(let ((test-dir (string-append (getcwd) "/../test")))
(mkdir test-dir)
(setenv "TEST_TMPDIR" (canonicalize-path test-dir)))))
- (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"
;; These tests reliably fail due to "Too many open files".
(("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
- (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
- #t))
- (add-after 'check 'build
+ (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))))
+ (add-after 'check 'clean
+ (lambda _
+ ;; Otherwise stale objects from the tests would interfere.
+ (invoke "make" "clean")))
+ (add-after 'clean 'build
;; The default build target is a debug build for tests. The
;; install target depends on the "shared_lib" release target
;; so we build it here for clarity.
(lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
- (apply invoke "make" "shared_lib"
- `(,@(if parallel-build?
- `("-j" ,(number->string (parallel-job-count)))
- '())
- ,@make-flags)))))))
+ (apply invoke "make" "shared_lib"
+ `(,@(if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '())
+ ,@make-flags)))))))
(native-inputs
`(("parallel" ,parallel)
("perl" ,perl)
("procps" ,procps)
- ("python" ,python-2)
+ ("python" ,python)
("which" ,which)))
(inputs
`(("bzip2" ,bzip2)
@@ -2613,51 +2591,145 @@ can autogenerate peewee models using @code{pwiz}, a model generator.")
(define-public python2-peewee
(package-with-python2 python-peewee))
+(define-public python-pypika-tortoise
+ (package
+ (name "python-pypika-tortoise")
+ (version "0.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pypika-tortoise" version))
+ (sha256
+ (base32 "0g4z0lz739nk04b405ynqpd3y1z5nfyxjz9hqgxcw3jydsjx0cb8"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/tortoise/pypika-tortoise")
+ (synopsis "Pypika fork for tortoise-orm")
+ (description "Pypika-tortoise is a fork of pypika which has been
+streamlined for its use in the context of tortoise-orm. It removes support
+for many database kinds that tortoise-orm doesn't need, for example.")
+ (license license:asl2.0)))
+
+(define-public python-sphinxcontrib-asyncio
+ (package
+ (name "python-sphinxcontrib-asyncio")
+ (version "0.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sphinxcontrib-asyncio" version))
+ (sha256
+ (base32 "0bkj010ygsr7m769llf2aq4bbjfhdwqrrabi98j8gpvyzvh2dzcr"))))
+ (build-system python-build-system)
+ (arguments '(#:tests? #f)) ;no test suite
+ (propagated-inputs (list python-sphinx))
+ (home-page "https://github.com/aio-libs/sphinxcontrib-asyncio")
+ (synopsis "Sphinx extension to support coroutines in markup")
+ (description "This package is a Sphinx extension providing additional
+coroutine-specific markup.")
+ (license license:asl2.0)))
+
+(define-public python-asyncpg
+ (package
+ (name "python-asyncpg")
+ (version "0.24.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asyncpg" version))
+ (sha256
+ (base32 "1in0q6iffpl8ag6ady4bvwnn40igh10cpp4xgm426j1lqdis0byx"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-typing-extensions))
+ (native-inputs
+ (list postgresql
+ python-cython
+ python-flake8
+ python-pycodestyle
+ python-pytest
+ python-sphinx
+ python-sphinx-rtd-theme
+ python-sphinxcontrib-asyncio
+ python-uvloop))
+ (home-page "https://github.com/MagicStack/asyncpg")
+ (synopsis "Fast PostgreSQL database client library for Python")
+ (description "@code{asyncpg} is a database interface library designed
+specifically for PostgreSQL and Python/asyncio. @code{asyncpg} is an
+efficient, clean implementation of PostgreSQL server binary protocol for use
+with Python's asyncio framework.")
+ (license license:asl2.0)))
+
+(define-public python-asyncmy
+ (package
+ (name "python-asyncmy")
+ (version "0.2.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asyncmy" version))
+ (sha256
+ (base32 "19p81jd4w7m7v2x1jdrwibp67wzqx1a7rdw5n4qqmch3iffp97vn"))))
+ (build-system python-build-system)
+ (native-inputs (list python-cython))
+ (home-page "https://github.com/long2ice/asyncmy")
+ (synopsis "Fast MySQL driver for Python")
+ (description "@code{asyncmy} is a fast @code{asyncio} MySQL driver, which
+reuses most of @code{pymysql} and @code{aiomysql} but rewrites the core
+protocol with Cython for performance.")
+ (license license:asl2.0)))
+
+(define-public python-aiomysql
+ (package
+ (name "python-aiomysql")
+ (version "0.0.21")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aiomysql" version))
+ (sha256
+ (base32 "0b442d0jb82z3lk19ylmm64ix88ppz7gay08bxld538ivg06j5c1"))))
+ (build-system python-build-system)
+ (arguments '(#:tests? #f)) ;test suite requires docker
+ (propagated-inputs (list python-pymysql))
+ (home-page "https://github.com/aio-libs/aiomysql")
+ (synopsis "MySQL driver for Python")
+ (description "@code{aiomysql} is a driver for accessing a MySQL database
+from the @code{asyncio} Python framework. It depends on and reuses most parts
+of PyMySQL. @code{aiomysql} tries to preserve the same API as the
+@code{aiopg} library.")
+ (license license:expat)))
+
(define-public python-tortoise-orm
(package
(name "python-tortoise-orm")
- (version "0.16.21")
+ (version "0.17.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tortoise-orm" version))
(sha256
- (base32
- "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
+ (base32 "1gzgiypln7lck3p95vk3i8rdx1bjbmmlcpb8xpba8cjdjvlj0l0z"))))
(build-system python-build-system)
- (arguments
- `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
- ; poetry.
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'relax-version-requirements
- (lambda _
- (substitute* "setup.py"
- (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
- (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite")
- (("pytz>=2020\\.4,<2021\\.0") "pytz")
- ;; Not required, since ciso8601 is used.
- (("'iso8601>=0\\.1\\.13,<0\\.2\\.0',") ""))
- #t)))))
- (native-inputs
- `(("python-asynctest" ,python-asynctest)
- ("python-nose2" ,python-nose2)))
+ ;; The test suite relies on asynctest, which is abandoned and doesn't
+ ;; support Python >= 3.8.
+ (arguments '(#:tests? #f))
(propagated-inputs
- `(("python-aiosqlite" ,python-aiosqlite)
- ("python-pypika" ,python-pypika)
- ("python-ciso8601" ,python-ciso8601)
- ("python-pytz" ,python-pytz)
- ("python-typing-extensions"
- ,python-typing-extensions)))
- (home-page
- "https://github.com/tortoise/tortoise-orm")
- (synopsis
- "Easy async ORM for python, built with relations in mind")
- (description
- "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
-inspired by Django. Tortoise ORM was build with relations in mind and
-admiration for the excellent and popular Django ORM. It’s engraved in its
-design that you are working not with just tables, you work with relational
-data.")
+ (list python-aiomysql
+ python-aiosqlite
+ python-asyncmy
+ python-asyncpg
+ python-ciso8601
+ python-iso8601
+ python-pypika-tortoise
+ python-pytz
+ python-rapidjson
+ python-uvloop))
+ (home-page "https://github.com/tortoise/tortoise-orm")
+ (synopsis "Asynchronous Object Relational Mapper (ORM) for Python")
+ (description "Tortoise ORM is an easy-to-use asyncio ORM (Object
+Relational Mapper) inspired by Django. Tortoise ORM was built with relations
+in mind and admiration for the excellent and popular Django ORM. It's
+engraved in its design that you are working not with just tables, you work
+with relational data.")
(license license:asl2.0)))
(define-public sqlcipher
@@ -3206,7 +3278,7 @@ PickleShare.")
(define-public python-apsw
(package
(name "python-apsw")
- (version "3.31.1-r1")
+ (version "3.36.0-r1")
(source
(origin
(method url-fetch)
@@ -3214,7 +3286,7 @@ PickleShare.")
"/download/" version "/apsw-" version ".zip"))
(sha256
(base32
- "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
+ "0w8q73147hv77dlpqrx6h1gx03acc8xqhvdpfp6vkffdm0wmqd8p"))))
(build-system python-build-system)
(native-inputs
`(("unzip" ,unzip)))