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.scm113
1 files changed, 101 insertions, 12 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 1433ca59c6..cbc5ffc2c6 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -627,7 +627,7 @@ Language.")
(define-public mariadb
(package
(name "mariadb")
- (version "10.1.33")
+ (version "10.1.34")
(source (origin
(method url-fetch)
(uri (string-append "https://downloads.mariadb.org/f/"
@@ -635,7 +635,20 @@ Language.")
name "-" version ".tar.gz"))
(sha256
(base32
- "0bax748j4srsyhw5cs5jvwigndh0zwmf4r2cjvhja31ckx8jqccl"))))
+ "0j2mdpyvj41vkq2rwrzky88b7170hzz6gy2vb2bc1447s2gp3q67"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete bundled snappy and xz.
+ (delete-file-recursively "storage/tokudb/PerconaFT/third_party")
+
+ ;; Preserve CMakeLists.txt for these.
+ (for-each (lambda (file)
+ (unless (string-suffix? "CMakeLists.txt" file)
+ (delete-file file)))
+ (append (find-files "extra/yassl")
+ (find-files "pcre") (find-files "zlib")))
+ #t))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
@@ -649,6 +662,12 @@ Language.")
;; For now, disable the features that that use libarchive (xtrabackup).
"-DWITH_LIBARCHIVE=OFF"
+ ;; Ensure the system libraries are used.
+ "-DWITH_JEMALLOC=yes"
+ "-DWITH_PCRE=system"
+ "-DWITH_SSL=system"
+ "-DWITH_ZLIB=system"
+
"-DDEFAULT_CHARSET=utf8"
"-DDEFAULT_COLLATION=utf8_general_ci"
"-DMYSQL_DATADIR=/var/lib/mysql"
@@ -662,10 +681,9 @@ Language.")
"-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
"-DINSTALL_DOCDIR=share/mysql/docs"
- "-DINSTALL_SHAREDIR=share/mysql")
+ "-DINSTALL_SHAREDIR=share")
#:phases
(modify-phases %standard-phases
-
;; Apply this patch that's only needed on ARM.
,@(if (and (not (%current-target-system))
(string=? "armhf-linux" (%current-system)))
@@ -677,11 +695,73 @@ Language.")
#t))))
'())
- (add-before
- 'configure 'pre-configure
- (lambda _
- (setenv "CONFIG_SHELL" (which "sh"))
- #t))
+ (add-after 'unpack 'unbundle
+ (lambda _
+ ;; The bundled PCRE in MariaDB has a patch that was upstreamed
+ ;; in version 8.34. Unfortunately the upstream patch behaves
+ ;; slightly differently and the build system fails to detect it.
+ ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
+ ;; XXX: Consider patching PCRE instead.
+ (substitute* "cmake/pcre.cmake"
+ ((" OR NOT PCRE_STACK_SIZE_OK") ""))
+
+ (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
+ ;; Remove dependency on these CMake targets.
+ ((" build_lzma build_snappy") ""))
+
+ (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
+ ;; This file checks that the bundled sources are present and
+ ;; declares build procedures for them. We don't need that.
+ (("^include\\(TokuThirdParty\\)") ""))
+
+ #t))
+ (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>.
+ "main.join_cache"
+ "main.explain_non_select"
+ "roles.acl_statistics"))
+
+ ;; This file contains a list of known-flaky tests for this
+ ;; release. Append our own items.
+ (unstable-tests (open-file "mysql-test/unstable-tests" "a")))
+ (for-each (lambda (test)
+ (format unstable-tests "~a : ~a\n"
+ test "Disabled in Guix"))
+ disabled-tests)
+ (close-port unstable-tests)
+
+ (substitute* "mysql-test/mysql-test-run.pl"
+ (("/bin/ls") (which "ls"))
+ (("/bin/sh") (which "sh")))
+ #t)))
+ (add-before 'configure 'disable-plugins
+ (lambda _
+ (let ((disable-plugin (lambda (name)
+ (call-with-output-file
+ (string-append "plugin/" name
+ "/CMakeLists.txt")
+ (lambda (port)
+ (format port "\n")))))
+ (disabled-plugins '(;; FIXME: On armhf-linux, this plugin
+ ;; triggers a GCC ICE. Disable for now.
+ "semisync"
+ ;; XXX: Causes a test failure.
+ "disks")))
+ (for-each disable-plugin disabled-plugins)
+ #t)))
+ (replace 'check
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ (with-directory-excursion "mysql-test"
+ (invoke "./mtr" "--verbose"
+ "--parallel" (number->string (parallel-job-count))
+ "--skip-test-list=unstable-tests"))
+ (format #t "test suite not run~%"))
+ #t))
(add-after
'install 'post-install
(lambda* (#:key outputs #:allow-other-keys)
@@ -694,7 +774,11 @@ Language.")
(with-directory-excursion out
(for-each delete-file-recursively
'("data" "mysql-test" "sql-bench"
- "share/man/man1/mysql-test-run.pl.1")))
+ "share/man/man1/mysql-test-run.pl.1"))
+ ;; Delete huge mysqltest executables.
+ (for-each delete-file (find-files "bin" "test"))
+ ;; And static libraries.
+ (for-each delete-file (find-files "lib" "\\.a$")))
#t))))))
(native-inputs
`(("bison" ,bison)
@@ -709,7 +793,12 @@ Language.")
("ncurses" ,ncurses)
("openssl" ,openssl)
("pcre" ,pcre)
+ ("snappy" ,snappy)
+ ("xz" ,xz)
("zlib" ,zlib)))
+ ;; The test suite is very resource intensive and can take more than three
+ ;; hours on a x86_64 system. Give slow and busy machines some leeway.
+ (properties '((timeout . 64800))) ;18 hours
(home-page "https://mariadb.org/")
(synopsis "SQL database server")
(description
@@ -1456,7 +1545,7 @@ valid SQL query.")
(define-public unixodbc
(package
(name "unixodbc")
- (version "2.3.4")
+ (version "2.3.6")
(source (origin
(method url-fetch)
(uri
@@ -1464,7 +1553,7 @@ valid SQL query.")
"ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
version ".tar.gz"))
(sha256
- (base32 "0f8y88rcc2akjvjv5y66yx7k0ms9h1s0vbcfy25j93didflhj59f"))))
+ (base32 "0sads5b8cmmj526gyjba7ccknl1vbhkslfqshv1yqln08zv3gdl8"))))
(build-system gnu-build-system)
(synopsis "Data source abstraction library")
(description "Unixodbc is a library providing an API with which to access