mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 22:50:23 -05:00
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.
This commit is contained in:
parent
f7175626ff
commit
525ebb8508
3 changed files with 41 additions and 99 deletions
|
@ -1303,7 +1303,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/lvm2-static-link.patch \
|
||||
%D%/packages/patches/mailutils-fix-uninitialized-variable.patch \
|
||||
%D%/packages/patches/make-impure-dirs.patch \
|
||||
%D%/packages/patches/mariadb-client-test-32bit.patch \
|
||||
%D%/packages/patches/mars-install.patch \
|
||||
%D%/packages/patches/mars-sfml-2.3.patch \
|
||||
%D%/packages/patches/maxima-defsystem-mkdir.patch \
|
||||
|
|
|
@ -716,7 +716,7 @@ (define-public mysql
|
|||
(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 @@ (define-public mariadb
|
|||
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 @@ (define-public mariadb
|
|||
(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 @@ (define-public mariadb
|
|||
"-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 @@ (define-public mariadb
|
|||
'(;; 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 @@ (define-public mariadb
|
|||
|
||||
;; 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 @@ (define-public mariadb
|
|||
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 @@ (define-public mariadb
|
|||
(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
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
From 93efa48a7b972fc463406603574a4d508eefe792 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Golubchik <serg@mariadb.org>
|
||||
Date: Sun, 13 May 2018 18:50:21 +0200
|
||||
Subject: [PATCH] fix failing main.mysql_client_test test on 32bit
|
||||
|
||||
in `ulonglong=ulong*uint` multiplication
|
||||
is done in ulong, wrapping around on 32bit.
|
||||
|
||||
This became visible after C/C changed the
|
||||
default charset to utf8, thus changing
|
||||
mbmaxlem from 1 to 3.
|
||||
---
|
||||
tests/mysql_client_fw.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
|
||||
index f69eb28a2871..4d036887629a 100644
|
||||
--- a/tests/mysql_client_fw.c
|
||||
+++ b/tests/mysql_client_fw.c
|
||||
@@ -768,7 +768,7 @@ static void do_verify_prepare_field(MYSQL_RES *result,
|
||||
{
|
||||
MYSQL_FIELD *field;
|
||||
CHARSET_INFO *cs;
|
||||
- ulonglong expected_field_length;
|
||||
+ ulonglong expected_field_length= length;
|
||||
|
||||
if (!(field= mysql_fetch_field_direct(result, no)))
|
||||
{
|
||||
@@ -777,7 +777,7 @@ static void do_verify_prepare_field(MYSQL_RES *result,
|
||||
}
|
||||
cs= get_charset(field->charsetnr, 0);
|
||||
DIE_UNLESS(cs);
|
||||
- if ((expected_field_length= length * cs->mbmaxlen) > UINT_MAX32)
|
||||
+ if ((expected_field_length*= cs->mbmaxlen) > UINT_MAX32)
|
||||
expected_field_length= UINT_MAX32;
|
||||
if (!opt_silent)
|
||||
{
|
Loading…
Reference in a new issue