guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/06: gnu: MariaDB: Update to 10.10.2.


From: guix-commits
Subject: 03/06: gnu: MariaDB: Update to 10.10.2.
Date: Mon, 21 Nov 2022 03:00:53 -0500 (EST)

mbakke pushed a commit to branch staging
in repository guix.

commit ad6463451128a644970676b0a03d8bb09f02326b
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Sep 8 19:55:23 2022 +0200

    gnu: MariaDB: Update to 10.10.2.
    
    * gnu/packages/databases.scm (mariadb): Update to 10.9.3.
    [source](snippet): Remove adjustments for deprecated TokuDB.
    [arguments]: Remove obsolete #:configure-flags.  Build with system libfmt.
    Adjust tests for 10.10.2, and mariadb_config file name.  Remove patch phase.
    [native-inputs]: Remove obsolete patch.
    [inputs]: Add FMT.  Change from OPENSSL-1.1 to OPENSSL.
    * gnu/tests/databases.scm (%mysql-os): Adjust config file so MariaDB works 
on
    overlayfs.
---
 gnu/local.mk                                      |  1 -
 gnu/packages/databases.scm                        | 79 +++++----------------
 gnu/packages/patches/mariadb-link-libatomic.patch | 83 -----------------------
 gnu/tests/databases.scm                           |  6 +-
 4 files changed, 21 insertions(+), 148 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index ec8480c201..98ba39cef7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1512,7 +1512,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/lvm2-static-link.patch                  \
   %D%/packages/patches/mailutils-variable-lookup.patch         \
   %D%/packages/patches/make-impure-dirs.patch                  \
-  %D%/packages/patches/mariadb-link-libatomic.patch            \
   %D%/packages/patches/mars-install.patch                      \
   %D%/packages/patches/mars-sfml-2.3.patch                     \
   %D%/packages/patches/mathjax-disable-webpack.patch                   \
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index e4dde1b22b..470b2bb38a 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -132,6 +132,7 @@
   #:use-module (gnu packages perl-web)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
