From ce29031a23104928155b498d552fc4140cc03030 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 29 Nov 2020 20:09:32 +0100 Subject: gnu: MariaDB: Update to 10.5.8. * gnu/packages/databases.scm (mariadb): Update to 10.5.8. [arguments]: Adjust #:configure-flags to not install tests; remove code for the same. Adjust phases for upstream test changes. Add workaround. --- gnu/packages/databases.scm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 4b1a1ff09d..bf9f31ad25 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -898,7 +898,7 @@ Language.") (define-public mariadb (package (name "mariadb") - (version "10.5.6") + (version "10.5.8") (source (origin (method url-fetch) (uri (string-append "https://downloads.mariadb.com/MariaDB" @@ -906,7 +906,7 @@ Language.") version ".tar.gz")) (sha256 (base32 - "1i257h0zdypdfj5wkg6ck9pxlkph0jvjs92k22pjr6gnx5lxs1gz")) + "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b")) (modules '((guix build utils))) (snippet '(begin @@ -956,6 +956,11 @@ Language.") "-DDEFAULT_COLLATION=utf8_general_ci" "-DMYSQL_DATADIR=/var/lib/mysql" "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" + + ;; Do not install the tests or benchmark suite. + "-DINSTALL_MYSQLTESTDIR=false" + "-DINSTALL_SQLBENCHDIR=false" + (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib")) (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib") "/lib") @@ -1005,8 +1010,15 @@ Language.") "main.explain_non_select" "main.stat_tables" "main.stat_tables_innodb" + "main.upgrade_MDEV-19650" "roles.acl_statistics" + ;; FIXME: This test checks various table encodings and + ;; fails because Guix defaults to UTF8 instead of the + ;; upstream default latin1_swedish_ci. It's not easily + ;; substitutable because several encodings are tested. + "main.sp2" + ;; This file contains a time bomb which makes it fail after ;; 2030-12-31. See for details. "main.mysqldump")) @@ -1077,12 +1089,15 @@ Language.") (("\\$basedir/share/mysql") (string-append lib "/share/mysql"))) - ;; Remove unneeded files for testing. (with-directory-excursion lib - (for-each delete-file-recursively - '("mysql-test" "sql-bench")) - ;; And static libraries. + ;; FIXME: Something creates an empty gnu/store/xxx-mariadb/bin + ;; directory at the root of the lib output. It's not present + ;; in the installation log. This started occuring between + ;; 10.5.6 and 10.5.8. How to prevent it? + (delete-file-recursively "gnu") + ;; Remove 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. -- cgit v1.2.3 From a73302ec91855fa1913a2702daee25f8b9cf487b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 13 Dec 2020 21:13:03 +0100 Subject: gnu: postgresql: Make version 13 the default. While at it, rearrange so that variables are in order, and also inherit the patches in lower versions, as the disable-resolve_symlinks patch was missing in 11 and 9. * gnu/packages/databases.scm (postgresql-13): Swap places with ... (postgresql): ... this. Turn into dummy pointer variable and move it last. (postgresql-11): Inherit from POSTGRESQL-13. Also inherit source. (postgresql-10): Inherit from POSTGRESQL-11. (postgresql-9.6): Inherit from POSTGRESQL-10. Also inherit source. --- gnu/packages/databases.scm | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index bf9f31ad25..8c0da1b666 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1173,17 +1173,17 @@ developed in C/C++ to MariaDB and MySQL databases.") (license license:lgpl2.1+))) ;; Don't forget to update the other postgresql packages when upgrading this one. -(define-public postgresql +(define-public postgresql-13 (package (name "postgresql") - (version "10.13") + (version "13.1") (source (origin (method url-fetch) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d")) + "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j")) (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) (build-system gnu-build-system) (arguments @@ -1219,46 +1219,45 @@ TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video.") (license (license:x11-style "file://COPYRIGHT")))) -(define-public postgresql-10 postgresql) - -(define-public postgresql-13 +(define-public postgresql-11 (package - (inherit postgresql) - (version "13.1") + (inherit postgresql-13) + (name "postgresql") + (version "11.6") (source (origin - (inherit (package-source postgresql)) + (inherit (package-source postgresql-13)) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j")))))) + "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9")))))) -(define-public postgresql-11 +(define-public postgresql-10 (package - (inherit postgresql) - (name "postgresql") - (version "11.6") + (inherit postgresql-11) + (version "10.13") (source (origin - (method url-fetch) + (inherit (package-source postgresql-11)) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9")))))) + "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d")))))) (define-public postgresql-9.6 (package - (inherit postgresql) - (name "postgresql") + (inherit postgresql-10) (version "9.6.16") (source (origin - (method url-fetch) + (inherit (package-source postgresql-10)) (uri (string-append "https://ftp.postgresql.org/pub/source/v" version "/postgresql-" version ".tar.bz2")) (sha256 (base32 "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w")))))) +(define-public postgresql postgresql-13) + (define-public python-pymysql (package (name "python-pymysql") -- cgit v1.2.3 From e693617f559f49d1d2606dd5ad997e444b9ad1b5 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 20 Dec 2020 16:06:49 +0100 Subject: gnu: PostgreSQL: Do not embed references to build tools. Fixes . * gnu/packages/databases.scm (postgresql-13)[arguments]: In #:configure-flags, provide non-absolute references to the build tools. --- gnu/packages/databases.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 8c0da1b666..733c8c4ef5 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1187,7 +1187,12 @@ developed in C/C++ to MariaDB and MySQL databases.") (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl") + `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl" + ;; PostgreSQL installs its own Makefile (should it?). + ;; Prevent it from retaining needless references to + ;; the build tools in order to save size. + "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c" + "LD=ld" "TAR=tar") #:phases (modify-phases %standard-phases (add-before 'configure 'patch-/bin/sh -- cgit v1.2.3 From 704b7861df926240fa730c05a59f7050fa45fec9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 20 Dec 2020 16:12:50 +0100 Subject: gnu: MariaDB: Fix 'mariadb_config' output to refer to correct directories. This fixes a regression introduced in ce29031a23104928155b498d552fc4140cc03030 where 'mariadb_config' would return libdir and plugindir relative to the location of the 'mariadb_config' program (which lives in a separate output). While at it, fix a couple other wrong references, and a another regression related to test installation. * gnu/packages/databases.scm (mariadb)[arguments]: Patch "mariadb_config.c.in" so that it falls back to old behavior. Patch 'mariadb.pc.in' and 'mariadb_connector_c.cmake' to cope with absolute directory names. In #:configure-flags, don't set INSTALL_MYSQLTESTDIR, but delete the installed tests with a phase. --- gnu/packages/databases.scm | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 733c8c4ef5..fa5dbfa244 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -957,8 +957,7 @@ Language.") "-DMYSQL_DATADIR=/var/lib/mysql" "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" - ;; Do not install the tests or benchmark suite. - "-DINSTALL_MYSQLTESTDIR=false" + ;; Do not install the benchmark suite. "-DINSTALL_SQLBENCHDIR=false" (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib")) @@ -990,14 +989,26 @@ Language.") ;; 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@")) + (("%s/@INSTALL_INCLUDEDIR@") + (string-append "@INSTALL_INCLUDEDIR@")) + ;; As of 10.5.8, the mariadb_config program tries to be + ;; clever and computes the installation directory relative + ;; to /proc/self/exe when running on Linux. Make it fall + ;; back to the old behaviour. + (("defined\\(__linux__\\)") + "0")) (substitute* "libmariadb/mariadb_config/libmariadb.pc.in" (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@") "@INSTALL_INCLUDEDIR@")) + (substitute* "support-files/mariadb.pc.in" + (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir) + (string-append dir "dir="))) (substitute* "include/CMakeLists.txt" (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}") "${INSTALL_INCLUDEDIR}")) + (substitute* "cmake/mariadb_connector_c.cmake" + (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}") + "${INSTALL_BINDIR}")) #t)) (add-after 'unpack 'adjust-tests (lambda _ @@ -1090,11 +1101,8 @@ Language.") (string-append lib "/share/mysql"))) (with-directory-excursion lib - ;; FIXME: Something creates an empty gnu/store/xxx-mariadb/bin - ;; directory at the root of the lib output. It's not present - ;; in the installation log. This started occuring between - ;; 10.5.6 and 10.5.8. How to prevent it? - (delete-file-recursively "gnu") + ;; Remove tests. + (delete-file-recursively "mysql-test") ;; Remove static libraries. (for-each delete-file (find-files "lib" "\\.a$"))) -- cgit v1.2.3 From 166472e2c8535e5b5e19e34aeaa0f84cb978b4e3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 21 Dec 2020 23:35:03 +0100 Subject: gnu: MariaDB: Disable failing test on i686-linux. * gnu/packages/databases.scm (mariadb)[arguments]: When building on i686-linux, disable one test. --- gnu/packages/databases.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index fa5dbfa244..827eee2bd0 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1030,6 +1030,12 @@ Language.") ;; substitutable because several encodings are tested. "main.sp2" + ;; XXX: This test occasionally fails on i686-linux: + ;; + ,@(if (string-prefix? "i686" (%current-system)) + '("main.myisampack") + '()) + ;; This file contains a time bomb which makes it fail after ;; 2030-12-31. See for details. "main.mysqldump")) -- cgit v1.2.3