unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#43355] [PATCH staging] gnu: MariaDB: Update to 10.5.5.
@ 2020-09-12 14:38 Marius Bakke
  0 siblings, 0 replies; only message in thread
From: Marius Bakke @ 2020-09-12 14:38 UTC (permalink / raw)
  To: 43355

* 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.5.
[source](patches): Remove.
[source](snippet): Adapt unbundling for yassl->wolfssl migration.
[arguments]: Remove workaround for armhf-linux.  Remove fix-pcre-detection
phase.  Add phase to fix referenced directory names.  Adjust substitution for
renamed file.  Enable previously failing tests, and disable all replication
tests.
[inputs]: Remove OPENSSL-1.0 and PCRE.  Add OPENSSL and PCRE2.
[native-inputs]: Remove armhf workaround.
---
 gnu/local.mk                                  |   1 -
 gnu/packages/databases.scm                    | 102 +++++++-----------
 .../patches/mariadb-client-test-32bit.patch   |  37 -------
 3 files changed, 41 insertions(+), 99 deletions(-)
 delete mode 100644 gnu/packages/patches/mariadb-client-test-32bit.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1baa8405c5..8be8d8ff59 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1292,7 +1292,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/luit-posix.patch				\
   %D%/packages/patches/lvm2-static-link.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		\
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 3f5f885c35..e9c0128080 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.5")
     (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"))
+                "1948j0bqlqqhp0hw7f69jy10jbdz27hrmci03nxpph2l2w32qsyg"))
               (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,17 @@ 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|LIBDIR)@" _ dir)
+                (string-append "@INSTALL_" dir "@")))
+             (substitute* "include/CMakeLists.txt"
+               (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
+                "${INSTALL_INCLUDEDIR}"))
              #t))
          (add-after 'unpack 'adjust-tests
            (lambda _
@@ -828,6 +815,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 +824,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 +835,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"))
 
@@ -895,6 +871,10 @@ Language.")
                            "--testcase-timeout=40"
                            "--suite-timeout=600"
                            "--parallel" (number->string (parallel-job-count))
+                           ;; Skip the replication tests: they are extremely I/O
+                           ;; intensive and frequently causes random false
+                           ;; positives even on powerful hardware.
+                           "--skip-rpl"
                            "--skip-test-list=unstable-tests"))
                  (format #t "test suite not run~%"))
              #t))
@@ -905,56 +885,56 @@ 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.
               (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
diff --git a/gnu/packages/patches/mariadb-client-test-32bit.patch b/gnu/packages/patches/mariadb-client-test-32bit.patch
deleted file mode 100644
index 02017e324d..0000000000
--- a/gnu/packages/patches/mariadb-client-test-32bit.patch
+++ /dev/null
@@ -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)
-   {
-- 
2.28.0





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-12 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 14:38 [bug#43355] [PATCH staging] gnu: MariaDB: Update to 10.5.5 Marius Bakke

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git