@@ -900,7 +901,7 @@ Language.")
 (define-public mariadb
   (package
     (name "mariadb")
-    (version "10.5.12")
+    (version "10.10.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://downloads.mariadb.com/MariaDB";
@@ -908,21 +909,11 @@ Language.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1gg4h9ahmk78cx01zyw0fqr6hhd78fsyhs0s34p3gi9hkak1qkxb"))
+                "1ciw7y08wms9g3hzhyria49r1b9n5wpbhkndazv95d925c8x1jsp"))
               (modules '((guix build utils)))
               (snippet
                '(begin
-                  ;; Delete bundled snappy and xz.
-                  (delete-file-recursively 
"storage/tokudb/PerconaFT/third_party")
-                  (substitute* "storage/tokudb/PerconaFT/CMakeLists.txt"
-                    ;; This file checks that the bundled sources are present 
and
-                    ;; declares build procedures for them.
-                    (("^include\\(TokuThirdParty\\)") ""))
-                  (substitute* "storage/tokudb/PerconaFT/ft/CMakeLists.txt"
-                    ;; Don't attempt to use the procedures we just removed.
-                    ((" build_lzma build_snappy") ""))
-
-                  ;; Preserve CMakeLists.txt for these.
+                  ;; Delete bundled libraries, but preserve CMakeLists.txt.
                   (for-each (lambda (file)
                               (unless (string-suffix? "CMakeLists.txt" file)
                                 (delete-file file)))
@@ -934,21 +925,10 @@ Language.")
      `(#:configure-flags
        (list
          "-DBUILD_CONFIG=mysql_release"
-         ;; Linking with libarchive fails, like this:
-
-         ;; ld: 
/gnu/store/...-libarchive-3.2.2/lib/libarchive.a(archive_entry.o):
-         ;; relocation R_X86_64_32 against `.bss' can not be used when
-         ;; making a shared object; recompile with -fPIC
-
-         ;; For now, disable the features that that use libarchive 
(xtrabackup).
-         "-DWITH_LIBARCHIVE=OFF"
-
-         ;; Disable the TokuDB engine, because its test suite frequently fails,
-         ;; and loading it crashes the server: <https://bugs.gnu.org/35521>.
-         "-DTOKUDB_OK=OFF"
 
          ;; Ensure the system libraries are used.
          "-DWITH_JEMALLOC=yes"
+         "-DWITH_LIBFMT=system"
          "-DWITH_PCRE=system"
          "-DWITH_SSL=system"
          "-DWITH_ZLIB=system"
@@ -988,14 +968,6 @@ Language.")
        #:parallel-tests? ,(target-x86-64?)
        #:phases
        (modify-phases %standard-phases
-         ,@(if (target-ppc32?)
-             `((add-after 'unpack 'apply-libatomics-patch
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (let ((patch-file
-                           (assoc-ref inputs
-                                               
"mariadb-link-libatomic.patch")))
-                     (invoke "patch" "-p1" "-i" patch-file)))))
-             '())
          (add-after 'unpack 'adjust-output-references
            (lambda _
              ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
@@ -1031,6 +1003,9 @@ Language.")
                       "main.explain_non_select"
                       "main.upgrade_MDEV-19650"
                       "roles.acl_statistics"
+                      "main.stat_tables_innodb"
+                      "main.stat_tables"
+                      "main.mysql_upgrade"
 
                       ;; Probably same as above, test failure reported 
upstream:
                       ;; <https://jira.mariadb.org/browse/MDEV-26320>.
@@ -1057,36 +1032,19 @@ Language.")
                          disabled-tests)
                (close-port unstable-tests)
 
-               ;; XXX: These fail because they expect a latin1 charset and
-               ;; collation.  See <https://jira.mariadb.org/browse/MDEV-21264>.
-               (substitute* '("mysql-test/main/gis_notembedded.result"
-                              "mysql-test/main/system_mysql_db.result")
-                 (("latin1_swedish_ci") "utf8_general_ci")
-                 (("\tlatin1") "\tutf8"))
-
                (substitute* 
"mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test"
                  (("/bin/bash")
                   (which "bash")))
 
-               (substitute* "mysql-test/mysql-test-run.pl"
+               (substitute* "mysql-test/mariadb-test-run.pl"
                  (("/bin/ls") (which "ls"))
                  (("/bin/sh") (which "sh"))))))
-         (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 '(;; XXX: Causes a test failure.
-                                       "disks")))
-               (for-each disable-plugin disabled-plugins))))
          (replace 'check
            (lambda* (#:key (tests? #t) parallel-tests? #:allow-other-keys)
              (if tests?
                  (with-directory-excursion "mysql-test"
-                   (invoke "./mtr" "--verbose"
+                   (invoke "./mariadb-test-run"
+                           "--verbose"
                            "--retry=3"
                            "--suite=main"
                            "--testcase-timeout=40"
@@ -1133,7 +1091,7 @@ Language.")
               (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")
+              (rename-file (string-append out "/bin/mariadb_config")
                            (string-append dev "/bin/mariadb_config"))
               (rename-file (string-append out "/bin/mysql_config")
                            (string-append dev "/bin/mysql_config"))
@@ -1146,19 +1104,14 @@ Language.")
                 (("-lssl -lcrypto" all)
                  (string-append "-L" openssl "/lib " all)))))))))
     (native-inputs
-     (if (target-ppc32?)
-       `(("mariadb-link-libatomic.patch"
-          ,(search-patch "mariadb-link-libatomic.patch"))
-         ("patch" ,patch)
-         ("bison" ,bison)
-         ("perl" ,perl))
-       (list bison perl)))
+     (list bison perl))
     (inputs
-     `(("jemalloc" ,jemalloc)
+     `(("fmt" ,fmt)
+       ("jemalloc" ,jemalloc)
        ("libaio" ,libaio)
        ("libxml2" ,libxml2)
        ("ncurses" ,ncurses)
-       ("openssl" ,openssl-1.1)
+       ("openssl" ,openssl)
        ("pam" ,linux-pam)
        ("pcre2" ,pcre2)
        ("xz" ,xz)
diff --git a/gnu/packages/patches/mariadb-link-libatomic.patch 
b/gnu/packages/patches/mariadb-link-libatomic.patch
deleted file mode 100644
index f331067b6e..0000000000
--- a/gnu/packages/patches/mariadb-link-libatomic.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-https://github.com/MariaDB/server/commit/f502ccbcb5dfce29067434885a23db8d1bd5f134.patch
-This was apparently merged in 10.8.2.
-
-From f502ccbcb5dfce29067434885a23db8d1bd5f134 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= <cvicentiu@gmail.com>
-Date: Fri, 15 Oct 2021 16:51:05 +0300
-Subject: [PATCH] Link with libatomic to enable C11 atomics support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Some architectures (mips) require libatomic to support proper
-atomic operations. Check first if support is available without
-linking, otherwise use the library.
-
-Contributors:
-James Cowgill <jcowgill@debian.org>
-Jessica Clarke <jrtc27@debian.org>
-Vicențiu Ciorbaru <vicentiu@mariadb.org>
----
- configure.cmake      | 20 +++++++++++++++++++-
- mysys/CMakeLists.txt |  4 ++++
- sql/CMakeLists.txt   |  1 -
- 3 files changed, 23 insertions(+), 2 deletions(-)
-
-diff --git a/configure.cmake b/configure.cmake
-index 7a1369d77703f..db8742bb93b5a 100644
---- a/configure.cmake
-+++ b/configure.cmake
-@@ -895,7 +895,25 @@ int main()
-   long long int *ptr= &var;
-   return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
- }"
--HAVE_GCC_C11_ATOMICS)
-+HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
-+IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
-+  SET(HAVE_GCC_C11_ATOMICS True)
-+ELSE()
-+  SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
-+  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+  CHECK_CXX_SOURCE_COMPILES("
-+  int main()
-+  {
-+    long long int var= 1;
-+    long long int *ptr= &var;
-+    return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
-+  }"
-+  HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+  IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+    SET(HAVE_GCC_C11_ATOMICS True)
-+  ENDIF()
-+  SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
-+ENDIF()
- 
- IF(WITH_VALGRIND)
-   SET(HAVE_valgrind 1)
-diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
-index f97e3b4d3904c..09d3f726ffc74 100644
---- a/mysys/CMakeLists.txt
-+++ b/mysys/CMakeLists.txt
-@@ -78,6 +78,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
-  ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO} 
${CRC32_LIBRARY})
- DTRACE_INSTRUMENT(mysys)
- 
-+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+  TARGET_LINK_LIBRARIES(mysys atomic)
-+ENDIF()
-+
- IF(HAVE_BFD_H)
-   TARGET_LINK_LIBRARIES(mysys bfd)  
- ENDIF(HAVE_BFD_H)
-diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
-index 5f5d7daf1a5bc..f574f1f20295d 100644
---- a/sql/CMakeLists.txt
-+++ b/sql/CMakeLists.txt
-@@ -307,7 +307,6 @@ IF(WITH_MYSQLD_LDFLAGS)
-      "${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}")
- ENDIF()
- 
--
- FIND_PACKAGE(BISON 2.0)
- 
- 
diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm
index 2ca13577a1..92be1a829b 100644
--- a/gnu/tests/databases.scm
+++ b/gnu/tests/databases.scm
@@ -389,7 +389,11 @@ data double PRECISION NULL
 
 (define %mysql-os
   (simple-operating-system
-   (service mysql-service-type)))
+   (service mysql-service-type
+            (mysql-configuration
+             ;; Disable O_DIRECT since it's not supported on overlayfs.
+             ;; See <https://jira.mariadb.org/browse/MDEV-28751>.
+             (extra-content "innodb-flush-method = fsync")))))
 
 (define* (run-mysql-test)
   "Run tests in %MYSQL-OS."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]