From dc3cd2906861bc6a02837ea582274a07e50b0f24 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Thu, 21 May 2026 03:17:43 -0400 Subject: [PATCH] import CS mariadb-11.8.6-2.module_el9+1327+fe5ff7c2 --- .gitignore | 4 +- .mariadb.metadata | 4 +- SOURCES/CVE-2025-13699.patch | 105 - SOURCES/README.mariadb-docs | 9 + SOURCES/README.mysql-docs | 4 - SOURCES/README.mysql-license | 9 - SOURCES/mariadb-10.3.39-tests.patch | 101 - SOURCES/mariadb-annocheck.patch | 13 - ...heck-socket.sh => mariadb-check-socket.sh} | 6 +- ...ck-upgrade.sh => mariadb-check-upgrade.sh} | 14 +- SOURCES/mariadb-federated.patch | 8 + SOURCES/mariadb-libfmt.patch | 37 + SOURCES/mariadb-logrotate.patch | 99 +- SOURCES/mariadb-mdev-30402.patch | 12 - SOURCES/mariadb-mtr.patch | 70 + SOURCES/mariadb-ownsetup.patch | 50 +- SOURCES/mariadb-pcdir.patch | 20 - ...re-db-dir.sh => mariadb-prepare-db-dir.sh} | 6 +- ...ts-common.sh => mariadb-scripts-common.sh} | 16 +- SOURCES/mariadb-scripts.patch | 20 +- SOURCES/mariadb-server-galera.cil | 15 + SOURCES/mariadb-server-galera.te | 23 - SOURCES/mariadb.tmpfiles.d.in | 8 + SOURCES/mysql.service.in | 60 +- SOURCES/mysql.tmpfiles.d.in | 3 - SOURCES/mysql@.service.in | 83 +- SOURCES/pcre_bundling.patch | 12 + SOURCES/rh-skipped-tests-arm.list | 5 +- SOURCES/rh-skipped-tests-base.list | 134 +- SOURCES/rh-skipped-tests-ppc.list | 51 +- SOURCES/rh-skipped-tests-s390.list | 23 +- ...9d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch | 75 + SPECS/mariadb.spec | 3028 ++++++----------- 33 files changed, 1687 insertions(+), 2440 deletions(-) delete mode 100644 SOURCES/CVE-2025-13699.patch create mode 100644 SOURCES/README.mariadb-docs delete mode 100644 SOURCES/README.mysql-docs delete mode 100644 SOURCES/README.mysql-license delete mode 100644 SOURCES/mariadb-10.3.39-tests.patch delete mode 100644 SOURCES/mariadb-annocheck.patch rename SOURCES/{mysql-check-socket.sh => mariadb-check-socket.sh} (80%) rename SOURCES/{mysql-check-upgrade.sh => mariadb-check-upgrade.sh} (68%) create mode 100644 SOURCES/mariadb-federated.patch create mode 100644 SOURCES/mariadb-libfmt.patch delete mode 100644 SOURCES/mariadb-mdev-30402.patch create mode 100644 SOURCES/mariadb-mtr.patch delete mode 100644 SOURCES/mariadb-pcdir.patch rename SOURCES/{mysql-prepare-db-dir.sh => mariadb-prepare-db-dir.sh} (95%) rename SOURCES/{mysql-scripts-common.sh => mariadb-scripts-common.sh} (81%) create mode 100644 SOURCES/mariadb-server-galera.cil delete mode 100644 SOURCES/mariadb-server-galera.te create mode 100644 SOURCES/mariadb.tmpfiles.d.in delete mode 100644 SOURCES/mysql.tmpfiles.d.in create mode 100644 SOURCES/pcre_bundling.patch create mode 100644 SOURCES/upstream_87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch diff --git a/.gitignore b/.gitignore index 2b032ad..f4b4661 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -SOURCES/mariadb-10.3.39.tar.gz +SOURCES/fmt-12.1.0.zip +SOURCES/mariadb-11.8.6.tar.gz +SOURCES/pcre2-10.47.zip diff --git a/.mariadb.metadata b/.mariadb.metadata index 81ef032..e0d5b45 100644 --- a/.mariadb.metadata +++ b/.mariadb.metadata @@ -1 +1,3 @@ -25972d22ed05249782141392f0893e71c7d549a9 SOURCES/mariadb-10.3.39.tar.gz +b7ac21c8a893c29a963634e289632c4a202c7b4e SOURCES/fmt-12.1.0.zip +67708c3a39324d1013e58c965c8ebad10b7e5663 SOURCES/mariadb-11.8.6.tar.gz +c800cd92e3deadd170996c168d47fa5fbd77eaf8 SOURCES/pcre2-10.47.zip diff --git a/SOURCES/CVE-2025-13699.patch b/SOURCES/CVE-2025-13699.patch deleted file mode 100644 index 6796ed7..0000000 --- a/SOURCES/CVE-2025-13699.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/client/mysqldump.c b/client/mysqldump.c -index b382dd41..0c30c319 100644 ---- a/client/mysqldump.c -+++ b/client/mysqldump.c -@@ -1776,6 +1776,26 @@ static char *cover_definer_clause(const char *stmt_str, - return query_str; - } - -+ -+static const char* build_path_for_table(char *to, const char *dir, -+ const char *table, const char *ext) -+{ -+ char filename[FN_REFLEN], tmp_path[FN_REFLEN]; -+ convert_dirname(tmp_path, path, NULL); -+ my_load_path(tmp_path, tmp_path, NULL); -+ if (check_if_legal_tablename(table)) -+ strxnmov(filename, sizeof(filename) - 1, table, "@@@", NULL); -+ else -+ { -+ uint errors, len; -+ len= my_convert(filename, sizeof(filename) - 1, &my_charset_filename, -+ table, (uint32)strlen(table), charset_info, &errors); -+ filename[len]= 0; -+ } -+ return fn_format(to, filename, tmp_path, ext, MYF(MY_UNPACK_FILENAME)); -+} -+ -+ - /* - Open a new .sql file to dump the table or view into - -@@ -1790,12 +1810,9 @@ static char *cover_definer_clause(const char *stmt_str, - */ - static FILE* open_sql_file_for_table(const char* table, int flags) - { -- FILE* res; -- char filename[FN_REFLEN], tmp_path[FN_REFLEN]; -- convert_dirname(tmp_path,path,NullS); -- res= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4), -- flags, MYF(MY_WME)); -- return res; -+ char filename[FN_REFLEN]; -+ return my_fopen(build_path_for_table(filename, path, table, ".sql"), -+ flags, MYF(MY_WME)); - } - - -@@ -3946,15 +3963,9 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key, - - if (path) - { -- char filename[FN_REFLEN], tmp_path[FN_REFLEN]; -+ char filename[FN_REFLEN]; - -- /* -- Convert the path to native os format -- and resolve to the full filepath. -- */ -- convert_dirname(tmp_path,path,NullS); -- my_load_path(tmp_path, tmp_path, NULL); -- fn_format(filename, table, tmp_path, ".txt", MYF(MY_UNPACK_FILENAME)); -+ build_path_for_table(filename, path, table, ".txt"); - - /* Must delete the file that 'INTO OUTFILE' will write to */ - my_delete(filename, MYF(0)); -@@ -3963,7 +3974,6 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key, - to_unix_path(filename); - - /* now build the query string */ -- - dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ "); - dynstr_append_checked(&query_string, select_field_names.str); - dynstr_append_checked(&query_string, " INTO OUTFILE '"); -diff --git a/client/mysqlimport.c b/client/mysqlimport.c -index 3ec23b87..7d6f9115 100644 ---- a/client/mysqlimport.c -+++ b/client/mysqlimport.c -@@ -320,7 +320,17 @@ static int write_to_table(char *filename, MYSQL *mysql) - DBUG_ENTER("write_to_table"); - DBUG_PRINT("enter",("filename: %s",filename)); - -- fn_format(tablename, filename, "", "", 1 | 2); /* removes path & ext. */ -+ fn_format(tablename, filename, "", "", MYF(MY_REPLACE_DIR | MY_REPLACE_EXT)); -+ if (strchr(tablename, '@')) -+ { -+ uint errors, len; -+ CHARSET_INFO *cs= -+ get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(0)); -+ len= my_convert(escaped_name, sizeof(escaped_name) - 1, cs, tablename, -+ (uint32)strlen(tablename), &my_charset_filename, &errors); -+ if (!errors) -+ strmake(tablename, escaped_name, len); -+ } - if (!opt_local_file) - strmov(hard_path,filename); - else -@@ -476,7 +486,7 @@ static MYSQL *db_connect(char *host, char *database, - mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth); - if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME)) - default_charset= (char *)my_default_csname(); -- mysql_options(mysql, MYSQL_SET_CHARSET_NAME, my_default_csname()); -+ mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset); - mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0); - mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, - "program_name", "mysqlimport"); diff --git a/SOURCES/README.mariadb-docs b/SOURCES/README.mariadb-docs new file mode 100644 index 0000000..bff53eb --- /dev/null +++ b/SOURCES/README.mariadb-docs @@ -0,0 +1,9 @@ +MariaDB haven't yet made a document package available for offline. + +You can create your own copy with the instructions here: + +https://mariadb.com/kb/en/meta/mirroring-the-mariadb-knowledge-base/ + +You can find view the on-line documentation at: + +https://mariadb.com/kb/en/documentation/ diff --git a/SOURCES/README.mysql-docs b/SOURCES/README.mysql-docs deleted file mode 100644 index dd894a7..0000000 --- a/SOURCES/README.mysql-docs +++ /dev/null @@ -1,4 +0,0 @@ -The official MySQL documentation is not freely redistributable, so we cannot -include it in RHEL or Fedora. You can find it on-line at - -http://dev.mysql.com/doc/ diff --git a/SOURCES/README.mysql-license b/SOURCES/README.mysql-license deleted file mode 100644 index ceabbcf..0000000 --- a/SOURCES/README.mysql-license +++ /dev/null @@ -1,9 +0,0 @@ -MySQL is distributed under GPL v2, but there are some licensing exceptions -that allow the client libraries to be linked with a non-GPL application, -so long as the application is under a license approved by Oracle. -For details see - -http://www.mysql.com/about/legal/licensing/foss-exception/ - -Some innobase code from Percona and Google is under BSD license. -Some code related to test-suite is under LGPLv2. diff --git a/SOURCES/mariadb-10.3.39-tests.patch b/SOURCES/mariadb-10.3.39-tests.patch deleted file mode 100644 index 54f5ff9..0000000 --- a/SOURCES/mariadb-10.3.39-tests.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- mariadb-10.3.39/mysql-test/include/default_mysqld.cnf 2023-05-03 06:32:44.000000000 +0200 -+++ ../../mariadb-10.3.39/mysql-test/include/default_mysqld.cnf 2023-07-07 13:58:40.255283041 +0200 -@@ -127,3 +127,8 @@ local-infile - # tables. Let's enable it in the [server] group, because this group - # is read after [mysqld] and [embedded] - loose-aria -+ -+[mysqltest] -+loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem -+loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem -+loose-ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem - ---- mariadb-10.3.39/mysql-test/include/wait_until_connected_again.inc 2023-05-03 06:32:44.000000000 +0200 -+++ ../../mariadb-10.3.39/mysql-test/include/wait_until_connected_again.inc 2023-07-07 13:55:30.424368106 +0200 -@@ -11,7 +11,7 @@ let $counter= 5000; - let $mysql_errno= 9999; - while ($mysql_errno) - { -- --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013 -+ --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013,2026 - show status; - - dec $counter; - ---- mariadb-10.3.39/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test 2023-05-03 06:32:45.000000000 +0200 -+++ ../../mariadb-10.3.39/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test 2023-07-07 13:54:31.152082427 +0200 -@@ -53,7 +53,7 @@ insert into t4 values (3),(4); - connection master; - # The get_lock function causes warning for unsafe statement. - --disable_warnings ----error 0,1317,2013 -+--error 0,1317,2013,2026 - reap; - --enable_warnings - connection master1; - ---- mariadb-10.3.39/mysql-test/suite/innodb/t/innodb_bug51920.test 2023-05-03 06:32:44.000000000 +0200 -+++ ../../mariadb-10.3.39/mysql-test/suite/innodb/t/innodb_bug51920.test 2023-07-07 15:11:39.000404508 +0200 -@@ -36,7 +36,7 @@ let $wait_condition = - # depending on platform. - # - connection con1; ---- error 1317, 2006, 2013, ER_CONNECTION_KILLED -+-- error 1317, 2006, 2013, 2026, ER_CONNECTION_KILLED - reap; - connection default; - DROP TABLE bug51920; - ---- mariadb-10.3.39/mysql-test/main/lock_kill.test 2023-05-03 06:32:44.000000000 +0200 -+++ ../../mariadb-10.3.39/mysql-test/main/lock_kill.test 2023-07-07 15:13:54.335086789 +0200 -@@ -17,7 +17,7 @@ LOCK TABLE t1 WRITE; - eval KILL $conid; - --enable_query_log - --connection con1 ----error 0,2006,2013,ER_CONNECTION_KILLED -+--error 0,2006,2013,2026,ER_CONNECTION_KILLED - reap; - --connection default - --disconnect con1 -@@ -35,7 +35,7 @@ LOCK TABLE t1 WRITE, t2 WRITE; - eval KILL $conid; - --enable_query_log - --connection con1 ----error 0,2006,2013,ER_CONNECTION_KILLED -+--error 0,2006,2013,2026,ER_CONNECTION_KILLED - reap; - --connection default - --disconnect con1 - ---- mariadb-10.3.39/mysql-test/main/loadxml.test 2023-05-03 06:32:44.000000000 +0200 -+++ ../../mariadb-10.3.39/mysql-test/main/loadxml.test 2023-07-07 15:15:14.862492763 +0200 -@@ -83,7 +83,7 @@ connection default; - connection addconroot; - # Read response from connection to avoid packets out-of-order when disconnecting - # Note, that connection can already be dead due to previously issued kill ----error 0,2013 -+--error 0,2013,2026 - --reap - disconnect addconroot; - connection default; - ---- mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.test 2023-05-03 06:32:45.000000000 +0200 -+++ ../../mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.test 2023-07-10 11:48:28.859497746 +0200 -@@ -1,3 +1,3 @@ - --replace_regex /varchar\([0-9]+\)/varchar(pathlen)/ - show create table information_schema.disks; --select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks; -+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks; - ---- mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.result 2023-05-03 06:32:45.000000000 +0200 -+++ ../../mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.result 2023-07-10 12:47:10.460233056 +0200 -@@ -7,6 +7,6 @@ DISKS CREATE TEMPORARY TABLE `DISKS` ( - `Used` bigint(32) NOT NULL, - `Available` bigint(32) NOT NULL - ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci --select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks; --sum(Total) > sum(Available) sum(Total)>sum(Used) -+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks; -+sum(Total) >= sum(Available) sum(Total) >= sum(Used) - 1 1 - diff --git a/SOURCES/mariadb-annocheck.patch b/SOURCES/mariadb-annocheck.patch deleted file mode 100644 index 223619d..0000000 --- a/SOURCES/mariadb-annocheck.patch +++ /dev/null @@ -1,13 +0,0 @@ -Harden the "hardened" flags even more to comply with RHEL8 security rules - ---- mariadb-10.3.25/CMakeLists.txt 2020-10-05 18:19:45.000000000 +0200 -+++ mariadb-10.3.25/CMakeLists.txt_patched 2020-11-03 01:29:52.369426705 +0100 -@@ -247,7 +247,7 @@ IF(NOT WITH_TSAN) - # security-enhancing flags - MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC") - MY_CHECK_AND_SET_LINKER_FLAG("-Wl,-z,relro,-z,now") -- MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4") -+ MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector-strong --param=ssp-buffer-size=4") - MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO) - ENDIF() - ENDIF() diff --git a/SOURCES/mysql-check-socket.sh b/SOURCES/mariadb-check-socket.sh similarity index 80% rename from SOURCES/mysql-check-socket.sh rename to SOURCES/mariadb-check-socket.sh index 407523f..51a7e43 100644 --- a/SOURCES/mysql-check-socket.sh +++ b/SOURCES/mariadb-check-socket.sh @@ -5,7 +5,7 @@ # positive result when starting and mysqld_safe could remove # a socket file, which is actually being used by a different daemon. -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" +source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common" if test -e "$socketfile" ; then echo "Socket file $socketfile exists." >&2 @@ -25,9 +25,9 @@ if test -e "$socketfile" ; then fi # some process uses the socket file - response=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1` + response=`@bindir@/mariadb-admin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1` if [ $? -eq 0 ] || echo "$response" | grep -q "Access denied for user" ; then - echo "Is another MySQL daemon already running with the same unix socket?" >&2 + echo "Is another MariaDB daemon already running with the same unix socket?" >&2 echo "Please, stop the process using the socket $socketfile or remove the file manually to start the service." >&2 exit 1 fi diff --git a/SOURCES/mysql-check-upgrade.sh b/SOURCES/mariadb-check-upgrade.sh similarity index 68% rename from SOURCES/mysql-check-upgrade.sh rename to SOURCES/mariadb-check-upgrade.sh index 1bfd3bc..fe95544 100644 --- a/SOURCES/mysql-check-upgrade.sh +++ b/SOURCES/mariadb-check-upgrade.sh @@ -1,6 +1,6 @@ #!/bin/sh -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" +source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common" upgrade_info_file="$datadir/mysql_upgrade_info" version=0 @@ -25,14 +25,14 @@ if [ $version -ne $thisversion ] ; then fi cat <&2 -The datadir located at $datadir needs to be upgraded using 'mysql_upgrade' tool. This can be done using the following steps: +The datadir located at $datadir needs to be upgraded using 'mariadb-upgrade' tool. This can be done using the following steps: - 1. Back-up your data before with 'mysql_upgrade' - 2. Start the database daemon using 'service @DAEMON_NAME@ start' - 3. Run 'mysql_upgrade' with a database user that has sufficient privileges + 1. Back-up your data before with 'mariadb-upgrade' + 2. Start the database daemon using 'systemctl start @DAEMON_NAME@.service' + 3. Run 'mariadb-upgrade' with a database user that has sufficient privileges -Read more about 'mysql_upgrade' usage at: -https://mariadb.com/kb/en/mariadb/documentation/sql-commands/table-commands/mysql_upgrade/ +Read more about 'mariadb-upgrade' usage at: +https://mariadb.com/kb/en/mysql_upgrade/ EOF fi diff --git a/SOURCES/mariadb-federated.patch b/SOURCES/mariadb-federated.patch new file mode 100644 index 0000000..c8267fd --- /dev/null +++ b/SOURCES/mariadb-federated.patch @@ -0,0 +1,8 @@ +--- mariadb-10.11.11/storage/federated/CMakeLists.txt 2025-01-30 12:01:24.000000000 +0100 ++++ mariadb-10.11.11/storage/federated/CMakeLists.txt_new 2025-05-16 14:06:10.496269412 +0200 +@@ -14,4 +14,4 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + + SET(FEDERATED_SOURCES ha_federated.cc) +-MYSQL_ADD_PLUGIN(federated ${FEDERATED_SOURCES} STORAGE_ENGINE MODULE_ONLY) ++MYSQL_ADD_PLUGIN(federated ${FEDERATED_SOURCES} STORAGE_ENGINE DISABLED) diff --git a/SOURCES/mariadb-libfmt.patch b/SOURCES/mariadb-libfmt.patch new file mode 100644 index 0000000..1c17faa --- /dev/null +++ b/SOURCES/mariadb-libfmt.patch @@ -0,0 +1,37 @@ +MariaDB upstream uses an old version (8.0) of the FMT library, unlike Fedora which packs a current one (10.2) + https://src.fedoraproject.org/rpms/fmt + https://github.com/MariaDB/server/blob/10.11/cmake/libfmt.cmake#L18 + +There is a breaking change between the FMT library version 8 and 10. +Sergei Golubchik from MariaDB upstream noticed that and decided to not rebase to the newer version for now. In the same commit: + https://github.com/MariaDB/server/commit/b5c367cd88e37091ab5f8dab0396c01c97d037e2 +He also fixed the CMake file controlling the FMT library. +It now correctly detects, whether the system version is able to compile a given code in an expected way. + +The incompatibility between FMT library version has been reported both agains Fedora and FMT upstream + https://bugzilla.redhat.com/show_bug.cgi?id=2266807 +The upstream created a patch and Fedora backported it + https://src.fedoraproject.org/rpms/fmt/c/7d6d6e2c33e845b3cbf3fcaf83f14dfeddfa8a70?branch=rawhide +but only in F40 and later. + +To avoid potential issues on systems with FMT library between 8.0 and the one with the fix backported, +introduce a bundling mechanism for use on such distributions. +We pre-download the sources archive and supply the CMake with it, instead of the web URL. + +This patch is not used at the moment as the current version of the fmt package available in f40-f43 is sufficient +therefore we are using it instead of the bundled fmt. + +We are still keeping this patch in case it may be needed in the future and because it is needed in rhel + +diff -Naur mariadb-11.8.6/cmake/libfmt.cmake mariadb-11.8.6_patched/cmake/libfmt.cmake +--- mariadb-11.8.6/cmake/libfmt.cmake 2026-01-31 14:27:46.000000000 +0100 ++++ mariadb-11.8.6_patched/cmake/libfmt.cmake 2026-03-24 15:12:55.190229788 +0100 +@@ -15,7 +15,7 @@ + ExternalProject_Add( + libfmt + PREFIX "${dir}" +- URL "https://github.com/fmtlib/fmt/releases/download/12.1.0/fmt-12.1.0.zip" ++ URL file:///${dir}/fmt-12.1.0.zip + URL_MD5 028c6979cad96a4260154f091885171a + INSTALL_COMMAND "" + CONFIGURE_COMMAND "" diff --git a/SOURCES/mariadb-logrotate.patch b/SOURCES/mariadb-logrotate.patch index e3b7e7c..ec522b0 100644 --- a/SOURCES/mariadb-logrotate.patch +++ b/SOURCES/mariadb-logrotate.patch @@ -1,79 +1,32 @@ -Adjust the mysql-log-rotate script in several ways: +Adjust the 'mariadb.logrotate.sh' script in several ways: * Use the correct log file pathname for Red Hat installations. -* Enable creation of the log file by logrotate (needed since - /var/log/ isn't writable by mysql user); and set the same 640 - permissions we normally use. -* Comment out the actual rotation commands, so that user must edit - the file to enable rotation. This is unfortunate, but the fact - that the script will probably fail without manual configuration - (to set a root password) means that we can't really have it turned - on by default. Fortunately, in most configurations the log file - is low-volume and so rotation is not critical functionality. -See discussions at RH bugs 799735, 547007 -* Note they are from Fedora 15 / 16 +* Remove Debian specific code + for the very unlikely, but possible scenario + in which the debian config file would exist. -Update 3/2017 -* it would be big unexpected change for anyone upgrading, if we start shipping it now. - Maybe it is good candidate for shipping with MariaDB 10.2 ? -* the 'mysqladmin flush logs' doesn´t guarantee, no entries are lost - during flushing, the operation is not atomic. - We should not ship it in that state - -Update 6/2018 -* the SIGHUP causes server to flush all logs. No password admin needed, the only constraint is - beeing able to send the SIGHUP to the process and read the mysqld pid file, which root can. -* Submited as PR: https://github.com/MariaDB/server/pull/807 - -Update 01/2022 -* added delaycompress option -* see https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux - ---- mariadb-10.3.32/support-files/mysql-log-rotate.sh 2022-01-14 17:03:27.000000000 +0100 -+++ mariadb-10.3.32/support-files/mysql-log-rotate.sh_patched 2022-01-17 15:07:54.205379672 +0100 -@@ -3,36 +3,22 @@ - # in the [mysqld] section as follows: - # - # [mysqld] --# log-error=@localstatedir@/mysqld.log --# --# If the root user has a password you have to create a --# /root/.my.cnf configuration file with the following --# content: --# --# [mysqladmin] --# password = --# user= root --# --# where "" is the password. --# --# ATTENTION: This /root/.my.cnf should be readable ONLY --# for root ! -+# log-error=@LOG_LOCATION@ +--- mariadb-10.11.6/support-files/mariadb.logrotate.sh 2023-11-08 16:51:43.000000000 +0100 ++++ mariadb-10.11.6/support-files/mariadb.logrotate.sh_patched 2023-12-17 18:03:36.955861025 +0100 +@@ -6,7 +6,7 @@ + # Read https://mariadb.com/kb/en/error-log/ to learn more about logging and + # https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ about rotating logs. --@localstatedir@/mysqld.log { -- # create 600 mysql mysql +-@localstatedir@/mysqld.log @localstatedir@/mariadb.log @logdir@/*.log { +@LOG_LOCATION@ { -+ create 600 mysql mysql - su mysql mysql - notifempty - daily - rotate 3 - missingok - compress -+ delaycompress - postrotate - # just if mysqld is really running -- if test -x @bindir@/mysqladmin && \ -- @bindir@/mysqladmin ping &>/dev/null -- then -- @bindir@/mysqladmin --local flush-error-log \ -- flush-engine-log flush-general-log flush-slow-log -- fi -+ if [ -e @PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid ] -+ then -+ kill -1 $(<@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid) -+ fi - endscript - } + + # Depends on a mysql@localhost unix_socket authenticated user with RELOAD privilege + @su_user@ +@@ -45,11 +45,6 @@ + # has thanks to the default use of Unix socket authentication for the 'mysql' + # (or root on Debian) account used everywhere since MariaDB 10.4. + postrotate +- if test -r /etc/mysql/debian.cnf +- then +- EXTRAPARAM='--defaults-file=/etc/mysql/debian.cnf' +- fi +- + if test -x @bindir@/mariadb-admin + then + @bindir@/mariadb-admin $EXTRAPARAM --local flush-error-log \ + diff --git a/SOURCES/mariadb-mdev-30402.patch b/SOURCES/mariadb-mdev-30402.patch deleted file mode 100644 index 069bf76..0000000 --- a/SOURCES/mariadb-mdev-30402.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- mariadb-10.3.39/scripts/wsrep_sst_mariabackup.sh 2023-08-11 11:31:40.415022889 +0200 -+++ ../../mariadb-10.3.39/scripts/wsrep_sst_mariabackup.sh 2023-08-11 11:32:01.924161077 +0200 -@@ -340,6 +340,9 @@ get_transfer() - "Use workaround for socat $SOCAT_VERSION bug" - fi - fi -+ if check_for_version "$SOCAT_VERSION" '1.7.4'; then -+ tcmd="$tcmd,no-sni=1" -+ fi - fi - - if [ "${sockopt#*,dhparam=}" = "$sockopt" ]; then diff --git a/SOURCES/mariadb-mtr.patch b/SOURCES/mariadb-mtr.patch new file mode 100644 index 0000000..592f73c --- /dev/null +++ b/SOURCES/mariadb-mtr.patch @@ -0,0 +1,70 @@ +diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl +index 594e052a16e..6a274b2d597 100755 +--- a/mysql-test/mariadb-test-run.pl ++++ b/mysql-test/mariadb-test-run.pl +@@ -1491,7 +1491,6 @@ sub command_line_setup { + mtr_warning ("Port base $opt_port_base rounded down to multiple of 10"); + $opt_port_base-= $rem; + } +- $opt_build_thread= $opt_port_base / 10 - 1000; + } + + # -------------------------------------------------------------------------- +@@ -1719,11 +1718,6 @@ sub command_line_setup { + # an environment variable can be used to control all ports. A small + # number is to be used, 0 - 16 or similar. + # +-# Note the MASTER_MYPORT has to be set the same in all 4.x and 5.x +-# versions of this script, else a 4.0 test run might conflict with a +-# 5.1 test run, even if different MTR_BUILD_THREAD is used. This means +-# all port numbers might not be used in this version of the script. +-# + # Also note the limitation of ports we are allowed to hand out. This + # differs between operating systems and configuration, see + # http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html +@@ -1734,10 +1728,14 @@ sub set_build_thread_ports($) { + + if ( lc($opt_build_thread) eq 'auto' ) { + my $found_free = 0; +- $build_thread = 300; # Start attempts from here +- my $build_thread_upper = $build_thread + ($opt_parallel > 1500 +- ? 3000 +- : 2 * $opt_parallel) + 300; ++ if ($opt_port_base eq "auto") { ++ $build_thread = 15000; ++ } else { ++ $build_thread = $opt_port_base; ++ } ++ $build_thread += ($thread - 1) * $opt_port_group_size; ++ my $build_thread_upper = $build_thread + $opt_parallel * 2; ++ + while (! $found_free) + { + $build_thread= mtr_get_unique_id($build_thread, $build_thread_upper); +@@ -1754,7 +1752,7 @@ sub set_build_thread_ports($) { + } + else + { +- $build_thread = $opt_build_thread + $thread - 1; ++ $build_thread = $opt_port_base + $thread - 1; + if (! check_ports_free($build_thread)) { + # Some port was not free(which one has already been printed) + mtr_error("Some port(s) was not free") +@@ -1763,7 +1761,7 @@ sub set_build_thread_ports($) { + $ENV{MTR_BUILD_THREAD}= $build_thread; + + # Calculate baseport +- $baseport= $build_thread * $opt_port_group_size + 10000; ++ $baseport= $build_thread; + if ( $baseport < 5001 or $baseport + $opt_port_group_size >= 32767 ) + { + mtr_error("MTR_BUILD_THREAD number results in a port", +@@ -2968,7 +2966,7 @@ sub kill_leftovers ($) { + sub check_ports_free ($) + { + my $bthread= shift; +- my $portbase = $bthread * $opt_port_group_size + 10000; ++ my $portbase = $bthread; + for ($portbase..$portbase+($opt_port_group_size-1)){ + if (mtr_ping_port($_)){ + mtr_report(" - 'localhost:$_' was not free"); diff --git a/SOURCES/mariadb-ownsetup.patch b/SOURCES/mariadb-ownsetup.patch index 3534c43..f53c799 100644 --- a/SOURCES/mariadb-ownsetup.patch +++ b/SOURCES/mariadb-ownsetup.patch @@ -1,33 +1,37 @@ -diff -up mariadb-10.1.8/support-files/CMakeLists.txt.p9 mariadb-10.1.8/support-files/CMakeLists.txt ---- mariadb-10.2.32/support-files/CMakeLists.txt 2020-05-08 13:45:27.000000000 +0200 -+++ mariadb-10.2.32/support-files/CMakeLists.txt_pacthed 2020-05-13 10:11:30.884190396 +0200 -@@ -100,7 +100,8 @@ IF(UNIX) - ENDIF() +--- mariadb-10.4.14/support-files/CMakeLists.txt 2020-08-06 17:28:28.000000000 +0200 ++++ mariadb-10.4.14/support-files/CMakeLists.txt_patched 2020-09-03 13:21:07.826658279 +0200 +@@ -187,6 +187,7 @@ IF(UNIX) + COMPONENT SharedLibraries) + INSTALL(FILES rpm/mysql-clients.cnf DESTINATION ${INSTALL_SYSCONF2DIR} + COMPONENT Client) ++ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_SOURCE_DIR}/rpm/server.cnf @ONLY) + INSTALL(FILES rpm/server.cnf DESTINATION ${INSTALL_SYSCONF2DIR} + COMPONENT IniFiles) + INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR} + +diff -Naurp mariadb-11.4.5/support-files/rpm/server.cnf* +--- mariadb-11.4.5/support-files/rpm/server.cnf 2025-01-30 18:54:57.000000000 +0100 ++++ mariadb-11.4.5/support-files/rpm/server.cnf_patched 2025-04-23 12:25:38.052571209 +0200 +@@ -3,6 +3,11 @@ + # Use it for options that only the server (but not clients) should see + # - CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) -- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig COMPONENT Development) -+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY) -+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) - - INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) - -diff -up mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup mariadb-10.0.15/support-files/rpm/server.cnf ---- mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup 2015-01-24 23:55:55.110063592 +0100 -+++ mariadb-10.0.15/support-files/rpm/server.cnf 2015-01-24 23:57:42.308114387 +0100 -@@ -9,7 +9,16 @@ - [server] - - # this is only for the mysqld standalone daemon +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, -+# customize your systemd unit file for mysqld/mariadb according to the ++# customize your systemd unit file for MariaDB according to the +# instructions in http://fedoraproject.org/wiki/Systemd - [mysqld] ++ + # this is read by the standalone daemon and embedded servers + [server] + +@@ -10,6 +15,10 @@ + # If you use the same .cnf file for MySQL and MariaDB, + # you can put MariaDB-only options here + [mariadb] +datadir=@MYSQL_DATADIR@ +socket=@MYSQL_UNIX_ADDR@ +log-error=@LOG_LOCATION@ +pid-file=@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid -+ # - # * Galera-related settings + # * Enable the Feedback plugin and submit anonymous usage information diff --git a/SOURCES/mariadb-pcdir.patch b/SOURCES/mariadb-pcdir.patch deleted file mode 100644 index d9a8a78..0000000 --- a/SOURCES/mariadb-pcdir.patch +++ /dev/null @@ -1,20 +0,0 @@ -Use PCDIR CMake option, if configured - -Upstream install the server pkgconfig file into arch-independent directory -Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340 - ---- mariadb-10.3.12/support-files/CMakeLists.txt 2019-03-20 15:25:53.423283135 +0100 -+++ mariadb-10.3.12/support-files/CMakeLists.txt_patched 2019-03-20 15:38:56.372819958 +0100 -@@ -82,7 +82,12 @@ IF(UNIX) - - CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) - CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY) -+IF(INSTALL_PCDIR) -+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_PCDIR} COMPONENT Development) -+ELSE() - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) -+ENDIF() -+ - - INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) - diff --git a/SOURCES/mysql-prepare-db-dir.sh b/SOURCES/mariadb-prepare-db-dir.sh similarity index 95% rename from SOURCES/mysql-prepare-db-dir.sh rename to SOURCES/mariadb-prepare-db-dir.sh index a82479f..cccfe96 100644 --- a/SOURCES/mysql-prepare-db-dir.sh +++ b/SOURCES/mariadb-prepare-db-dir.sh @@ -1,9 +1,9 @@ #!/bin/sh -# This script creates the mysql data directory during first service start. +# This script creates the MariaDB data directory during first service start. # In subsequent starts, it does nothing much. -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" +source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common" export LC_ALL=C @@ -97,7 +97,7 @@ if should_initialize "$datadir" ; then # https://bugzilla.redhat.com/show_bug.cgi?id=1335849#c19 INITDB_TIMESTAMP=`LANG=C date -u` sleep 1 - @bindir@/mysql_install_db --rpm --datadir="$datadir" --user="$myuser" --skip-test-db >&2 + @bindir@/mariadb-install-db --rpm --datadir="$datadir" --user="$myuser" --skip-test-db >&2 ret=$? if [ $ret -ne 0 ] ; then echo "Initialization of @NICE_PROJECT_NAME@ database failed." >&2 diff --git a/SOURCES/mysql-scripts-common.sh b/SOURCES/mariadb-scripts-common.sh similarity index 81% rename from SOURCES/mysql-scripts-common.sh rename to SOURCES/mariadb-scripts-common.sh index e270433..e603a9e 100644 --- a/SOURCES/mysql-scripts-common.sh +++ b/SOURCES/mariadb-scripts-common.sh @@ -1,11 +1,11 @@ #!/bin/sh -# Some useful functions used in other MySQL helper scripts +# Some useful functions used in other MariaDB helper scripts # This scripts defines variables datadir, errlogfile, socketfile export LC_ALL=C -# extract value of a MySQL option from config files +# extract value of a MariaDB option from config files # Usage: get_mysql_option VARNAME DEFAULT SECTION [ SECTION, ... ] # result is returned in $result # We use my_print_defaults which prints all options from multiple files, @@ -25,7 +25,7 @@ get_mysql_option(){ fi } -# For the case of running more instances via systemd, scrits that source +# For the case of running more instances via systemd, scripts that source # this file can get --default-group-suffix or similar option as the first # argument. The utility my_print_defaults needs to use it as well, so the # scripts sourcing this file work with the same options as the daemon. @@ -35,20 +35,20 @@ while echo "$1" | grep -q '^--defaults' ; do shift done -# Defaults here had better match what mysqld_safe will default to +# Defaults here had better match what mariadbd-safe will default to # The option values are generally defined on three important places # on the default installation: -# 1) default values are hardcoded in the code of mysqld daemon or -# mysqld_safe script +# 1) default values are hardcoded in the code of mariadbd daemon or +# mariadbd-safe script # 2) configurable values are defined in @sysconfdir@/my.cnf # 3) default values for helper scripts are specified bellow # So, in case values are defined in my.cnf, we need to get that value. # In case they are not defined in my.cnf, we need to get the same value # in the daemon, as in the helper scripts. Thus, default values here -# must correspond with values defined in mysqld_safe script and source +# must correspond with values defined in mariadbd-safe script and source # code itself. -server_sections="mysqld_safe mysqld server mysqld-@MAJOR_VERSION@.@MINOR_VERSION@ mariadb mariadb-@MAJOR_VERSION@.@MINOR_VERSION@ client-server" +server_sections="mysqld_safe mysqld server mysqld-@MAJOR_VERSION@.@MINOR_VERSION@ mariadb mariadb-@MAJOR_VERSION@.@MINOR_VERSION@ mariadbd mariadbd-@MAJOR_VERSION@.@MINOR_VERSION@ client-server galera" get_mysql_option "$server_sections" datadir "@MYSQL_DATADIR@" datadir="$result" diff --git a/SOURCES/mariadb-scripts.patch b/SOURCES/mariadb-scripts.patch index b684482..fefc06d 100644 --- a/SOURCES/mariadb-scripts.patch +++ b/SOURCES/mariadb-scripts.patch @@ -1,22 +1,22 @@ We have some downstream patches and other scripts that include variables to be expanded by cmake. Cmake needs to know about them, so adding them manually. ---- mariadb-10.3.8/scripts/CMakeLists.txt 2018-07-02 09:34:11.000000000 +0200 -+++ mariadb-10.3.8/scripts/CMakeLists.txt_patched 2018-07-03 10:58:15.954670153 +0200 -@@ -361,6 +361,34 @@ ELSE() - COMPONENT ${${file}_COMPONENT} - ) +--- mariadb-10.5.5/scripts/CMakeLists.txt.old 2020-09-24 10:13:35.272589689 +0200 ++++ mariadb-10.5.5/scripts/CMakeLists.txt 2020-09-24 10:17:31.428985798 +0200 +@@ -377,6 +377,34 @@ + INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT}Symlinks) + ENDIF() ENDFOREACH() + + # files for systemd + SET(SYSTEMD_SCRIPTS -+ mysql.tmpfiles.d ++ mariadb.tmpfiles.d + mysql.service + mysql@.service -+ mysql-prepare-db-dir -+ mysql-check-socket -+ mysql-check-upgrade -+ mysql-scripts-common ++ mariadb-prepare-db-dir ++ mariadb-check-socket ++ mariadb-check-upgrade ++ mariadb-scripts-common + mysql_config_multilib + clustercheck + galera_new_cluster diff --git a/SOURCES/mariadb-server-galera.cil b/SOURCES/mariadb-server-galera.cil new file mode 100644 index 0000000..269a41b --- /dev/null +++ b/SOURCES/mariadb-server-galera.cil @@ -0,0 +1,15 @@ +(optional mariadb-server-galera-1_0 + (typeattributeset cil_gen_require mysqld_t) + (typeattributeset cil_gen_require rsync_exec_t) + (typeattributeset cil_gen_require anon_inodefs_t) + (typeattributeset cil_gen_require proc_net_t) + (typeattributeset cil_gen_require kerberos_port_t) + ; allow mysqld to run rsyncd + (allow mysqld_t self (process (setpgid))) + (allow mysqld_t rsync_exec_t (file (read execute execute_no_trans getattr open))) + (allow mysqld_t anon_inodefs_t (file (getattr))) + (allow mysqld_t proc_net_t (file (read open))) + + ; allow rsyncd to listen on port 4444 + (allow mysqld_t kerberos_port_t (tcp_socket (name_bind name_connect))) +) diff --git a/SOURCES/mariadb-server-galera.te b/SOURCES/mariadb-server-galera.te deleted file mode 100644 index bdce127..0000000 --- a/SOURCES/mariadb-server-galera.te +++ /dev/null @@ -1,23 +0,0 @@ - -module mariadb-server-galera 1.0; - -require { - type mysqld_t; - type rsync_exec_t; - type anon_inodefs_t; - type proc_net_t; - type kerberos_port_t; - class file { read execute execute_no_trans getattr open }; - class tcp_socket { name_bind name_connect }; - class process { setpgid siginh rlimitinh noatsecure }; -} - -# allow mysqld to run rsyncd -allow mysqld_t self:process setpgid; -allow mysqld_t rsync_exec_t:file { read execute execute_no_trans getattr open }; -allow mysqld_t anon_inodefs_t:file getattr; -allow mysqld_t proc_net_t:file { read open }; - -# allow rsyncd to listen on port 4444 -allow mysqld_t kerberos_port_t:tcp_socket { name_bind name_connect }; - diff --git a/SOURCES/mariadb.tmpfiles.d.in b/SOURCES/mariadb.tmpfiles.d.in new file mode 100644 index 0000000..e59968a --- /dev/null +++ b/SOURCES/mariadb.tmpfiles.d.in @@ -0,0 +1,8 @@ +# Do not edit this file. +# To override this, put /etc/tmpfiles.d/mariadb.conf instead. +d @PID_FILE_DIR@ 0755 mysql mysql - + +# Rules for ephemeral file systems (ImageMode) +d /var/lib/mysql 0755 mysql mysql - +d /var/log/mariadb 0750 mysql mysql - +f /var/log/mariadb/mariadb.log 0660 mysql mysql - diff --git a/SOURCES/mysql.service.in b/SOURCES/mysql.service.in index 6f84dd3..062662d 100644 --- a/SOURCES/mysql.service.in +++ b/SOURCES/mysql.service.in @@ -1,32 +1,24 @@ # It's not recommended to modify this file in-place, because it will be # overwritten during package upgrades. If you want to customize, the -# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service", -# containing -# .include /usr/lib/systemd/system/@DAEMON_NAME@.service -# ...make your changes here... -# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf", -# which doesn't need to include ".include" call and which will be parsed -# after the file @DAEMON_NAME@.service itself is parsed. +# best way is to: +# +# root> systemctl edit @DAEMON_NAME@.service +# +# Then add additonal directives under a section (probably [Service]). # # For more info about custom unit files, see systemd.unit(5) or # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F - -# For example, if you want to increase mysql's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, so create a file named -# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing: +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# # [Service] # LimitNOFILE=10000 - -# Note: /usr/lib/... is recommended in the .include line though /lib/... -# still works. -# Don't forget to reload systemd daemon after you change unit configuration: -# root> systemctl --system daemon-reload - -# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance. +# [Unit] Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server -Documentation=man:mysqld(8) +Documentation=man:mariadbd(8) Documentation=https://mariadb.com/kb/en/library/systemd/ After=network.target @@ -40,20 +32,38 @@ Type=notify User=mysql Group=mysql -ExecStartPre=@libexecdir@/mysql-check-socket +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-start-position + +ExecStartPre=@libexecdir@/mariadb-check-socket # '%n' expands to 'Full unit name'; man systemd.unit -ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n +ExecStartPre=@libexecdir@/mariadb-prepare-db-dir %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove @INSTALL_RUNDATADIR@/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ + VAR=`@bindir@/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > @INSTALL_RUNDATADIR@/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=@libexecdir@/mysqld --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=@libexecdir@/mysql-check-upgrade +ExecStart=@libexecdir@/mariadbd --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION +ExecStartPost=@libexecdir@/mariadb-check-upgrade + +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f @INSTALL_RUNDATADIR@/wsrep-start-position # Setting this to true can break replication and the Type=notify settings -# See also bind-address mysqld option. +# See also bind-address MariaDB option. PrivateNetwork=false -KillMode=process KillSignal=SIGTERM # Don't want to see an automated SIGKILL ever diff --git a/SOURCES/mysql.tmpfiles.d.in b/SOURCES/mysql.tmpfiles.d.in deleted file mode 100644 index 9e6b6e8..0000000 --- a/SOURCES/mysql.tmpfiles.d.in +++ /dev/null @@ -1,3 +0,0 @@ -# Do not edit this file. -# To override this, put /etc/tmpfiles.d/mariadb.conf instead. -d @PID_FILE_DIR@ 0755 mysql mysql - diff --git a/SOURCES/mysql@.service.in b/SOURCES/mysql@.service.in index b36ce6d..9ddc63f 100644 --- a/SOURCES/mysql@.service.in +++ b/SOURCES/mysql@.service.in @@ -1,39 +1,46 @@ -# Multi instance version of mariadb. For if you run mutiple verions at once. +# Multi instance version of MariaDB. For if you run mutiple verions at once. # Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera. # -# To use multi instance variant, use [mysqld.INSTANCENAME] as sections in my.cnf +# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in +# @sysconfdir@/@my.cnf to change per instance settings. A minimumal necessary +# configuration items to change to avoid conflicts between instances is: +# +# [mariadbd.instancename] +# # TCP port to make available for clients +# port=3306 +# # Socket to make available for clients +# socket=/tmp/mariadb-instancename.sock +# # Where MariaDB should store all its data +# datadir=/usr/local/mariadb-instancename/data +# # and start the service via: -# systemctl start @DAEMON_NAME@@{instancename}.server +# +# root> systemctl start @DAEMON_NAME@@{instancename}.server # # It's not recommended to modify this file in-place, because it will be -# overwritten during package upgrades. If you want to customize, the -# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service", -# containing -# .include /usr/lib/systemd/system/@DAEMON_NAME@.service -# ...make your changes here... -# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf", -# which doesn't need to include ".include" call and which will be parsed -# after the file @DAEMON_NAME@.service itself is parsed. +# overwritten during package upgrades. If you want to customize, for +# all instances, the best way is: +# +# root> systemctl edit @DAEMON_NAME@@.service +# +# Then add additonal directives under a section (probably [Service]). +# +# If you only want to change a specific instance: +# +# root> systemctl edit @DAEMON_NAME@@{instancename}.server # # For more info about custom unit files, see systemd.unit(5) or # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F - -# For example, if you want to increase mysql's open-files-limit to 10000, -# you need to increase systemd's LimitNOFILE setting, so create a file named -# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing: +# +# For example, if you want to increase MariaDB's open-files-limit to 10000, +# you need to increase systemd's LimitNOFILE setting, use the contents below: +# # [Service] # LimitNOFILE=10000 -# Note: /usr/lib/... is recommended in the .include line though /lib/... -# still works. -# Don't forget to reload systemd daemon after you change unit configuration: -# root> systemctl --system daemon-reload - -# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance. - [Unit] Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server -Documentation=man:mysqld(8) +Documentation=man:mariadbd(8) Documentation=https://mariadb.com/kb/en/library/systemd/ After=network.target @@ -47,19 +54,37 @@ Type=notify User=mysql Group=mysql -ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I -ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n +# Use an environment file to pass variable _WSREP_NEW_CLUSTER +EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-new-cluster +# Use an environment file to pass variable _WSREP_START_POSITION +EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-start-position + +ExecStartPre=@libexecdir@/mariadb-check-socket --defaults-group-suffix=.%I +ExecStartPre=@libexecdir@/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n + +# Perform automatic wsrep recovery. When server is started without wsrep, +# galera_recovery simply returns an empty string. In any case, however, +# the script is not expected to return with a non-zero status. +# It is always safe to remove @INSTALL_RUNDATADIR@/wsrep-start-position +# environment file. +# Do not panic if galera_recovery script is not available. (MDEV-10538) +ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ + VAR=`@bindir@/galera_recovery`; [ $? -eq 0 ] \ + && echo _WSREP_START_POSITION=$VAR > @INSTALL_RUNDATADIR@/wsrep-start-position || exit 1" + # MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 -ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER -ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I +ExecStart=@libexecdir@/mariadbd --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION +ExecStartPost=@libexecdir@/mariadb-check-upgrade --defaults-group-suffix=.%I + +# Unset _WSREP_START_POSITION environment variable. +ExecStartPost=/bin/rm -f @INSTALL_RUNDATADIR@/wsrep-start-position # Setting this to true can break replication and the Type=notify settings -# See also bind-address mysqld option. +# See also bind-address MariaDB option. PrivateNetwork=false -KillMode=process KillSignal=SIGTERM # Don't want to see an automated SIGKILL ever diff --git a/SOURCES/pcre_bundling.patch b/SOURCES/pcre_bundling.patch new file mode 100644 index 0000000..8047861 --- /dev/null +++ b/SOURCES/pcre_bundling.patch @@ -0,0 +1,12 @@ +diff -Naur mariadb-11.8.6/cmake/pcre.cmake mariadb-11.8.6_patched/cmake/pcre.cmake +--- mariadb-11.8.6/cmake/pcre.cmake 2026-01-31 14:27:46.000000000 +0100 ++++ mariadb-11.8.6_patched/cmake/pcre.cmake 2026-03-24 15:36:42.555989118 +0100 +@@ -65,7 +65,7 @@ + ExternalProject_Add( + pcre2 + PREFIX "${dir}" +- URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.zip" ++ URL "file:///${dir}/pcre2-10.47.zip" + URL_MD5 7906aec38f872b74f1b925122dde9069 + INSTALL_COMMAND "" + CMAKE_ARGS diff --git a/SOURCES/rh-skipped-tests-arm.list b/SOURCES/rh-skipped-tests-arm.list index c3b5ced..bfcf7ba 100644 --- a/SOURCES/rh-skipped-tests-arm.list +++ b/SOURCES/rh-skipped-tests-arm.list @@ -1,3 +1,2 @@ -# Fails on aarch64 -innodb.innodb_buffer_pool_resize : -innodb.innodb_buffer_pool_resize_with_chunks : +# Fails since 10.11.13 +main.mysql_client_test_nonblock : #2373007 diff --git a/SOURCES/rh-skipped-tests-base.list b/SOURCES/rh-skipped-tests-base.list index 1a8e119..b0b9149 100644 --- a/SOURCES/rh-skipped-tests-base.list +++ b/SOURCES/rh-skipped-tests-base.list @@ -1,30 +1,122 @@ -# Fails everywhere -innodb.innodb_defrag_binlog : +# The SSL test are failing correctly. Fro more explanation, see: +# https://jira.mariadb.org/browse/MDEV-8404?focusedCommentId=84275&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-84275 +main.ssl_7937 : #1399847 +main.ssl_8k_key : +main.ssl_crl : #1399847 -main.ssl_7937 : -main.ssl_8k_key : -main.ssl_crl : -main.ssl_system_ca : -main.userstat : +# ------------------------------ +# Tests that fails because of 'Self Signed Certificate in the Certificate Chain' +perfschema.cnf_option : -perfschema.cnf_option : -perfschema.nesting : +rpl.rpl_row_img_blobs : +rpl.rpl_row_img_eng_min : +rpl.rpl_row_img_eng_noblob : + +sys_vars.slave_parallel_threads_basic : + +# ------------------------------ +# Expected to fail, the plugin is not build with server, but 'mariadb-connector-c' instead +plugins.auth_ed25519 : +plugins.multiauth : + +# ------------------------------ +perfschema.nesting : #1399847 +perfschema.socket_summary_by_instance_func : #1399847 perfschema.socket_summary_by_event_name_func : -perfschema.socket_summary_by_instance_func : -plugins.feedback_plugin_load : +# ------------------------------ +# Fails since 10.1.12 +innodb.innodb_defrag_binlog : -rpl.rpl_row_img_blobs : -rpl.rpl_row_img_eng_min : -rpl.rpl_row_img_eng_noblob : +# Fails everywhere since 10.4.11 +sys_vars.tcp_nodelay : -sys_vars.slave_parallel_threads_basic : +# Fails since 10.5.3 +main.mysqld--help-aria : -# Fails only on i686 -main.myisampack : +# Fails since 10.5.4 +main.ssl_system_ca : -# We don't build the plugin in server; we build it in mariadb-connector-c instead -plugins.auth_ed25519 : +# Fails on all architectures since 10.5.13 +oqgraph.regression_mdev6345 : +type_test.type_test_double : +# Fails on i686 since 10.5.13 +oqgraph.general-innodb : +oqgraph.general-Aria : +oqgraph.general-MyISAM : +oqgraph.legacy_upgrade : +oqgraph.regression_1133093 : +oqgraph.regression_1196036 : +oqgraph.regression_1213120 : -# Fails when builder uses a different trimezone than expected -main.timezone : +# Fails on all architectures since 10.5.18 +main.loadxml : +main.lock_kill : + +# Fails since 10.5.20 +bg.spider_fixes : +bugfix.mdev_29904 : "[Warning] mariadbd: Can't get hardware address with error 0" +rpl.rpl_err_ignoredtable : + +# Fails on 10.11.6 +main.plugin_auth : +main.userstat : +main.information_schema : + +binlog_encryption.rpl_gtid_basic : +perfschema.threads_mysql : +rpl.rpl_gtid_basic : +rpl.rpl_semi_sync_wait_point : + +# Fails since 10.11.7 +main.mdev375 : + +perfschema.show_aggregate : + +spider/bugfix.ddl_log : +spider/bugfix.mdev_28218 : +spider/bugfix.mdev_28218_mixed : +spider/bugfix.mdev_30370 : +spider/bugfix.mdev_32683 : +spider/bugfix.plugin_load_add_all : +spider/bugfix.plugin_load_add_spider : +spider/bugfix.udf_mysql_func_early : +spider/bugfix.udf_mysql_func_early_init_file : + +# Fails since 10.11.8 +rpl.rpl_get_lock : + +# Fails since 10.11.9 +plugins.feedback_plugin_load : +# Unstable +main.init_connect : + +# Fails since 10.11.10 +main.connect : + +# Fails since 10.11.11 +main.ssl_cipher : + +# Fails since 11.8.1 +main.ssl_autoverify : +main.tmp_space_usage : extended testsuite +binlog.max_binlog_total_size : +plugins.parsec : + +# Fails since 11.8.3 +rpl.rpl_mixed_mixing_engines : +rpl.rpl_non_direct_mixed_mixing_engines : + +# Unstable since the previous commit (Fedora downstream: def9e708480f10fbac6869a5e0155d5a358f0f1b) +mariabackup.slave_provision_nolock : + +# Fails since 11.8.3 +main.myisampack : + +# Fails since 11.8.6 +main.chained_ssl_certificates : +mysql_sha2.socket : +mysql_sha2.ssl_auto : +mysql_sha2.ssl_manual : +mysql_sha2.tcp_nossl : +plugins.mdev38431 : diff --git a/SOURCES/rh-skipped-tests-ppc.list b/SOURCES/rh-skipped-tests-ppc.list index 1938180..1121103 100644 --- a/SOURCES/rh-skipped-tests-ppc.list +++ b/SOURCES/rh-skipped-tests-ppc.list @@ -1,30 +1,27 @@ -# Fails on ppc64le -parts.partition_alter1_1_innodb : -parts.partition_alter1_2_innodb : -parts.partition_alter1_1_2_innodb : -parts.partition_alter1_2_1_innodb : -parts.partition_alter2_1_1_innodb : -parts.partition_alter1_2_2_innodb : -parts.partition_alter2_1_2_innodb : -parts.partition_alter2_2_1_innodb : -parts.partition_alter2_2_2_innodb : -parts.partition_alter4_innodb : -parts.partition_basic_innodb : -parts.part_supported_sql_func_innodb : +# Fails since 10.5.20 +innodb.innodb_defrag_concurrent : +parts.partition_alter4_innodb : +rpl.rpl_parallel_optimistic_xa_lsu_off : -rpl.rpl_loaddata_m : +# Fails on 10.11.6 +perfschema.threads_innodb : -# -stress.ddl_innodb : +# Fails since 11.8.3 +encryption.innodb_encryption-page-compression : +encryption.innochecksum : +encryption.innodb-checksum-algorithm : +encryption.innodb-discard-import : +encryption.innodb-discard-import-change : +encryption.instant_alter_import : +encryption.innodb_import : BUG#0 +encryption.innodb-key-rotation-disable : BUG#0 +encryption.innodb-force-corrupt : BUG#0 +encryption.innodb-page_encryption_compression : BUG#0 +encryption.innodb-bad-key-change3 : BUG#0 +innodb.instant_alter_import : BUG#0 +innodb.table_flags : BUG#0 +innodb.101_compatibility : BUG#0 -innodb.innodb_buffer_pool_resize : -innodb.innodb_buffer_pool_resize_with_chunks : -innodb.innodb_bulk_create_index : -innodb.innodb_defrag_binlog : -innodb.innodb_defrag_concurrent : -innodb_gis.kill_server : -gcol.innodb_virtual_basic : - -# Unstable (randomly failing) tests -innodb_gis.rtree_search : -main.type_ranges : +# Fails since 11.8.6 +mariabackup.incremental_page_compressed : +innodb.restart : diff --git a/SOURCES/rh-skipped-tests-s390.list b/SOURCES/rh-skipped-tests-s390.list index 8dc4339..2db1a01 100644 --- a/SOURCES/rh-skipped-tests-s390.list +++ b/SOURCES/rh-skipped-tests-s390.list @@ -1,15 +1,12 @@ -# Fails on s390x -disks.disks : -disks.disks_notembedded : +# Fails since 10.5.2 +perfschema.memory_aggregate_32bit : +period.overlaps : -# related to MDEV-20194 -# first check of `undefined` table causes warning, -# instead INSERT and ALTER should cause it -innodb.row_size_error_log_warnings_3 : +# Fails on 10.11.6 +innodb_gis.rtree_rollback1 : +mariabackup.encrypted_page_corruption : +mariabackup.huge_lsn : +mariabackup.xb_file_key_management : -# Fails since 2025 -archive.archive : -compat/oracle.column_compression : -main.func_compress : -main.column_compression_rpl : -main.column_compression : +# Fails since 10.11.9 +main.having_cond_pushdown : diff --git a/SOURCES/upstream_87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch b/SOURCES/upstream_87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch new file mode 100644 index 0000000..7f2dc00 --- /dev/null +++ b/SOURCES/upstream_87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch @@ -0,0 +1,75 @@ +diff -Naur mariadb-11.8.6/mysql-test/main/skip_grants.result mariadb-11.8.6_patched/mysql-test/main/skip_grants.result +--- mariadb-11.8.6/mysql-test/main/skip_grants.result 2026-01-31 14:27:46.000000000 +0100 ++++ mariadb-11.8.6_patched/mysql-test/main/skip_grants.result 2026-02-18 13:58:02.842715556 +0100 +@@ -152,4 +152,44 @@ + # + select * from information_schema.users; + USER PASSWORD_ERRORS PASSWORD_EXPIRATION_TIME ++# ++# MDEV-38811 crash in information_schema.table_constraints when --skip-grant-tables ++# ++select * from information_schema.table_constraints; ++CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE ++def mysql Host mysql roles_mapping UNIQUE ++def mysql Options mysql servers CHECK ++def mysql PRIMARY mysql column_stats PRIMARY KEY ++def mysql PRIMARY mysql columns_priv PRIMARY KEY ++def mysql PRIMARY mysql db PRIMARY KEY ++def mysql PRIMARY mysql event PRIMARY KEY ++def mysql PRIMARY mysql func PRIMARY KEY ++def mysql PRIMARY mysql global_priv PRIMARY KEY ++def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY ++def mysql PRIMARY mysql help_category PRIMARY KEY ++def mysql PRIMARY mysql help_keyword PRIMARY KEY ++def mysql PRIMARY mysql help_relation PRIMARY KEY ++def mysql PRIMARY mysql help_topic PRIMARY KEY ++def mysql PRIMARY mysql index_stats PRIMARY KEY ++def mysql PRIMARY mysql plugin PRIMARY KEY ++def mysql PRIMARY mysql proc PRIMARY KEY ++def mysql PRIMARY mysql procs_priv PRIMARY KEY ++def mysql PRIMARY mysql proxies_priv PRIMARY KEY ++def mysql PRIMARY mysql servers PRIMARY KEY ++def mysql PRIMARY mysql table_stats PRIMARY KEY ++def mysql PRIMARY mysql tables_priv PRIMARY KEY ++def mysql PRIMARY mysql time_zone PRIMARY KEY ++def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY ++def mysql PRIMARY mysql time_zone_name PRIMARY KEY ++def mysql PRIMARY mysql time_zone_transition PRIMARY KEY ++def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY ++def mysql Priv mysql global_priv CHECK ++def mysql name mysql help_category UNIQUE ++def mysql name mysql help_keyword UNIQUE ++def mysql name mysql help_topic UNIQUE ++def sys PRIMARY sys sys_config PRIMARY KEY ++Warnings: ++Warning 1286 Unknown storage engine 'InnoDB' ++Warning 1286 Unknown storage engine 'InnoDB' ++Warning 1286 Unknown storage engine 'InnoDB' + # End of 11.8 tests +diff -Naur mariadb-11.8.6/mysql-test/main/skip_grants.test mariadb-11.8.6_patched/mysql-test/main/skip_grants.test +--- mariadb-11.8.6/mysql-test/main/skip_grants.test 2026-01-31 14:27:46.000000000 +0100 ++++ mariadb-11.8.6_patched/mysql-test/main/skip_grants.test 2026-02-18 13:12:21.663377393 +0100 +@@ -191,4 +191,10 @@ + --echo # + select * from information_schema.users; + ++--echo # ++--echo # MDEV-38811 crash in information_schema.table_constraints when --skip-grant-tables ++--echo # ++--sorted_result ++select * from information_schema.table_constraints; ++ + --echo # End of 11.8 tests +diff -Naur mariadb-11.8.6/sql/sql_acl.cc mariadb-11.8.6_patched/sql/sql_acl.cc +--- mariadb-11.8.6/sql/sql_acl.cc 2026-01-31 14:27:48.000000000 +0100 ++++ mariadb-11.8.6_patched/sql/sql_acl.cc 2026-02-18 13:13:21.601008459 +0100 +@@ -3927,6 +3927,9 @@ + privilege_t acl_get_all3(Security_context *sctx, const char *db, + bool db_is_patern) + { ++ if (!initialized) ++ return DB_ACLS; ++ + privilege_t access= acl_get(sctx->host, sctx->ip, + sctx->priv_user, db, db_is_patern); + if (sctx->priv_role[0]) diff --git a/SPECS/mariadb.spec b/SPECS/mariadb.spec index b248b9a..148c5fc 100644 --- a/SPECS/mariadb.spec +++ b/SPECS/mariadb.spec @@ -1,48 +1,77 @@ -# Prefix that is used for patches -%global pkg_name %{name} -%global pkgnamepatch mariadb +# Plain package name for cases, where %%{name} differs (e.g. for versioned packages) +%global majorname mariadb +%global package_version 11.8.6 +%global majorversion %(echo %{package_version} | cut -d'.' -f1-2 ) + +# Set if this package will be the default one in distribution +%{!?mariadb_default:%global mariadb_default 0} # Regression tests may take a long time (many cores recommended), skip them by %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%{!?ignore_testsuite_result:%global ignore_testsuite_result 0} +%global ignore_testsuite_result 0 -# In f20+ use unversioned docdirs, otherwise the old versioned one -%global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} -%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{pkg_name}-%{version}} +# The last version on which the full testsuite has been run +# In case of further rebuilds of that version, don't require full testsuite to be run +# run only "main" suite +%global last_tested_version 11.8.6 +# Set to 1 to force run the testsuite even if it was already tested in current version +%global force_run_testsuite 0 -# By default, patch(1) creates backup files when chunks apply with offsets. -# Turn that off to ensure such files don't get included in RPMs (cf bz#884755). -%global _default_patch_flags --no-backup-if-mismatch +# Filtering: https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/ +%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::|wsrep) +%global __provides_exclude_from ^(%{_datadir}/(mysql|mariadb-test)/.*|%{_libdir}/%{majorname}/plugin/.*\\.so)$ +# For some use cases we do not need some parts of the package. Set to "...with" to exclude +%bcond_with clibrary +%bcond_with config +%bcond_without embedded +%bcond_without devel +%bcond_without client +%bcond_without common +%bcond_without errmsg +%bcond_without backup - -# TokuDB engine -# https://mariadb.com/kb/en/mariadb/tokudb/ -# TokuDB engine is available only for x86_64 -# Mroonga engine -# https://mariadb.com/kb/en/mariadb/about-mroonga/ -# Current version in MariaDB, 7.07, only supports the x86_64 -# Mroonga upstream warns about using 32-bit package: http://mroonga.org/docs/install.html -# RocksDB engine -# https://mariadb.com/kb/en/library/myrocks-supported-platforms/ -# RocksB engine is available only for x86_64 -# RocksDB may be built with jemalloc, if specified in CMake -# Cassandra engine -# Experimental version of the Cassandra storage engine -# The tests needs running cassandra server -# Do not build it for now -%if "%_arch" == "x86_64" && 0%{?fedora} -%bcond_without tokudb -%bcond_without mroonga -%bcond_without rocksdb -%bcond_with cassandra +# Package 'galera' (which is a run-time requirement for 'mariadb-server-galera') is no longer built for i686 architecture in Fedora +%ifarch %{ix86} +%bcond_with galera %else -%bcond_with tokudb -%bcond_with mroonga -%bcond_with rocksdb -%bcond_with cassandra +%bcond_without galera +%endif + +%if !0%{?flatpak} +%bcond_without test +%endif + +# Page compression algorithms for various storage engines +%bcond_without lz4 +%bcond_without bzip2 +%bcond_without lzo +%bcond_without snappy +%bcond_without zstd +%if 0%{?fedora} +%bcond_without lzma +%else +%bcond_with lzma +%endif + +# Aditional SELinux rules from a standalone package 'mysql-selinux' (that holds rules shared between MariaDB and MySQL) +%bcond_without require_mysql_selinux + +# For deep debugging we need to build binaries with extra debug info +%bcond_with debug + +# Authentication plugins +%bcond_without gssapi +%if !0%{?flatpak} +%bcond_without pam +%endif +%if 0%{?fedora} +# MariaDB upstream packages this as a separate subpackage +%bcond_without hashicorp +%else +%bcond_with hashicorp %endif # The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing @@ -50,161 +79,192 @@ %bcond_without oqgraph # Other plugins +# S3 storage engine +# https://mariadb.com/kb/en/s3-storage-engine/ %if 0%{?fedora} %bcond_without cracklib %bcond_without connect %bcond_without sphinx +%bcond_without s3 %else %bcond_with cracklib %bcond_with connect %bcond_with sphinx +%bcond_with s3 %endif -%bcond_without gssapi -# For some use cases we do not need some parts of the package. Set to "...with" to exclude -%if 0%{?fedora} || 0%{?rhel} > 7 -%bcond_with clibrary -%else -%bcond_without clibrary -%endif -%bcond_without embedded -%bcond_without devel -%bcond_without client -%bcond_without common -%bcond_without errmsg -%bcond_without test -%bcond_without galera -%bcond_without backup +# Mroonga engine +# https://mariadb.com/kb/en/mariadb/about-mroonga/ +# Current version in MariaDB, 7.07, only supports the x86_64 +# Mroonga upstream warns about using 32-bit package: http://mroonga.org/docs/install.html +# RocksDB engine +# https://mariadb.com/kb/en/library/about-myrocks-for-mariadb/ +# RocksDB engine is available only for x86_64 +# RocksDB may be built with jemalloc, if specified in CMake +%ifarch x86_64 %if 0%{?fedora} -%bcond_without bench +%bcond_without mroonga +%bcond_without rocksdb %else -%bcond_with bench +%bcond_with mroonga +%bcond_with rocksdb +%endif %endif -# When there is already another package that ships /etc/my.cnf, -# rather include it than ship the file again, since conflicts between -# those files may create issues -%if 0%{?fedora} >= 29 || 0%{?rhel} > 7 -%bcond_with config -%else -%bcond_without config -%endif -# For deep debugging we need to build binaries with extra debug info -%bcond_with debug +%global selinuxtype targeted -# Page compression algorithms for InnoDB & XtraDB -# lz4 currently cannot be turned off by CMake, only by not having lz4-devel package in the buildroot -# https://jira.mariadb.org/browse/MDEV-15932 -%bcond_without lz4 - - - -# MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use +# MariaDB 10.0 and later requires pcre >= 10.34, otherwise we need to use # the bundled library, since the package cannot be build with older version -%if 0%{?fedora} || 0%{?rhel} > 7 -%bcond_without unbundled_pcre +# https://mariadb.com/kb/en/pcre/ +%bcond bundled_pcre 1 +%if %{with bundled_pcre} +%global pcre_bundled_version 10.47 +%endif + +# To avoid issues with a breaking change in FMT library, bundle it on systems where FMT wasn't fixed yet +# See mariadb-libfmt.patch for detailed description. +# As the breaking issues are no longer present in fedora 41 +# and higher, this issue only remains in rhel +%if 0%{?rhel} +%bcond bundled_fmt 1 %else -%bcond_with unbundled_pcre -%global pcre_bundled_version 8.45 +%bcond bundled_fmt 0 +%endif + +%if %{with bundled_fmt} +%global fmt_bundled_version 12.1.0 %endif # Include systemd files -%global daemon_name %{name} -%global daemondir %{_unitdir} -%global daemon_no_prefix %{pkg_name} -%global mysqld_pid_dir mariadb +%global daemon_name %{majorname} +%global daemon_no_prefix %{majorname} # We define some system's well known locations here so we can use them easily # later when building to another location (like SCL) -%global logrotateddir %{_sysconfdir}/logrotate.d -%global logfiledir %{_localstatedir}/log/%{daemon_name} -%global logfile %{logfiledir}/%{daemon_name}.log +%global logrotateddir %{_sysconfdir}/logrotate.d +%global logfiledir %{_localstatedir}/log/%{daemon_name} +%global logfile %{logfiledir}/%{daemon_name}.log # Directory for storing pid file -%global pidfiledir %{_rundir}/%{mysqld_pid_dir} +%global pidfiledir %{_rundir}/%{daemon_name} # Defining where database data live -%global dbdatadir %{_localstatedir}/lib/mysql -# Home directory of mysql user should be same for all packages that create it -%global mysqluserhome /var/lib/mysql - - - -# Provide mysql names for compatibility -%if 0%{?fedora} -%bcond_without mysql_names -%else -%bcond_with mysql_names -%endif +%global dbdatadir %{_localstatedir}/lib/mysql + +%global sysusersd_contents $(echo "u mysql 27 'MariaDB and MySQL Server' %{dbdatadir} -") + +%global temp_sysusers_file %( \ + TEMPFILE=$(mktemp); \ + echo "%{sysusersd_contents}" > $TEMPFILE; \ + echo $TEMPFILE \ +) +# Set explicit conflicts with 'mysql' packages +%bcond_without conflicts_mysql +# Set explicit conflicts with 'community-mysql' names, provided by 'mysql' packages +# 'community-mysql' names are deprecated and to be removed in future Fedora +%bcond_without conflicts_community_mysql # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} -Name: mariadb -Version: 10.3.39 +Name: %{majorname} +Version: %{package_version} Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server URL: http://mariadb.org -# Exceptions allow client libraries to be linked with most open source SW, not only GPL code. See README.mysql-license -License: GPLv2 with exceptions and LGPLv2 and BSD +License: ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz +%if %{with bundled_fmt} +Source1: https://github.com/fmtlib/fmt/releases/download/%{fmt_bundled_version}/fmt-%{fmt_bundled_version}.zip +%endif Source2: mysql_config_multilib.sh Source3: my.cnf.in -Source6: README.mysql-docs -Source7: README.mysql-license +%if %{with bundled_pcre} +Source4: https://github.com/PCRE2Project/pcre2/releases/download/pcre2-%{pcre_bundled_version}/pcre2-%{pcre_bundled_version}.zip +%endif +Source6: README.mariadb-docs Source8: README.wsrep_sst_rsync_tunnel -Source10: mysql.tmpfiles.d.in +Source10: mariadb.tmpfiles.d.in Source11: mysql.service.in -Source12: mysql-prepare-db-dir.sh -Source14: mysql-check-socket.sh -Source15: mysql-scripts-common.sh -Source16: mysql-check-upgrade.sh +Source12: mariadb-prepare-db-dir.sh +Source14: mariadb-check-socket.sh +Source15: mariadb-scripts-common.sh +Source16: mariadb-check-upgrade.sh Source18: mysql@.service.in Source50: rh-skipped-tests-base.list Source51: rh-skipped-tests-arm.list Source52: rh-skipped-tests-s390.list Source53: rh-skipped-tests-ppc.list -# Proposed upstream: https://jira.mariadb.org/browse/MDEV-12442 -# General upstream response was slightly positive +# Red Hat OpenStack scripts: +# Clustercheck: +# Maintainer: +# Damien Ciabrini +# Source / Upstream: +# Damien; based on https://github.com/olafz/percona-clustercheck +# not updated in 5 years; low-effort maintenance +# Purpose: +# In Openstack, galera is accessed like an A/P database, we have a +# load balancer (haproxy) that drives traffic to a single node and +# performs failover when the galera node monitor fails. +# clustercheck.sh is the monitoring script that is being called remotely +# by haproxy. It is a glue between haproxy and the local galera node that +# can run SQL commands to check whether the local galera is connected to the galera cluster. +# Proposed to MariaDB upstream: https://jira.mariadb.org/browse/MDEV-12442 +# General upstream response was slightly positive Source70: clustercheck.sh Source71: LICENSE.clustercheck + # Upstream said: "Generally MariaDB has more allows to allow for xtradb sst mechanism". # https://jira.mariadb.org/browse/MDEV-12646 -Source72: mariadb-server-galera.te +Source72: mariadb-server-galera.cil + # Script to support encrypted rsync transfers when SST is required between nodes. # https://github.com/dciabrin/wsrep_sst_rsync_tunnel/blob/master/wsrep_sst_rsync_tunnel Source73: wsrep_sst_rsync_tunnel -# Patch4: Red Hat distributions specific logrotate fix -# it would be big unexpected change, if we start shipping it now. Better wait for MariaDB 10.2 -Patch4: %{pkgnamepatch}-logrotate.patch +# Patch4: Use the correct log file pathname for Red Hat installations +Patch4: %{majorname}-logrotate.patch # Patch7: add to the CMake file all files where we want macros to be expanded -Patch7: %{pkgnamepatch}-scripts.patch +Patch7: %{majorname}-scripts.patch # Patch9: pre-configure to comply with guidelines -Patch9: %{pkgnamepatch}-ownsetup.patch -# Patch10: Add RHEL8 required security -Patch10: %{pkgnamepatch}-annocheck.patch -# Patch12: Downstream fix for a correct pkgconfig file location -Patch12: %{pkgnamepatch}-pcdir.patch -# Patch13: Fix failing 10.3.39 ssl and disks tests -Patch13: %{pkgnamepatch}-10.3.39-tests.patch -# Patch14: Backport MDEV-30402 socat patch -Patch14: %{pkgnamepatch}-mdev-30402.patch +Patch9: %{majorname}-ownsetup.patch +# Patch13: bundle the FMT library +Patch13: %{majorname}-libfmt.patch +# Patch14: make MTR port calculation reasonably predictable +Patch14: %{majorname}-mtr.patch -Patch15: CVE-2025-13699.patch +Patch16: %{majorname}-federated.patch +Patch18: pcre_bundling.patch -BuildRequires: cmake gcc-c++ +Patch17: upstream_87309d3d4bb8f48910d05b0ca5ee989bcdd6b053.patch + +# This macro is used for package/sub-package names in the entire specfile +%if %?mariadb_default +%global pkgname %{majorname} +%package -n %{pkgname} +Summary: A very fast and robust SQL database server +%else +%global pkgname %{name} +%endif + +BuildRequires: make cmake gcc-c++ +BuildRequires: libxcrypt-devel BuildRequires: multilib-rpm-config BuildRequires: selinux-policy-devel BuildRequires: systemd systemd-devel -# Page compression algorithms for InnoDB & XtraDB +# Page compression algorithms for various storage engines BuildRequires: zlib-devel -%{?with_lz4:BuildRequires: lz4-devel} +%{?with_lz4:BuildRequires: lz4-devel >= 1.6} +%{?with_bzip2:BuildRequires: bzip2-devel} +%{?with_lzma:BuildRequires: xz-devel} +%{?with_lzo:BuildRequires: lzo-devel} +%{?with_snappy:BuildRequires: snappy-devel} +%{?with_zstd:BuildRequires: libzstd-devel} # asynchornous operations stuff; needed also for wsrep API BuildRequires: libaio-devel @@ -214,101 +274,165 @@ BuildRequires: libedit-devel BuildRequires: ncurses-devel # debugging stuff BuildRequires: systemtap-sdt-devel +%if 0%{?fedora} >= 41 || 0%{?rhel} >= 11 +BuildRequires: systemtap-sdt-dtrace +%endif # Bison SQL parser; needed also for wsrep API -BuildRequires: bison bison-devel +BuildRequires: bison >= 2.4 +BuildRequires: bison-devel >= 2.4 -# auth_pam.so plugin will be build if pam-devel is installed -BuildRequires: pam-devel -# use either new enough version of pcre or provide bundles(pcre) -%{?with_unbundled_pcre:BuildRequires: pcre-devel >= 8.35 pkgconf} -%{!?with_unbundled_pcre:Provides: bundled(pcre) = %{pcre_bundled_version}} +%{?with_debug:BuildRequires: valgrind-devel} + +# use either new enough version of pcre2 or provide bundles(pcre2) +%{?with_bundled_pcre:Provides: bundled(pcre2) = %{pcre_bundled_version}} +%{!?with_bundled_pcre:BuildRequires: pcre2-devel >= 10.34 pkgconf} # Few utilities needs Perl -%if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: perl-interpreter BuildRequires: perl-generators -%endif # Some tests requires python BuildRequires: python3 # Tests requires time and ps and some perl modules BuildRequires: procps BuildRequires: time +BuildRequires: perl(base) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(English) BuildRequires: perl(Env) +BuildRequires: perl(Errno) BuildRequires: perl(Exporter) BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(File::Temp) -BuildRequires: perl(Data::Dumper) BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IO::Select) +BuildRequires: perl(IO::Socket) +BuildRequires: perl(IO::Socket::INET) BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) BuildRequires: perl(Memoize) +BuildRequires: perl(POSIX) BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(Symbol) BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Term::ANSIColor) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) -BuildRequires: perl(Symbol) +BuildRequires: perl(Time::localtime) +BuildRequires: perl(warnings) # for running some openssl tests rhbz#1189180 BuildRequires: openssl openssl-devel +BuildRequires: systemd-rpm-macros + +%{!?with_bundled_fmt:BuildRequires: fmt-devel >= 11.1.4-1} + Requires: bash coreutils grep -Requires: %{name}-common%{?_isa} = %{sameevr} +Requires: %{pkgname}-common = %{sameevr} %if %{with clibrary} # Explicit EVR requirement for -libs is needed for RHBZ#1406320 -Requires: %{name}-libs%{?_isa} = %{sameevr} +Requires: %{pkgname}-libs%{?_isa} = %{sameevr} %else # If not built with client library in this package, use connector-c -Requires: mariadb-connector-c >= 3.1.11 +Requires: mariadb-connector-c >= 3.0 %endif -%if %{with mysql_names} -Provides: mysql = %{sameevr} -Provides: mysql%{?_isa} = %{sameevr} -Provides: mysql-compat-client = %{sameevr} -Provides: mysql-compat-client%{?_isa} = %{sameevr} +# Recommend additional client utils that require Perl +Recommends: %{pkgname}-client-utils + +Suggests: %{pkgname}-server%{?_isa} = %{sameevr} + +%{?with_conflicts_mysql:Conflicts: mysql-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql} +# Explicitly disallow combination mariadb + mysql-server +%{?with_conflicts_mysql:Conflicts: mysql-server-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql-server} + +%define conflict_with_other_streams() %{expand:\ +Provides: %{majorname}%{?1:-%{1}}-any\ +Conflicts: %{majorname}%{?1:-%{1}}-any\ +} + +# Provide also mariadbXX.XX if default +%if %?mariadb_default +%define mariadbXX_if_default() %{expand:\ +Provides: mariadb%{majorversion}%{?1:-%{1}} = %{sameevr}\ +Provides: mariadb%{majorversion}%{?1:-%{1}}%{?_isa} = %{sameevr}\ +} +%else +%define mariadbXX_if_default() %{nil} %endif -Suggests: %{name}-server%{?_isa} = %{sameevr} +%define virtual_conflicts_and_provides() %{expand:\ +%conflict_with_other_streams %{**}\ +%mariadbXX_if_default %{**}\ +} -Conflicts: mysql - -# obsoletion of mariadb-galera -Provides: mariadb-galera = %{sameevr} - -# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering -%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) -%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/%{pkg_name}/plugin/.*\\.so)$ - -# Define license macro if not present -%{!?_licensedir:%global license %doc} +#%%virtual_conflicts_and_provides %description -MariaDB is a community developed branch of MySQL - a multi-user, multi-threaded +MariaDB is a community developed fork from MySQL - a multi-user, multi-threaded SQL database server. It is a client/server implementation consisting of -a server daemon (mysqld) and many different client programs and libraries. +a server daemon (mariadbd) and many different client programs and libraries. The base package contains the standard MariaDB/MySQL client programs and -generic MySQL files. +utilities. + +%if %?mariadb_default +%description -n %{pkgname} +MariaDB is a community developed fork from MySQL - a multi-user, multi-threaded +SQL database server. It is a client/server implementation consisting of +a server daemon (mariadbd) and many different client programs and libraries. +The base package contains the standard MariaDB/MySQL client programs and +utilities. +%endif + +%package -n %{pkgname}-client-utils +BuildArch: noarch +Summary: Non-essential client utilities for MariaDB/MySQL applications +Requires: %{pkgname} = %{sameevr} +Requires: perl(DBI) + +# Only conflicts, provides would add %%{_isa} provides for noarch, +# which is not wanted +%conflict_with_other_streams client-utils + +%description -n %{pkgname}-client-utils +This package contains all non-essential client utilities and scripts for +managing databases. It also contains all utilities requiring Perl and it is the +only MariaDB sub-package with the corresponding server-utils one, except test +subpackage, that depends on Perl. %if %{with clibrary} -%package libs +%package -n %{pkgname}-libs Summary: The shared libraries required for MariaDB/MySQL clients -Requires: %{name}-common%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-libs = %{sameevr} -Provides: mysql-libs%{?_isa} = %{sameevr} -%endif # mysql_names +Requires: %{pkgname}-common = %{sameevr} -%description libs +#%%virtual_conflicts_and_provides libs + +%{?with_conflicts_mysql:Conflicts: mysql-libs-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql-libs} + +%description -n %{pkgname}-libs The mariadb-libs package provides the essential shared libraries for any MariaDB/MySQL client program or interface. You will need to install this package to use any other MariaDB package or any clients that need to connect to a MariaDB/MySQL server. -%endif #clibrary +%endif # At least main config file /etc/my.cnf is shared for client and server part # Since we want to support combination of different client and server -# implementations (e.g. mariadb library and mysql server), +# implementations (e.g. mariadb library and community-mysql server), # we need the config file(s) to be in a separate package, so no extra packages # are pulled, because these would likely conflict. # More specifically, the dependency on the main configuration file (/etc/my.cnf) @@ -316,10 +440,12 @@ to a MariaDB/MySQL server. # a specific package, so installer app can choose whatever package fits to # the transaction. %if %{with config} -%package config +%package -n %{pkgname}-config Summary: The config files required by server and client -%description config +#%%virtual_conflicts_and_provides config + +%description -n %{pkgname}-config The package provides the config file my.cnf and my.cnf.d directory used by any MariaDB or MySQL program. You will need to install this package to use any other MariaDB or MySQL package if the config files are not provided in the @@ -328,29 +454,36 @@ package itself. %if %{with common} -%package common +%package -n %{pkgname}-common Summary: The shared files required by server and client +BuildArch: noarch +%if 0%{?flatpak} +Requires: mariadb-connector-c-config +%else Requires: %{_sysconfdir}/my.cnf - -# obsoletion of mariadb-galera-common -Provides: mariadb-galera-common = %{sameevr} - -%if %{without clibrary} -Obsoletes: %{name}-libs <= %{sameevr} %endif -%description common +# Only conflicts, provides would add %%{_isa} provides for noarch, +# which is not wanted +%conflict_with_other_streams common + +%description -n %{pkgname}-common The package provides the essential shared files for any MariaDB program. You will need to install this package to use any other MariaDB package. %endif %if %{with errmsg} -%package errmsg +%package -n %{pkgname}-errmsg Summary: The error messages files required by server and embedded -Requires: %{name}-common%{?_isa} = %{sameevr} +BuildArch: noarch +Requires: %{pkgname}-common = %{sameevr} -%description errmsg +# Only conflicts, provides would add %%{_isa} provides for noarch, +# which is not wanted +%conflict_with_other_streams errmsg + +%description -n %{pkgname}-errmsg The package provides error messages files for the MariaDB daemon and the embedded server. You will need to install this package to use any of those MariaDB packages. @@ -358,95 +491,112 @@ MariaDB packages. %if %{with galera} -%package server-galera +%package -n %{pkgname}-server-galera Summary: The configuration files and scripts for galera replication -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-server%{?_isa} = %{sameevr} -Requires: galera >= 25.3.3 -Requires(post): libselinux-utils -%if 0%{?rhel} > 7 -Requires(post): policycoreutils-python-utils -%else -Requires(post): policycoreutils-python -%endif +Requires: %{pkgname}-common = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} +Requires: galera >= 26.4.3 +BuildRequires: selinux-policy-%{selinuxtype} +Requires: selinux-policy-%{selinuxtype} +Requires(post): (libselinux-utils if selinux-policy-%{selinuxtype}) +Requires(post): (policycoreutils if selinux-policy-%{selinuxtype}) +Requires(post): (policycoreutils-python-utils if selinux-policy-%{selinuxtype}) # wsrep requirements Requires: lsof # Default wsrep_sst_method Requires: rsync -# obsoletion of mariadb-galera-server -Provides: mariadb-galera-server = %{sameevr} +#%%virtual_conflicts_and_provides server-galera -%description server-galera +%description -n %{pkgname}-server-galera MariaDB is a multi-user, multi-threaded SQL database server. It is a -client/server implementation consisting of a server daemon (mysqld) +client/server implementation consisting of a server daemon (mariadbd) and many different client programs and libraries. This package contains -the MariaDB server and some accompanying files and directories. -MariaDB is a community developed branch of MySQL. +added files to allow MariaDB server to operate as a Galera cluster +member. MariaDB is a community developed fork originally from MySQL. %endif -%package server +%package -n %{pkgname}-server Summary: The MariaDB server and related files -# note: no version here = %%{version}-%%{release} -%if %{with mysql_names} -Requires: mysql-compat-client%{?_isa} -Requires: mysql%{?_isa} -Recommends: %{name}%{?_isa} -%else -Requires: %{name}%{?_isa} +%if %{with hashicorp} +BuildRequires: curl-devel %endif -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -Recommends: %{name}-server-utils%{?_isa} = %{sameevr} -Recommends: %{name}-backup%{?_isa} = %{sameevr} -%{?with_cracklib:Recommends: %{name}-cracklib-password-check%{?_isa} = %{sameevr}} -%{?with_gssapi:Recommends: %{name}-gssapi-server%{?_isa} = %{sameevr}} -%{?with_rocksdb:Recommends: %{name}-rocksdb-engine%{?_isa} = %{sameevr}} -%{?with_tokudb:Recommends: %{name}-tokudb-engine%{?_isa} = %{sameevr}} + +Requires: %{pkgname}%{?_isa} = %{sameevr} +Requires: %{pkgname}-common = %{sameevr} +Requires: %{pkgname}-errmsg = %{sameevr} +Recommends: %{pkgname}-server-utils = %{sameevr} +Recommends: %{pkgname}-backup%{?_isa} = %{sameevr} +%{?with_cracklib:Recommends: %{pkgname}-cracklib-password-check%{?_isa} = %{sameevr}} +%{?with_gssapi:Recommends: %{pkgname}-gssapi-server%{?_isa} = %{sameevr}} +%{?with_rocksdb:Suggests: %{pkgname}-rocksdb-engine%{?_isa} = %{sameevr}} +%{?with_sphinx:Suggests: %{pkgname}-sphinx-engine%{?_isa} = %{sameevr}} +%{?with_oqgraph:Suggests: %{pkgname}-oqgraph-engine%{?_isa} = %{sameevr}} +%{?with_connect:Suggests: %{pkgname}-connect-engine%{?_isa} = %{sameevr}} +%{?with_pam:Suggests: %{pkgname}-pam%{?_isa} = %{sameevr}} + +%{?sysusers_requires_compat} + +%{?with_bundled_fmt:Provides: bundled(fmt) = %{fmt_bundled_version}} Suggests: mytop Suggests: logrotate +%if 0%{?flatpak} +Requires: mariadb-connector-c-config +%else Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d +%endif -# for fuser in mysql-check-socket -Requires: psmisc +#%%virtual_conflicts_and_provides server + +# Additional SELinux rules (common for MariaDB & MySQL) shipped in a separate package +# For cases, where we want to fix a SELinux issues in MariaDB sooner than patched selinux-policy-targeted package is released +%if %{with require_mysql_selinux} +# The *-selinux package should only be required on SELinux enabled systems. Therefore the following rich dependency syntax should be used: +Requires: (mysql-selinux >= 1.0.10 if selinux-policy-%{selinuxtype}) +# This ensures that the *-selinux package and all its dependencies are not pulled into containers and other systems that do not use SELinux. +# https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Adding_dependency_to_the_spec_file_of_corresponding_package +%endif Requires: coreutils -Requires(pre): /usr/sbin/useradd # We require this to be present for %%{_tmpfilesdir} Requires: systemd # Make sure it's there when scriptlets run, too %{?systemd_requires} # RHBZ#1496131; use 'iproute' instead of 'net-tools' Requires: iproute -%if %{with mysql_names} -Provides: mysql-server = %{sameevr} -Provides: mysql-server%{?_isa} = %{sameevr} -Provides: mysql-compat-server = %{sameevr} -Provides: mysql-compat-server%{?_isa} = %{sameevr} -%endif -Conflicts: mysql-server +# The 'wsrep_sst_common' and 'wsrep_sst_rsync_tunnel' calls 'which' utility +%{?with_galera:Requires: which} -%description server +%{?with_conflicts_mysql:Conflicts: mysql-server-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql-server} +# Explicitly disallow combination mariadb-server + mysql +%{?with_conflicts_mysql:Conflicts: mysql-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql} + +%description -n %{pkgname}-server MariaDB is a multi-user, multi-threaded SQL database server. It is a -client/server implementation consisting of a server daemon (mysqld) +client/server implementation consisting of a server daemon (mariadbd) and many different client programs and libraries. This package contains the MariaDB server and some accompanying files and directories. -MariaDB is a community developed branch of MySQL. +MariaDB is a community developed fork from MySQL. %if %{with oqgraph} -%package oqgraph-engine +%package -n %{pkgname}-oqgraph-engine Summary: The Open Query GRAPH engine for MariaDB -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} # boost and Judy required for oograph -BuildRequires: boost-devel Judy-devel +BuildRequires: boost-devel >= 1.40.0 +BuildRequires: Judy-devel -%description oqgraph-engine +#%%virtual_conflicts_and_provides oqgraph-engine + +%description -n %{pkgname}-oqgraph-engine The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB database server. OQGRAPH is a computation engine allowing hierarchies and more complex graph structures to be handled in a relational fashion. In a nutshell, @@ -456,14 +606,16 @@ standard SQL syntax, and results joined onto other tables. %if %{with connect} -%package connect-engine +%package -n %{pkgname}-connect-engine Summary: The CONNECT storage engine for MariaDB -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} # As per https://jira.mariadb.org/browse/MDEV-21450 BuildRequires: libxml2-devel -%description connect-engine +#%%virtual_conflicts_and_provides connect-engine + +%description -n %{pkgname}-connect-engine The CONNECT storage engine enables MariaDB to access external local or remote data (MED). This is done by defining tables based on different data types, in particular files in various formats, data extracted from other DBMS @@ -473,12 +625,14 @@ or products (such as Excel), or data retrieved from the environment %if %{with backup} -%package backup +%package -n %{pkgname}-backup Summary: The mariabackup tool for physical online backups -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} BuildRequires: libarchive-devel -%description backup +#%%virtual_conflicts_and_provides backup + +%description -n %{pkgname}-backup MariaDB Backup is an open source tool provided by MariaDB for performing physical online backups of InnoDB, Aria and MyISAM tables. For InnoDB, "hot online" backups are possible. @@ -486,36 +640,43 @@ For InnoDB, "hot online" backups are possible. %if %{with rocksdb} -%package rocksdb-engine +%package -n %{pkgname}-rocksdb-engine Summary: The RocksDB storage engine for MariaDB -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} +# The version of rocksdb provided is not specified because the mariadb +# upstream provides it as a submodule, which is linked in their github +# https://github.com/MariaDB/server/ inside storage/rocksdb +# the commits linked here don't match the releases made by the rocksdb +# upstream: https://github.com/facebook/rocksdb/ +# therefore the release specified here would be rough at best. +# A rough release can also be found inside the source tarball +# inside the storage/rocksdb/rocksdb/include/rocksdb/version.h file +# but it does not match the real release every time Provides: bundled(rocksdb) +Conflicts: rocksdb-tools -%description rocksdb-engine +#%%virtual_conflicts_and_provides rocksdb-engine + +%description -n %{pkgname}-rocksdb-engine The RocksDB storage engine is used for high performance servers on SSD drives. %endif -%if %{with tokudb} -%package tokudb-engine -Summary: The TokuDB storage engine for MariaDB -Requires: %{name}-server%{?_isa} = %{sameevr} -BuildRequires: jemalloc-devel -Requires: jemalloc - -%description tokudb-engine -The TokuDB storage engine from Percona. -%endif - - %if %{with cracklib} -%package cracklib-password-check +%package -n %{pkgname}-cracklib-password-check Summary: The password strength checking plugin -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} BuildRequires: cracklib-dicts cracklib-devel Requires: cracklib-dicts -%description cracklib-password-check +BuildRequires: selinux-policy-devel +Requires(post): (libselinux-utils if selinux-policy-%{selinuxtype}) +Requires(post): (policycoreutils if selinux-policy-%{selinuxtype}) +Requires(post): (policycoreutils-python-utils if selinux-policy-%{selinuxtype}) + +#%%virtual_conflicts_and_provides cracklib-password-check + +%description -n %{pkgname}-cracklib-password-check CrackLib is a password strength checking library. It is installed by default in many Linux distributions and is invoked automatically (by pam_cracklib.so) whenever the user login password is modified. @@ -525,144 +686,155 @@ also use it to check MariaDB account passwords. %if %{with gssapi} -%package gssapi-server +%package -n %{pkgname}-gssapi-server Summary: GSSAPI authentication plugin for server -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} BuildRequires: krb5-devel -%description gssapi-server +#%%virtual_conflicts_and_provides gssapi-server + +%description -n %{pkgname}-gssapi-server GSSAPI authentication server-side plugin for MariaDB for passwordless login. This plugin includes support for Kerberos on Unix. %endif +%if %{with pam} +%package -n %{pkgname}-pam +Summary: PAM authentication plugin for the MariaDB server + +Requires: %{pkgname}-server%{?_isa} = %{sameevr} +# This subpackage NEED the 'mysql' user/group (created during mariadb-server %%pre) to be available prior installation +Requires(pre): %{pkgname}-server%{?_isa} = %{sameevr} + +BuildRequires: pam-devel + +#%%virtual_conflicts_and_provides pam + +%description -n %{pkgname}-pam +PAM authentication server-side plugin for MariaDB. +%endif + + %if %{with sphinx} -%package sphinx-engine +# MariaDB upstream packages this inside the client sub-package +%package -n %{pkgname}-sphinx-engine Summary: The Sphinx storage engine for MariaDB -Requires: %{name}-server%{?_isa} = %{sameevr} -BuildRequires: sphinx libsphinxclient libsphinxclient-devel +Requires: %{pkgname}-server%{?_isa} = %{sameevr} +BuildRequires: sphinx libsphinxclient-devel Requires: sphinx libsphinxclient -%description sphinx-engine +#%%virtual_conflicts_and_provides sphinx-engine + +%description -n %{pkgname}-sphinx-engine The Sphinx storage engine for MariaDB. %endif -%if %{with cassandra} -%package cassandra-engine -Summary: The Cassandra storage engine for MariaDB - EXPERIMENTAL VERSION -Requires: %{name}-server%{?_isa} = %{sameevr} -BuildRequires: cassandra thrift-devel -%description cassandra-engine -The Cassandra storage engine for MariaDB. EXPERIMENTAL VERSION! +%if %{with s3} +%package -n %{pkgname}-s3-engine +Summary: The S3 storage engine for MariaDB +Requires: %{pkgname}-server%{?_isa} = %{sameevr} + +BuildRequires: curl-devel + +#%%virtual_conflicts_and_provides s3-engine + +%description -n %{pkgname}-s3-engine +The S3 read only storage engine allows archiving MariaDB tables in Amazon S3, +or any third-party public or private cloud that implements S3 API, +but still have them accessible for reading in MariaDB. %endif -%package server-utils +%package -n %{pkgname}-server-utils +BuildArch: noarch Summary: Non-essential server utilities for MariaDB/MySQL applications -Requires: %{name}-server%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-perl = %{sameevr} -%endif -Conflicts: mysql-server +Requires: %{pkgname}-server = %{sameevr} # mysqlhotcopy needs DBI/DBD support -Requires: perl(DBI) perl(DBD::mysql) +Requires: perl(DBI) perl(DBD::MariaDB) -%description server-utils +# Only conflicts, provides would add %%{_isa} provides for noarch, +# which is not wanted +%conflict_with_other_streams server-utils + +%{?with_conflicts_mysql:Conflicts: mysql-server-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql-server} + +%description -n %{pkgname}-server-utils This package contains all non-essential server utilities and scripts for managing databases. It also contains all utilities requiring Perl and it is -the only MariaDB sub-package, except test subpackage, that depends on Perl. +the only MariaDB sub-package with the corresponding client-utils one, except +test subpackage, that depends on Perl. %if %{with devel} -%package devel +%package -n %{pkgname}-devel Summary: Files for development of MariaDB/MySQL applications -%{?with_clibrary:Requires: %{name}-libs%{?_isa} = %{sameevr}} +%{?with_clibrary:Requires: %{pkgname}-libs%{?_isa} = %{sameevr}} Requires: openssl-devel %if %{without clibrary} -Requires: mariadb-connector-c-devel >= 3.1.11 +Requires: mariadb-connector-c-devel >= 3.0 %endif -%if %{with mysql_names} -Provides: mysql-devel = %{sameevr} -Provides: mysql-devel%{?_isa} = %{sameevr} -%endif -Conflicts: mysql-devel -%description devel +#%%virtual_conflicts_and_provides devel + +%{?with_conflicts_mysql:Conflicts: mysql-devel-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql-devel} + +%description -n %{pkgname}-devel MariaDB is a multi-user, multi-threaded SQL database server. MariaDB is a community developed branch of MySQL. %if %{with clibrary} This package contains everything needed for developing MariaDB/MySQL client -and server applications. +and server plugins and applications. %else This package contains everything needed for developing MariaDB/MySQL server -applications. For developing client applications, use mariadb-connector-c -package. +plugins and applications. For developing client applications, use +mariadb-connector-c package. %endif %endif %if %{with embedded} -%package embedded +%package -n %{pkgname}-embedded Summary: MariaDB as an embeddable library -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-embedded = %{sameevr} -Provides: mysql-embedded%{?_isa} = %{sameevr} -%endif +Requires: %{pkgname}-common = %{sameevr} +Requires: %{pkgname}-errmsg = %{sameevr} -%description embedded +#%%virtual_conflicts_and_provides embedded + +%description -n %{pkgname}-embedded MariaDB is a multi-user, multi-threaded SQL database server. This package contains a version of the MariaDB server that can be embedded into a client application instead of running as a separate process. -MariaDB is a community developed branch of MySQL. +MariaDB is a community developed fork from MySQL. -%package embedded-devel +%package -n %{pkgname}-embedded-devel Summary: Development files for MariaDB as an embeddable library -Requires: %{name}-embedded%{?_isa} = %{sameevr} -Requires: %{name}-devel%{?_isa} = %{sameevr} +Requires: %{pkgname}-embedded%{?_isa} = %{sameevr} +Requires: %{pkgname}-devel%{?_isa} = %{sameevr} # embedded-devel should require libaio-devel (rhbz#1290517) Requires: libaio-devel -%if %{with mysql_names} -Provides: mysql-embedded-devel = %{sameevr} -Provides: mysql-embedded-devel%{?_isa} = %{sameevr} -%endif -Conflicts: mysql-embedded-devel -%description embedded-devel +#%%virtual_conflicts_and_provides embedded-devel + +%description -n %{pkgname}-embedded-devel MariaDB is a multi-user, multi-threaded SQL database server. -MariaDB is a community developed branch of MySQL. +MariaDB is a community developed fork from MySQL. This package contains files needed for developing and testing with the embedded version of the MariaDB server. %endif -%if %{with bench} -%package bench -Summary: MariaDB benchmark scripts and data -Requires: %{name}%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-bench = %{sameevr} -Provides: mysql-bench%{?_isa} = %{sameevr} -%endif -Conflicts: mysql-bench - -%description bench -MariaDB is a multi-user, multi-threaded SQL database server. -MariaDB is a community developed branch of MySQL. -This package contains benchmark scripts and data for use when benchmarking -MariaDB. -%endif - - %if %{with test} -%package test +%package -n %{pkgname}-test Summary: The test suite distributed with MariaDB -Requires: %{name}%{?_isa} = %{sameevr} -Requires: %{name}-common%{?_isa} = %{sameevr} -Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: %{pkgname}%{?_isa} = %{sameevr} +Requires: %{pkgname}-common = %{sameevr} +Requires: %{pkgname}-server%{?_isa} = %{sameevr} +Requires: patch Requires: perl(Env) Requires: perl(Exporter) Requires: perl(Fcntl) @@ -675,37 +847,61 @@ Requires: perl(Sys::Hostname) Requires: perl(Test::More) Requires: perl(Time::HiRes) -Conflicts: mysql-test -%if %{with mysql_names} -Provides: mysql-test = %{sameevr} -Provides: mysql-test%{?_isa} = %{sameevr} -%endif +#%%virtual_conflicts_and_provides test -%description test +%{?with_conflicts_mysql:Conflicts: mysql-test-any} +%{?with_conflicts_community_mysql:Conflicts: community-mysql-test} + +%description -n %{pkgname}-test MariaDB is a multi-user, multi-threaded SQL database server. -MariaDB is a community developed branch of MySQL. +MariaDB is a community developed fork from MySQL. This package contains the regression test suite distributed with the MariaDB sources. %endif %prep -%setup -q -n mariadb-%{version} +%setup -q -n %{majorname}-%{version} + +# Remove bundled code that is unused (all cases in which we use the system version of the library instead) +# as required by https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling +rm -r zlib libmariadb/external/zlib +rm -r win libmariadb/win +rm -r extra/wolfssl +rm -r storage/columnstore +rm -r debian + +%if %{with bundled_fmt} +mkdir -p %{_vpath_builddir}/extra/libfmt/ +mv %{SOURCE1} %{_vpath_builddir}/extra/libfmt/ +%endif +%if %{with bundled_pcre} +mkdir -p %{_vpath_builddir}/extra/pcre2/ +mv %{SOURCE4} %{_vpath_builddir}/extra/pcre2/ +%endif # Remove JAR files that upstream puts into tarball find . -name "*.jar" -type f -exec rm --verbose -f {} \; +# Remove testsuite for the mariadb-connector-c +rm -r libmariadb/unittest +%if %{without rocksdb} +rm -r storage/rocksdb/ +%endif -%patch4 -p1 -%patch7 -p1 -%patch9 -p1 -%patch10 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -# workaround for upstream bug #56342 -#rm mysql-test/t/ssl_8k_key-master.opt +%patch -P4 -p1 +%patch -P7 -p1 +%patch -P9 -p1 +%if %{with bundled_fmt} +%patch -P13 -p1 +%endif + +%patch -P14 -p1 +%patch -P16 -p1 +%patch -P17 -p1 +%if %{with bundled_pcre} +%patch -P18 -p1 +%endif # generate a list of tests that fail, but are not disabled by upstream cat %{SOURCE50} | tee -a mysql-test/unstable-tests @@ -726,46 +922,37 @@ cat %{SOURCE53} | tee -a mysql-test/unstable-tests cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE18} %{SOURCE70} %{SOURCE73} scripts +# Create a sysusers.d config file +# We no longer enforce the hardcoded UID/GID 27. +echo "%{sysusersd_contents}" > support-files/%{majorname}.sysusers.conf + %if %{with galera} # prepare selinux policy -mkdir selinux -sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{name}-server-galera.te +sed 's/mariadb-server-galera/%{majorname}-server-galera/' %{SOURCE72} > %{majorname}-server-galera.cil %endif # Get version of PCRE, that upstream use -pcre_maj=`grep '^m4_define(pcre_major' pcre/configure.ac | sed -r 's/^m4_define\(pcre_major, \[([0-9]+)\]\)/\1/'` -pcre_min=`grep '^m4_define(pcre_minor' pcre/configure.ac | sed -r 's/^m4_define\(pcre_minor, \[([0-9]+)\]\)/\1/'` +pcre_version=`grep -e "URL \"" cmake/pcre.cmake | sed -r "s;.*pcre2-([[:digit:]]+\.[[:digit:]]+).*;\1;" ` -%if %{without unbundled_pcre} # Check if the PCRE version in macro 'pcre_bundled_version', used in Provides: bundled(...), is the same version as upstream actually bundles -if [ %{pcre_bundled_version} != "$pcre_maj.$pcre_min" ] -then - echo "\n Error: Bundled PCRE version is not correct. \n\tBundled version number:%{pcre_bundled_version} \n\tUpstream version number: $pcre_maj.$pcre_min\n" +%if %{with bundled_pcre} +if [ %{pcre_bundled_version} != "$pcre_version" ] ; then + echo -e "\n Error: Bundled PCRE version is not correct. \n\tBundled version number: %{pcre_bundled_version} \n\tUpstream version number: $pcre_version\n" exit 1 fi %else # Check if the PCRE version that upstream use, is the same as the one present in system -pcre_system_version=`pkgconf %{_libdir}/pkgconfig/libpcre.pc --modversion 2>/dev/null ` -if [ "$pcre_system_version" != "$pcre_maj.$pcre_min" ] -then - echo "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number:$pcre_system_version \n\tUpstream version number: $pcre_maj.$pcre_min\n" +pcre_system_version=`pkgconf /usr/%{_lib}/pkgconfig/libpcre2-*.pc --modversion 2>/dev/null | head -n 1` + +if [ "$pcre_system_version" != "$pcre_version" ] ; then + echo -e "\n Warning: Error: System version of PCRE differs from the version used by the MariaDB upstream. \n\tSystem version number: $pcre_system_version \n\tUpstream version number: $pcre_version\n" fi -%endif # PCRE - - -%if %{without rocksdb} -rm -r storage/rocksdb/ %endif -# Remove python scripts remains from tokudb upstream (those files are not used anyway) -rm -r storage/tokudb/mysql-test/tokudb/t/*.py - %build -%{set_build_flags} - # fail quickly and obviously if user tries to build as root %if %runselftest if [ x"$(id -u)" = "x0" ]; then @@ -776,19 +963,34 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py fi %endif -CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# Override all optimization flags when making a debug build -%{?with_debug: CFLAGS="$CFLAGS -O0 -g"} -CXXFLAGS="$CFLAGS" -CPPFLAGS="$CFLAGS" -export CFLAGS CXXFLAGS CPPFLAGS +# Adjust the compliation flags: +# First initialize the distribution default values +%{set_build_flags} +# Add custom tweaks +CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" +# Force the 'PIC' mode so that we can build libmysqld.so +CFLAGS="$CFLAGS -fPIC" + +# When making a debug build, remove all optimizations +%if %{with debug} +# -D_FORTIFY_SOURCE requires optimizations enabled. Disable the fortify. +%undefine _fortify_level +CFLAGS=`echo "$CFLAGS" | sed -r 's/-O[0123]//'` +CFLAGS="$CFLAGS -O0 -g" +%endif + +# Apply the updated values +CXXFLAGS="$CFLAGS"; CPPFLAGS="$CFLAGS"; export CFLAGS CXXFLAGS CPPFLAGS + # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX # so we can't use %%{_datadir} and so forth here. -%cmake . \ +%cmake \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DBUILD_CONFIG=mysql_release \ -DFEATURE_SET="community" \ + -DWITH_SBOM=0 \ -DINSTALL_LAYOUT=RPM \ -DDAEMON_NAME="%{daemon_name}" \ -DDAEMON_NO_PREFIX="%{daemon_no_prefix}" \ @@ -799,28 +1001,28 @@ export CFLAGS CXXFLAGS CPPFLAGS -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DINSTALL_SYSCONFDIR="%{_sysconfdir}" \ -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \ - -DINSTALL_DOCDIR="share/doc/%{_pkgdocdirname}" \ - -DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \ + -DINSTALL_DOCDIR="share/doc/%{majorname}" \ + -DINSTALL_DOCREADMEDIR="share/doc/%{majorname}" \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_INFODIR=share/info \ -DINSTALL_LIBDIR="%{_lib}" \ -DINSTALL_MANDIR=share/man \ - -DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \ - -DINSTALL_MYSQLTESTDIR=%{?with_test:share/mysql-test}%{!?with_test:} \ - -DINSTALL_PLUGINDIR="%{_lib}/%{pkg_name}/plugin" \ + -DINSTALL_MYSQLSHAREDIR=share/%{majorname} \ + -DINSTALL_MYSQLTESTDIR=%{?with_test:share/mariadb-test}%{!?with_test:} \ + -DINSTALL_PLUGINDIR="%{_lib}/%{majorname}/plugin" \ -DINSTALL_SBINDIR=libexec \ -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=share \ - -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ - -DINSTALL_PCDIR=%{_lib}/pkgconfig \ + -DINSTALL_SUPPORTFILESDIR=share/%{majorname} \ -DMYSQL_DATADIR="%{dbdatadir}" \ - -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ - -DTMPDIR=/var/tmp \ - -DGRN_DATA_DIR=share/%{name}-server/groonga \ - -DGROONGA_NORMALIZER_MYSQL_PROJECT_NAME=%{name}-server/groonga-normalizer-mysql \ + -DTMPDIR=%{_localstatedir}/tmp \ + -DINSTALL_SYSTEMD_TMPFILESDIR="" \ + -DINSTALL_SYSTEMD_SYSUSERSDIR="" \ + -DGRN_DATA_DIR=share/%{majorname}-server/groonga \ + -DGROONGA_NORMALIZER_MYSQL_PROJECT_NAME=%{majorname}-server/groonga-normalizer-mysql \ -DENABLED_LOCAL_INFILE=ON \ -DENABLE_DTRACE=ON \ - -DSECURITY_HARDENED=ON \ + -DSECURITY_HARDENED=OFF \ + -DWITH_PCRE=%{?with_bundled_pcre:bundled}%{!?with_bundled_pcre:system} \ -DWITH_WSREP=%{?with_galera:ON}%{!?with_galera:OFF} \ -DWITH_INNODB_DISALLOW_WRITES=%{?with_galera:ON}%{!?with_galera:OFF} \ -DWITH_EMBEDDED_SERVER=%{?with_embedded:ON}%{!?with_embedded:OFF} \ @@ -829,41 +1031,44 @@ export CFLAGS CXXFLAGS CPPFLAGS -DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ - -DWITH_JEMALLOC=%{?with_tokudb:yes}%{!?with_tokudb:no} \ - -DLZ4_LIBS=%{_libdir}/liblz4.so \ - -DLZ4_LIBS=%{?with_lz4:%{_libdir}/liblz4.so}%{!?with_lz4:} \ - -DWITH_INNODB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ + -DWITH_LIBFMT=%{?with_bundled_fmt:bundled}%{!?with_bundled_fmt:system} \ + -DPLUGIN_PROVIDER_LZ4=%{?with_lz4:DYNAMIC}%{!?with_lz4:NO} \ -DWITH_ROCKSDB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ + -DPLUGIN_PROVIDER_BZIP2=%{?with_bzip2:DYNAMIC}%{!?with_bzip2:NO} \ + -DWITH_ROCKSDB_BZip2=%{?with_bzip2:ON}%{!?with_bzip2:OFF} \ + -DPLUGIN_PROVIDER_LZMA=%{?with_lzma:DYNAMIC}%{!?with_lzma:NO} \ + \ -DPLUGIN_MROONGA=%{?with_mroonga:DYNAMIC}%{!?with_mroonga:NO} \ -DPLUGIN_OQGRAPH=%{?with_oqgraph:DYNAMIC}%{!?with_oqgraph:NO} \ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=%{?with_cracklib:DYNAMIC}%{!?with_cracklib:NO} \ -DPLUGIN_ROCKSDB=%{?with_rocksdb:DYNAMIC}%{!?with_rocksdb:NO} \ -DPLUGIN_SPHINX=%{?with_sphinx:DYNAMIC}%{!?with_sphinx:NO} \ - -DPLUGIN_TOKUDB=%{?with_tokudb:DYNAMIC}%{!?with_tokudb:NO} \ -DPLUGIN_CONNECT=%{?with_connect:DYNAMIC}%{!?with_connect:NO} \ + -DPLUGIN_S3=%{?with_s3:DYNAMIC}%{!?with_s3:NO} \ + -DPLUGIN_AUTH_GSSAPI=%{?with_gssapi:DYNAMIC}%{!?with_gssapi:NO} \ + -DPLUGIN_AUTH_PAM=%{?with_pam:YES}%{!?with_pam:NO} \ + -DPLUGIN_AUTH_PAM_V1=%{?with_pam:DYNAMIC}%{!?with_pam:NO} \ + -DPLUGIN_COLUMNSTORE=NO \ -DPLUGIN_CLIENT_ED25519=OFF \ - -DWITH_CASSANDRA=%{?with_cassandra:TRUE}%{!?with_cassandra:FALSE} \ -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ - -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ + -DPLUGIN_AWS_KEY_MANAGEMENT=OFF \ -DCONNECT_WITH_MONGO=OFF \ -DCONNECT_WITH_JDBC=OFF \ + -DPLUGIN_HASHICORP_KEY_MANAGEMENT=%{?with_hashicorp:DYNAMIC}%{!?with_hashicorp:NO} \ %{?with_debug: -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON -DWITH_VALGRIND=ON} -# Print all Cmake options values -# cmake -LAH for List Advanced Help -cmake -LA +# The -DSECURITY_HARDENED is used to force a set of compilation flags for hardening +# The issue is that the MariaDB upstream level of hardening is lower than expected by Red Hat +# We disable this option to the default compilation flags (which have higher level of hardening) will be used -%make_build VERBOSE=1 +# Print all cached CMake options values; "-N" means to run in read-only mode; "-LAH" means "List Advanced Help" for each option +cmake -B %{_vpath_builddir} -N -LAH +%cmake_build -# build selinux policy -%if %{with galera} -pushd selinux -make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp -%endif %install -%make_install +%cmake_install # multilib header support #1625157 for header in mysql/server/my_config.h mysql/server/private/config.h; do @@ -877,138 +1082,142 @@ ln -s mysql_config.1.gz %{buildroot}%{_mandir}/man1/mariadb_config.1.gz if [ %multilib_capable ] then mv %{buildroot}%{_bindir}/mysql_config %{buildroot}%{_bindir}/mysql_config-%{__isa_bits} -install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_config +install -p -m 0755 %{_vpath_builddir}/scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_config # Copy manual page for multilib mysql_config; https://jira.mariadb.org/browse/MDEV-11961 ln -s mysql_config.1 %{buildroot}%{_mandir}/man1/mysql_config-%{__isa_bits}.1 fi -%if %{without clibrary} -# Client part should be included in package 'mariadb-connector-c' -rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc -%endif - -# install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, -# but that's pretty wacko --- see also %%{name}-file-contents.patch) -install -p -m 644 Docs/INFO_SRC %{buildroot}%{_libdir}/%{pkg_name}/ -install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/%{pkg_name}/ -rm -r %{buildroot}%{_datadir}/doc/%{_pkgdocdirname}/MariaDB-server-%{version}/ - # Logfile creation mkdir -p %{buildroot}%{logfiledir} chmod 0750 %{buildroot}%{logfiledir} touch %{buildroot}%{logfile} +# PID file directory # current setting in my.cnf is to use /var/run/mariadb for creating pid file, # however since my.cnf is not updated by RPM if changed, we need to create mysqld # as well because users can have odd settings in their /etc/my.cnf mkdir -p %{buildroot}%{pidfiledir} + +# DB datadir install -p -m 0755 -d %{buildroot}%{dbdatadir} %if %{with config} -install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf +install -D -p -m 0644 %{_vpath_builddir}/scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf %else -rm scripts/my.cnf +rm %{_vpath_builddir}/scripts/my.cnf +rm %{buildroot}%{_sysconfdir}/my.cnf %endif # use different config file name for each variant of server (mariadb / mysql) -mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf +mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{majorname}-server.cnf -# remove SysV init script and a symlink to that, we pack our very own -rm %{buildroot}%{_sysconfdir}/init.d/mysql +# Remove upstream SysV init script and a symlink to that, we use systemd rm %{buildroot}%{_libexecdir}/rcmysql +# Remove upstream Systemd service files +rm -r %{buildroot}%{_datadir}/%{majorname}/systemd + # install systemd unit files and scripts for handling server startup -install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service -install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service -# Remove the upstream version -rm %{buildroot}%{_tmpfilesdir}/mariadb.conf -# Install downstream version -install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf -%if 0%{?mysqld_pid_dir:1} -echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf -%endif #pid +install -D -p -m 644 %{_vpath_builddir}/scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service +install -D -p -m 644 %{_vpath_builddir}/scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service # helper scripts for service starting -install -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir -install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket -install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade -install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common +install -p -m 755 %{_vpath_builddir}/scripts/mariadb-prepare-db-dir %{buildroot}%{_libexecdir}/mariadb-prepare-db-dir +install -p -m 755 %{_vpath_builddir}/scripts/mariadb-check-socket %{buildroot}%{_libexecdir}/mariadb-check-socket +install -p -m 755 %{_vpath_builddir}/scripts/mariadb-check-upgrade %{buildroot}%{_libexecdir}/mariadb-check-upgrade +install -p -m 644 %{_vpath_builddir}/scripts/mariadb-scripts-common %{buildroot}%{_libexecdir}/mariadb-scripts-common -# install aditional galera selinux policy -%if %{with galera} -install -p -m 644 -D selinux/%{name}-server-galera.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp +# Install downstream version of tmpfiles +install -D -p -m 0644 %{_vpath_builddir}/scripts/mariadb.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{majorname}.conf + +# Install downstream version of sysusers.d config +install -m0644 -D support-files/%{majorname}.sysusers.conf %{buildroot}%{_sysusersdir}/%{majorname}.conf + +# Install additional cracklib selinux policy +%if %{with cracklib} +mkdir -p %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/ +mv %{buildroot}%{_datadir}/mariadb/policy/selinux/mariadb-plugin-cracklib-password-check.pp %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{majorname}-plugin-cracklib-password-check.pp +rm %{buildroot}%{_datadir}/mariadb/policy/selinux/mariadb-plugin-cracklib-password-check.te %endif %if %{with test} -# mysql-test includes one executable that doesn't belong under /usr/share, so move it and provide a symlink -mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} -ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process +# mariadb-test includes one executable that doesn't belong under /usr/share, so move it and provide a symlink +mv %{buildroot}%{_datadir}/mariadb-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} +ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mariadb-test/lib/My/SafeProcess/my_safe_process # Provide symlink expected by RH QA tests -ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/rh-skipped-tests.list +ln -s unstable-tests %{buildroot}%{_datadir}/mariadb-test/rh-skipped-tests.list %endif - -# Client that uses libmysqld embedded server. -# Pretty much like normal mysql command line client, but it doesn't require a running mariadb server. -%{?with_embedded:rm %{buildroot}%{_bindir}/mysql_embedded} -rm %{buildroot}%{_mandir}/man1/mysql_embedded.1* # Static libraries rm %{buildroot}%{_libdir}/*.a # This script creates the MySQL system tables and starts the server. # Upstream says: # It looks like it's just "mysql_install_db && mysqld_safe" # I've never heard of anyone using it, I'd say, no need to pack it. -rm %{buildroot}%{_datadir}/%{pkg_name}/binary-configure +rm %{buildroot}%{_datadir}/%{majorname}/binary-configure # FS files first-bytes recoginiton # Not updated by upstream since nobody realy use that -rm %{buildroot}%{_datadir}/%{pkg_name}/magic +rm %{buildroot}%{_datadir}/%{majorname}/magic # Upstream ships them because of, https://jira.mariadb.org/browse/MDEV-10797 # In Fedora we use our own systemd unit files and scripts -rm %{buildroot}%{_datadir}/%{pkg_name}/mysql.server -rm %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server +rm %{buildroot}%{_datadir}/%{majorname}/mysql.server +rm %{buildroot}%{_datadir}/%{majorname}/mysqld_multi.server # Binary for monitoring MySQL performance -# Shipped as a standalona package in Fedora +# Shipped as a standalone package in Fedora rm %{buildroot}%{_bindir}/mytop +rm %{buildroot}%{_mandir}/man1/mytop.1* -# put logrotate script where it needs to be -mkdir -p %{buildroot}%{logrotateddir} -mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} -chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} +# Should be shipped with mariadb-connector-c +rm %{buildroot}%{_mandir}/man1/mariadb_config.1* + +# for compatibility with upstream RPMs, create mysqld symlink in sbin +mkdir -p %{buildroot}%{_sbindir} +ln -s %{_libexecdir}/mysqld %{buildroot}%{_sbindir}/mysqld +ln -s %{_libexecdir}/mariadbd %{buildroot}%{_sbindir}/mariadbd # copy additional docs into build tree so %%doc will find them install -p -m 0644 %{SOURCE6} %{basename:%{SOURCE6}} -install -p -m 0644 %{SOURCE7} %{basename:%{SOURCE7}} -install -p -m 0644 %{SOURCE8} %{basename:%{SOURCE8}} install -p -m 0644 %{SOURCE16} %{basename:%{SOURCE16}} -install -p -m 0644 %{SOURCE71} %{basename:%{SOURCE71}} -# install galera config file -sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' support-files/wsrep.cnf -install -p -m 0644 support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +%if %{with galera} +# Add wsrep_sst_rsync_tunnel script +install -p -m 0755 scripts/wsrep_sst_rsync_tunnel %{buildroot}%{_bindir}/wsrep_sst_rsync_tunnel +install -p -m 0644 %{SOURCE8} %{basename:%{SOURCE8}} + # install the clustercheck script mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck -install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck +install -p -m 0755 %{_vpath_builddir}/scripts/clustercheck %{buildroot}%{_bindir}/clustercheck +# clustercheck license +install -p -m 0644 %{SOURCE71} %{basename:%{SOURCE71}} + +# install galera config file +sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' %{_vpath_builddir}/support-files/wsrep.cnf +install -p -m 0644 %{_vpath_builddir}/support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf + +# install additional galera selinux policy +install -p -m 644 -D %{majorname}-server-galera.cil %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{majorname}-server-galera.cil + +# Fix Galera Replication config file +# The replication requires cluster address upon startup (which is end-user specific). +# Disable it entirely, rather than have it failing out-of-the-box. +sed -i 's/^wsrep_on=1/wsrep_on=0/' %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +%endif # remove duplicate logrotate script -rm %{buildroot}%{logrotateddir}/mysql +rm %{buildroot}%{_datadir}/mariadb/mariadb.logrotate # Remove AppArmor files -rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor +rm -r %{buildroot}%{_datadir}/%{majorname}/policy/apparmor -# Buildroot does not have symlink /lib --> /usr/lib +# Buildroot does not have symlink /lib64 --> /usr/lib64 +%if %{with pam} mv %{buildroot}/%{_lib}/security %{buildroot}%{_libdir} - -# script without shebang: https://jira.mariadb.org/browse/MDEV-14266 -chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf - -# Add wsrep_sst_rsync_tunnel script -install -p -m 0755 scripts/wsrep_sst_rsync_tunnel %{buildroot}%{_bindir}/wsrep_sst_rsync_tunnel +%endif # Disable plugins %if %{with gssapi} -# Comment out the line to keep RHEL8 behaviour the same -#sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/auth_gssapi.cnf +sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/auth_gssapi.cnf %endif %if %{with cracklib} sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf @@ -1016,28 +1225,34 @@ sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf. %if %{without embedded} rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-,mysql_}embedded.1* %endif %if %{without clibrary} +# Client part should be included in package 'mariadb-connector-c' +rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc + rm %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf # Client library and links rm %{buildroot}%{_libdir}/libmariadb.so.* unlink %{buildroot}%{_libdir}/libmysqlclient.so unlink %{buildroot}%{_libdir}/libmysqlclient_r.so unlink %{buildroot}%{_libdir}/libmariadb.so +rm %{buildroot}%{_mandir}/man3/* # Client plugins -rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/{dialog.so,mysql_clear_password.so,sha256_password.so} -%if %{with gssapi} -rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/auth_gssapi_client.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/{dialog.so,mysql_clear_password.so,sha256_password.so,parsec.so} +%if %{with gssapi} || %{with hashicorp} +rm %{buildroot}%{_libdir}/%{majorname}/plugin/auth_gssapi_client.so %endif %endif %if %{without clibrary} || %{without devel} rm %{buildroot}%{_bindir}/mysql_config* rm %{buildroot}%{_bindir}/mariadb_config +rm %{buildroot}%{_bindir}/mariadb-config rm %{buildroot}%{_mandir}/man1/mysql_config*.1* -unlink %{buildroot}%{_mandir}/man1/mariadb_config.1* %endif %if %{without clibrary} && %{with devel} @@ -1056,84 +1271,87 @@ rm %{buildroot}%{_libdir}/pkgconfig/mariadb.pc rm %{buildroot}%{_libdir}/libmariadb*.so unlink %{buildroot}%{_libdir}/libmysqlclient.so unlink %{buildroot}%{_libdir}/libmysqlclient_r.so -%endif # clibrary -%endif # devel +%endif +%endif %if %{without client} -rm %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap} -rm %{buildroot}%{_mandir}/man1/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap}.1* +rm %{buildroot}%{_bindir}/msql2mysql +rm %{buildroot}%{_bindir}/my_print_defaults +rm %{buildroot}%{_bindir}/replace +rm %{buildroot}%{_bindir}/{mysql,mariadb} +rm %{buildroot}%{_bindir}/mysql{access,admin,binlog,check,_convert_table_format,dump,dumpslow,_find_rows,hotcopy,import,_plugin,_setpermission,show,slap,_tzinfo_to_sql,_waitpid} +rm %{buildroot}%{_bindir}/mariadb-{access,admin,binlog,check,convert-table-format,dump,dumpslow,find-rows,hotcopy,import,plugin,setpermission,show,slap,tzinfo-to-sql,waitpid} + +rm %{buildroot}%{_mandir}/man1/msql2mysql.1* +rm %{buildroot}%{_mandir}/man1/my_print_defaults.1* +rm %{buildroot}%{_mandir}/man1/replace.1* +rm %{buildroot}%{_mandir}/man1/{mysql,mariadb}.1* +rm %{buildroot}%{_mandir}/man1/mysql{access,admin,binlog,check,_convert_table_format,dump,dumpslow,_find_rows,hotcopy,import,_plugin,_setpermission,show,slap,_tzinfo_to_sql,_waitpid}.1* +rm %{buildroot}%{_mandir}/man1/mariadb-{access,admin,binlog,check,convert-table-format,dump,dumpslow,find-rows,hotcopy,import,plugin,setpermission,show,slap,tzinfo-to-sql,waitpid}.1* + rm %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf %endif -%if %{without tokudb} -%else -%if 0%{?fedora} || 0%{?rhel} > 7 -# Move the upstream file to the correct location -mv %{buildroot}/etc/systemd/system/mariadb.service.d/tokudb.conf %{buildroot}%{_unitdir}/mariadb.service.d/tokudb.conf -%endif -%endif - -%if %{without config} -rm %{buildroot}%{_sysconfdir}/my.cnf -%endif - %if %{without common} -rm -r %{buildroot}%{_datadir}/%{pkg_name}/charsets +rm -r %{buildroot}%{_datadir}/%{majorname}/charsets +rm -r %{buildroot}%{_docdir}/%{majorname} %endif %if %{without errmsg} -rm %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt -rm -r %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ +rm -r %{buildroot}%{_datadir}/%{majorname}/{english,czech,danish,dutch,estonian,\ french,german,greek,hungarian,italian,japanese,korean,norwegian,norwegian-ny,\ -polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian,hindi} -%endif - -%if %{without bench} -rm -r %{buildroot}%{_datadir}/sql-bench +polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian,hindi,\ +bulgarian,chinese,georgian} %endif %if %{without test} %if %{with embedded} -rm %{buildroot}%{_bindir}/{mysqltest_embedded,mysql_client_test_embedded} -rm %{buildroot}%{_mandir}/man1/{mysqltest_embedded,mysql_client_test_embedded}.1* -%endif # embedded rm %{buildroot}%{_bindir}/test-connect-t +rm %{buildroot}%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} +rm %{buildroot}%{_bindir}/{mariadb-client-test-embedded,mariadb-test-embedded} +rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* +# endif embedded +%endif +%if %{with pam} +rm %{buildroot}/suite/plugins/pam/mariadb_mtr +rm %{buildroot}/suite/plugins/pam/pam_mariadb_mtr.so +# endif pam +%endif rm %{buildroot}%{_bindir}/{mysql_client_test,mysqltest} -rm %{buildroot}%{_mandir}/man1/{mysql_client_test,my_safe_process,mysqltest}.1* +rm %{buildroot}%{_bindir}/{mariadb-client-test,mariadb-test} +rm %{buildroot}%{_mandir}/man1/{mysql_client_test,mysqltest,my_safe_process}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-client-test,mariadb-test}.1* rm %{buildroot}%{_mandir}/man1/{mysql-test-run,mysql-stress-test}.pl.1* -%endif # test - -%if %{without galera} -rm %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf -rm %{buildroot}%{_sysconfdir}/sysconfig/clustercheck -rm %{buildroot}%{_bindir}/{clustercheck,galera_new_cluster} -rm %{buildroot}%{_bindir}/galera_recovery -rm %{buildroot}%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf +rm %{buildroot}%{_libdir}/%{majorname}/plugin/adt_null.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/auth_0x0100.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/auth_test_plugin.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/debug_key_management.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/dialog_examples.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/example_key_management.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/func_test.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/ha_example.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/ha_test_sql_discovery.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/libdaemon_example.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/mypluglib.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/qa_auth_client.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/qa_auth_interface.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/qa_auth_server.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/test_sql_service.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/test_versioning.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/type_mysql_timestamp.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/type_test.so +rm %{buildroot}%{_libdir}/%{majorname}/plugin/daemon_example.ini %endif -%if %{without rocksdb} -rm %{buildroot}%{_mandir}/man1/mysql_ldb.1* +%if %{without backup} +rm %{buildroot}%{_mandir}/man1/maria{,db-}backup.1* +rm %{buildroot}%{_mandir}/man1/mbstream.1* %endif %check %if %{with test} %if %runselftest - -# Workaround for rhbz#1618810 -OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file -export OPENSSL_SYSTEM_CIPHERS_OVERRIDE -OPENSSL_CONF='' -export OPENSSL_CONF - -# hack to let 32- and 64-bit tests run concurrently on same build machine -export MTR_PARALLEL=1 -# builds might happen at the same host, avoid collision -export MTR_BUILD_THREAD=%{__isa_bits} - # The cmake build scripts don't provide any simple way to control the # options for mysql-test-run, so ignore the make target and just call it # manually. Nonstandard options chosen are: @@ -1152,1513 +1370,517 @@ export MTR_BUILD_THREAD=%{__isa_bits} ( set -ex + cd %{buildroot}%{_datadir}/mariadb-test - cd mysql-test - perl ./mysql-test-run.pl --parallel=auto --force --retry=1 --ssl \ - --suite-timeout=5000 --testcase-timeout=100 \ - --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=10 --big-test \ - --skip-test=spider \ -%if %{ignore_testsuite_result} - --max-test-fail=9999 || : -%else - --skip-test-list=unstable-tests -%endif + export common_testsuite_arguments=" --port-base=$(( $(date +%s) % 20000 + 10000 )) --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --force-restart --shutdown-timeout=60 --max-test-fail=5 " -# Second run for the SPIDER suites that fail with SCA (ssl self signed certificate) - perl ./mysql-test-run.pl --parallel=auto --force --retry=1 \ - --suite-timeout=60 --testcase-timeout=10 \ - --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=0 --big-test \ - --skip-ssl --suite=spider,spider/bg,spider/bugfix,spider/handler \ -%if %{ignore_testsuite_result} - --max-test-fail=999 || : -%endif + # If full testsuite has already been run on this version and we don't explicitly want the full testsuite to be run + if [[ "%{last_tested_version}" == "%{version}" ]] && [[ %{force_run_testsuite} -eq 0 ]] + then + # in further rebuilds only run the basic "main" suite (~800 tests) + echo -e "\n\nRunning just the base testsuite\n\n" + perl ./mysql-test-run.pl $common_testsuite_arguments --ssl --suite=main --mem --skip-test-list=unstable-tests + fi + + # If either this version wasn't marked as tested yet or I explicitly want to run the testsuite, run everything we have (~4000 test) + if [[ "%{last_tested_version}" != "%{version}" ]] || [[ %{force_run_testsuite} -ne 0 ]] + then + echo -e "\n\nRunning the advanced testsuite\n\n" + perl ./mysql-test-run.pl $common_testsuite_arguments --ssl --big-test --skip-test=spider \ + %if %{ignore_testsuite_result} + --max-test-fail=9999 || : + %else + --skip-test-list=unstable-tests + %endif + + # Spider tests can't be run in the Fedora KOJI at this moment, see #2291227 + %if 0 + # Second run for the SPIDER suites that fail with SCA (ssl self signed certificate) + perl ./mysql-test-run.pl $common_testsuite_arguments --skip-ssl --big-test --suite=spider,spider/bg,spider/bugfix \ + %if %{ignore_testsuite_result} + --max-test-fail=999 || : + %else + --skip-test-list=unstable-tests + %endif + %endif + # blank line + fi + + # There might be a dangling symlink left from the testing, remove it to not be installed + rm -rf ./var + # Remove temporary files created by the testsuite execution + find ./ -type f -name '*~' -exec rm {} + ) -%endif # if dry run -%endif # with test +# NOTE: the Spider SE has 2 more hidden testsuites "oracle" and "oracle2". +# however, all of the tests fail with: "failed: 12521: Can't use wrapper 'oracle' for SQL connection" - - -%pre server -/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : -/usr/sbin/useradd -M -N -g mysql -o -r -d %{mysqluserhome} -s /sbin/nologin \ - -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : - -%if %{with clibrary} -# Can be dropped on F27 EOL -%ldconfig_scriptlets libs +%endif %endif -%if %{with embedded} -# Can be dropped on F27 EOL -%ldconfig_scriptlets embedded -%endif -%if %{with galera} -%post server-galera -# Do what README at support-files/policy/selinux/README and upstream page -# http://galeracluster.com/documentation-webpages/firewallsettings.html recommend: -semanage port -a -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : -semanage port -a -t mysqld_port_t -p tcp 4567 >/dev/null 2>&1 || : -semanage port -a -t mysqld_port_t -p udp 4567 >/dev/null 2>&1 || : -semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp >/dev/null 2>&1 || : -%endif +%pre -n %{pkgname}-server +%sysusers_create_compat %{temp_sysusers_file} -%post server +%post -n %{pkgname}-server %systemd_post %{daemon_name}.service -%preun server +%preun -n %{pkgname}-server %systemd_preun %{daemon_name}.service +%postun -n %{pkgname}-server +%systemd_postun_with_restart %{daemon_name}.service + %if %{with galera} -%postun server-galera +%post -n %{pkgname}-server-galera +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{majorname}-server-galera.cil + +# Allow ports needed for the replication: +# https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Port_Labeling +if [ $1 -eq 1 ]; then + # https://mariadb.com/kb/en/library/configuring-mariadb-galera-cluster/#network-ports + # Galera Replication Port + semanage port -a -t mysqld_port_t -p tcp 4567 >/dev/null 2>&1 || : + semanage port -a -t mysqld_port_t -p udp 4567 >/dev/null 2>&1 || : + # IST Port + semanage port -a -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : + # SST Port + semanage port -a -t mysqld_port_t -p tcp 4444 >/dev/null 2>&1 || : +fi + +%postun -n %{pkgname}-server-galera if [ $1 -eq 0 ]; then - semodule -r %{name}-server-galera 2>/dev/null || : + %selinux_modules_uninstall -s %{selinuxtype} %{majorname}-server-galera + + # Delete port labeling when the package is removed + # https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Port_Labeling + semanage port -d -t mysqld_port_t -p tcp 4567 >/dev/null 2>&1 || : + semanage port -d -t mysqld_port_t -p udp 4567 >/dev/null 2>&1 || : + semanage port -d -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : + semanage port -d -t mysqld_port_t -p tcp 4444 >/dev/null 2>&1 || : fi %endif -%postun server -%systemd_postun_with_restart %{daemon_name}.service +%if %{with cracklib} +%post -n %{pkgname}-cracklib-password-check +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{majorname}-plugin-cracklib-password-check.pp + +%postun -n %{pkgname}-cracklib-password-check +if [ $1 -eq 0 ]; then + %selinux_modules_uninstall -s %{selinuxtype} %{majorname}-plugin-cracklib-password-check +fi +%endif %if %{with client} -%files -%{_bindir}/msql2mysql -%{_bindir}/mysql -%{_bindir}/mysql_find_rows -%{_bindir}/mysql_plugin -%{_bindir}/mysql_waitpid -%{_bindir}/mysqlaccess -%{_bindir}/mysqladmin -%{_bindir}/mysqlbinlog -%{_bindir}/mysqlcheck -%{_bindir}/mysqldump -%{_bindir}/mysqlimport -%{_bindir}/mysqlshow -%{_bindir}/mysqlslap +%files -n %{pkgname} +%{_bindir}/{msql2mysql,replace} +%{_bindir}/{mysql,mariadb} +%{_bindir}/mysql{admin,binlog,check,dump,import,_plugin,show,slap,_tzinfo_to_sql,_waitpid} +%{_bindir}/mariadb-{admin,binlog,check,dump,import,plugin,show,slap,tzinfo-to-sql,waitpid} +%{_bindir}/my_print_defaults + +%{_mandir}/man1/{msql2mysql,replace}.1* +%{_mandir}/man1/{mysql,mariadb}.1* +%{_mandir}/man1/mysql{access,admin,binlog,check,dump,_find_rows,import,_plugin,show,slap,_tzinfo_to_sql,_waitpid}.1* +%{_mandir}/man1/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,tzinfo-to-sql,waitpid}.1* +%{_mandir}/man1/my_print_defaults.1* -%{_mandir}/man1/msql2mysql.1* -%{_mandir}/man1/mysql.1* -%{_mandir}/man1/mysql_find_rows.1* -%{_mandir}/man1/mysql_plugin.1* -%{_mandir}/man1/mysql_waitpid.1* -%{_mandir}/man1/mysqlaccess.1* -%{_mandir}/man1/mysqladmin.1* -%{_mandir}/man1/mysqlbinlog.1* -%{_mandir}/man1/mysqlcheck.1* -%{_mandir}/man1/mysqldump.1* -%{_mandir}/man1/mysqlimport.1* -%{_mandir}/man1/mysqlshow.1* -%{_mandir}/man1/mysqlslap.1* %config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf + +%files -n %{pkgname}-client-utils +%{_bindir}/mysql{access,_convert_table_format,dumpslow,_find_rows,hotcopy,_setpermission} +%{_bindir}/mariadb-{access,convert-table-format,dumpslow,find-rows,hotcopy,setpermission} +%{_mandir}/man1/mysql{access,_convert_table_format,dumpslow,_find_rows,hotcopy,_setpermission}.1* +%{_mandir}/man1/mariadb-{access,convert-table-format,dumpslow,find-rows,hotcopy,setpermission}.1* %endif %if %{with clibrary} -%files libs -%{_libdir}/libmariadb.so.* +%files -n %{pkgname}-libs +%exclude %{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so} +%{_libdir}/libmariadb.so* %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf %endif %if %{with config} -%files config -# Although the default my.cnf contains only server settings, we put it in the +%files -n %{pkgname}-config +# although the default my.cnf contains only server settings, we put it in the # common package because it can be used for client settings too. %dir %{_sysconfdir}/my.cnf.d %config(noreplace) %{_sysconfdir}/my.cnf %endif %if %{with common} -%files common -%doc %{_datadir}/doc/%{_pkgdocdirname} -%dir %{_datadir}/%{pkg_name} -%{_datadir}/%{pkg_name}/charsets +%files -n %{pkgname}-common +%doc %{_docdir}/%{majorname} +%{?with_galera:%exclude %{_docdir}/%{majorname}/MariaDB-server-%{version}/README-wsrep} +%dir %{_datadir}/%{majorname} +%{_datadir}/%{majorname}/charsets %if %{with clibrary} -%{_libdir}/%{pkg_name}/plugin/dialog.so -%{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so -%endif # clibrary -%endif # common +%{_libdir}/%{majorname}/plugin/dialog.so +%{_libdir}/%{majorname}/plugin/mysql_clear_password.so +%endif +%endif %if %{with errmsg} -%files errmsg -%{_datadir}/%{pkg_name}/errmsg-utf8.txt -%{_datadir}/%{pkg_name}/english -%lang(cs) %{_datadir}/%{pkg_name}/czech -%lang(da) %{_datadir}/%{pkg_name}/danish -%lang(nl) %{_datadir}/%{pkg_name}/dutch -%lang(et) %{_datadir}/%{pkg_name}/estonian -%lang(fr) %{_datadir}/%{pkg_name}/french -%lang(de) %{_datadir}/%{pkg_name}/german -%lang(el) %{_datadir}/%{pkg_name}/greek -%lang(hi) %{_datadir}/%{pkg_name}/hindi -%lang(hu) %{_datadir}/%{pkg_name}/hungarian -%lang(it) %{_datadir}/%{pkg_name}/italian -%lang(ja) %{_datadir}/%{pkg_name}/japanese -%lang(ko) %{_datadir}/%{pkg_name}/korean -%lang(no) %{_datadir}/%{pkg_name}/norwegian -%lang(no) %{_datadir}/%{pkg_name}/norwegian-ny -%lang(pl) %{_datadir}/%{pkg_name}/polish -%lang(pt) %{_datadir}/%{pkg_name}/portuguese -%lang(ro) %{_datadir}/%{pkg_name}/romanian -%lang(ru) %{_datadir}/%{pkg_name}/russian -%lang(sr) %{_datadir}/%{pkg_name}/serbian -%lang(sk) %{_datadir}/%{pkg_name}/slovak -%lang(es) %{_datadir}/%{pkg_name}/spanish -%lang(sv) %{_datadir}/%{pkg_name}/swedish -%lang(uk) %{_datadir}/%{pkg_name}/ukrainian +%files -n %{pkgname}-errmsg +%{_datadir}/%{majorname}/english +%lang(cs) %{_datadir}/%{majorname}/czech +%lang(da) %{_datadir}/%{majorname}/danish +%lang(nl) %{_datadir}/%{majorname}/dutch +%lang(et) %{_datadir}/%{majorname}/estonian +%lang(fr) %{_datadir}/%{majorname}/french +%lang(de) %{_datadir}/%{majorname}/german +%lang(el) %{_datadir}/%{majorname}/greek +%lang(hi) %{_datadir}/%{majorname}/hindi +%lang(hu) %{_datadir}/%{majorname}/hungarian +%lang(it) %{_datadir}/%{majorname}/italian +%lang(ja) %{_datadir}/%{majorname}/japanese +%lang(ko) %{_datadir}/%{majorname}/korean +%lang(no) %{_datadir}/%{majorname}/norwegian +%lang(no) %{_datadir}/%{majorname}/norwegian-ny +%lang(pl) %{_datadir}/%{majorname}/polish +%lang(pt) %{_datadir}/%{majorname}/portuguese +%lang(ro) %{_datadir}/%{majorname}/romanian +%lang(ru) %{_datadir}/%{majorname}/russian +%lang(sr) %{_datadir}/%{majorname}/serbian +%lang(sk) %{_datadir}/%{majorname}/slovak +%lang(es) %{_datadir}/%{majorname}/spanish +%lang(sv) %{_datadir}/%{majorname}/swedish +%lang(uk) %{_datadir}/%{majorname}/ukrainian +%lang(bg) %{_datadir}/%{majorname}/bulgarian +%lang(zh) %{_datadir}/%{majorname}/chinese +%lang(ka) %{_datadir}/%{majorname}/georgian +%lang(sw) %{_datadir}/%{majorname}/swahili %endif %if %{with galera} -%files server-galera +%files -n %{pkgname}-server-galera %doc Docs/README-wsrep %license LICENSE.clustercheck %{_bindir}/clustercheck %{_bindir}/galera_new_cluster %{_bindir}/galera_recovery -%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf -%config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf -%attr(0640,root,root) %ghost %config(noreplace) %{_sysconfdir}/sysconfig/clustercheck -%{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp -%endif - -%files server -%doc README.wsrep_sst_rsync_tunnel - -%{_bindir}/aria_chk -%{_bindir}/aria_dump_log -%{_bindir}/aria_ftdump -%{_bindir}/aria_pack -%{_bindir}/aria_read_log -%{_bindir}/mariadb-service-convert -%{_bindir}/myisamchk -%{_bindir}/myisam_ftdump -%{_bindir}/myisamlog -%{_bindir}/myisampack -%{_bindir}/my_print_defaults -%{_bindir}/mysql_install_db -%{_bindir}/mysql_secure_installation -%{_bindir}/mysql_tzinfo_to_sql -%{_bindir}/mysqld_safe -%{_bindir}/mysqld_safe_helper -%{_bindir}/innochecksum -%{_bindir}/replace -%{_bindir}/resolve_stack_dump -%{_bindir}/resolveip -# wsrep_sst_common should be moved to /usr/share/mariadb: https://jira.mariadb.org/browse/MDEV-14296 -%{_bindir}/wsrep_* - -%config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset - -%{_libexecdir}/mysqld - -%{_libdir}/%{pkg_name}/INFO_SRC -%{_libdir}/%{pkg_name}/INFO_BIN -%if %{without common} -%dir %{_datadir}/%{pkg_name} -%endif - -%dir %{_libdir}/%{pkg_name} -%dir %{_libdir}/%{pkg_name}/plugin -%{_libdir}/security/pam_user_map.so -%config(noreplace) %{_sysconfdir}/security/user_map.conf -%{_libdir}/%{pkg_name}/plugin/* -%{?with_oqgraph:%exclude %{_libdir}/%{pkg_name}/plugin/ha_oqgraph.so} -%{?with_connect:%exclude %{_libdir}/%{pkg_name}/plugin/ha_connect.so} -%{?with_cracklib:%exclude %{_libdir}/%{pkg_name}/plugin/cracklib_password_check.so} -%{?with_rocksdb:%exclude %{_libdir}/%{pkg_name}/plugin/ha_rocksdb.so} -%{?with_tokudb:%exclude %{_libdir}/%{pkg_name}/plugin/ha_tokudb.so} -%{?with_gssapi:%exclude %{_libdir}/%{pkg_name}/plugin/auth_gssapi.so} -%{?with_sphinx:%exclude %{_libdir}/%{pkg_name}/plugin/ha_sphinx.so} -%{?with_cassandra:%exclude %{_libdir}/%{pkg_name}/plugin/ha_cassandra.so} -%if %{with clibrary} -%exclude %{_libdir}/%{pkg_name}/plugin/dialog.so -%exclude %{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so -%endif - -%{_mandir}/man1/aria_chk.1* -%{_mandir}/man1/aria_dump_log.1* -%{_mandir}/man1/aria_ftdump.1* -%{_mandir}/man1/aria_pack.1* -%{_mandir}/man1/aria_read_log.1* +%{_libdir}/%{majorname}/plugin/wsrep_info.so %{_mandir}/man1/galera_new_cluster.1* %{_mandir}/man1/galera_recovery.1* +%config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf +%attr(0640,root,root) %ghost %config(noreplace) %{_sysconfdir}/sysconfig/clustercheck +%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{majorname}-server-galera +%{_datadir}/selinux/packages/%{selinuxtype}/%{majorname}-server-galera.cil +%endif + +%files -n %{pkgname}-server + +%{_bindir}/aria_{chk,dump_log,ftdump,pack,read_log} +%{_mandir}/man1/aria_{chk,dump_log,ftdump,pack,read_log}.1* + +%{_bindir}/myisam{chk,_ftdump,log,pack} +%{_mandir}/man1/myisam{chk,_ftdump,log,pack}.1* + +%{_bindir}/mariadb-service-convert %{_mandir}/man1/mariadb-service-convert.1* -%{_mandir}/man1/myisamchk.1* -%{_mandir}/man1/myisamlog.1* -%{_mandir}/man1/myisampack.1* -%{_mandir}/man1/myisam_ftdump.1* -%{_mandir}/man1/my_print_defaults.1* -%{_mandir}/man1/mysql.server.1* -%{_mandir}/man1/mysql_install_db.1* -%{_mandir}/man1/mysql_secure_installation.1* -%{_mandir}/man1/mysql_tzinfo_to_sql.1* -%{_mandir}/man1/mysqld_safe.1* -%{_mandir}/man1/mysqld_safe_helper.1* -%{_mandir}/man1/innochecksum.1* -%{_mandir}/man1/replace.1* -%{_mandir}/man1/resolveip.1* -%{_mandir}/man1/resolve_stack_dump.1* -%{_mandir}/man8/mysqld.8* +%{_bindir}/mariadb-conv +%{_mandir}/man1/mariadb-conv.1* + +%{_bindir}/mysql_{install_db,secure_installation,upgrade} +%{_mandir}/man1/mysql_{install_db,secure_installation,upgrade}.1* +%{_bindir}/mariadb-{install-db,secure-installation,upgrade} +%{_mandir}/man1/mariadb-{install-db,secure-installation,upgrade}.1* +%{_bindir}/{mysqld_,mariadbd-}safe +%{_mandir}/man1/{mysqld_,mariadbd-}safe.1* +%{_bindir}/{mysqld_safe_helper,mariadbd-safe-helper} +%{_mandir}/man1/{mysqld_safe_helper,mariadbd-safe-helper}.1* + +%{_bindir}/{innochecksum,perror,resolve_stack_dump,resolveip} +%{_mandir}/man1/{innochecksum,perror,resolve_stack_dump,resolveip}.1* + +%if %{with galera} +# wsrep_sst_common should be moved to /usr/share/mariadb: https://jira.mariadb.org/browse/MDEV-14296 +%{_bindir}/wsrep_* %{_mandir}/man1/wsrep_*.1* +%doc README.wsrep_sst_rsync_tunnel +%endif -%{_datadir}/%{pkg_name}/fill_help_tables.sql -%{_datadir}/%{pkg_name}/install_spider.sql -%{_datadir}/%{pkg_name}/maria_add_gis_sp.sql -%{_datadir}/%{pkg_name}/maria_add_gis_sp_bootstrap.sql -%{_datadir}/%{pkg_name}/mysql_system_tables.sql -%{_datadir}/%{pkg_name}/mysql_system_tables_data.sql -%{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql -%{_datadir}/%{pkg_name}/mysql_performance_tables.sql -%{_datadir}/%{pkg_name}/mysql_test_db.sql +%config(noreplace) %{_sysconfdir}/my.cnf.d/%{majorname}-server.cnf +%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset +%config(noreplace) %{_sysconfdir}/my.cnf.d/spider.cnf + +%{?with_lz4:%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_lz4.cnf} +%{?with_bzip2:%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_bzip2.cnf} +%{?with_lzma:%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_lzma.cnf} +%{?with_lzo:%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_lzo.cnf} +%{?with_snappy:%config(noreplace) %{_sysconfdir}/my.cnf.d/provider_snappy.cnf} + +%{?with_hashicorp:%config(noreplace) %{_sysconfdir}/my.cnf.d/hashicorp_key_management.cnf} + +%{_sbindir}/mysqld +%{_sbindir}/mariadbd +%{_libexecdir}/{mysqld,mariadbd} + +%{_mandir}/man1/mysql.server.1* +%{_mandir}/man8/{mysqld,mariadbd}.8* + +%if %{without common} +%dir %{_datadir}/%{majorname} +%endif + +%dir %{_libdir}/%{majorname} +%dir %{_libdir}/%{majorname}/plugin + +%{_libdir}/%{majorname}/plugin/auth_ed25519.so +%{_libdir}/%{majorname}/plugin/auth_parsec.so +%{_libdir}/%{majorname}/plugin/auth_mysql_sha2.so +%{_libdir}/%{majorname}/plugin/disks.so +%{_libdir}/%{majorname}/plugin/file_key_management.so +%{_libdir}/%{majorname}/plugin/ha_archive.so +%{_libdir}/%{majorname}/plugin/ha_blackhole.so +%{_libdir}/%{majorname}/plugin/ha_federatedx.so +%{_libdir}/%{majorname}/plugin/ha_spider.so +%{_libdir}/%{majorname}/plugin/handlersocket.so +%{?with_hashicorp:%{_libdir}/%{majorname}/plugin/hashicorp_key_management.so} +%{_libdir}/%{majorname}/plugin/locales.so +%{_libdir}/%{majorname}/plugin/metadata_lock_info.so +%{_libdir}/%{majorname}/plugin/password_reuse_check.so +%{?with_bzip2:%{_libdir}/%{majorname}/plugin/provider_bzip2.so} +%{?with_lz4:%{_libdir}/%{majorname}/plugin/provider_lz4.so} +%{?with_lzma:%{_libdir}/%{majorname}/plugin/provider_lzma.so} +%{?with_lzo:%{_libdir}/%{majorname}/plugin/provider_lzo.so} +%{?with_snappy:%{_libdir}/%{majorname}/plugin/provider_snappy.so} +%{_libdir}/%{majorname}/plugin/query_cache_info.so +%{_libdir}/%{majorname}/plugin/query_response_time.so +%{_libdir}/%{majorname}/plugin/server_audit.so +%{_libdir}/%{majorname}/plugin/simple_password_check.so +%{_libdir}/%{majorname}/plugin/sql_errlog.so +%{_libdir}/%{majorname}/plugin/type_mysql_json.so + +%{_datadir}/%{majorname}/mini-benchmark +%{_datadir}/%{majorname}/fill_help_tables.sql +%{_datadir}/%{majorname}/maria_add_gis_{sp,sp_bootstrap}.sql +%{_datadir}/%{majorname}/mariadb_{system_tables,system_tables_data,sys_schema,test_data_timezone,performance_tables,test_db}.sql %if %{with mroonga} -%{_datadir}/%{pkg_name}/mroonga/install.sql -%{_datadir}/%{pkg_name}/mroonga/uninstall.sql -%license %{_datadir}/%{pkg_name}/mroonga/COPYING -%license %{_datadir}/%{pkg_name}/mroonga/AUTHORS -%license %{_datadir}/%{name}-server/groonga-normalizer-mysql/lgpl-2.0.txt -%license %{_datadir}/%{name}-server/groonga/COPYING -%doc %{_datadir}/%{name}-server/groonga-normalizer-mysql/README.md -%doc %{_datadir}/%{name}-server/groonga/README.md +%dir %{_datadir}/%{majorname}/mroonga +%dir %{_datadir}/%{majorname}-server +%dir %{_datadir}/%{majorname}-server/groonga +%dir %{_datadir}/%{majorname}-server/groonga-normalizer-mysql +%{_datadir}/%{majorname}/mroonga/install.sql +%{_datadir}/%{majorname}/mroonga/uninstall.sql +%{_libdir}/%{majorname}/plugin/ha_mroonga.so +%license %{_datadir}/%{majorname}/mroonga/COPYING +%license %{_datadir}/%{majorname}/mroonga/AUTHORS +%license %{_datadir}/%{majorname}-server/groonga-normalizer-mysql/lgpl-2.0.txt +%license %{_datadir}/%{majorname}-server/groonga/COPYING +%doc %{_datadir}/%{majorname}-server/groonga-normalizer-mysql/README.md +%doc %{_datadir}/%{majorname}-server/groonga/README.md %endif -%{_datadir}/%{pkg_name}/wsrep.cnf -%{_datadir}/%{pkg_name}/wsrep_notify -%dir %{_datadir}/%{pkg_name}/policy -%dir %{_datadir}/%{pkg_name}/policy/selinux -%{_datadir}/%{pkg_name}/policy/selinux/README -%{_datadir}/%{pkg_name}/policy/selinux/mariadb-server.* -%{_datadir}/%{pkg_name}/policy/selinux/mariadb.* -%{_datadir}/%{pkg_name}/systemd/mariadb.service -# mariadb@ is installed only when we have cmake newer than 3.3 -%if 0%{?fedora} || 0%{?rhel} > 7 -%{_datadir}/%{pkg_name}/systemd/mariadb@.service +%if %{with galera} +%{_datadir}/%{majorname}/wsrep.cnf +%{_datadir}/%{majorname}/wsrep_notify %endif +%dir %{_datadir}/%{majorname}/policy +%dir %{_datadir}/%{majorname}/policy/selinux +%{_datadir}/%{majorname}/policy/selinux/README +%{_datadir}/%{majorname}/policy/selinux/mariadb-server.* +%{_datadir}/%{majorname}/policy/selinux/mariadb.* -%{_unitdir}/%{daemon_name}* -%{?with_tokudb:%exclude %{_unitdir}/mariadb.service.d/tokudb.conf} +# More on socket activation or extra port service at +# https://mariadb.com/kb/en/systemd/ +%{_unitdir}/%{daemon_name}.service +%{_unitdir}/mysql{,d}.service +%{_unitdir}/%{daemon_name}@.service +%{_unitdir}/%{daemon_name}.socket +%{_unitdir}/%{daemon_name}@.socket +%{_unitdir}/%{daemon_name}-extra.socket +%{_unitdir}/%{daemon_name}-extra@.socket +%{_unitdir}/%{daemon_name}@bootstrap.service.d -%{_libexecdir}/mysql-prepare-db-dir -%{_libexecdir}/mysql-check-socket -%{_libexecdir}/mysql-check-upgrade -%{_libexecdir}/mysql-scripts-common +%{_libexecdir}/mariadb-prepare-db-dir +%{_libexecdir}/mariadb-check-socket +%{_libexecdir}/mariadb-check-upgrade +%{_libexecdir}/mariadb-scripts-common +# Remember to also update the mariadb.tmpfiles.d.in file when updating these permissions %attr(0755,mysql,mysql) %dir %{pidfiledir} %attr(0755,mysql,mysql) %dir %{dbdatadir} %attr(0750,mysql,mysql) %dir %{logfiledir} # This does what it should. # RPMLint error "conffile-without-noreplace-flag /var/log/mariadb/mariadb.log" is false positive. -%attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} +%attr(0660,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} %config(noreplace) %{logrotateddir}/%{daemon_name} -%{_tmpfilesdir}/%{name}.conf -%{_sysusersdir}/%{name}.conf +%{_tmpfilesdir}/%{majorname}.conf +%{_sysusersdir}/%{majorname}.conf %if %{with cracklib} -%files cracklib-password-check +%files -n %{pkgname}-cracklib-password-check %config(noreplace) %{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf -%{_libdir}/%{pkg_name}/plugin/cracklib_password_check.so +%{_libdir}/%{majorname}/plugin/cracklib_password_check.so +%{_datadir}/selinux/packages/%{selinuxtype}/%{majorname}-plugin-cracklib-password-check.pp +%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{majorname}-plugin-cracklib-password-check %endif %if %{with backup} -%files backup -%{_bindir}/mariabackup +%files -n %{pkgname}-backup +%{_bindir}/maria{,db-}backup %{_bindir}/mbstream -%{_mandir}/man1/mariabackup.1* +%{_mandir}/man1/maria{,db-}backup.1* %{_mandir}/man1/mbstream.1* %endif %if %{with rocksdb} -%files rocksdb-engine +%files -n %{pkgname}-rocksdb-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/rocksdb.cnf %{_bindir}/myrocks_hotbackup -%{_bindir}/mysql_ldb +%{_bindir}/{mysql_,mariadb-}ldb %{_bindir}/sst_dump -%{_libdir}/%{pkg_name}/plugin/ha_rocksdb.so -%{_mandir}/man1/mysql_ldb.1* -%endif - -%if %{with tokudb} -%files tokudb-engine -%{_bindir}/tokuftdump -%{_bindir}/tokuft_logprint -%{_mandir}/man1/tokuftdump.1* -%{_mandir}/man1/tokuft_logprint.1* -%config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf -%{_libdir}/%{pkg_name}/plugin/ha_tokudb.so -%{_unitdir}/mariadb.service.d/tokudb.conf +%{_libdir}/%{majorname}/plugin/ha_rocksdb.so +%{_mandir}/man1/{mysql_,mariadb-}ldb.1* +%{_mandir}/man1/myrocks_hotbackup.1* %endif %if %{with gssapi} -%files gssapi-server -%{_libdir}/%{pkg_name}/plugin/auth_gssapi.so +%files -n %{pkgname}-gssapi-server +%{_libdir}/%{majorname}/plugin/auth_gssapi.so %config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf %endif +%if %{with pam} +%files -n %{pkgname}-pam +%{_libdir}/%{majorname}/plugin/{auth_pam_v1.so,auth_pam.so} +%attr(0755,root,root) %dir %{_libdir}/%{majorname}/plugin/auth_pam_tool_dir +# SUID-to-root binary. Access MUST be restricted (https://jira.mariadb.org/browse/MDEV-25126) +%attr(4750,root,mysql) %{_libdir}/%{majorname}/plugin/auth_pam_tool_dir/auth_pam_tool +%{_libdir}/security/pam_user_map.so +%config(noreplace) %{_sysconfdir}/security/user_map.conf +%endif + %if %{with sphinx} -%files sphinx-engine -%{_libdir}/%{pkg_name}/plugin/ha_sphinx.so +%files -n %{pkgname}-sphinx-engine +%{_libdir}/%{majorname}/plugin/ha_sphinx.so %endif %if %{with oqgraph} -%files oqgraph-engine +%files -n %{pkgname}-oqgraph-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/oqgraph.cnf -%{_libdir}/%{pkg_name}/plugin/ha_oqgraph.so +%{_libdir}/%{majorname}/plugin/ha_oqgraph.so %endif %if %{with connect} -%files connect-engine +%files -n %{pkgname}-connect-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/connect.cnf -%{_libdir}/%{pkg_name}/plugin/ha_connect.so +%{_libdir}/%{majorname}/plugin/ha_connect.so %endif -%if %{with cassandra} -%files cassandra-engine -%config(noreplace) %{_sysconfdir}/my.cnf.d/cassandra.cnf -%{_libdir}/%{pkg_name}/plugin/ha_cassandra.so +%if %{with s3} +%files -n %{pkgname}-s3-engine +%{_bindir}/aria_s3_copy +%{_mandir}/man1/aria_s3_copy.1* +%config(noreplace) %{_sysconfdir}/my.cnf.d/s3.cnf +%{_libdir}/%{majorname}/plugin/ha_s3.so %endif -%files server-utils +%files -n %{pkgname}-server-utils # Perl utilities -%{_bindir}/mysql_convert_table_format -%{_bindir}/mysql_fix_extensions -%{_bindir}/mysql_setpermission -%{_bindir}/mysqldumpslow -%{_bindir}/mysqld_multi -%{_bindir}/mysqlhotcopy -%{_mandir}/man1/mysql_convert_table_format.1* -%{_mandir}/man1/mysql_fix_extensions.1* -%{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqld_multi.1* -%{_mandir}/man1/mysqlhotcopy.1* -%{_mandir}/man1/mysql_setpermission.1* -# Utilities that can be used remotely -%{_bindir}/mysql_upgrade -%{_bindir}/perror -%{_mandir}/man1/mysql_upgrade.1* -%{_mandir}/man1/perror.1* +%{_bindir}/mysql{_fix_extensions} +%{_bindir}/mariadb-{fix-extensions} +%{_bindir}/{mysqld_,mariadbd-}multi + +%{_mandir}/man1/mysql{_fix_extensions}.1* +%{_mandir}/man1/mariadb-{fix-extensions}.1* +%{_mandir}/man1/{mysqld_,mariadbd-}multi.1* %if %{with devel} -%files devel +%files -n %{pkgname}-devel %{_includedir}/* %{_datadir}/aclocal/mysql.m4 -%{_libdir}/pkgconfig/mariadb.pc +%{_libdir}/pkgconfig/*mariadb.pc %if %{with clibrary} +%{_mandir}/man3/* %{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so} %{_bindir}/mysql_config* %{_bindir}/mariadb_config* +%{_bindir}/mariadb-config %{_libdir}/libmariadb.so %{_libdir}/libmysqlclient.so %{_libdir}/libmysqlclient_r.so %{_mandir}/man1/mysql_config* -%{_mandir}/man1/mariadb_config* %endif %endif %if %{with embedded} -%files embedded +%files -n %{pkgname}-embedded %{_libdir}/libmariadbd.so.* +%{_bindir}/{mariadb-,mysql_}embedded +%{_mandir}/man1/{mysql_,mariadb-}embedded.1* -%files embedded-devel +%files -n %{pkgname}-embedded-devel %{_libdir}/libmysqld.so %{_libdir}/libmariadbd.so %endif -%if %{with bench} -%files bench -%{_datadir}/sql-bench -%doc %{_datadir}/sql-bench/README -%endif - %if %{with test} -%files test +%files -n %{pkgname}-test %if %{with embedded} %{_bindir}/test-connect-t -%{_bindir}/mysql_client_test_embedded -%{_bindir}/mysqltest_embedded -%{_mandir}/man1/mysql_client_test_embedded.1* -%{_mandir}/man1/mysqltest_embedded.1* +%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} +%{_bindir}/{mariadb-client-test-embedded,mariadb-test-embedded} +%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* %endif -%{_bindir}/mysql_client_test +%{_bindir}/{mysql_client_test,mysqltest,mariadb-client-test,mariadb-test} %{_bindir}/my_safe_process -%{_bindir}/mysqltest -%attr(-,mysql,mysql) %{_datadir}/mysql-test -%{_mandir}/man1/mysql_client_test.1* +%dir %{_libdir}/%{majorname}/plugin +# shared objects required for testing +%{_libdir}/%{majorname}/plugin/adt_null.so +%{_libdir}/%{majorname}/plugin/auth_0x0100.so +%{_libdir}/%{majorname}/plugin/auth_test_plugin.so +%{_libdir}/%{majorname}/plugin/debug_key_management.so +%{_libdir}/%{majorname}/plugin/dialog_examples.so +%{_libdir}/%{majorname}/plugin/example_key_management.so +%{_libdir}/%{majorname}/plugin/func_test.so +%{_libdir}/%{majorname}/plugin/ha_example.so +%{_libdir}/%{majorname}/plugin/ha_test_sql_discovery.so +%{_libdir}/%{majorname}/plugin/libdaemon_example.so +%{_libdir}/%{majorname}/plugin/mypluglib.so +%{_libdir}/%{majorname}/plugin/qa_auth_client.so +%{_libdir}/%{majorname}/plugin/qa_auth_interface.so +%{_libdir}/%{majorname}/plugin/qa_auth_server.so +%{_libdir}/%{majorname}/plugin/test_sql_service.so +%{_libdir}/%{majorname}/plugin/test_versioning.so +%{_libdir}/%{majorname}/plugin/type_mysql_timestamp.so +%{_libdir}/%{majorname}/plugin/type_test.so +%{_libdir}/%{majorname}/plugin/daemon_example.ini +%attr(-,mysql,mysql) %{_datadir}/mariadb-test +%{_mandir}/man1/{mysql_client_test,mysqltest,mariadb-client-test,mariadb-test}.1* %{_mandir}/man1/my_safe_process.1* -%{_mandir}/man1/mysqltest.1* %{_mandir}/man1/mysql-stress-test.pl.1* %{_mandir}/man1/mysql-test-run.pl.1* %endif %changelog -* Mon Dec 1 2025 Pavol Sloboda - 3:10.3.39-2 -- Release bump for rebuild +* Wed Feb 18 2026 Pavol Sloboda - 3:11.8.6-2 +- Added a fix for SIGSEGV when using skip-grant-tables +- Resolves: RHBZ#2438390 -* Thu Jun 22 2023 Anton Bobrov - 3:10.3.39-1 -- Rebase to 10.3.39 -- CVEs fixed: - CVE-2022-47015, CVE-2018-25032, CVE-2022-32091, CVE-2022-32084 +* Fri Feb 06 2026 Michal Schorm - 3:11.8.6-1 +- Rebase to 11.8.6 -* Thu Jun 30 2022 Zuzana Miklankova - 3:10.3.35-1 -- Rebase to 10.3.35 +* Mon Dec 1 2025 Pavol Sloboda - 3:11.8.5-1 +- Rebase to 11.8.5 -* Thu Jun 30 2022 Zuzana Miklankova - 3:10.3.34-1 -- Rebase to 10.3.34 +* Thu Nov 27 2025 Pavol Sloboda - 3:11.8.3-7 +- Bump release for rebuild -* Mon Jan 17 2022 Zuzana Miklankova - 3:10.3.32-2 -- Add delaycompress option to the logrotate script -- Resolves: rhbz:#2015580 +* Wed Nov 19 2025 Pavol Sloboda - 3:11.8.3-6 +- Bump release for rebuild -* Wed Jan 12 2022 Zuzana Miklankova - 3:10.3.32-1 -- Rebase to 10.3.32 +* Wed Oct 29 2025 Lukas Javorsky - 3:11.8.3-5 +- Revert to soft static allocation of MariaDB and MySQL sysusers.d files -* Tue Jan 11 2022 Zuzana Miklankova - 3:10.3.31-1 -- Rebase to 10.3.31 - -* Fri Sep 24 2021 Lukas Javorsky - 3:10.3.30-1 -- Rebase to 10.3.30 - -* Mon Aug 09 2021 Lukas Javorsky - 3:10.3.29-2 -- Set user_map.conf file to be noreplace config file -- Resolves: rhbz#1989534 - -* Tue May 05 2021 Michal Schorm - 3:10.3.29-1 -- Rebase to 10.3.29 - -* Wed Mar 24 2021 Michal Schorm - 3:10.3.28-1 -- Rebase to 10.3.28 - -* Thu Dec 03 2020 Michal Schorm - 3:10.3.27-3 -- Remove mariadb_rpl.h from includedir - This file is shipped in mariadb-connector-c package -- Require matching version of mariadb-connector-c package - -* Wed Nov 25 2020 Michal Schorm - 3:10.3.27-2 -- Disable building of the ed25519 client plugin. - From now on it will be shipped by 'mariadb-connector-c' package - -* Thu Nov 12 2020 Michal Schorm - 3:10.3.27-1 -- Rebase to 10.3.27 -- mariadb-debug_build.patch is no more needed, upstream did the changes: - https://github.com/MariaDB/server/commit/31eaa2029f3c2a4f8e5609ce8b87682286238d9a#diff-32766783af7cac683980224d63c59929 - https://github.com/MariaDB/server/commit/23c6fb3e6231b8939331e2d9f157092f24ed8f4f#diff-78f3162f137407db5240950beb2bcd7c - -* Fri May 15 2020 Michal Schorm - 3:10.3.23-1 -- Rebase to 10.3.23 -- Make conflicts between corresponding mariadb and mysql packages explicit -- Get rid of the Conflicts macro, it was intended to mark conflicts with - *upstream* packages - Resolves: #1853159 - -* Mon Mar 30 2020 Lukas Javorsky - 3:10.3.22-1 -- Rebase to 10.3.22 - -* Fri Jan 10 2020 Lukas Javorsky - 3:10.3.21-1 -- Rebase to 10.3.21 - -* Thu Dec 05 2019 Lukas Javorsky - 3:10.3.20-2 -- Change path of groonga's packaged files -- Fix bz#1763287 - -* Thu Dec 05 2019 Lukas Javorsky - 3:10.3.20-1 -- Rebase to 10.3.20 -- NOTE: 10.3.19 was deleted by upstream - -* Tue Dec 03 2019 Lukas Javorsky - 3:10.3.18-1 -- Rebase to 10.3.18 - -* Tue Dec 03 2019 Lukas Javorsky - 3:10.3.17-2 -- Fix the debug build - -* Thu Aug 01 2019 Michal Schorm - 3:10.3.17-1 -- Rebase to 10.3.17 - Resolves: #1711265 - Resolves: #1701687 -- Add patch for server pkgconfig file location -- Use logrotatedir macro on one more spot -- Fix building of TokuDB with Jemalloc 5 -- Fix building with / without lz4 -- Fix "ggsapi" -> "gssapi" typo but keep the broken behaviour -- Control building of the CACHING_SHA2_PASSWORD plugin -- Fix the license tag - Resolves: #1702707 - -* Mon Dec 10 2018 Michal Schorm - 3:10.3.11-1 -- Rebase to 10.3.11 -- Remove README.mysql-cnf as we don't ship example configuration files anymore - Resolves: #1653318 -- CVEs fixed: - CVE-2018-3282, CVE-2016-9843, CVE-2018-3174, CVE-2018-3143, CVE-2018-3156 - CVE-2018-3251, CVE-2018-3185, CVE-2018-3277, CVE-2018-3162, CVE-2018-3173 - CVE-2018-3200, CVE-2018-3284 - -* Fri Oct 12 2018 Michal Schorm - 3:10.3.10-3 -- Fix "-fstack-protector-strong" static analysis errors - Resolves: #1624139 -- Add wsrep_sst_rsync_tunnel script, add README - Resolves: #1650463 -- Fix few covscan issues - Resolves: #1649707 -- Fix galera_new_cluster script - Resolves: #1641663 - -* Fri Oct 12 2018 Michal Schorm - 3:10.3.10-2 -- Fix RPMDiff errors - license and path macros - Resolves: #1638720 - -* Fri Oct 05 2018 Michal Schorm - 3:10.3.10-1 -- Rebase to 10.3.10 - Resolves: #1637034 - -* Wed Aug 22 2018 Michal Schorm - 3:10.3.9-1 -- Rebase to 10.3.9 -- Add workaround for short SSL certificates -- Fix parallel installability for x86_64 and i686 devel packages -- CVEs fixed: #1603531 - CVE-2018-3058 CVE-2018-3063 CVE-2018-3064 CVE-2018-3066 - -* Mon Aug 13 2018 Michal Schorm - 3:10.3.8-6 -- Use openssl-devel instead of pkgconfig(openssl) -- Enable conflicts against mysql (instead of community-mysql) - Related: #1581034 - -* Sun Aug 12 2018 Honza Horak - 3:10.3.8-5 -- Define explicit conflicts with mysql - Resolves: #1581034 - -* Wed Jul 25 2018 Honza Horak - 3:10.3.8-4 -- Do not build config on systems where mariadb-connector-c-config exists instead - -* Tue Jul 17 2018 Honza Horak - 3:10.3.8-3 -- Move config files mysql-clients.cnf and enable_encryption.preset to correct - sub-packages, similar to what upstream does - -* Tue Jul 03 2018 Michal Schorm - 3:10.3.8-1 -- Rebase to 10.3.8 -- Build TokuDB with jemalloc - -* Wed Jun 27 2018 Michal Schorm - 3:10.3.7-2 -- Rebase to 10.3.7 -- Remove the galera obsoletes - -* Tue Jun 05 2018 Honza Horak - 3:10.2.15-2 -- Use mysqladmin for checking the socket -- Jemalloc dependency moved to the TokuDB subpackage. - CMake jemalloc option removed, not used anymore. - The server doesn't need jemalloc since 10.2: https://jira.mariadb.org/browse/MDEV-11059 -- Build MariaDB with TokuDB without Jemalloc. - -* Wed May 23 2018 Michal Schorm - 3:10.2.15-1 -- Rebase to 10.2.15 -- CVEs fixed: #1568962 - CVE-2018-2755 CVE-2018-2761 CVE-2018-2766 CVE-2018-2771 CVE-2018-2781 - CVE-2018-2782 CVE-2018-2784 CVE-2018-2787 CVE-2018-2813 CVE-2018-2817 - CVE-2018-2819 CVE-2018-2786 CVE-2018-2759 CVE-2018-2777 CVE-2018-2810 - -* Thu Mar 29 2018 Michal Schorm - 3:10.2.14-1 -- Rebase to 10.2.14 -- Update testsuite run for SSL self signed certificates - -* Tue Mar 6 2018 Michal Schorm - 3:10.2.13-2 -- Further fix of ldconfig scriptlets for F27 -- Fix hardcoded paths, move unversioned libraries and symlinks to the devel subpackage - -* Thu Mar 1 2018 Michal Schorm - 3:10.2.13-1 -- Rebase to 10.2.13 - -* Mon Feb 26 2018 Michal Schorm - 3:10.2.12-8 -- SPECfile refresh, RHEL6, SySV init and old fedora stuff removed - -* Sun Feb 25 2018 Michal Schorm - 3:10.2.12-7 -- Rebuilt for ldconfig_post and ldconfig_postun bug - Related: #1548331 - -* Thu Feb 08 2018 Fedora Release Engineering - 3:10.2.12-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Jan 26 2018 Michal Schorm - 3:10.2.12-5 -- Use '-ldl' compiler flag when associated library used - Resolves: #1538990 - -* Thu Jan 25 2018 Michal Schorm - 3:10.2.12-4 -- Fix the upgrade path. Build TokuDB subpackage again, but build a unsupported - configuration by upstream (without Jemalloc). - Jemmalloc has been updated to version 5, which isn't backwards compatible. -- Use downstream tmpfiles instead of the upstream one - Related: #1538066 - -* Sat Jan 20 2018 Björn Esser - 3:10.2.12-3 -- Rebuilt for switch to libxcrypt - -* Thu Jan 11 2018 Honza Horak - 3:10.2.12-1 -- Do not build connect plugin with mongo and jdbc connectors -- Support MYSQLD_OPTS and _WSREP_NEW_CLUSTER env vars in init script, - same as it is done in case of systemd unit file - Related: #1455850 -- Print the same messages as before when starting the service in SysV init, - to not scare users - Related: #1463411 - -* Wed Jan 10 2018 Michal Schorm - 3:10.2.12-1 -- Rebase to 10.2.12 -- Temporary fix for https://jira.mariadb.org/browse/MDEV-14537 removed -- TokuDB disabled - -* Mon Dec 11 2017 Michal Schorm - 3:10.2.11-2 -- Temporary fix for #1523875 removed, bug in Annobin fixed - Resolves: #1523875 - -* Sat Dec 09 2017 Michal Schorm - 3:10.2.11-1 -- Rebase to 10.2.11 -- Temporary fix for https://jira.mariadb.org/browse/MDEV-14537 introduced -- Temporary fix for #1523875 intoruced - Related: #1523875 - -* Wed Dec 06 2017 Michal Schorm - 3:10.2.10-2 -- Fix PID file location - Related: #1483331, #1515779 -- Remove 'Group' tags as they should not be used any more - Related: https://fedoraproject.org/wiki/RPMGroups - -* Mon Nov 20 2017 Michal Schorm - 3:10.2.10-1 -- Rebase to 10.2.10 version -- Patch 2: mariadb-install-test.patch has been incorporated by upstream -- Patch 8: mariadb-install-db-sharedir.patch; upstream started to use macros -- Update PCRE check -- Start using location libdir/mariadb for plugins -- Move libraries to libdir -- Divided to more sub-packages to match upstream's RPM list - Resolves: #1490401; #1400463 -- Update of Cmake arguments to supported format - Related: https://lists.launchpad.net/maria-discuss/msg04852.html -- Remove false Provides - -* Thu Oct 05 2017 Michal Schorm - 3:10.2.9-3 -- Fix client library obsolete - Related: #1498956 -- Enable testsuite again -- RPMLint error fix: - Remove unused python scripts which remained from TokuDB upstream -- RPMLint error fix: description line too long - -* Wed Oct 04 2017 Michal Schorm - 3:10.2.9-2 -- Fix of "with" and "without" macros, so they works -- Use 'iproute' dependency instead of 'net-tools' - Related: #1496131 -- Set server package to own /usr/lib64/mysql directory -- Use correct obsolete, so upgrade from maridb 10.1 to 10.2 is possible - with dnf "--allowerasing" option - Related: #1497234 -- Fix building with client library - -* Thu Sep 28 2017 Michal Schorm - 3:10.2.9-1 -- Rebase to 10.2.9 -- Testsuite temorarly disabled in order to fast deploy critical fix - Related: #1497234 - -* Wed Sep 20 2017 Michal Schorm - 3:10.2.8-5 -- Fix building without client library part -- Start building mariadb without client library part, - use mariadb-connector-c package >= 3.0 instead -- Use obosletes of "-libs" in "-common", if built without client library part - -* Mon Aug 28 2017 Honza Horak - 3:10.2.8-2 -- Fix paths in galera_recovery and galera_new_cluster - Resolves: #1403416 -- Support --defaults-group-suffix properly in systemd unit file - Resolves: #1485777 -- Allow 4567 port for tcp as well -- Install mysql-wait-ready on RHEL-6 for the SysV init -- Run mysql-prepare-db-dir as non-root -- Sync mysql.init with community-mysql - -* Sun Aug 20 2017 Honza Horak - 3:10.2.8-1 -- Rebase to 10.2.8 - -* Thu Aug 03 2017 Fedora Release Engineering - 3:10.2.7-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 3:10.2.7-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue Jul 25 2017 Adam Williamson - 3:10.2.7-6 -- Revert previous change, go back to libmariadb headers (RHBZ #1474764) - -* Fri Jul 21 2017 Adam Williamson - 3:10.2.7-5 -- Install correct headers (server, not client) - MDEV-13370 - -* Wed Jul 19 2017 Jonathan Wakely - 3:10.2.7-4 -- Rebuilt for s390x binutils bug - -* Tue Jul 18 2017 Jonathan Wakely - 3:10.2.7-3 -- Rebuilt for Boost 1.64 - -* Thu Jul 13 2017 Michal Schorm - 3:10.2.7-2 -- Remove mysql-wait-* scripts. They aren't needed when using systemd "Type=notify" - -* Thu Jul 13 2017 Michal Schorm - 3:10.2.7-1 -- Rebase to 10.2.7 -- Get back mysql_config, its "--libmysqld-libs" is still needed - -* Wed Jul 12 2017 Adam Williamson - 3:10.2.6-4 -- Add manual Provides: for the libmysqlcient compat symlink - -* Wed Jul 12 2017 Adam Williamson - 3:10.2.6-3 -- Move libmysqlclient.so.18 compat link to -libs subpackage - -* Tue Jul 11 2017 Michal Schorm - 3:10.2.6-2 -- Disable Dtrace -- Disable Sphinx, circural dependency - -* Tue Jul 11 2017 Michal Schorm - 3:10.2.6-1 -- Rebase to 10.2.6 -- SSL patch removed -- 'libmariadb.so.3' replaced 'limysqlclient.so.18.0.0', symlinks provided -- "make test" removed, it needs running server and same test are included in the testsuite - -* Mon Jul 10 2017 Michal Schorm - 3:10.1.25-1 -- Rebase to 10.1.25 -- Disable plugins 'cracklib' and 'gssapi' by default -- Related: #1468028, #1464070 -- Looks like the testsuite removes its 'var' content correctly, - no need to do that explicitly. - -* Fri Jul 07 2017 Igor Gnatenko - 3:10.1.24-5 -- Rebuild due to bug in RPM (RHBZ #1468476) - -* Mon Jun 19 2017 Michal Schorm - 3:10.1.24-4 -- Use "/run" location instead of "/var/run" symlink -- Related: #1455811 -- Remove AppArmor files - -* Fri Jun 09 2017 Honza Horak - 3:10.1.24-3 -- Downstream script mariadb-prepare-db-dir fixed for CVE-2017-3265 -- Resolves: #1458940 -- Check properly that datadir includes only expected files -- Related: #1356897 - -* Wed Jun 07 2017 Michal Schorm - 3:10.1.24-2 -- Fixed incorrect Jemalloc initialization; #1459671 - -* Fri Jun 02 2017 Michal Schorm - 3:10.1.24-1 -- Rebase to 10.1.24 -- Build dependecies Bison and Libarchive added, others corrected -- Disabling Mroonga engine for i686 architecture, as it is not supported by MariaDB -- Removed patches: (fixed by upstream) - Patch5: mariadb-file-contents.patch - Patch14: mariadb-example-config-files.patch - Patch31: mariadb-string-overflow.patch - Patch32: mariadb-basedir.patch - Patch41: mariadb-galera-new-cluster-help.patch -- Resolves: rhbz#1414387 - CVE-2017-3313 -- Resolves partly: rhbz#1443408 - CVE-2017-3308 CVE-2017-3309 CVE-2017-3453 CVE-2017-3456 CVE-2017-3464 - -* Tue May 23 2017 Michal Schorm - 3:10.1.21-6 -- Plugin oqgraph enabled -- Plugin jemalloc enabled -- 'force' option for 'rm' removed -- Enabled '--big-test' option for the testsuite -- Disabled '--skip-rpl' option for the testsuite = replication tests enabled -- Multilib manpage added - -* Mon May 15 2017 Fedora Release Engineering - 3:10.1.21-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Tue Mar 07 2017 Michal Schorm - 3:10.1.21-4 -- Cracklib plugin enabled -- Removed strmov patch, it is no longer needed. The issue was fixed long ago in both MariaDB and MySQL - -* Wed Feb 15 2017 Michal Schorm - 3:10.1.21-3 -- Fix for some RPMLint issues -- Fix: Only server utilities can be move to server-utils subpackage. The rest (from client) - were moved back to where they came from (client - the main subpackage) -- Added correct "Obsoletes" for the server-utils subpackage -- Fixed FTBFS in F26 on x86_64, because of -Werror option -- Related: #1421092, #1395127 - -* Fri Feb 10 2017 Fedora Release Engineering - 3:10.1.21-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jan 24 2017 Michal Schorm - 3:10.1.21-1 -- Rebase to version 10.1.21 -- Most of the non-essential utilites has been moved to the new sub-package mariadb-server-utils -- Patches "admincrash" and "errno" removed, they are no longer relevant - "mysql-embedded-check.c" removed, no longer relevant -- Buildrequires krb5-devel duplicity removed -- Manpage for mysql_secure_installation extended -- Preparation for the CrackLib plugin to be added (waiting for correct SELinux rules to be relased) -- Related: #1260821, #1205082, #1414387 - -* Tue Jan 03 2017 Honza Horak - 3:10.1.20-3 -- Add explicit EVR requirement in main package for -libs -- Related: #1406320 - -* Tue Dec 20 2016 Honza Horak - 3:10.1.20-2 -- Use correct macro when removing doc files -- Resolves: #1400981 - -* Sat Dec 17 2016 Michal Schorm - 3:10.1.20-1 -- Rebase to version 10.1.20 -- Related: #1405258 - -* Fri Dec 02 2016 Michal Schorm - 3:10.1.19-6 -- Move patch from specfile to standalone patch file -- Related: #1382988 - -* Thu Dec 01 2016 Rex Dieter - 3:10.1.19-6 -- -devel: use pkgconfig(openssl) to allow any implementation (like compat-openssl10) - -* Wed Nov 30 2016 Michal Schorm - 3:10.1.19-5 -- Testsuite blacklists heavily updated. Current tracker: #1399847 -- Log-error option added to all config files examples -- Resolves: #1382988 - -* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-4 -- JdbcMariaDB.jar test removed -- PCRE version check added -- Related: #1382988, #1396945, #1096787 - -* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-4 -- test suite ENABLED, consensus was made it still should be run every build - -* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-2 -- fixed bug 1382988 -- added comment to the test suite -- test suite DISABLED for most builds in Koji, see comments - -* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-1 -- Update to 10.1.19 -- added temporary support to build with OpenSSL 1.0 on Fedora >= 26 -- added krb5-devel pkg as Buldrquires to prevent gssapi failure - -* Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 -- Update to 10.1.18 - -* Wed Aug 31 2016 Jakub Dorňák - 3:10.1.17-1 -- Update to 10.1.17 - -* Mon Aug 29 2016 Jakub Dorňák - 3:10.1.16-2 -- Fixed galera replication -- Resolves: #1352946 - -* Tue Jul 19 2016 Jakub Dorňák - 3:10.1.16-1 -- Update to 10.1.16 - -* Fri Jul 15 2016 Honza Horak - 3:10.1.14-5 -- Fail build when test-suite fails -- Use license macro for inclusion of licenses - -* Thu Jul 14 2016 Honza Horak - 3:10.1.14-4 -- Revert Update to 10.1.15, this release is broken - https://lists.launchpad.net/maria-discuss/msg03691.html - -* Thu Jul 14 2016 Honza Horak - 2:10.1.15-3 -- Check datadir more carefully to avoid unwanted data corruption -- Related: #1335849 - -* Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 -- Bump epoch - (related to the downgrade from the pre-release version) - -* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.15-1 -- Update to 10.1.15 - -* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.14-3 -- Revert "Update to 10.2.0" - It is possible that MariaDB 10.2.0 won't be stable till f25 GA. - -* Tue Jun 21 2016 Pavel Raiskup - 1:10.1.14-3 -- BR multilib-rpm-config and use it for multilib workarounds -- install architecture dependant pc file to arch-dependant location - -* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 -- Fix mysql-prepare-db-dir -- Resolves: #1335849 - -* Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 -- Update to 10.2.0 - -* Thu May 12 2016 Jakub Dorňák - 1:10.1.14-1 -- Add selinux policy -- Update to 10.1.14 (includes various bug fixes) -- Add -h and --help options to galera_new_cluster - -* Thu Apr 7 2016 Jakub Dorňák - 1:10.1.13-3 -- wsrep_on in galera.cnf - -* Tue Apr 5 2016 Jakub Dorňák - 1:10.1.13-2 -- Moved /etc/sysconfig/clustercheck - and /usr/share/mariadb/systemd/use_galera_new_cluster.conf - to mariadb-server-galera - -* Tue Mar 29 2016 Jakub Dorňák - 1:10.1.13-1 -- Update to 10.1.13 - -* Wed Mar 23 2016 Jakub Dorňák - 1:10.1.12-4 -- Fixed conflict with mariadb-galera-server - -* Tue Mar 22 2016 Jakub Dorňák - 1:10.1.12-3 -- Add subpackage mariadb-server-galera -- Resolves: 1310622 - -* Tue Mar 01 2016 Honza Horak - 1:10.1.12-2 -- Rebuild for BZ#1309199 (symbol versioning) - -* Mon Feb 29 2016 Jakub Dorňák - 1:10.1.12-1 -- Update to 10.1.12 - -* Tue Feb 16 2016 Honza Horak - 1:10.1.11-9 -- Remove dangling symlink to /etc/init.d/mysql - -* Sat Feb 13 2016 Honza Horak - 1:10.1.11-8 -- Use epoch for obsoleting mariadb-galera-server - -* Fri Feb 12 2016 Honza Horak - 1:10.1.11-7 -- Add Provides: bundled(pcre) in case we build with bundled pcre -- Related: #1302296 -- embedded-devel should require libaio-devel -- Resolves: #1290517 - -* Fri Feb 12 2016 Honza Horak - 1:10.1.11-6 -- Fix typo s/obsolate/obsolete/ - -* Thu Feb 11 2016 Honza Horak - 1:10.1.11-5 -- Add missing requirements for proper wsrep functionality -- Obsolate mariadb-galera & mariadb-galera-server (thanks Tomas Repik) -- Resolves: #1279753 -- Re-enable using libedit, which should be now fixed -- Related: #1201988 -- Remove mariadb-wait-ready call from systemd unit, we have now systemd notify support -- Make mariadb@.service similar to mariadb.service - -* Mon Feb 08 2016 Honza Horak - 1:10.1.11-4 -- Use systemd unit file more compatible with upstream - -* Sun Feb 07 2016 Honza Horak - 1:10.1.11-3 -- Temporarily disabling oqgraph for - https://mariadb.atlassian.net/browse/MDEV-9479 - -* Thu Feb 04 2016 Fedora Release Engineering - 1:10.1.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Feb 3 2016 Jakub Dorňák - 1:10.1.11-1 -- Update to 10.1.11 - -* Tue Jan 19 2016 Jakub Dorňák - 1:10.1.10-1 -- Update to 10.1.10 - -* Mon Dec 07 2015 Dan Horák - 1:10.1.8-3 -- rebuilt for s390(x) - -* Tue Nov 03 2015 Honza Horak - 1:10.1.8-2 -- Expand variables in server.cnf - -* Thu Oct 22 2015 Jakub Dorňák - 1:10.1.8-1 -- Update to 10.1.8 - -* Thu Aug 27 2015 Jonathan Wakely - 1:10.0.21-2 -- Rebuilt for Boost 1.59 - -* Mon Aug 10 2015 Jakub Dorňák - 1:10.0.21-1 -- Update to 10.0.21 - -* Wed Jul 29 2015 Fedora Release Engineering - 1:10.0.20-3 -- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - -* Wed Jul 22 2015 David Tardon - 1:10.0.20-2 -- rebuild for Boost 1.58 - -* Tue Jun 23 2015 Honza Horak - 1:10.0.20-1 -- Update to 10.0.20 - -* Wed Jun 17 2015 Fedora Release Engineering - 1:10.0.19-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Jun 03 2015 Dan Horák - 1:10.0.19-2 -- Update lists of failing tests (jdornak) -- Related: #1149647 - -* Mon May 11 2015 Honza Horak - 1:10.0.19-1 -- Update to 10.0.19 - -* Thu May 07 2015 Honza Horak - 1:10.0.18-1 -- Update to 10.0.18 - -* Thu May 07 2015 Honza Horak - 1:10.0.17-4 -- Include client plugins into -common package since they are used by both -libs - and base packages. -- Do not use libedit -- Related: #1201988 -- Let plugin dir to be owned by -common -- Use correct comment in the init script -- Related: #1184604 -- Add openssl as BuildRequires to run some openssl tests during build -- Related: #1189180 -- Fail in case any command in check fails -- Related: #1124791 -- Fix mysqladmin crash if run with -u root -p -- Resolves: #1207170 - -* Sat May 02 2015 Kalev Lember - 1:10.0.17-3 -- Rebuilt for GCC 5 C++11 ABI change - -* Fri Mar 06 2015 Honza Horak - 1:10.0.17-2 -- Wait for daemon ends -- Resolves: #1072958 -- Do not include symlink to libmysqlclient if not shipping the library -- Do not use scl prefix more than once in paths - Based on https://www.redhat.com/archives/sclorg/2015-February/msg00038.html - -* Wed Mar 04 2015 Honza Horak - 1:10.0.17-1 -- Rebase to version 10.0.17 -- Added variable for turn off skipping some tests - -* Tue Mar 03 2015 Honza Horak - 1:10.0.16-6 -- Check permissions when starting service on RHEL-6 -- Resolves: #1194699 -- Do not create test database by default -- Related: #1194611 - -* Fri Feb 13 2015 Matej Muzila - 1:10.0.16-4 -- Enable tokudb - -* Tue Feb 10 2015 Honza Horak - 1:10.0.16-3 -- Fix openssl_1 test - -* Wed Feb 4 2015 Jakub Dorňák - 1:10.0.16-2 -- Include new certificate for tests -- Update lists of failing tests -- Related: #1186110 - -* Tue Feb 3 2015 Jakub Dorňák - 1:10.0.16-9 -- Rebase to version 10.0.16 -- Resolves: #1187895 - -* Tue Jan 27 2015 Petr Machata - 1:10.0.15-9 -- Rebuild for boost 1.57.0 - -* Mon Jan 26 2015 Honza Horak - 1:10.0.15-8 -- Fix typo in the config file - -* Sun Jan 25 2015 Honza Horak - 1:10.0.15-7 -- Do not create log file in post script - -* Sat Jan 24 2015 Honza Horak - 1:10.0.15-6 -- Move server settings to config file under my.cnf.d dir - -* Sat Jan 24 2015 Honza Horak - 1:10.0.15-5 -- Fix path for sysconfig file - Filter provides in el6 properly - Fix initscript file location - -* Tue Jan 06 2015 Honza Horak - 1:10.0.15-4 -- Disable failing tests connect.mrr, connect.updelx2 on ppc and s390 - -* Mon Dec 22 2014 Honza Horak - 1:10.0.15-3 -- Fix macros paths in my.cnf -- Create old location for pid file if it remained in my.cnf - -* Fri Dec 05 2014 Honza Horak - 1:10.0.15-2 -- Rework usage of macros and remove some compatibility artefacts - -* Thu Nov 27 2014 Jakub Dorňák - 1:10.0.15-1 -- Update to 10.0.15 - -* Thu Nov 20 2014 Jan Stanek - 1:10.0.14-8 -- Applied upstream fix for mysql_config --cflags output. -- Resolves: #1160845 - -* Fri Oct 24 2014 Jan Stanek - 1:10.0.14-7 -- Fixed compat service file. -- Resolves: #1155700 - -* Mon Oct 13 2014 Honza Horak - 1:10.0.14-6 -- Remove bundled cmd-line-utils -- Related: #1079637 -- Move mysqlimport man page to proper package -- Disable main.key_cache test on s390 - Releated: #1149647 - -* Wed Oct 08 2014 Honza Horak - 1:10.0.14-5 -- Disable tests connect.part_file, connect.part_table - and connect.updelx -- Related: #1149647 - -* Wed Oct 01 2014 Honza Horak - 1:10.0.14-4 -- Add bcond_without mysql_names - Use more correct path when deleting mysql logrotate script - -* Wed Oct 01 2014 Honza Horak - 1:10.0.14-3 -- Build with system libedit -- Resolves: #1079637 - -* Mon Sep 29 2014 Honza Horak - 1:10.0.14-2 -- Add with_debug option - -* Mon Sep 29 2014 Honza Horak - 1:10.0.14-1 -- Update to 10.0.14 - -* Wed Sep 24 2014 Honza Horak - 1:10.0.13-8 -- Move connect engine to a separate package - Rename oqgraph engine to align with upstream packages -- Move some files to correspond with MariaDB upstream packages - client.cnf into -libs, mysql_plugin and msql2mysql into base, - tokuftdump and aria_* into -server, errmsg-utf8.txt into -errmsg -- Remove duplicate cnf files packaged using %%doc -- Check upgrade script added to warn about need for mysql_upgrade - -* Wed Sep 24 2014 Matej Muzila - 1:10.0.13-7 -- Client related libraries moved from mariadb-server to mariadb-libs -- Related: #1138843 - -* Mon Sep 08 2014 Honza Horak - 1:10.0.13-6 -- Disable vcol_supported_sql_funcs_myisam test on all arches -- Related: #1096787 -- Install systemd service file on RHEL-7+ - Server requires any mysql package, so it should be fine with older client - -* Thu Sep 04 2014 Honza Horak - 1:10.0.13-5 -- Fix paths in mysql_install_db script -- Resolves: #1134328 -- Use %%cmake macro - -* Tue Aug 19 2014 Honza Horak - 1:10.0.13-4 -- Build config subpackage everytime -- Disable failing tests: innodb_simulate_comp_failures_small, key_cache - rhbz#1096787 - -* Sun Aug 17 2014 Fedora Release Engineering - 1:10.0.13-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Thu Aug 14 2014 Honza Horak - 1:10.0.13-2 -- Include mysqld_unit only if required; enable tokudb in f20- - -* Wed Aug 13 2014 Honza Horak - 1:10.0.13-1 -- Rebase to version 10.0.13 - -* Tue Aug 12 2014 Honza Horak - 1:10.0.12-8 -- Introduce -config subpackage and ship base config files here - -* Tue Aug 5 2014 Honza Horak - 1:10.0.12-7 -- Adopt changes from mysql, thanks Bjorn Munch - -* Mon Jul 28 2014 Honza Horak - 1:10.0.12-6 -- Use explicit sysconfdir -- Absolut path for default value for pid file and error log - -* Tue Jul 22 2014 Honza Horak - 1:10.0.12-5 -- Hardcoded paths removed to work fine in chroot -- Spec rewrite to be more similar to oterh MySQL implementations -- Use variable for daemon unit name -- Include SysV init script if built on older system -- Add possibility to not ship some sub-packages - -* Mon Jul 21 2014 Honza Horak - 1:10.0.12-4 -- Reformating spec and removing unnecessary snippets - -* Tue Jul 15 2014 Honza Horak - 1:10.0.12-3 -- Enable OQGRAPH engine and package it as a sub-package -- Add support for TokuDB engine for x86_64 (currently still disabled) -- Re-enable tokudb_innodb_xa_crash again, seems to be fixed now -- Drop superfluous -libs and -embedded ldconfig deps (thanks Ville Skyttä) -- Separate -lib and -common sub-packages -- Require /etc/my.cnf instead of shipping it -- Include README.mysql-cnf -- Multilib support re-worked -- Introduce new option with_mysqld_unit -- Removed obsolete mysql-cluster, the package should already be removed -- Improve error message when log file is not writable -- Compile all binaries with full RELRO (RHBZ#1092548) -- Use modern symbol filtering with compatible backup -- Add more groupnames for server's my.cnf -- Error messages now provided by a separate package (thanks Alexander Barkov) -- Expand paths in helper scripts using cmake - -* Wed Jun 18 2014 Mikko Tiihonen - 1:10.0.12-2 -- Use -fno-delete-null-pointer-checks to avoid segfaults with gcc 4.9 - -* Tue Jun 17 2014 Jakub Dorňák - 1:10.0.12-1 -- Rebase to version 10.0.12 - -* Sat Jun 07 2014 Fedora Release Engineering - 1:10.0.11-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Jun 3 2014 Jakub Dorňák - 1:10.0.11-4 -- rebuild with tests failing on different arches disabled (#1096787) - -* Thu May 29 2014 Dan Horák - 1:10.0.11-2 -- rebuild with tests failing on big endian arches disabled (#1096787) - -* Wed May 14 2014 Jakub Dorňák - 1:10.0.11-1 -- Rebase to version 10.0.11 - -* Mon May 05 2014 Honza Horak - 1:10.0.10-3 -- Script for socket check enhanced - -* Thu Apr 10 2014 Jakub Dorňák - 1:10.0.10-2 -- use system pcre library - -* Thu Apr 10 2014 Jakub Dorňák - 1:10.0.10-1 -- Rebase to version 10.0.10 - -* Wed Mar 12 2014 Honza Horak - 1:5.5.36-2 -- Server crashes on SQL select containing more group by and left join statements using innodb tables -- Resolves: #1065676 -- Fix paths in helper scripts -- Move language files into mariadb directory - -* Thu Mar 06 2014 Honza Horak - 1:5.5.36-1 -- Rebase to 5.5.36 - https://kb.askmonty.org/en/mariadb-5536-changelog/ - -* Tue Feb 25 2014 Honza Horak 1:5.5.35-5 -- Daemon helper scripts sanity changes and spec files clean-up - -* Tue Feb 11 2014 Honza Horak 1:5.5.35-4 -- Fix typo in mysqld.service -- Resolves: #1063981 - -* Wed Feb 5 2014 Honza Horak 1:5.5.35-3 -- Do not touch the log file in post script, so it does not get wrong owner -- Resolves: #1061045 - -* Thu Jan 30 2014 Honza Horak 1:5.5.35-1 -- Rebase to 5.5.35 - https://kb.askmonty.org/en/mariadb-5535-changelog/ - Also fixes: CVE-2014-0001, CVE-2014-0412, CVE-2014-0437, CVE-2013-5908, - CVE-2014-0420, CVE-2014-0393, CVE-2013-5891, CVE-2014-0386, CVE-2014-0401, - CVE-2014-0402 -- Resolves: #1054043 -- Resolves: #1059546 - -* Tue Jan 14 2014 Honza Horak - 1:5.5.34-9 -- Adopt compatible system versioning -- Related: #1045013 -- Use compatibility mysqld.service instead of link -- Related: #1014311 - -* Mon Jan 13 2014 Rex Dieter 1:5.5.34-8 -- move mysql_config alternatives scriptlets to -devel too - -* Fri Jan 10 2014 Honza Horak 1:5.5.34-7 -- Build with -O3 on ppc64 -- Related: #1051069 -- Move mysql_config to -devel sub-package and remove Require: mariadb -- Related: #1050920 - -* Fri Jan 10 2014 Marcin Juszkiewicz 1:5.5.34-6 -- Disable main.gis-precise test also for AArch64 -- Disable perfschema.func_file_io and perfschema.func_mutex for AArch64 - (like it is done for 32-bit ARM) - -* Fri Jan 10 2014 Honza Horak 1:5.5.34-5 -- Clean all non-needed doc files properly - -* Wed Jan 8 2014 Honza Horak 1:5.5.34-4 -- Read socketfile location in mariadb-prepare-db-dir script - -* Mon Jan 6 2014 Honza Horak 1:5.5.34-3 -- Don't test EDH-RSA-DES-CBC-SHA cipher, it seems to be removed from openssl - which now makes mariadb/mysql FTBFS because openssl_1 test fails -- Related: #1044565 -- Use upstream's layout for symbols version in client library -- Related: #1045013 -- Check if socket file is not being used by another process at a time - of starting the service -- Related: #1045435 -- Use %%ghost directive for the log file -- Related: 1043501 - -* Wed Nov 27 2013 Honza Horak 1:5.5.34-2 -- Fix mariadb-wait-ready script - -* Fri Nov 22 2013 Honza Horak 1:5.5.34-1 -- Rebase to 5.5.34 - -* Mon Nov 4 2013 Honza Horak 1:5.5.33a-4 -- Fix spec file to be ready for backport by Oden Eriksson -- Resolves: #1026404 - -* Mon Nov 4 2013 Honza Horak 1:5.5.33a-3 -- Add pam-devel to build-requires in order to build -- Related: #1019945 -- Check if correct process is running in mysql-wait-ready script -- Related: #1026313 - -* Mon Oct 14 2013 Honza Horak 1:5.5.33a-2 -- Turn on test suite - -* Thu Oct 10 2013 Honza Horak 1:5.5.33a-1 -- Rebase to 5.5.33a - https://kb.askmonty.org/en/mariadb-5533-changelog/ - https://kb.askmonty.org/en/mariadb-5533a-changelog/ -- Enable outfile_loaddata test -- Disable tokudb_innodb_xa_crash test - -* Mon Sep 2 2013 Honza Horak - 1:5.5.32-12 -- Re-organize my.cnf to include only generic settings -- Resolves: #1003115 -- Move pid file location to /var/run/mariadb -- Make mysqld a symlink to mariadb unit file rather than the opposite way -- Related: #999589 - -* Thu Aug 29 2013 Honza Horak - 1:5.5.32-11 -- Move log file into /var/log/mariadb/mariadb.log -- Rename logrotate script to mariadb -- Resolves: #999589 - -* Wed Aug 14 2013 Rex Dieter 1:5.5.32-10 -- fix alternatives usage - -* Tue Aug 13 2013 Honza Horak - 1:5.5.32-9 -- Multilib issues solved by alternatives -- Resolves: #986959 - -* Sat Aug 03 2013 Petr Pisar - 1:5.5.32-8 -- Perl 5.18 rebuild - -* Wed Jul 31 2013 Honza Horak - 1:5.5.32-7 -- Do not use login shell for mysql user - -* Tue Jul 30 2013 Honza Horak - 1:5.5.32-6 -- Remove unneeded systemd-sysv requires -- Provide mysql-compat-server symbol -- Create mariadb.service symlink -- Fix multilib header location for arm -- Enhance documentation in the unit file -- Use scriptstub instead of links to avoid multilib conflicts -- Add condition for doc placement in F20+ - -* Sun Jul 28 2013 Dennis Gilmore - 1:5.5.32-5 -- remove "Requires(pretrans): systemd" since its not possible -- when installing mariadb and systemd at the same time. as in a new install - -* Sat Jul 27 2013 Kevin Fenzi 1:5.5.32-4 -- Set rpm doc macro to install docs in unversioned dir - -* Fri Jul 26 2013 Dennis Gilmore 1:5.5.32-3 -- add Requires(pre) on systemd for the server package - -* Tue Jul 23 2013 Dennis Gilmore 1:5.5.32-2 -- replace systemd-units requires with systemd -- remove solaris files - -* Fri Jul 19 2013 Honza Horak 1:5.5.32-1 -- Rebase to 5.5.32 - https://kb.askmonty.org/en/mariadb-5532-changelog/ -- Clean-up un-necessary systemd snippets - -* Wed Jul 17 2013 Petr Pisar - 1:5.5.31-7 -- Perl 5.18 rebuild - -* Mon Jul 1 2013 Honza Horak 1:5.5.31-6 -- Test suite params enhanced to decrease server condition influence -- Fix misleading error message when uninstalling built-in plugins -- Related: #966873 - -* Thu Jun 27 2013 Honza Horak 1:5.5.31-5 -- Apply fixes found by Coverity static analysis tool - -* Wed Jun 19 2013 Honza Horak 1:5.5.31-4 -- Do not use pretrans scriptlet, which doesn't work in anaconda -- Resolves: #975348 - -* Fri Jun 14 2013 Honza Horak 1:5.5.31-3 -- Explicitly enable mysqld if it was enabled in the beginning - of the transaction. - -* Thu Jun 13 2013 Honza Horak 1:5.5.31-2 -- Apply man page fix from Jan Stanek - -* Fri May 24 2013 Honza Horak 1:5.5.31-1 -- Rebase to 5.5.31 - https://kb.askmonty.org/en/mariadb-5531-changelog/ -- Preserve time-stamps in case of installed files -- Use /var/tmp instead of /tmp, since the later is using tmpfs, - which can cause problems -- Resolves: #962087 -- Fix test suite requirements - -* Sun May 5 2013 Honza Horak 1:5.5.30-2 -- Remove mytop utility, which is packaged separately -- Resolve multilib conflicts in mysql/private/config.h - -* Fri Mar 22 2013 Honza Horak 1:5.5.30-1 -- Rebase to 5.5.30 - https://kb.askmonty.org/en/mariadb-5530-changelog/ - -* Fri Mar 22 2013 Honza Horak 1:5.5.29-11 -- Obsolete MySQL since it is now renamed to community-mysql -- Remove real- virtual names - -* Thu Mar 21 2013 Honza Horak 1:5.5.29-10 -- Adding epoch to have higher priority than other mysql implementations - when comes to provider comparison - -* Wed Mar 13 2013 Honza Horak 5.5.29-9 -- Let mariadb-embedded-devel conflict with MySQL-embedded-devel -- Adjust mariadb-sortbuffer.patch to correspond with upstream patch - -* Mon Mar 4 2013 Honza Horak 5.5.29-8 -- Mask expected warnings about setrlimit in test suite - -* Thu Feb 28 2013 Honza Horak 5.5.29-7 -- Use configured prefix value instead of guessing basedir - in mysql_config -- Resolves: #916189 -- Export dynamic columns and non-blocking API functions documented - by upstream - -* Wed Feb 27 2013 Honza Horak 5.5.29-6 -- Fix sort_buffer_length option type - -* Wed Feb 13 2013 Honza Horak 5.5.29-5 -- Suppress warnings in tests and skip tests also on ppc64p7 - -* Tue Feb 12 2013 Honza Horak 5.5.29-4 -- Suppress warning in tests on ppc -- Enable fixed index_merge_myisam test case - -* Thu Feb 07 2013 Honza Horak 5.5.29-3 -- Packages need to provide also %%_isa version of mysql package -- Provide own symbols with real- prefix to distinguish from mysql - unambiguously -- Fix format for buffer size in error messages (MDEV-4156) -- Disable some tests that fail on ppc and s390 -- Conflict only with real-mysql, otherwise mariadb conflicts with ourself - -* Tue Feb 05 2013 Honza Horak 5.5.29-2 -- Let mariadb-libs to own /etc/my.cnf.d - -* Thu Jan 31 2013 Honza Horak 5.5.29-1 -- Rebase to 5.5.29 - https://kb.askmonty.org/en/mariadb-5529-changelog/ -- Fix inaccurate default for socket location in mysqld-wait-ready -- Resolves: #890535 - -* Thu Jan 31 2013 Honza Horak 5.5.28a-8 -- Enable obsoleting mysql - -* Wed Jan 30 2013 Honza Horak 5.5.28a-7 -- Adding necessary hacks for perl dependency checking, rpm is still - not wise enough -- Namespace sanity re-added for symbol default_charset_info - -* Mon Jan 28 2013 Honza Horak 5.5.28a-6 -- Removed %%{_isa} from provides/obsoletes, which doesn't allow - proper obsoleting -- Do not obsolete mysql at the time of testing - -* Thu Jan 10 2013 Honza Horak 5.5.28a-5 -- Added licenses LGPLv2 and BSD -- Removed wrong usage of %%{epoch} -- Test-suite is run in %%check -- Removed perl dependency checking adjustment, rpm seems to be smart enough -- Other minor spec file fixes - -* Tue Dec 18 2012 Honza Horak 5.5.28a-4 -- Packaging of MariaDB based on MySQL package +* Wed Oct 29 2025 Nikola Davidova - 3:11.8.3-4 +- Bump release for tmpfiles.d change +* Tue Oct 21 2025 Pavol Sloboda - 3:11.8.3-1 +- Initial commit on stream-mariadb-11.8-rhel-9.8.0 +- Resolves: RHEL-96956