summaryrefslogtreecommitdiff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-08-31 13:35:19 +0200
committerMarius Bakke <marius@gnu.org>2020-10-13 23:48:12 +0200
commit525ebb8508655e7a5dd68073dc57fe1c686d8878 (patch)
tree84a686185e00d152813458b1880a746de697b7be /gnu/packages/databases.scm
parentf7175626ffce578be1bc6df4916a129f86557872 (diff)
downloadguix-patches-525ebb8508655e7a5dd68073dc57fe1c686d8878.tar
guix-patches-525ebb8508655e7a5dd68073dc57fe1c686d8878.tar.gz
gnu: MariaDB: Update to 10.5.6.
* gnu/packages/patches/mariadb-client-test-32bit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/databases.scm (mariadb): Update to 10.5.6. [source](patches): Remove. [source](snippet): Adapt unbundling for yassl->wolfssl migration. [arguments]: Remove fix-pcre-detection phase. Add phase to fix referenced directory names. Adjust substitution for renamed file. Disable four tests. Enable previously failing ones. Remove armhf workaround. [native-inputs]: On armhf-linux, remove GCC-5. [inputs]: Remove OPENSSL-1.0 and PCRE. Add OPENSSL and PCRE2.
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm102
1 files changed, 41 insertions, 61 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 0584fe111a..885e0614ef 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -716,7 +716,7 @@ Language.")
(define-public mariadb
(package
(name "mariadb")
- (version "10.1.45")
+ (version "10.5.6")
(source (origin
(method url-fetch)
(uri (string-append "https://downloads.mariadb.com/MariaDB"
@@ -724,8 +724,7 @@ Language.")
version ".tar.gz"))
(sha256
(base32
- "1mfs0x4c0z7d306n128dxdawk3llk25vxif5zwl20fv1z5qhz3wx"))
- (patches (search-patches "mariadb-client-test-32bit.patch"))
+ "1i257h0zdypdfj5wkg6ck9pxlkph0jvjs92k22pjr6gnx5lxs1gz"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -743,8 +742,8 @@ Language.")
(for-each (lambda (file)
(unless (string-suffix? "CMakeLists.txt" file)
(delete-file file)))
- (append (find-files "extra/yassl")
- (find-files "pcre") (find-files "zlib")))
+ (append (find-files "extra/wolfssl")
+ (find-files "zlib")))
#t))))
(build-system cmake-build-system)
(outputs '("out" "lib" "dev"))
@@ -798,29 +797,20 @@ Language.")
"-DINSTALL_SHAREDIR=share")
#:phases
(modify-phases %standard-phases
- ,@(if (string-prefix? "arm" (%current-system))
- ;; XXX: Because of the GCC 5 input, we need to hide GCC 7 from
- ;; CPLUS_INCLUDE_PATH so that its headers do not shadow GCC 5.
- '((add-after 'set-paths 'hide-default-gcc
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((gcc (assoc-ref inputs "gcc")))
- (setenv "CPLUS_INCLUDE_PATH"
- (string-join
- (delete (string-append gcc "/include/c++")
- (string-split (getenv "CPLUS_INCLUDE_PATH")
- #\:))
- ":"))
- #t))))
- '())
- (add-after 'unpack 'fix-pcre-detection
+ (add-after 'unpack 'adjust-output-references
(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") ""))
+ ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
+ ;; to other variables such as $INSTALL_INCLUDEDIR, which does
+ ;; not work when the latter uses an absolute file name.
+ (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
+ (("@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@")
+ "@INSTALL_INCLUDEDIR@"))
+ (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
+ (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
+ "@INSTALL_INCLUDEDIR@"))
+ (substitute* "include/CMakeLists.txt"
+ (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
+ "${INSTALL_INCLUDEDIR}"))
#t))
(add-after 'unpack 'adjust-tests
(lambda _
@@ -828,6 +818,7 @@ Language.")
'(;; 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"
@@ -836,20 +827,7 @@ Language.")
;; This file contains a time bomb which makes it fail after
;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
- "main.mysqldump"
-
- ;; FIXME: This test fails on i686:
- ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
- ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
- ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
- ;; (all three tables must exist and be identical)
- ;; in a loop it produces the same error around 1/240 times.
- ;; montywi on #maria suggested removing the real_end check in
- ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
- ;; reach the ending quote occasionally. Disable it for now.
- "main.myisampack"
- ;; FIXME: This test fails on armhf-linux:
- "mroonga/storage.index_read_multiple_double"))
+ "main.mysqldump"))
;; This file contains a list of known-flaky tests for this
;; release. Append our own items.
@@ -860,9 +838,10 @@ Language.")
disabled-tests)
(close-port unstable-tests)
- ;; XXX: This test fails because it expects a latin1 charset and
+ ;; XXX: These fail because they expect a latin1 charset and
;; collation. See <https://jira.mariadb.org/browse/MDEV-21264>.
- (substitute* "mysql-test/r/gis_notembedded.result"
+ (substitute* '("mysql-test/main/gis_notembedded.result"
+ "mysql-test/main/system_mysql_db.result")
(("latin1_swedish_ci") "utf8_general_ci")
(("\tlatin1") "\tutf8"))
@@ -905,56 +884,57 @@ Language.")
(dev (assoc-ref outputs "dev"))
(lib (assoc-ref outputs "lib"))
(openssl (assoc-ref inputs "openssl")))
- (substitute* (string-append out "/bin/mysql_install_db")
+ (substitute* (list (string-append out "/bin/mariadb-install-db")
+ (string-append out "/bin/mysql_install_db"))
(("basedir=\"\"")
- (string-append "basedir=\"" out "\"")))
+ (string-append "basedir=\"" out "\""))
+ (("\\$basedir/share/mysql")
+ (string-append lib "/share/mysql")))
+
;; Remove unneeded files for testing.
(with-directory-excursion lib
(for-each delete-file-recursively
- '("data" "mysql-test" "sql-bench"))
+ '("mysql-test" "sql-bench"))
;; And static libraries.
(for-each delete-file (find-files "lib" "\\.a$")))
(with-directory-excursion out
(delete-file "share/man/man1/mysql-test-run.pl.1")
;; Delete huge and unnecessary executables.
- (for-each delete-file (find-files "bin" "(test|embedded)")))
+ (for-each delete-file (find-files "bin" "test$")))
(mkdir-p (string-append dev "/share"))
(mkdir-p (string-append dev "/bin"))
+ (rename-file (string-append lib "/bin/mariadbd")
+ (string-append out "/bin/mariadbd"))
(rename-file (string-append lib "/bin/mysqld")
(string-append out "/bin/mysqld"))
- (rename-file (string-append lib "/share/pkgconfig")
- (string-append dev "/share/pkgconfig"))
+ (mkdir-p (string-append dev "/lib"))
+ (rename-file (string-append lib "/lib/pkgconfig")
+ (string-append dev "/lib/pkgconfig"))
+ (rename-file (string-append lib "/bin/mariadb_config")
+ (string-append dev "/bin/mariadb_config"))
(rename-file (string-append out "/bin/mysql_config")
(string-append dev "/bin/mysql_config"))
-
- (substitute* (string-append out "/bin/mysql_install_db")
- (("\\$basedir/share/mysql")
- (string-append lib "/share/mysql")))
-
;; Embed an absolute reference to OpenSSL in mysql_config
;; and the pkg-config file to avoid propagation.
+ ;; XXX: how to do this for mariadb_config.c.in?
(substitute* (list (string-append dev "/bin/mysql_config")
- (string-append dev "/share/pkgconfig/mariadb.pc"))
+ (string-append dev "/lib/pkgconfig/mariadb.pc"))
(("-lssl -lcrypto" all)
(string-append "-L" openssl "/lib " all)))
#t))))))
(native-inputs
`(("bison" ,bison)
- ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
- ,@(if (string-prefix? "armhf" (%current-system))
- `(("gcc@5" ,gcc-5))
- '())
("perl" ,perl)))
(inputs
`(("jemalloc" ,jemalloc)
("libaio" ,libaio)
("libxml2" ,libxml2)
("ncurses" ,ncurses)
- ("openssl" ,openssl-1.0)
+ ("openssl" ,openssl)
("pam" ,linux-pam)
- ("pcre" ,pcre)
+ ("pcre2" ,pcre2)
("xz" ,xz)
("zlib" ,zlib)))
;; The test suite is very resource intensive and can take more than three