From 561842194b76025eb93283befa13d4dcf534e30a Mon Sep 17 00:00:00 2001 From: Dongqi Chen Date: Fri, 14 Feb 2020 14:57:42 +0800 Subject: [PATCH] CentOS 8: Upgrade mariadb to version 10.3.17 (1)Release Version Upgrade (2)Fix spec to remove TokuDB related compilation errors (3)Extract the files in srpm to replace the 'centos/files/' directory Story: 2006729 Task: 38764 Depends-On: https://review.opendev.org/#/c/734429/ Change-Id: I4c1543440027a90edf0d1653b61deea0d9a104cd Signed-off-by: Dongqi Chen --- centos_srpms_centos.lst | 1 - centos_tarball-dl.lst | 2 +- database/mariadb/centos/build_srpm.data | 2 +- .../mariadb/centos/files/README.mysql-cnf | 13 - .../files/README.wsrep_sst_rsync_tunnel | 132 ++ .../centos/files/mariadb-admincrash.patch | 32 - .../centos/files/mariadb-annocheck.patch | 13 + .../centos/files/mariadb-basedir.patch | 24 - .../centos/files/mariadb-covscan.patch | 19 + .../mariadb/centos/files/mariadb-errno.patch | 26 - .../files/mariadb-example-config-files.patch | 72 - .../centos/files/mariadb-file-contents.patch | 49 - .../centos/files/mariadb-galera.cnf.patch | 21 - .../files/mariadb-install-db-sharedir.patch | 49 - .../centos/files/mariadb-install-test.patch | 62 - .../centos/files/mariadb-logrotate.patch | 97 +- .../centos/files/mariadb-notestdb.patch | 24 - .../centos/files/mariadb-ownsetup.patch | 24 +- .../mariadb/centos/files/mariadb-pcdir.patch | 20 + .../mariadb-revert-stdouterr-closing.patch | 34 - .../centos/files/mariadb-scripts.patch | 29 +- .../files/mariadb-spider_on_armv7hl.patch | 1078 ++++++++++ .../centos/files/mariadb-ssl-cypher.patch | 30 - .../mariadb/centos/files/mariadb-strmov.patch | 40 - .../centos/files/mysql-check-socket.sh | 6 +- .../centos/files/mysql-check-upgrade.sh | 6 +- .../centos/files/mysql-embedded-check.c | 26 - .../centos/files/mysql-prepare-db-dir.sh | 56 +- .../centos/files/mysql-scripts-common.sh | 12 +- .../mariadb/centos/files/mysql-wait-ready.sh | 45 - .../mariadb/centos/files/mysql-wait-stop.sh | 36 - database/mariadb/centos/files/mysql.init.in | 186 -- .../mariadb/centos/files/mysql.service.in | 13 +- .../mariadb/centos/files/mysql@.service.in | 18 +- .../centos/files/rh-skipped-tests-arm.list | 29 +- .../centos/files/rh-skipped-tests-arm32.list | 41 + .../centos/files/rh-skipped-tests-base.list | 36 +- .../files/rh-skipped-tests-ppc-s390.list | 0 .../centos/files/rh-skipped-tests-ppc.list | 21 + .../centos/files/rh-skipped-tests-s390.list | 2 + .../centos/files/wsrep_sst_rsync_tunnel | 482 +++++ database/mariadb/centos/mariadb.spec | 1840 +++++++++++------ .../mariadb/centos/mariadb.spec.unmodified | 1797 ++++++++++------ 43 files changed, 4385 insertions(+), 2160 deletions(-) delete mode 100644 database/mariadb/centos/files/README.mysql-cnf create mode 100644 database/mariadb/centos/files/README.wsrep_sst_rsync_tunnel delete mode 100644 database/mariadb/centos/files/mariadb-admincrash.patch create mode 100644 database/mariadb/centos/files/mariadb-annocheck.patch delete mode 100644 database/mariadb/centos/files/mariadb-basedir.patch create mode 100644 database/mariadb/centos/files/mariadb-covscan.patch delete mode 100644 database/mariadb/centos/files/mariadb-errno.patch delete mode 100644 database/mariadb/centos/files/mariadb-example-config-files.patch delete mode 100644 database/mariadb/centos/files/mariadb-file-contents.patch delete mode 100644 database/mariadb/centos/files/mariadb-galera.cnf.patch delete mode 100644 database/mariadb/centos/files/mariadb-install-db-sharedir.patch delete mode 100644 database/mariadb/centos/files/mariadb-install-test.patch delete mode 100644 database/mariadb/centos/files/mariadb-notestdb.patch create mode 100644 database/mariadb/centos/files/mariadb-pcdir.patch delete mode 100644 database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch create mode 100644 database/mariadb/centos/files/mariadb-spider_on_armv7hl.patch delete mode 100644 database/mariadb/centos/files/mariadb-ssl-cypher.patch delete mode 100644 database/mariadb/centos/files/mariadb-strmov.patch delete mode 100644 database/mariadb/centos/files/mysql-embedded-check.c delete mode 100644 database/mariadb/centos/files/mysql-wait-ready.sh delete mode 100644 database/mariadb/centos/files/mysql-wait-stop.sh delete mode 100644 database/mariadb/centos/files/mysql.init.in create mode 100644 database/mariadb/centos/files/rh-skipped-tests-arm32.list delete mode 100644 database/mariadb/centos/files/rh-skipped-tests-ppc-s390.list create mode 100644 database/mariadb/centos/files/rh-skipped-tests-ppc.list create mode 100644 database/mariadb/centos/files/rh-skipped-tests-s390.list create mode 100644 database/mariadb/centos/files/wsrep_sst_rsync_tunnel diff --git a/centos_srpms_centos.lst b/centos_srpms_centos.lst index 82d065370..a04de6d34 100644 --- a/centos_srpms_centos.lst +++ b/centos_srpms_centos.lst @@ -10,7 +10,6 @@ initscripts-10.00.1-1.el8_0.1.src.rpm # libevent-2.0.21-4.el7.src.rpm lighttpd-1.4.55-1.el8.src.rpm # logrotate-3.8.6-17.el7.src.rpm -mariadb-10.3.17-1.module_el8.1.0+257+48736ea6.src.rpm net-snmp-5.8-7.el8_0.2.src.rpm net-tools-2.0-0.51.20160912git.el8.src.rpm openldap-2.4.46-9.el8.src.rpm diff --git a/centos_tarball-dl.lst b/centos_tarball-dl.lst index c936fe038..4c77462b9 100644 --- a/centos_tarball-dl.lst +++ b/centos_tarball-dl.lst @@ -34,7 +34,7 @@ ldapscripts-2.0.8.tgz#ldapscripts-2.0.8#https://sourceforge.net/projects/ldapscr libtpms-0.6.0-4f0d59d.tar.gz#libtpms-0.6.0#https://github.com/stefanberger/libtpms/tarball/c421ca0f4d00c0caceeda8d62c1efb2b7e47db04#http## lldpd-0.9.0.tar.gz#lldpd-0.9.0#https://media.luffy.cx/files/lldpd/lldpd-0.9.0.tar.gz#http## lua-1fce39c6397056db645718b8f5821571d97869a4.tar.gz#lua#https://api.github.com/repos/ceph/lua/tarball/1fce39c6397056db645718b8f5821571d97869a4#https## -!mariadb-10.1.28.tar.gz#mariadb-10.1.28#https://github.com/MariaDB/server/archive/mariadb-10.1.28.tar.gz#http_script##post-dl-script/mariadb.sh +!mariadb-10.3.17.tar.gz#mariadb-10.3.17#https://github.com/MariaDB/server/archive/mariadb-10.3.17.tar.gz#http_script##post-dl-script/mariadb.sh !MLNX_OFED_SRC-4.7-3.2.9.0.tgz#MLNX_OFED_SRC-4.7-3.2.9.0#http://content.mellanox.com/ofed/MLNX_OFED-4.7-3.2.9.0/MLNX_OFED_SRC-4.7-3.2.9.0.tgz#http_script##post-dl-script/MLNX_OFED.sh openvswitch-2.11.0.tar.gz#openvswitch-2.11.0#https://github.com/openvswitch/ovs/archive/v2.11.0.tar.gz#http## puppet-boolean-22b726dd78b0a60a224cc7054aebbf28e9306f62.tar.gz#puppet-boolean#https://github.com/voxpupuli/puppet-boolean/tarball/22b726dd78b0a60a224cc7054aebbf28e9306f62#http## diff --git a/database/mariadb/centos/build_srpm.data b/database/mariadb/centos/build_srpm.data index 4563119df..167ea3890 100644 --- a/database/mariadb/centos/build_srpm.data +++ b/database/mariadb/centos/build_srpm.data @@ -1,4 +1,4 @@ -COPY_LIST="$CGCS_BASE/downloads/mariadb-10.1.28.tar.gz $PKG_BASE/centos/files/*" +COPY_LIST="$CGCS_BASE/downloads/mariadb-10.3.17.tar.gz $PKG_BASE/centos/files/*" TIS_PATCH_VER=15 BUILD_IS_BIG=7 BUILD_IS_SLOW=19 diff --git a/database/mariadb/centos/files/README.mysql-cnf b/database/mariadb/centos/files/README.mysql-cnf deleted file mode 100644 index 3700c7f14..000000000 --- a/database/mariadb/centos/files/README.mysql-cnf +++ /dev/null @@ -1,13 +0,0 @@ -This directory contains prepared configuration files with .cnf extension, -which provide a configuration for some common MariaDB deployment scenarios. -These configuration files do not include the default configuration of datadir, -log-file and pid-file locations, as specified in the default my.cnf file, -provided in this distribution. - -Thus, it is recommended to use these configuration files as an addition to the -default my.cnf configuration file. - -Since default my.cnf contains `!includedir @INSTALL_SYSCONF2DIR@` directive, it is -recommended to copy required configuration under @INSTALL_SYSCONF2DIR@ directory, -so the default my.cnf specifications will be extended. - diff --git a/database/mariadb/centos/files/README.wsrep_sst_rsync_tunnel b/database/mariadb/centos/files/README.wsrep_sst_rsync_tunnel new file mode 100644 index 000000000..0222b34a3 --- /dev/null +++ b/database/mariadb/centos/files/README.wsrep_sst_rsync_tunnel @@ -0,0 +1,132 @@ +socat tunnel for encrypted rsync SST +==================================== + +`wsrep_sst_rsync_tunnel` is an extension of the rsync-based [SST](http://galeracluster.com/documentation-webpages/glossary.html#term-state-snapshot-transfer) +implementation that ships with mariadb. Its purpose is to encrypt +communication between the donor and the joiner during an SST. + +Encryption is implemented by means of a socat tunnel, using OPENSSL +addresses. It can be configured via the regular openssl flags exposed +by socat. + + +## How to configure the script + +This SST script can configured by setting a few keys in your favorite +mariadb option file in addition to the usual galera settings. + + [mysqld] + ... + bind_address= + wsrep_sst_method=rsync_tunnel + ... + + [sst] + tca=/path/to/your/ca-file.crt + tcert=/path/to/node/certificate.crt + tkey=/path/to/node/key.key + sockopt= + +When a joiner node requests an SST, `wsrep_sst_rsync_tunnel` uses +socat to listen to incoming SSL connections on port 4444 in lieu of +the original rsync daemon. Received data will be forwarded to the +rscynd daemon started locally to replicate the database. + +When a donor node serves the SST, `wsrep_sst_rsync_tunnel` makes +a series of rsync calls that target a locally started socat daemon. +The daemon tunnels all rsync traffic into an encrypted SSL connection +that targets the joiner's end of the socat tunnel. + +Encryption parameters are specified under the `[sst]` group in the +mariadb option file, where `tkey` and `tcert` are respectively the key +and the certificate that are used by both sides of the socat tunnel. +Each node typically has a different key and cert. Both key and +certificate can be combined into a single PEM file and referenced by +`tcert`. Option `tca` holds a list of the trusted signing +certificates. + +In case you need to tweak the creation of the SSL connection, you can +pass valid socat options (as per socat manual) via the `sockopt` key. +For debugging purpose, the exact socat command that is being executed +shows up in the mariadb log file. + +Note that socat verifies that the certificate's commonName matches +that of the host that is being targeted. The target name comes from +the value configured in `bind_address`, so it's important that it +matches the certificate's commonName. An IP address can be used for +`bind_address`, but you may get into trouble in case different +hostnames resolve to the same IP (e.g. multiple networks per host). + + +## Examples of use + +Suppose you're running a 3-node galera cluster +`node1.my.cluster`, `node2.my.cluster`, `node3.my.cluster`. + +### Scenario: using self-signed certificates + +On each node, create a key and a certificate, and bundle them into a +single PEM file. For instance on `node1.my.cluster`: + + openssl genrsa -out /tls/mysql-$(hostname -f).key 2048 + openssl req -new -key /tls/mysql-$(hostname -f).key -x509 -days 365000 -subj "/CN=$(hostname -f)" -out /tls/mysql-$(hostname -f).crt -batch + cat /tls/mysql-$(hostname -f).key /tls/mysql-$(hostname -f).crt > /tls/mysql.pem + +Then, on each node, create a cafile that will contain all the certs to +trust: + + for n in node1.my.cluster node2.my.cluster node3.my.cluster; do + ssh $n 'cat /tls/mysql-$(hostname -f).crt' >> /tls/all-mysql.crt + done + +Once you have those two files on each host, you can configure the SST +appropriately. For instance from `/etc/my.cnf.d/galera.cnf`: + + [mysqld] + ... + + [sst] + tca=/tls/all-mysql.crt + tcert=/tls/mysql.pem + +### Scenario: using self-signed certificates, without verification + +By default, when socat tries to establish a SSL connection to a peer, +it also verifies that it can trust the peer's certificate. If for some +reason you need to disable that feature, you can amend the previous +configuration with a sockopt option: + + [mysqld] + ... + + [sst] + tca=/tls/all-mysql.crt + tcert=/tls/mysql.pem + sockopt="verify=0" + +The associated sockopt value is passed to socat when +the donor or the joiner configures his part of the tunnel. + +Note: please do not do so in production, this is inherently insecure +as you will not verify the identity of the peer you're connecting to! + +### Scenario: using certificates from a CA + +Suppose you have a FreeIPA service which generated a key file and a +certificate file for the three galera nodes, respectively located at +/tls/mysql.key and /tls/mysql.crt. + +Assuming that the certificate for the FreeIPA server is available at +/etc/ipa/ca.crt, you can configure you galera servers as follows: + + [sst] + tca=/etc/ipa/ca.crt + tcert=/tls/mysql.crt + tkey=/tls/mysql.key + +## License + +Copyright © 2017 [Damien Ciabrini](https://github.com/dciabrin). +This work is derived from the original `wsrep_rsync_sst`, copyright +© 2010-2014 [Codership Oy](https://github.com/codership). +Released under the GNU GPLv2. diff --git a/database/mariadb/centos/files/mariadb-admincrash.patch b/database/mariadb/centos/files/mariadb-admincrash.patch deleted file mode 100644 index cc2b10dd0..000000000 --- a/database/mariadb/centos/files/mariadb-admincrash.patch +++ /dev/null @@ -1,32 +0,0 @@ -mysqladmin crash on execution of below command: - - #> mysqladmin -u root -p - ... - Segmentation fault (core dumped) - -This is probably caused by memory corruption based on working with temp_argv[-1]. - -RHBZ: #1207041 -Upstream report: https://mariadb.atlassian.net/browse/MDEV-7883 - ---- - client/mysqladmin.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc -index ffdc73f..cb0c558 100644 ---- a/client/mysqladmin.cc -+++ b/client/mysqladmin.cc -@@ -1361,7 +1361,8 @@ static char **mask_password(int argc, char ***argv) - } - argc--; - } -- temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE)); -+ if (argc >= 0) -+ temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE)); - return(temp_argv); - } - --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-annocheck.patch b/database/mariadb/centos/files/mariadb-annocheck.patch new file mode 100644 index 000000000..d7456a4b9 --- /dev/null +++ b/database/mariadb/centos/files/mariadb-annocheck.patch @@ -0,0 +1,13 @@ +Harden the "hardened" flags even more to comply with RHEL8 security rules + +--- mariadb-10.3.10/CMakeLists.txt 2018-10-02 11:45:39.000000000 +0200 ++++ mariadb-10.3.10/CMakeLists.txt_patched 2018-11-08 03:48:01.713969313 +0100 +@@ -226,7 +226,7 @@ IF(NOT WITH_TSAN) + # security-enhancing flags + MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC") + MY_CHECK_AND_SET_COMPILER_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/database/mariadb/centos/files/mariadb-basedir.patch b/database/mariadb/centos/files/mariadb-basedir.patch deleted file mode 100644 index d1f4c10c1..000000000 --- a/database/mariadb/centos/files/mariadb-basedir.patch +++ /dev/null @@ -1,24 +0,0 @@ -Don't guess basedir in mysql_config; we place it under _libdir because -of multilib conflicts, so use rather configured @prefix@ path directly. - ---- - scripts/mysql_config.sh | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh -index 52f6d56..df63365 100644 ---- a/scripts/mysql_config.sh -+++ b/scripts/mysql_config.sh -@@ -76,8 +76,7 @@ get_full_path () - - me=`get_full_path $0` - --# Script might have been renamed but assume mysql_config --basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'` -+basedir='@prefix@' - - ldata='@localstatedir@' - execdir='@libexecdir@' --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-covscan.patch b/database/mariadb/centos/files/mariadb-covscan.patch new file mode 100644 index 000000000..08235a0e2 --- /dev/null +++ b/database/mariadb/centos/files/mariadb-covscan.patch @@ -0,0 +1,19 @@ +Error: SHELLCHECK_WARNING: +/usr/bin/mysql_install_db:431:10: warning: Remove backticks to avoid executing output. [SC2092] +# 429| if test ! -d "$dir" +# 430| then +# 431|-> if ! `mkdir -p "$dir"` +# 432| then +# 433| echo "Fatal error Can't create database directory '$dir'" +--- mariadb-10.3.10/scripts/mysql_install_db.sh 2018-10-02 11:45:42.000000000 +0200 ++++ mariadb-10.3.10/scripts/mysql_install_db.sh_patched 2018-11-14 10:06:54.868469138 +0100 +@@ -428,7 +428,7 @@ for dir in "$ldata" "$ldata/mysql" + do + if test ! -d "$dir" + then +- if ! `mkdir -p "$dir"` ++ if ! mkdir -p "$dir" + then + echo "Fatal error Can't create database directory '$dir'" + link_to_help + diff --git a/database/mariadb/centos/files/mariadb-errno.patch b/database/mariadb/centos/files/mariadb-errno.patch deleted file mode 100644 index 5ff34f000..000000000 --- a/database/mariadb/centos/files/mariadb-errno.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- - include/my_sys.h | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -diff --git a/include/my_sys.h b/include/my_sys.h -index 110a2ee..a90ac5c 100644 ---- a/include/my_sys.h -+++ b/include/my_sys.h -@@ -212,13 +212,7 @@ - #define my_safe_afree(ptr, size) my_afree(ptr) - #endif /* HAVE_ALLOCA */ - --#ifndef errno /* did we already get it? */ --#ifdef HAVE_ERRNO_AS_DEFINE --#include /* errno is a define */ --#else --extern int errno; /* declare errno */ --#endif --#endif /* #ifndef errno */ -+#include /* errno is a define */ - extern char *home_dir; /* Home directory for user */ - extern MYSQL_PLUGIN_IMPORT char *mysql_data_home; - extern const char *my_progname; /* program-name (printed in errors) */ --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-example-config-files.patch b/database/mariadb/centos/files/mariadb-example-config-files.patch deleted file mode 100644 index f29d129a5..000000000 --- a/database/mariadb/centos/files/mariadb-example-config-files.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- - support-files/my-huge.cnf.sh | 1 + - support-files/my-innodb-heavy-4G.cnf.sh | 2 +- - support-files/my-large.cnf.sh | 1 + - support-files/my-medium.cnf.sh | 1 + - support-files/my-small.cnf.sh | 1 + - 5 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh -index 4e08348..d8bf29e 100644 ---- a/support-files/my-huge.cnf.sh -+++ b/support-files/my-huge.cnf.sh -@@ -25,6 +25,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MySQL server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking -diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh -index 2590ff5..85fd33a 100644 ---- a/support-files/my-innodb-heavy-4G.cnf.sh -+++ b/support-files/my-innodb-heavy-4G.cnf.sh -@@ -42,7 +42,7 @@ socket = @MYSQL_UNIX_ADDR@ - # The MariaDB server - # - [mysqld] -- -+log-error = @LOG_LOCATION@ - # generic configuration options - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ -diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh -index 6f8dab0..e8c5f74 100644 ---- a/support-files/my-large.cnf.sh -+++ b/support-files/my-large.cnf.sh -@@ -25,6 +25,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MariaDB server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking -diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh -index 19ab8df..fc8fc78 100644 ---- a/support-files/my-medium.cnf.sh -+++ b/support-files/my-medium.cnf.sh -@@ -26,6 +26,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MariaDB server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking -diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh -index 8c78072..6777431 100644 ---- a/support-files/my-small.cnf.sh -+++ b/support-files/my-small.cnf.sh -@@ -24,6 +24,7 @@ socket = @MYSQL_UNIX_ADDR@ - - # The MySQL server - [mysqld] -+log-error = @LOG_LOCATION@ - port = @MYSQL_TCP_PORT@ - socket = @MYSQL_UNIX_ADDR@ - skip-external-locking --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-file-contents.patch b/database/mariadb/centos/files/mariadb-file-contents.patch deleted file mode 100644 index 5f438fc2a..000000000 --- a/database/mariadb/centos/files/mariadb-file-contents.patch +++ /dev/null @@ -1,49 +0,0 @@ -Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which -breaks at least two packaging commandments, so we put them into $libdir -instead. That means we have to hack the file_contents regression test -to know about this. - -Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425 - ---- - mysql-test/t/file_contents.test | 13 ++++++++++-- - 1 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test -index 4734a02..a892297 100644 ---- a/mysql-test/t/file_contents.test -+++ b/mysql-test/t/file_contents.test -@@ -11,7 +11,7 @@ - --perl - print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n"; - $dir_bin = $ENV{'MYSQL_BINDIR'}; --if ($dir_bin eq '/usr/') { -+if ($dir_bin =~ '.*/usr/$') { - # RPM package - $dir_docs = $dir_bin; - $dir_docs =~ s|/lib|/share/doc|; -@@ -22,7 +22,7 @@ if ($dir_bin eq '/usr/') { - # RedHat: version number in directory name - $dir_docs = glob "$dir_docs/MariaDB-server*"; - } --} elsif ($dir_bin eq '/usr') { -+} elsif ($dir_bin =~ '.*/usr$') { - # RPM build during development - $dir_docs = "$dir_bin/share/doc"; - if(-d "$dir_docs/packages") { -@@ -32,6 +32,15 @@ if ($dir_bin eq '/usr/') { - # RedHat/Debian: version number in directory name - $dir_docs = glob "$dir_docs/mariadb-server-*"; - $dir_docs = glob "$dir_docs/MariaDB-server*" unless -d $dir_docs; -+ -+ # All the above is entirely wacko, because these files are not docs; -+ # they should be kept in libdir instead. mtr does not provide a nice -+ # way to find libdir though, so we have to kluge it like this: -+ if (-d "$dir_bin/lib64/mysql") { -+ $dir_docs = "$dir_bin/lib64/mysql"; -+ } else { -+ $dir_docs = "$dir_bin/lib/mysql"; -+ } - } - # Slackware - $dir_docs = glob "$dir_bin/doc/mariadb-[0-9]*" unless -d $dir_docs; diff --git a/database/mariadb/centos/files/mariadb-galera.cnf.patch b/database/mariadb/centos/files/mariadb-galera.cnf.patch deleted file mode 100644 index e03ee88a5..000000000 --- a/database/mariadb/centos/files/mariadb-galera.cnf.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- - support-files/wsrep.cnf.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/support-files/wsrep.cnf.sh b/support-files/wsrep.cnf.sh -index a539085..51ce3dc 100644 ---- a/support-files/wsrep.cnf.sh -+++ b/support-files/wsrep.cnf.sh -@@ -30,6 +30,9 @@ bind-address=0.0.0.0 - ## WSREP options - ## - -+# Enable wsrep -+wsrep_on=1 -+ - # Full path to wsrep provider library or 'none' - wsrep_provider=none - --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-install-db-sharedir.patch b/database/mariadb/centos/files/mariadb-install-db-sharedir.patch deleted file mode 100644 index 44dbd6ec0..000000000 --- a/database/mariadb/centos/files/mariadb-install-db-sharedir.patch +++ /dev/null @@ -1,49 +0,0 @@ -Use configured value instead of hardcoded path - ---- - scripts/mysql_install_db.pl.in | 2 +- - scripts/mysql_install_db.sh | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in -index 9d2c1f6..0accdd1 100644 ---- a/scripts/mysql_install_db.pl.in -+++ b/scripts/mysql_install_db.pl.in -@@ -320,7 +320,7 @@ elsif ( $opt->{basedir} ) - find_in_basedir($opt,"file","mysqld-nt", - "bin"); # ,"sql" - $srcpkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql", -- "share","share/mysql"); # ,"scripts" -+ "share","@INSTALL_MYSQLSHAREDIR@"); # ,"scripts" - $buildpkgdir = $srcpkgdatadir; - $scriptdir = "$opt->{basedir}/scripts"; - } -diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh -index 364cc4f..eaa7a89 100644 ---- a/scripts/mysql_install_db.sh -+++ b/scripts/mysql_install_db.sh -@@ -311,17 +311,17 @@ then - cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin - exit 1 - fi -- langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english` -+ langdir=`find_in_basedir --dir errmsg.sys share/english @INSTALL_MYSQLSHAREDIR@/english` - if test -z "$langdir" - then -- cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english -+ cannot_find_file errmsg.sys $basedir/share/english $basedir/@INSTALL_MYSQLSHAREDIR@/english - exit 1 - fi -- srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` -+ srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share @INSTALL_MYSQLSHAREDIR@` - buildpkgdatadir=$srcpkgdatadir - if test -z "$srcpkgdatadir" - then -- cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql -+ cannot_find_file fill_help_tables.sql $basedir/share $basedir/@INSTALL_MYSQLSHAREDIR@ - exit 1 - fi - scriptdir="$basedir/scripts" --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-install-test.patch b/database/mariadb/centos/files/mariadb-install-test.patch deleted file mode 100644 index 2bbfc470a..000000000 --- a/database/mariadb/centos/files/mariadb-install-test.patch +++ /dev/null @@ -1,62 +0,0 @@ -Improve the documentation that will be installed in the mysql-test RPM. - ---- - mysql-test/README | 36 +++++++++++++++++++++++++----------- - 1 file changed, 25 insertions(+), 11 deletions(-) - -diff --git a/mysql-test/README b/mysql-test/README -index 0fba1cc..2e756e9 100644 ---- a/mysql-test/README -+++ b/mysql-test/README -@@ -1,15 +1,28 @@ --This directory contains a test suite for the MySQL daemon. To run --the currently existing test cases, simply execute ./mysql-test-run in --this directory. It will fire up the newly built mysqld and test it. -+This directory contains a test suite for the MariaDB daemon. To run -+the currently existing test cases, execute ./mysql-test-run in -+this directory. - --Note that you do not have to have to do "make install", and you could --actually have a co-existing MySQL installation. The tests will not --conflict with it. To run the test suite in a source directory, you --must do make first. -+For use in Red Hat distributions, you should run the script as user mysql, -+who is created with nologin shell however, so the best bet is something like -+ $ su - -+ # cd /usr/share/mysql-test -+ # su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=rh-skipped-tests.list" - --All tests must pass. If one or more of them fail on your system, please --read the following manual section for instructions on how to report the --problem: -+This will use the installed mysql executables, but will run a private copy -+of the server process (using data files within /usr/share/mysql-test), -+so you need not start the mysqld service beforehand. -+ -+The "--skip-test-list=rh-skipped-tests.list" option excludes tests that are -+known to fail on one or more Red-Hat-supported platforms. You can omit it -+if you want to check whether such failures occur for you. Documentation -+about the reasons for omitting such tests can be found in the file -+rh-skipped-tests.list. -+ -+To clean up afterwards, remove the created "var" subdirectory, eg -+ # su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var" -+ -+If one or more tests fail on your system, please read the following manual -+section for instructions on how to report the problem: - - https://mariadb.com/kb/en/reporting-bugs - -@@ -26,7 +39,8 @@ other relevant options. - - With no test cases named on the command line, mysql-test-run falls back - to the normal "non-extern" behavior. The reason for this is that some --tests cannot run with an external server. -+tests cannot run with an external server (because they need to control the -+options with which the server is started). - - You can create your own test cases. To create a test case, create a new - file in the t subdirectory using a text editor. The file should have a .test --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-logrotate.patch b/database/mariadb/centos/files/mariadb-logrotate.patch index e87240cb3..fd58c4222 100644 --- a/database/mariadb/centos/files/mariadb-logrotate.patch +++ b/database/mariadb/centos/files/mariadb-logrotate.patch @@ -12,69 +12,66 @@ Adjust the mysql-log-rotate script in several ways: is low-volume and so rotation is not critical functionality. See discussions at RH bugs 799735, 547007 +* Note they are from Fedora 15 / 16 ---- - support-files/mysql-log-rotate.sh | 44 ++++++++++++++++++++------------------- - 1 files changed, 23 insertions(+), 21 deletions(-) +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 -diff --git a/support-files/mysql-log-rotate.sh b/support-files/mysql-log-rotate.sh -index 5d1b30b..425c591 100644 ---- a/support-files/mysql-log-rotate.sh -+++ b/support-files/mysql-log-rotate.sh -@@ -1,9 +1,9 @@ +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 + +--- mariadb-10.3.7/support-files/mysql-log-rotate.sh 2018-05-23 22:38:46.000000000 +0200 ++++ mariadb-10.3.7/support-files/mysql-log-rotate.sh_patched 2018-06-27 12:11:23.705719826 +0200 +@@ -1,25 +1,12 @@ # This logname can be set in /etc/my.cnf --# by setting the variable "err-log" + # by setting the variable "err-log" -# in the [safe_mysqld] section as follows: -+# by setting the variable "log-error" -+# in the [mysqld_safe] section as follows: ++# in the [mysqld] section as follows: # -# [safe_mysqld] -# err-log=@localstatedir@/mysqld.log -+# [mysqld_safe] -+# log-error=@LOG_LOCATION@ - # - # If the root user has a password you have to create a - # /root/.my.cnf configuration file with the following -@@ -18,20 +18,22 @@ - # ATTENTION: This /root/.my.cnf should be readable ONLY - # for root ! +-# +-# 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 ! ++# [mysqld] ++# log_error=@LOG_LOCATION@ -@localstatedir@/mysqld.log { - # create 600 mysql mysql -- notifempty -- daily -- rotate 3 -- missingok -- compress -- postrotate -- # just if mysqld is really running ++@LOG_LOCATION@ { ++ create 600 mysql mysql + notifempty + daily + rotate 3 +@@ -27,11 +14,9 @@ + compress + 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 -- endscript --} -+# Then, un-comment the following lines to enable rotation of mysql's log file: -+ -+#@LOG_LOCATION@ { -+# # create 600 mysql mysql -+# notifempty -+# daily -+# rotate 3 -+# missingok -+# compress -+# 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 -+# endscript -+#} --- -1.9.1 - ++ if [ -e @PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid ] ++ then ++ kill -1 $(<@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid) ++ fi + endscript + } diff --git a/database/mariadb/centos/files/mariadb-notestdb.patch b/database/mariadb/centos/files/mariadb-notestdb.patch deleted file mode 100644 index b6ea1f5d4..000000000 --- a/database/mariadb/centos/files/mariadb-notestdb.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- - scripts/mysql_install_db.pl.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in -index 0accdd1..3ab2786 100644 ---- a/scripts/mysql_install_db.pl.in -+++ b/scripts/mysql_install_db.pl.in -@@ -399,10 +399,10 @@ if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ ) - } - - # ---------------------------------------------------------------------- --# Create database directories mysql & test -+# Create database directories mysql - # ---------------------------------------------------------------------- - --foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" ) -+foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql" ) - { - # FIXME not really the same as original "mkdir -p", but ok? - mkdir($dir, 0700) unless -d $dir; --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-ownsetup.patch b/database/mariadb/centos/files/mariadb-ownsetup.patch index b54c24ac5..23dcba82f 100644 --- a/database/mariadb/centos/files/mariadb-ownsetup.patch +++ b/database/mariadb/centos/files/mariadb-ownsetup.patch @@ -1,13 +1,7 @@ ---- - support-files/CMakeLists.txt | 1 + - support-files/rpm/server.cnf | 9 +++++++++ - 2 files changed, 10 insertions(+) - -diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt -index 71e9b3f..5f3b2a6 100644 ---- a/support-files/CMakeLists.txt -+++ b/support-files/CMakeLists.txt -@@ -81,6 +81,7 @@ IF(UNIX) +diff -up mariadb-10.1.8/support-files/CMakeLists.txt.p9 mariadb-10.1.8/support-files/CMakeLists.txt +--- mariadb-10.1.8/support-files/CMakeLists.txt.p9 2015-11-03 11:38:46.029139464 +0100 ++++ mariadb-10.1.8/support-files/CMakeLists.txt 2015-11-03 11:41:07.107605055 +0100 +@@ -62,6 +62,7 @@ IF(UNIX) ENDIF() CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) @@ -15,10 +9,9 @@ index 71e9b3f..5f3b2a6 100644 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 --git a/support-files/rpm/server.cnf b/support-files/rpm/server.cnf -index 9682d2b..6f398d4 100644 ---- a/support-files/rpm/server.cnf -+++ b/support-files/rpm/server.cnf +diff -up mariadb-10.1.8/support-files/rpm/server.cnf.p9 mariadb-10.1.8/support-files/rpm/server.cnf +--- mariadb-10.1.8/support-files/rpm/server.cnf.p9 2015-10-15 17:44:19.000000000 +0200 ++++ mariadb-10.1.8/support-files/rpm/server.cnf 2015-11-03 11:38:25.228070808 +0100 @@ -9,7 +9,16 @@ [server] @@ -36,6 +29,3 @@ index 9682d2b..6f398d4 100644 # # * Galera-related settings --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-pcdir.patch b/database/mariadb/centos/files/mariadb-pcdir.patch new file mode 100644 index 000000000..d9a8a78ca --- /dev/null +++ b/database/mariadb/centos/files/mariadb-pcdir.patch @@ -0,0 +1,20 @@ +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/database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch b/database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch deleted file mode 100644 index 96274c32e..000000000 --- a/database/mariadb/centos/files/mariadb-revert-stdouterr-closing.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- - scripts/mysqld_safe.sh | 2 +- - support-files/mysql.server.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh -index 5564f92..fe77d97 100644 ---- a/scripts/mysqld_safe.sh -+++ b/scripts/mysqld_safe.sh -@@ -756,7 +756,7 @@ if [ ! -d $mysql_unix_port_dir ] - then - if ! `mkdir -p $mysql_unix_port_dir` - then -- log_error "Fatal error Can't create database directory '$mysql_unix_port'" -+ echo "Fatal error Can't create database directory '$mysql_unix_port'" - exit 1 - fi - chown $user $mysql_unix_port_dir -diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh -index ed0da3c..312f2b2 100644 ---- a/support-files/mysql.server.sh -+++ b/support-files/mysql.server.sh -@@ -296,7 +296,7 @@ case "$mode" in - then - # Give extra arguments to mysqld with the my.cnf file. This script - # may be overwritten at next upgrade. -- $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" & -+ $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" >dev/null & - wait_for_ready; return_value=$? - - # Make lock for RedHat / SuSE --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-scripts.patch b/database/mariadb/centos/files/mariadb-scripts.patch index fe51eb739..b684482d3 100644 --- a/database/mariadb/centos/files/mariadb-scripts.patch +++ b/database/mariadb/centos/files/mariadb-scripts.patch @@ -1,29 +1,25 @@ ---- - scripts/CMakeLists.txt | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) +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. -diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt -index 2f9c185..a6e4d49 100644 ---- a/scripts/CMakeLists.txt -+++ b/scripts/CMakeLists.txt -@@ -362,6 +362,35 @@ ELSE() +--- 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} ) ENDFOREACH() - ++ + # files for systemd + SET(SYSTEMD_SCRIPTS + mysql.tmpfiles.d + mysql.service + mysql@.service + mysql-prepare-db-dir -+ mysql-wait-ready -+ mysql-wait-stop + mysql-check-socket + mysql-check-upgrade + mysql-scripts-common + mysql_config_multilib + clustercheck -+ mysql.init ++ galera_new_cluster + my.cnf + ) + FOREACH(file ${SYSTEMD_SCRIPTS}) @@ -39,9 +35,6 @@ index 2f9c185..a6e4d49 100644 + ENDIF() + ENDFOREACH() + - FOREACH(file ${WSREP_SOURCE}) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh - ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) --- -1.9.1 - + ENDIF() + + # Install libgcc as mylibgcc.a diff --git a/database/mariadb/centos/files/mariadb-spider_on_armv7hl.patch b/database/mariadb/centos/files/mariadb-spider_on_armv7hl.patch new file mode 100644 index 000000000..e4e6694b8 --- /dev/null +++ b/database/mariadb/centos/files/mariadb-spider_on_armv7hl.patch @@ -0,0 +1,1078 @@ +Fix for: +https://jira.mariadb.org/browse/MDEV-18737 +Taken from: +https://github.com/MariaDB/server/commit/ddce85907611e0533d6226de7f53e751cf173f6a + + + + + +From 3faf5d4c1c3274a20a92cb3eb7eb2de6140894d6 Mon Sep 17 00:00:00 2001 +From: Kentoku SHIBA +Date: Thu, 25 Jul 2019 22:52:45 +0900 +Subject: [PATCH] MDEV-18737 Spider "Out of memory" on armv7hl (#1363) + +This is an issue of memory alignment of variable argument when calling my_multi_malloc(). +The fix is strictly casting allocating size to "uint". +--- + storage/spider/ha_spider.cc | 36 +++-- + storage/spider/spd_conn.cc | 69 +++++----- + storage/spider/spd_copy_tables.cc | 25 ++-- + storage/spider/spd_db_conn.cc | 13 +- + storage/spider/spd_db_handlersocket.cc | 4 +- + storage/spider/spd_db_mysql.cc | 10 +- + storage/spider/spd_db_oracle.cc | 24 ++-- + storage/spider/spd_direct_sql.cc | 78 +++++------ + storage/spider/spd_group_by_handler.cc | 7 +- + storage/spider/spd_ping_table.cc | 36 +++-- + storage/spider/spd_table.cc | 134 ++++++++++--------- + storage/spider/spd_trx.cc | 173 +++++++++++++------------ + 12 files changed, 327 insertions(+), 282 deletions(-) + +diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc +index 967d2c6e5de..e04f0c8ef55 100644 +--- a/storage/spider/ha_spider.cc ++++ b/storage/spider/ha_spider.cc +@@ -394,15 +394,24 @@ int ha_spider::open( + { + if (!(searched_bitmap = (uchar *) + spider_bulk_malloc(spider_current_trx, 15, MYF(MY_WME), +- &searched_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &ft_discard_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &position_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &partition_handler_share, sizeof(SPIDER_PARTITION_HANDLER_SHARE), +- &idx_read_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &idx_write_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &rnd_read_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &rnd_write_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &pt_handler_share_handlers, sizeof(ha_spider *) * part_num, ++ &searched_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &ft_discard_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &position_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &partition_handler_share, ++ (uint) sizeof(SPIDER_PARTITION_HANDLER_SHARE), ++ &idx_read_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &idx_write_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &rnd_read_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &rnd_write_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &pt_handler_share_handlers, ++ (uint) sizeof(ha_spider *) * part_num, + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -11317,7 +11326,7 @@ int ha_spider::create( + if (!(tmp_share.static_key_cardinality = (longlong *) + spider_bulk_malloc(spider_current_trx, 246, MYF(MY_WME), + &tmp_share.static_key_cardinality, +- sizeof(*tmp_share.static_key_cardinality) * form->s->keys, ++ (uint) (sizeof(*tmp_share.static_key_cardinality) * form->s->keys), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -12126,7 +12135,8 @@ int ha_spider::info_push( + spider_free(spider_current_trx, hs_pushed_ret_fields, MYF(0)); + if (!(hs_pushed_ret_fields = (uint32 *) + spider_bulk_malloc(spider_current_trx, 17, MYF(MY_WME), +- &hs_pushed_ret_fields, sizeof(uint32) * hs_pushed_ret_fields_num, ++ &hs_pushed_ret_fields, ++ (uint) (sizeof(uint32) * hs_pushed_ret_fields_num), + NullS)) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -13690,8 +13700,8 @@ SPIDER_BULK_ACCESS_LINK *ha_spider::create_bulk_access_link() + */ + if (!(bulk_access_link = (SPIDER_BULK_ACCESS_LINK *) + spider_bulk_malloc(spider_current_trx, 168, MYF(MY_WME), +- &bulk_access_link, sizeof(SPIDER_BULK_ACCESS_LINK), +- &ref, ALIGN_SIZE(ref_length) * 2, ++ &bulk_access_link, (uint) (sizeof(SPIDER_BULK_ACCESS_LINK)), ++ &ref, (uint) (ALIGN_SIZE(ref_length) * 2), + NullS)) + ) { + goto error_bulk_malloc; +diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc +index 911c9bc95ac..f8ca9108061 100644 +--- a/storage/spider/spd_conn.cc ++++ b/storage/spider/spd_conn.cc +@@ -470,30 +470,30 @@ SPIDER_CONN *spider_create_conn( + #endif + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 18, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, share->conn_keys_lengths[link_idx] + 1, +- &tmp_host, share->tgt_hosts_lengths[link_idx] + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (share->conn_keys_lengths[link_idx] + 1), ++ &tmp_host, (uint) (share->tgt_hosts_lengths[link_idx] + 1), + &tmp_username, +- share->tgt_usernames_lengths[link_idx] + 1, ++ (uint) (share->tgt_usernames_lengths[link_idx] + 1), + &tmp_password, +- share->tgt_passwords_lengths[link_idx] + 1, +- &tmp_socket, share->tgt_sockets_lengths[link_idx] + 1, ++ (uint) (share->tgt_passwords_lengths[link_idx] + 1), ++ &tmp_socket, (uint) (share->tgt_sockets_lengths[link_idx] + 1), + &tmp_wrapper, +- share->tgt_wrappers_lengths[link_idx] + 1, +- &tmp_ssl_ca, share->tgt_ssl_cas_lengths[link_idx] + 1, ++ (uint) (share->tgt_wrappers_lengths[link_idx] + 1), ++ &tmp_ssl_ca, (uint) (share->tgt_ssl_cas_lengths[link_idx] + 1), + &tmp_ssl_capath, +- share->tgt_ssl_capaths_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_capaths_lengths[link_idx] + 1), + &tmp_ssl_cert, +- share->tgt_ssl_certs_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_certs_lengths[link_idx] + 1), + &tmp_ssl_cipher, +- share->tgt_ssl_ciphers_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_ciphers_lengths[link_idx] + 1), + &tmp_ssl_key, +- share->tgt_ssl_keys_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_keys_lengths[link_idx] + 1), + &tmp_default_file, +- share->tgt_default_files_lengths[link_idx] + 1, ++ (uint) (share->tgt_default_files_lengths[link_idx] + 1), + &tmp_default_group, +- share->tgt_default_groups_lengths[link_idx] + 1, +- &need_mon, sizeof(int), ++ (uint) (share->tgt_default_groups_lengths[link_idx] + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -592,13 +592,13 @@ SPIDER_CONN *spider_create_conn( + } else if (conn_kind == SPIDER_CONN_KIND_HS_READ) { + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 19, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, share->hs_read_conn_keys_lengths[link_idx] + 1, +- &tmp_host, share->tgt_hosts_lengths[link_idx] + 1, +- &tmp_socket, share->hs_read_socks_lengths[link_idx] + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (share->hs_read_conn_keys_lengths[link_idx] + 1), ++ &tmp_host, (uint) (share->tgt_hosts_lengths[link_idx] + 1), ++ &tmp_socket, (uint) (share->hs_read_socks_lengths[link_idx] + 1), + &tmp_wrapper, +- share->tgt_wrappers_lengths[link_idx] + 1, +- &need_mon, sizeof(int), ++ (uint) (share->tgt_wrappers_lengths[link_idx] + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -634,13 +634,13 @@ SPIDER_CONN *spider_create_conn( + } else { + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 20, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, share->hs_write_conn_keys_lengths[link_idx] + 1, +- &tmp_host, share->tgt_hosts_lengths[link_idx] + 1, +- &tmp_socket, share->hs_write_socks_lengths[link_idx] + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (share->hs_write_conn_keys_lengths[link_idx] + 1), ++ &tmp_host, (uint) (share->tgt_hosts_lengths[link_idx] + 1), ++ &tmp_socket, (uint) (share->hs_write_socks_lengths[link_idx] + 1), + &tmp_wrapper, +- share->tgt_wrappers_lengths[link_idx] + 1, +- &need_mon, sizeof(int), ++ (uint) (share->tgt_wrappers_lengths[link_idx] + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -3634,13 +3634,16 @@ int spider_create_mon_threads( + } + if (!(share->bg_mon_thds = (THD **) + spider_bulk_malloc(spider_current_trx, 23, MYF(MY_WME | MY_ZEROFILL), +- &share->bg_mon_thds, sizeof(THD *) * share->all_link_count, +- &share->bg_mon_threads, sizeof(pthread_t) * share->all_link_count, +- &share->bg_mon_mutexes, sizeof(pthread_mutex_t) * +- share->all_link_count, +- &share->bg_mon_conds, sizeof(pthread_cond_t) * share->all_link_count, ++ &share->bg_mon_thds, ++ (uint) (sizeof(THD *) * share->all_link_count), ++ &share->bg_mon_threads, ++ (uint) (sizeof(pthread_t) * share->all_link_count), ++ &share->bg_mon_mutexes, ++ (uint) (sizeof(pthread_mutex_t) * share->all_link_count), ++ &share->bg_mon_conds, ++ (uint) (sizeof(pthread_cond_t) * share->all_link_count), + &share->bg_mon_sleep_conds, +- sizeof(pthread_cond_t) * share->all_link_count, ++ (uint) (sizeof(pthread_cond_t) * share->all_link_count), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc +index 13c53220b16..1a472e2c12b 100644 +--- a/storage/spider/spd_copy_tables.cc ++++ b/storage/spider/spd_copy_tables.cc +@@ -390,12 +390,15 @@ int spider_udf_get_copy_tgt_tables( + do { + if (!(table_conn = (SPIDER_COPY_TABLE_CONN *) + spider_bulk_malloc(spider_current_trx, 25, MYF(MY_WME | MY_ZEROFILL), +- &table_conn, sizeof(SPIDER_COPY_TABLE_CONN), +- &tmp_share, sizeof(SPIDER_SHARE), +- &tmp_connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &tmp_connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &tmp_long, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &tmp_longlong, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, ++ &table_conn, (uint) (sizeof(SPIDER_COPY_TABLE_CONN)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &tmp_connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &tmp_connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &tmp_long, (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &tmp_longlong, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), + NullS)) + ) { + spider_sys_index_end(table_tables); +@@ -706,12 +709,12 @@ int spider_udf_copy_tables_create_table_list( + if (!(copy_tables->link_idxs[0] = (int *) + spider_bulk_malloc(spider_current_trx, 26, MYF(MY_WME | MY_ZEROFILL), + ©_tables->link_idxs[0], +- sizeof(int) * copy_tables->link_idx_count[0], ++ (uint) (sizeof(int) * copy_tables->link_idx_count[0]), + ©_tables->link_idxs[1], +- sizeof(int) * copy_tables->link_idx_count[1], +- &tmp_name_ptr, sizeof(char) * ( ++ (uint) (sizeof(int) * copy_tables->link_idx_count[1]), ++ &tmp_name_ptr, (uint) (sizeof(char) * ( + spider_table_name_length * 2 + copy_tables->database_length + 3 +- ), ++ )), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -906,7 +909,7 @@ long long spider_copy_tables_body( + + if (!(copy_tables = (SPIDER_COPY_TABLES *) + spider_bulk_malloc(spider_current_trx, 27, MYF(MY_WME | MY_ZEROFILL), +- ©_tables, sizeof(SPIDER_COPY_TABLES), ++ ©_tables, (uint) (sizeof(SPIDER_COPY_TABLES)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc +index cc4599ce0b3..f7178293b05 100644 +--- a/storage/spider/spd_db_conn.cc ++++ b/storage/spider/spd_db_conn.cc +@@ -2643,7 +2643,8 @@ int spider_db_fetch_for_item_sum_func( + if (!spider->direct_aggregate_item_first) + { + if (!spider_bulk_malloc(spider_current_trx, 240, MYF(MY_WME), +- &spider->direct_aggregate_item_first, sizeof(SPIDER_ITEM_HLD), ++ &spider->direct_aggregate_item_first, ++ (uint) (sizeof(SPIDER_ITEM_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -2662,7 +2663,7 @@ int spider_db_fetch_for_item_sum_func( + { + if (!spider_bulk_malloc(spider_current_trx, 241, MYF(MY_WME), + &spider->direct_aggregate_item_current->next, +- sizeof(SPIDER_ITEM_HLD), NullS) ++ (uint) (sizeof(SPIDER_ITEM_HLD)), NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); + } +@@ -4034,8 +4035,8 @@ int spider_db_store_result( + current->field_count = field_count; + if (!(position = (SPIDER_POSITION *) + spider_bulk_malloc(spider_current_trx, 7, MYF(MY_WME | MY_ZEROFILL), +- &position, sizeof(SPIDER_POSITION) * page_size, +- &tmp_row, sizeof(char*) * field_count, ++ &position, (uint) (sizeof(SPIDER_POSITION) * page_size), ++ &tmp_row, (uint) (sizeof(SPIDER_DB_ROW) * field_count), + NullS)) + ) + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -10814,8 +10815,8 @@ int spider_db_udf_copy_tables( + DBUG_ENTER("spider_db_udf_copy_tables"); + if (!(last_row_pos = (ulong *) + spider_bulk_malloc(spider_current_trx, 30, MYF(MY_WME), +- &last_row_pos, sizeof(ulong) * table->s->fields, +- &last_lengths, sizeof(ulong) * table->s->fields, ++ &last_row_pos, (uint) (sizeof(ulong) * table->s->fields), ++ &last_lengths, (uint) (sizeof(ulong) * table->s->fields), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_db_handlersocket.cc b/storage/spider/spd_db_handlersocket.cc +index 1e42838f40a..1e88ad4a59a 100644 +--- a/storage/spider/spd_db_handlersocket.cc ++++ b/storage/spider/spd_db_handlersocket.cc +@@ -505,8 +505,8 @@ SPIDER_DB_ROW *spider_db_handlersocket_row::clone() + DBUG_RETURN(NULL); + } + if (!spider_bulk_malloc(spider_current_trx, 169, MYF(MY_WME), +- &clone_row->hs_row, sizeof(SPIDER_HS_STRING_REF) * field_count, +- &tmp_char, row_size, ++ &clone_row->hs_row, (uint) (sizeof(SPIDER_HS_STRING_REF) * field_count), ++ &tmp_char, (uint) (row_size), + NullS) + ) { + delete clone_row; +diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc +index 1b62b4a9bd5..947a614f11e 100644 +--- a/storage/spider/spd_db_mysql.cc ++++ b/storage/spider/spd_db_mysql.cc +@@ -523,9 +523,9 @@ SPIDER_DB_ROW *spider_db_mbase_row::clone() + row_size = record_size + field_count; + } + if (!spider_bulk_malloc(spider_current_trx, 29, MYF(MY_WME), +- &clone_row->row, sizeof(char*) * field_count, +- &tmp_char, row_size, +- &clone_row->lengths, sizeof(ulong) * field_count, ++ &clone_row->row, (uint) (sizeof(char*) * field_count), ++ &tmp_char, (uint) (row_size), ++ &clone_row->lengths, (uint) (sizeof(ulong) * field_count), + NullS) + ) { + delete clone_row; +@@ -13519,7 +13519,7 @@ int spider_mbase_handler::init_union_table_name_pos() + if (!union_table_name_pos_first) + { + if (!spider_bulk_malloc(spider_current_trx, 236, MYF(MY_WME), +- &union_table_name_pos_first, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_first, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -13540,7 +13540,7 @@ int spider_mbase_handler::set_union_table_name_pos() + if (!union_table_name_pos_current->next) + { + if (!spider_bulk_malloc(spider_current_trx, 237, MYF(MY_WME), +- &union_table_name_pos_current->next, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_current->next, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc +index 08d7d3e083d..d869afc61f4 100644 +--- a/storage/spider/spd_db_oracle.cc ++++ b/storage/spider/spd_db_oracle.cc +@@ -588,16 +588,16 @@ int spider_db_oracle_row::init() + if ( + !(ind = (sb2 *) + spider_bulk_malloc(spider_current_trx, 161, MYF(MY_WME | MY_ZEROFILL), +- &ind, sizeof(sb2) * field_count, +- &rlen, sizeof(ub2) * field_count, +- &coltp, sizeof(ub2) * field_count, +- &colsz, sizeof(ub2) * field_count, +- &row_size, sizeof(ulong) * field_count, +- &val, sizeof(char *) * field_count, +- &tmp_val, MAX_FIELD_WIDTH * field_count, +- &defnp, sizeof(OCIDefine *) * field_count, +- &lobhp, sizeof(OCILobLocator *) * field_count, +- &colhp, sizeof(OCIParam *) * field_count, ++ &ind, (uint) (sizeof(sb2) * field_count), ++ &rlen, (uint) (sizeof(ub2) * field_count), ++ &coltp, (uint) (sizeof(ub2) * field_count), ++ &colsz, (uint) (sizeof(ub2) * field_count), ++ &row_size, (uint) (sizeof(ulong) * field_count), ++ &val, (uint) (sizeof(char *) * field_count), ++ &tmp_val, (uint) (MAX_FIELD_WIDTH * field_count), ++ &defnp, (uint) (sizeof(OCIDefine *) * field_count), ++ &lobhp, (uint) (sizeof(OCILobLocator *) * field_count), ++ &colhp, (uint) (sizeof(OCIParam *) * field_count), + NullS) + ) || + !(val_str = new spider_string[field_count]) +@@ -12487,7 +12487,7 @@ int spider_oracle_handler::init_union_table_name_pos() + if (!union_table_name_pos_first) + { + if (!spider_bulk_malloc(spider_current_trx, 238, MYF(MY_WME), +- &union_table_name_pos_first, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_first, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -12508,7 +12508,7 @@ int spider_oracle_handler::set_union_table_name_pos() + if (!union_table_name_pos_current->next) + { + if (!spider_bulk_malloc(spider_current_trx, 239, MYF(MY_WME), +- &union_table_name_pos_current->next, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_current->next, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc +index 7237d0877a7..7bf0b91a4a7 100644 +--- a/storage/spider/spd_direct_sql.cc ++++ b/storage/spider/spd_direct_sql.cc +@@ -1,4 +1,5 @@ +-/* Copyright (C) 2009-2018 Kentoku Shiba ++/* Copyright (C) 2009-2019 Kentoku Shiba ++ Copyright (C) 2019 MariaDB corp + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -117,31 +118,32 @@ int spider_udf_direct_sql_create_table_list( + #if MYSQL_VERSION_ID < 50500 + if (!(direct_sql->db_names = (char**) + spider_bulk_malloc(spider_current_trx, 31, MYF(MY_WME | MY_ZEROFILL), +- &direct_sql->db_names, sizeof(char*) * table_count, +- &direct_sql->table_names, sizeof(char*) * table_count, +- &direct_sql->tables, sizeof(TABLE*) * table_count, +- &tmp_name_ptr, sizeof(char) * ( ++ &direct_sql->db_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->table_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->tables, (uint) (sizeof(TABLE*) * table_count), ++ &tmp_name_ptr, (uint) (sizeof(char) * ( + table_name_list_length + + thd->db_length * table_count + + 2 * table_count +- ), +- &direct_sql->iop, sizeof(int) * table_count, ++ )), ++ &direct_sql->iop, (uint) (sizeof(int) * table_count), + NullS)) + ) + #else + if (!(direct_sql->db_names = (char**) + spider_bulk_malloc(spider_current_trx, 31, MYF(MY_WME | MY_ZEROFILL), +- &direct_sql->db_names, sizeof(char*) * table_count, +- &direct_sql->table_names, sizeof(char*) * table_count, +- &direct_sql->tables, sizeof(TABLE*) * table_count, +- &tmp_name_ptr, sizeof(char) * ( ++ &direct_sql->db_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->table_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->tables, (uint) (sizeof(TABLE*) * table_count), ++ &tmp_name_ptr, (uint) (sizeof(char) * ( + table_name_list_length + + SPIDER_THD_db_length(thd) * table_count + + 2 * table_count +- ), +- &direct_sql->iop, sizeof(int) * table_count, +- &direct_sql->table_list, sizeof(TABLE_LIST) * table_count, +- &direct_sql->real_table_bitmap, sizeof(uchar) * ((table_count + 7) / 8), ++ )), ++ &direct_sql->iop, (uint) (sizeof(int) * table_count), ++ &direct_sql->table_list, (uint) (sizeof(TABLE_LIST) * table_count), ++ &direct_sql->real_table_bitmap, ++ (uint) (sizeof(uchar) * ((table_count + 7) / 8)), + NullS)) + ) + #endif +@@ -412,23 +414,23 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn( + #endif + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 32, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, direct_sql->conn_key_length + 1, +- &tmp_host, direct_sql->tgt_host_length + 1, +- &tmp_username, direct_sql->tgt_username_length + 1, +- &tmp_password, direct_sql->tgt_password_length + 1, +- &tmp_socket, direct_sql->tgt_socket_length + 1, +- &tmp_wrapper, direct_sql->tgt_wrapper_length + 1, +- &tmp_ssl_ca, direct_sql->tgt_ssl_ca_length + 1, +- &tmp_ssl_capath, direct_sql->tgt_ssl_capath_length + 1, +- &tmp_ssl_cert, direct_sql->tgt_ssl_cert_length + 1, +- &tmp_ssl_cipher, direct_sql->tgt_ssl_cipher_length + 1, +- &tmp_ssl_key, direct_sql->tgt_ssl_key_length + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (direct_sql->conn_key_length + 1), ++ &tmp_host, (uint) (direct_sql->tgt_host_length + 1), ++ &tmp_username, (uint) (direct_sql->tgt_username_length + 1), ++ &tmp_password, (uint) (direct_sql->tgt_password_length + 1), ++ &tmp_socket, (uint) (direct_sql->tgt_socket_length + 1), ++ &tmp_wrapper, (uint) (direct_sql->tgt_wrapper_length + 1), ++ &tmp_ssl_ca, (uint) (direct_sql->tgt_ssl_ca_length + 1), ++ &tmp_ssl_capath, (uint) (direct_sql->tgt_ssl_capath_length + 1), ++ &tmp_ssl_cert, (uint) (direct_sql->tgt_ssl_cert_length + 1), ++ &tmp_ssl_cipher, (uint) (direct_sql->tgt_ssl_cipher_length + 1), ++ &tmp_ssl_key, (uint) (direct_sql->tgt_ssl_key_length + 1), + &tmp_default_file, +- direct_sql->tgt_default_file_length + 1, ++ (uint) (direct_sql->tgt_default_file_length + 1), + &tmp_default_group, +- direct_sql->tgt_default_group_length + 1, +- &need_mon, sizeof(int), ++ (uint) (direct_sql->tgt_default_group_length + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -439,12 +441,12 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn( + } else { + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 33, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, direct_sql->conn_key_length + 1, +- &tmp_host, direct_sql->tgt_host_length + 1, +- &tmp_socket, direct_sql->tgt_socket_length + 1, +- &tmp_wrapper, direct_sql->tgt_wrapper_length + 1, +- &need_mon, sizeof(int), ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (direct_sql->conn_key_length + 1), ++ &tmp_host, (uint) (direct_sql->tgt_host_length + 1), ++ &tmp_socket, (uint) (direct_sql->tgt_socket_length + 1), ++ &tmp_wrapper, (uint) (direct_sql->tgt_wrapper_length + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -1602,8 +1604,8 @@ long long spider_direct_sql_body( + SPIDER_BACKUP_DASTATUS; + if (!(direct_sql = (SPIDER_DIRECT_SQL *) + spider_bulk_malloc(spider_current_trx, 34, MYF(MY_WME | MY_ZEROFILL), +- &direct_sql, sizeof(SPIDER_DIRECT_SQL), +- &sql, sizeof(char) * args->lengths[0], ++ &direct_sql, (uint) (sizeof(SPIDER_DIRECT_SQL)), ++ &sql, (uint) (sizeof(char) * args->lengths[0]), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +diff --git a/storage/spider/spd_group_by_handler.cc b/storage/spider/spd_group_by_handler.cc +index 3b57092c4ce..51cfca23106 100644 +--- a/storage/spider/spd_group_by_handler.cc ++++ b/storage/spider/spd_group_by_handler.cc +@@ -1,4 +1,5 @@ +-/* Copyright (C) 2008-2018 Kentoku Shiba ++/* Copyright (C) 2008-2019 Kentoku Shiba ++ Copyright (C) 2019 MariaDB corp + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -637,9 +638,9 @@ SPIDER_CONN_HOLDER *spider_fields::create_conn_holder( + DBUG_PRINT("info",("spider this=%p", this)); + return_conn_holder = (SPIDER_CONN_HOLDER *) + spider_bulk_malloc(spider_current_trx, 252, MYF(MY_WME | MY_ZEROFILL), +- &return_conn_holder, sizeof(SPIDER_CONN_HOLDER), ++ &return_conn_holder, (uint) (sizeof(SPIDER_CONN_HOLDER)), + &table_link_idx_holder, +- table_count * sizeof(SPIDER_TABLE_LINK_IDX_HOLDER), ++ (uint) (table_count * sizeof(SPIDER_TABLE_LINK_IDX_HOLDER)), + NullS + ); + if (!return_conn_holder) +diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc +index 431d46063c3..60e36fc24fb 100644 +--- a/storage/spider/spd_ping_table.cc ++++ b/storage/spider/spd_ping_table.cc +@@ -1,4 +1,5 @@ +-/* Copyright (C) 2009-2018 Kentoku Shiba ++/* Copyright (C) 2009-2019 Kentoku Shiba ++ Copyright (C) 2019 MariaDB corp + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -367,12 +368,15 @@ int spider_get_ping_table_mon( + do { + if (!(table_mon = (SPIDER_TABLE_MON *) + spider_bulk_malloc(spider_current_trx, 35, MYF(MY_WME | MY_ZEROFILL), +- &table_mon, sizeof(SPIDER_TABLE_MON), +- &tmp_share, sizeof(SPIDER_SHARE), +- &tmp_connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &tmp_connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &tmp_long, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &tmp_longlong, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, ++ &table_mon, (uint) (sizeof(SPIDER_TABLE_MON)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &tmp_connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &tmp_connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &tmp_long, (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &tmp_longlong, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), + NullS)) + ) { + spider_sys_index_end(table_link_mon); +@@ -491,13 +495,17 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt( + SPD_INIT_ALLOC_ROOT(&mem_root, 4096, 0, MYF(MY_WME)); + if (!(table_mon_list = (SPIDER_TABLE_MON_LIST *) + spider_bulk_malloc(spider_current_trx, 36, MYF(MY_WME | MY_ZEROFILL), +- &table_mon_list, sizeof(SPIDER_TABLE_MON_LIST), +- &tmp_share, sizeof(SPIDER_SHARE), +- &tmp_connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &tmp_connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &tmp_long, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &tmp_longlong, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, +- &key_str, str->length() + 1, ++ &table_mon_list, (uint) (sizeof(SPIDER_TABLE_MON_LIST)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &tmp_connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &tmp_connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &tmp_long, ++ (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &tmp_longlong, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), ++ &key_str, (uint) (str->length() + 1), + NullS)) + ) { + my_error(HA_ERR_OUT_OF_MEM, MYF(0)); +diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc +index 83c5a37555f..5bae895570d 100644 +--- a/storage/spider/spd_table.cc ++++ b/storage/spider/spd_table.cc +@@ -1209,8 +1209,8 @@ int spider_create_string_list( + + if (!(*string_list = (char**) + spider_bulk_malloc(spider_current_trx, 37, MYF(MY_WME | MY_ZEROFILL), +- string_list, sizeof(char*) * (*list_length), +- string_length_list, sizeof(int) * (*list_length), ++ string_list, (uint) (sizeof(char*) * (*list_length)), ++ string_length_list, (uint) (sizeof(int) * (*list_length)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1328,7 +1328,7 @@ int spider_create_long_list( + + if (!(*long_list = (long*) + spider_bulk_malloc(spider_current_trx, 38, MYF(MY_WME | MY_ZEROFILL), +- long_list, sizeof(long) * (*list_length), ++ long_list, (uint) (sizeof(long) * (*list_length)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1412,7 +1412,7 @@ int spider_create_longlong_list( + + if (!(*longlong_list = (longlong *) + spider_bulk_malloc(spider_current_trx, 39, MYF(MY_WME | MY_ZEROFILL), +- longlong_list, sizeof(longlong) * (*list_length), ++ longlong_list, (uint) (sizeof(longlong) * (*list_length)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1483,8 +1483,8 @@ int spider_increase_string_list( + + if (!(tmp_str_list = (char**) + spider_bulk_malloc(spider_current_trx, 40, MYF(MY_WME | MY_ZEROFILL), +- &tmp_str_list, sizeof(char*) * link_count, +- &tmp_length_list, sizeof(uint) * link_count, ++ &tmp_str_list, (uint) (sizeof(char*) * link_count), ++ &tmp_length_list, (uint) (sizeof(uint) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1546,8 +1546,8 @@ int spider_increase_null_string_list( + + if (!(tmp_str_list = (char**) + spider_bulk_malloc(spider_current_trx, 247, MYF(MY_WME | MY_ZEROFILL), +- &tmp_str_list, sizeof(char*) * link_count, +- &tmp_length_list, sizeof(uint) * link_count, ++ &tmp_str_list, (uint) (sizeof(char*) * link_count), ++ &tmp_length_list, (uint) (sizeof(uint) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1604,7 +1604,7 @@ int spider_increase_long_list( + + if (!(tmp_long_list = (long*) + spider_bulk_malloc(spider_current_trx, 41, MYF(MY_WME | MY_ZEROFILL), +- &tmp_long_list, sizeof(long) * link_count, ++ &tmp_long_list, (uint) (sizeof(long) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1649,7 +1649,7 @@ int spider_increase_longlong_list( + + if (!(tmp_longlong_list = (longlong*) + spider_bulk_malloc(spider_current_trx, 42, MYF(MY_WME | MY_ZEROFILL), +- &tmp_longlong_list, sizeof(longlong) * link_count, ++ &tmp_longlong_list, (uint) (sizeof(longlong) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -2972,17 +2972,17 @@ int spider_parse_connect_info( + if (!(share_alter->tmp_server_names = (char **) + spider_bulk_malloc(spider_current_trx, 43, MYF(MY_WME | MY_ZEROFILL), + &share_alter->tmp_server_names, +- sizeof(char *) * 16 * share->all_link_count, ++ (uint) (sizeof(char *) * 16 * share->all_link_count), + &share_alter->tmp_server_names_lengths, +- sizeof(uint *) * 16 * share->all_link_count, ++ (uint) (sizeof(uint *) * 16 * share->all_link_count), + &share_alter->tmp_tgt_ports, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + &share_alter->tmp_tgt_ssl_vscs, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + &share_alter->tmp_monitoring_binlog_pos_at_failing, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + &share_alter->tmp_link_statuses, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -4383,13 +4383,17 @@ SPIDER_SHARE *spider_create_share( + bitmap_size = spider_bitmap_size(table_share->fields); + if (!(share = (SPIDER_SHARE *) + spider_bulk_malloc(spider_current_trx, 46, MYF(MY_WME | MY_ZEROFILL), +- &share, sizeof(*share), +- &tmp_name, length + 1, +- &tmp_static_key_cardinality, sizeof(*tmp_static_key_cardinality) * table_share->keys, +- &tmp_cardinality, sizeof(*tmp_cardinality) * table_share->fields, +- &tmp_cardinality_upd, sizeof(*tmp_cardinality_upd) * bitmap_size, +- &tmp_table_mon_mutex_bitmap, sizeof(*tmp_table_mon_mutex_bitmap) * +- ((spider_param_udf_table_mon_mutex_count() + 7) / 8), ++ &share, (uint) (sizeof(*share)), ++ &tmp_name, (uint) (length + 1), ++ &tmp_static_key_cardinality, ++ (uint) (sizeof(*tmp_static_key_cardinality) * table_share->keys), ++ &tmp_cardinality, ++ (uint) (sizeof(*tmp_cardinality) * table_share->fields), ++ &tmp_cardinality_upd, ++ (uint) (sizeof(*tmp_cardinality_upd) * bitmap_size), ++ &tmp_table_mon_mutex_bitmap, ++ (uint) (sizeof(*tmp_table_mon_mutex_bitmap) * ++ ((spider_param_udf_table_mon_mutex_count() + 7) / 8)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -5907,8 +5911,8 @@ SPIDER_LGTM_TBLHND_SHARE *spider_get_lgtm_tblhnd_share( + DBUG_PRINT("info",("spider create new lgtm tblhnd share")); + if (!(lgtm_tblhnd_share = (SPIDER_LGTM_TBLHND_SHARE *) + spider_bulk_malloc(spider_current_trx, 244, MYF(MY_WME | MY_ZEROFILL), +- &lgtm_tblhnd_share, sizeof(*lgtm_tblhnd_share), +- &tmp_name, table_name_length + 1, ++ &lgtm_tblhnd_share, (uint) (sizeof(*lgtm_tblhnd_share)), ++ &tmp_name, (uint) (table_name_length + 1), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -6017,9 +6021,10 @@ SPIDER_PARTITION_SHARE *spider_get_pt_share( + DBUG_PRINT("info",("spider create new pt share")); + if (!(partition_share = (SPIDER_PARTITION_SHARE *) + spider_bulk_malloc(spider_current_trx, 51, MYF(MY_WME | MY_ZEROFILL), +- &partition_share, sizeof(*partition_share), +- &tmp_name, table_share->path.length + 1, +- &tmp_cardinality, sizeof(*tmp_cardinality) * table_share->fields, ++ &partition_share, (uint) (sizeof(*partition_share)), ++ &tmp_name, (uint) (table_share->path.length + 1), ++ &tmp_cardinality, ++ (uint) (sizeof(*tmp_cardinality) * table_share->fields), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -6395,15 +6400,18 @@ int spider_open_all_tables( + + if (!(share = (SPIDER_SHARE *) + spider_bulk_malloc(spider_current_trx, 52, MYF(MY_WME | MY_ZEROFILL), +- &share, sizeof(*share), +- &connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &long_info, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &longlong_info, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, +- &conns, sizeof(SPIDER_CONN *), +- &need_mon, sizeof(int), +- &spider->conn_link_idx, sizeof(uint), +- &spider->conn_can_fo, sizeof(uchar), ++ &share, (uint) (sizeof(*share)), ++ &connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &long_info, (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &longlong_info, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), ++ &conns, (uint) (sizeof(SPIDER_CONN *)), ++ &need_mon, (uint) (sizeof(int)), ++ &spider->conn_link_idx, (uint) (sizeof(uint)), ++ &spider->conn_can_fo, (uint) (sizeof(uchar)), + NullS)) + ) { + delete spider; +@@ -7204,12 +7212,12 @@ int spider_db_init( + + if (!(spider_udf_table_mon_mutexes = (pthread_mutex_t *) + spider_bulk_malloc(NULL, 53, MYF(MY_WME | MY_ZEROFILL), +- &spider_udf_table_mon_mutexes, sizeof(pthread_mutex_t) * +- spider_param_udf_table_mon_mutex_count(), +- &spider_udf_table_mon_conds, sizeof(pthread_cond_t) * +- spider_param_udf_table_mon_mutex_count(), +- &spider_udf_table_mon_list_hash, sizeof(HASH) * +- spider_param_udf_table_mon_mutex_count(), ++ &spider_udf_table_mon_mutexes, (uint) (sizeof(pthread_mutex_t) * ++ spider_param_udf_table_mon_mutex_count()), ++ &spider_udf_table_mon_conds, (uint) (sizeof(pthread_cond_t) * ++ spider_param_udf_table_mon_mutex_count()), ++ &spider_udf_table_mon_list_hash, (uint) (sizeof(HASH) * ++ spider_param_udf_table_mon_mutex_count()), + NullS)) + ) + goto error_alloc_mon_mutxes; +@@ -7258,10 +7266,10 @@ int spider_db_init( + #ifndef WITHOUT_SPIDER_BG_SEARCH + if (!(spider_table_sts_threads = (SPIDER_THREAD *) + spider_bulk_malloc(NULL, 256, MYF(MY_WME | MY_ZEROFILL), +- &spider_table_sts_threads, sizeof(SPIDER_THREAD) * +- spider_param_table_sts_thread_count(), +- &spider_table_crd_threads, sizeof(SPIDER_THREAD) * +- spider_param_table_crd_thread_count(), ++ &spider_table_sts_threads, (uint) (sizeof(SPIDER_THREAD) * ++ spider_param_table_sts_thread_count()), ++ &spider_table_crd_threads, (uint) (sizeof(SPIDER_THREAD) * ++ spider_param_table_crd_thread_count()), + NullS)) + ) + goto error_alloc_mon_mutxes; +@@ -7968,8 +7976,8 @@ SPIDER_INIT_ERROR_TABLE *spider_get_init_error_table( + } + if (!(spider_init_error_table = (SPIDER_INIT_ERROR_TABLE *) + spider_bulk_malloc(spider_current_trx, 54, MYF(MY_WME | MY_ZEROFILL), +- &spider_init_error_table, sizeof(*spider_init_error_table), +- &tmp_name, share->table_name_length + 1, ++ &spider_init_error_table, (uint) (sizeof(*spider_init_error_table)), ++ &tmp_name, (uint) (share->table_name_length + 1), + NullS)) + ) { + pthread_mutex_unlock(&spider_init_error_tbl_mutex); +@@ -9551,25 +9559,25 @@ int spider_create_spider_object_for_share( + #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) + if (!(need_mons = (int *) + spider_bulk_malloc(spider_current_trx, 255, MYF(MY_WME | MY_ZEROFILL), +- &need_mons, (sizeof(int) * share->link_count), +- &conns, (sizeof(SPIDER_CONN *) * share->link_count), +- &conn_link_idx, (sizeof(uint) * share->link_count), +- &conn_can_fo, (sizeof(uchar) * share->link_bitmap_size), +- &conn_keys, (sizeof(char *) * share->link_count), +- &hs_r_conn_keys, (sizeof(char *) * share->link_count), +- &hs_w_conn_keys, (sizeof(char *) * share->link_count), +- &dbton_hdl, (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), ++ &need_mons, (uint) (sizeof(int) * share->link_count), ++ &conns, (uint) (sizeof(SPIDER_CONN *) * share->link_count), ++ &conn_link_idx, (uint) (sizeof(uint) * share->link_count), ++ &conn_can_fo, (uint) (sizeof(uchar) * share->link_bitmap_size), ++ &conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &hs_r_conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &hs_w_conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &dbton_hdl, (uint) (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), + NullS)) + ) + #else + if (!(need_mons = (int *) + spider_bulk_malloc(spider_current_trx, 255, MYF(MY_WME | MY_ZEROFILL), +- &need_mons, (sizeof(int) * share->link_count), +- &conns, (sizeof(SPIDER_CONN *) * share->link_count), +- &conn_link_idx, (sizeof(uint) * share->link_count), +- &conn_can_fo, (sizeof(uchar) * share->link_bitmap_size), +- &conn_keys, (sizeof(char *) * share->link_count), +- &dbton_hdl, (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), ++ &need_mons, (uint) (sizeof(int) * share->link_count), ++ &conns, (uint) (sizeof(SPIDER_CONN *) * share->link_count), ++ &conn_link_idx, (uint) (sizeof(uint) * share->link_count), ++ &conn_can_fo, (uint) (sizeof(uchar) * share->link_bitmap_size), ++ &conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &dbton_hdl, (uint) (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), + NullS)) + ) + #endif +diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc +index bb9f11793cb..1638533eca1 100644 +--- a/storage/spider/spd_trx.cc ++++ b/storage/spider/spd_trx.cc +@@ -548,81 +548,90 @@ int spider_create_trx_alter_table( + + if (!(alter_table = (SPIDER_ALTER_TABLE *) + spider_bulk_malloc(spider_current_trx, 55, MYF(MY_WME | MY_ZEROFILL), +- &alter_table, sizeof(*alter_table), +- &tmp_name, sizeof(char) * (share->table_name_length + 1), +- +- &tmp_server_names, sizeof(char *) * share->all_link_count, +- &tmp_tgt_table_names, sizeof(char *) * share->all_link_count, +- &tmp_tgt_dbs, sizeof(char *) * share->all_link_count, +- &tmp_tgt_hosts, sizeof(char *) * share->all_link_count, +- &tmp_tgt_usernames, sizeof(char *) * share->all_link_count, +- &tmp_tgt_passwords, sizeof(char *) * share->all_link_count, +- &tmp_tgt_sockets, sizeof(char *) * share->all_link_count, +- &tmp_tgt_wrappers, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_cas, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_capaths, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_certs, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_ciphers, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_keys, sizeof(char *) * share->all_link_count, +- &tmp_tgt_default_files, sizeof(char *) * share->all_link_count, +- &tmp_tgt_default_groups, sizeof(char *) * share->all_link_count, +- &tmp_static_link_ids, sizeof(char *) * share->all_link_count, +- +- &tmp_server_names_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_table_names_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_dbs_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_hosts_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_usernames_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_passwords_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_sockets_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_wrappers_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_cas_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_capaths_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_certs_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_ciphers_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_keys_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_default_files_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_default_groups_lengths, sizeof(uint) * share->all_link_count, +- &tmp_static_link_ids_lengths, sizeof(uint) * share->all_link_count, +- +- &tmp_tgt_ports, sizeof(long) * share->all_link_count, +- &tmp_tgt_ssl_vscs, sizeof(long) * share->all_link_count, ++ &alter_table, (uint) (sizeof(*alter_table)), ++ &tmp_name, (uint) (sizeof(char) * (share->table_name_length + 1)), ++ ++ &tmp_server_names, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_table_names, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_dbs, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_hosts, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_usernames, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_passwords, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_sockets, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_wrappers, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_cas, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_capaths, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_certs, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_ciphers, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_keys, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_default_files, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_default_groups, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_static_link_ids, (uint) (sizeof(char *) * share->all_link_count), ++ ++ &tmp_server_names_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_table_names_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_dbs_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_hosts_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_usernames_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_passwords_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_sockets_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_wrappers_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_cas_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_capaths_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_certs_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_ciphers_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_keys_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_default_files_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_default_groups_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_static_link_ids_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ ++ &tmp_tgt_ports, (uint) (sizeof(long) * share->all_link_count), ++ &tmp_tgt_ssl_vscs, (uint) (sizeof(long) * share->all_link_count), + &tmp_monitoring_binlog_pos_at_failing, +- sizeof(long) * share->all_link_count, +- &tmp_link_statuses, sizeof(long) * share->all_link_count, +- +- &tmp_server_names_char, sizeof(char) * +- (share_alter->tmp_server_names_charlen + 1), +- &tmp_tgt_table_names_char, sizeof(char) * +- (share_alter->tmp_tgt_table_names_charlen + 1), +- &tmp_tgt_dbs_char, sizeof(char) * +- (share_alter->tmp_tgt_dbs_charlen + 1), +- &tmp_tgt_hosts_char, sizeof(char) * +- (share_alter->tmp_tgt_hosts_charlen + 1), +- &tmp_tgt_usernames_char, sizeof(char) * +- (share_alter->tmp_tgt_usernames_charlen + 1), +- &tmp_tgt_passwords_char, sizeof(char) * +- (share_alter->tmp_tgt_passwords_charlen + 1), +- &tmp_tgt_sockets_char, sizeof(char) * +- (share_alter->tmp_tgt_sockets_charlen + 1), +- &tmp_tgt_wrappers_char, sizeof(char) * +- (share_alter->tmp_tgt_wrappers_charlen + 1), +- &tmp_tgt_ssl_cas_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_cas_charlen + 1), +- &tmp_tgt_ssl_capaths_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_capaths_charlen + 1), +- &tmp_tgt_ssl_certs_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_certs_charlen + 1), +- &tmp_tgt_ssl_ciphers_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_ciphers_charlen + 1), +- &tmp_tgt_ssl_keys_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_keys_charlen + 1), +- &tmp_tgt_default_files_char, sizeof(char) * +- (share_alter->tmp_tgt_default_files_charlen + 1), +- &tmp_tgt_default_groups_char, sizeof(char) * +- (share_alter->tmp_tgt_default_groups_charlen + 1), +- &tmp_static_link_ids_char, sizeof(char) * +- (share_alter->tmp_static_link_ids_charlen + 1), ++ (uint) (sizeof(long) * share->all_link_count), ++ &tmp_link_statuses, (uint) (sizeof(long) * share->all_link_count), ++ ++ &tmp_server_names_char, (uint) (sizeof(char) * ++ (share_alter->tmp_server_names_charlen + 1)), ++ &tmp_tgt_table_names_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_table_names_charlen + 1)), ++ &tmp_tgt_dbs_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_dbs_charlen + 1)), ++ &tmp_tgt_hosts_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_hosts_charlen + 1)), ++ &tmp_tgt_usernames_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_usernames_charlen + 1)), ++ &tmp_tgt_passwords_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_passwords_charlen + 1)), ++ &tmp_tgt_sockets_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_sockets_charlen + 1)), ++ &tmp_tgt_wrappers_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_wrappers_charlen + 1)), ++ &tmp_tgt_ssl_cas_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_cas_charlen + 1)), ++ &tmp_tgt_ssl_capaths_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_capaths_charlen + 1)), ++ &tmp_tgt_ssl_certs_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_certs_charlen + 1)), ++ &tmp_tgt_ssl_ciphers_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_ciphers_charlen + 1)), ++ &tmp_tgt_ssl_keys_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_keys_charlen + 1)), ++ &tmp_tgt_default_files_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_default_files_charlen + 1)), ++ &tmp_tgt_default_groups_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_default_groups_charlen + 1)), ++ &tmp_static_link_ids_char, (uint) (sizeof(char) * ++ (share_alter->tmp_static_link_ids_charlen + 1)), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -1200,10 +1209,10 @@ SPIDER_TRX *spider_get_trx( + DBUG_PRINT("info",("spider create new trx")); + if (!(trx = (SPIDER_TRX *) + spider_bulk_malloc(NULL, 56, MYF(MY_WME | MY_ZEROFILL), +- &trx, sizeof(*trx), +- &tmp_share, sizeof(SPIDER_SHARE), +- &udf_table_mutexes, sizeof(pthread_mutex_t) * +- spider_param_udf_table_lock_mutex_count(), ++ &trx, (uint) (sizeof(*trx)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &udf_table_mutexes, (uint) (sizeof(pthread_mutex_t) * ++ spider_param_udf_table_lock_mutex_count()), + NullS)) + ) + goto error_alloc_trx; +@@ -4191,10 +4200,10 @@ int spider_create_trx_ha( + { + if (!(trx_ha = (SPIDER_TRX_HA *) + spider_bulk_malloc(spider_current_trx, 58, MYF(MY_WME), +- &trx_ha, sizeof(SPIDER_TRX_HA), +- &tmp_name, sizeof(char *) * (share->table_name_length + 1), +- &conn_link_idx, sizeof(uint) * share->link_count, +- &conn_can_fo, sizeof(uchar) * share->link_bitmap_size, ++ &trx_ha, (uint) (sizeof(SPIDER_TRX_HA)), ++ &tmp_name, (uint) (sizeof(char *) * (share->table_name_length + 1)), ++ &conn_link_idx, (uint) (sizeof(uint) * share->link_count), ++ &conn_can_fo, (uint) (sizeof(uchar) * share->link_bitmap_size), + NullS)) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +-- +2.23.0 + diff --git a/database/mariadb/centos/files/mariadb-ssl-cypher.patch b/database/mariadb/centos/files/mariadb-ssl-cypher.patch deleted file mode 100644 index 9ff9e0269..000000000 --- a/database/mariadb/centos/files/mariadb-ssl-cypher.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- - mysql-test/r/ssl_8k_key.result | 4 ++-- - mysql-test/t/ssl_8k_key.test | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/mysql-test/r/ssl_8k_key.result b/mysql-test/r/ssl_8k_key.result -index b33a1d2..ff9d0cc 100644 ---- a/mysql-test/r/ssl_8k_key.result -+++ b/mysql-test/r/ssl_8k_key.result -@@ -1,2 +1,2 @@ --Variable_name Value --Ssl_cipher DHE-RSA-AES256-SHA -+have_ssl -+1 -diff --git a/mysql-test/t/ssl_8k_key.test b/mysql-test/t/ssl_8k_key.test -index 27cffdc..4b81648 100644 ---- a/mysql-test/t/ssl_8k_key.test -+++ b/mysql-test/t/ssl_8k_key.test -@@ -5,7 +5,7 @@ - # - # Bug#29784 YaSSL assertion failure when reading 8k key. - # ----exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1 -+--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1 - - ## This test file is for testing encrypted communication only, not other - ## encryption routines that the SSL library happens to provide! --- -1.9.1 - diff --git a/database/mariadb/centos/files/mariadb-strmov.patch b/database/mariadb/centos/files/mariadb-strmov.patch deleted file mode 100644 index cdd2f8bcb..000000000 --- a/database/mariadb/centos/files/mariadb-strmov.patch +++ /dev/null @@ -1,40 +0,0 @@ -Remove overly optimistic definition of strmov() as stpcpy(). - -mysql uses this macro with overlapping source and destination strings, -which is verboten per spec, and fails on some Red Hat platforms. -Deleting the definition is sufficient to make it fall back to a -byte-at-a-time copy loop, which should consistently give the -expected behavior. - -Note: the particular case that prompted this patch is reported and fixed -at http://bugs.mysql.com/bug.php?id=48864. However, my faith in upstream's -ability to detect this type of error is low, and I also see little evidence -of any real performance gain from optimizing these calls. So I'm keeping -this patch. - ---- - include/m_string.h | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/include/m_string.h b/include/m_string.h -index 7437ea8..bb3ab57 100644 ---- a/include/m_string.h -+++ b/include/m_string.h -@@ -73,14 +73,6 @@ - extern void *(*my_str_realloc)(void *, size_t); - extern void (*my_str_free)(void *); - --#ifdef DBUG_OFF --#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER) --#define strmov(A,B) __builtin_stpcpy((A),(B)) --#elif defined(HAVE_STPCPY) --#define strmov(A,B) stpcpy((A),(B)) --#endif --#endif -- - /* Declared in int2str() */ - extern const char _dig_vec_upper[]; - extern const char _dig_vec_lower[]; --- -1.9.1 - diff --git a/database/mariadb/centos/files/mysql-check-socket.sh b/database/mariadb/centos/files/mysql-check-socket.sh index b15cd32fe..407523fd5 100644 --- a/database/mariadb/centos/files/mysql-check-socket.sh +++ b/database/mariadb/centos/files/mysql-check-socket.sh @@ -25,10 +25,10 @@ if test -e "$socketfile" ; then fi # some process uses the socket file - if fuser "$socketfile" &>/dev/null ; then - socketpid=$(fuser "$socketfile" 2>/dev/null) + response=`@bindir@/mysqladmin --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 "Please, stop the process $socketpid or remove $socketfile manually to start the service." >&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/database/mariadb/centos/files/mysql-check-upgrade.sh b/database/mariadb/centos/files/mysql-check-upgrade.sh index cd669bda8..1bfd3bc6a 100644 --- a/database/mariadb/centos/files/mysql-check-upgrade.sh +++ b/database/mariadb/centos/files/mysql-check-upgrade.sh @@ -27,9 +27,9 @@ if [ $version -ne $thisversion ] ; then cat <&2 The datadir located at $datadir needs to be upgraded using 'mysql_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 'mysql_upgrade' + 2. Start the database daemon using 'service @DAEMON_NAME@ start' + 3. Run 'mysql_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/ diff --git a/database/mariadb/centos/files/mysql-embedded-check.c b/database/mariadb/centos/files/mysql-embedded-check.c deleted file mode 100644 index 8bf8ca53d..000000000 --- a/database/mariadb/centos/files/mysql-embedded-check.c +++ /dev/null @@ -1,26 +0,0 @@ -/* simple test program to see if we can link the embedded server library */ - -#include -#include -#include - -#include "mysql.h" - -MYSQL *mysql; - -static char *server_options[] = \ - { "mysql_test", "--defaults-file=my.cnf", NULL }; -int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; - -static char *server_groups[] = { "libmysqld_server", - "libmysqld_client", NULL }; - -int main(int argc, char **argv) -{ - mysql_library_init(num_elements, server_options, server_groups); - mysql = mysql_init(NULL); - mysql_close(mysql); - mysql_library_end(); - - return 0; -} diff --git a/database/mariadb/centos/files/mysql-prepare-db-dir.sh b/database/mariadb/centos/files/mysql-prepare-db-dir.sh index 52a42a067..cfc90258a 100644 --- a/database/mariadb/centos/files/mysql-prepare-db-dir.sh +++ b/database/mariadb/centos/files/mysql-prepare-db-dir.sh @@ -5,24 +5,27 @@ source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" +export LC_ALL=C + # Returns content of the specified directory # If listing files fails, fake-file is returned so which means # we'll behave like there was some data initialized +# Some files or directories are fine to be there, so those are +# explicitly removed from the listing # @param datadir -ls_check_datadir () +list_datadir () { - ls -A "$1" 2>/dev/null - test $? -eq 0 || echo "fake-file" + ( ls -1A "$1" 2>/dev/null || echo "fake-file" ) | grep -v \ + -e '^lost+found$' \ + -e '\.err$' \ + -e '^.bash_history$' } # Checks whether datadir should be initialized # @param datadir should_initialize () { - case `ls_check_datadir "$1"` in - ""|lost+found|*.err) true ;; - *) false ;; - esac + test -z "$(list_datadir "$1")" } # If two args given first is user, second is group @@ -52,24 +55,23 @@ else fi # Set up the errlogfile with appropriate permissions -touch "$errlogfile" -ret=$? -# Provide some advice if the log file cannot be touched -if [ $ret -ne 0 ] ; then - errlogdir=$(dirname $errlogfile) +if [ ! -e "$errlogfile" -a ! -h "$errlogfile" -a x$(dirname "$errlogfile") = "x/var/log" ]; then + case $(basename "$errlogfile") in + mysql*.log|mariadb*.log) install /dev/null -m0640 -o$myuser -g$mygroup "$errlogfile" ;; + *) ;; + esac +else + # Provide some advice if the log file cannot be created by this script + errlogdir=$(dirname "$errlogfile") if ! [ -d "$errlogdir" ] ; then - echo "The directory $errlogdir does not exist." - elif [ -f "$errlogfile" ] ; then - echo "The log file $errlogfile cannot be touched, please, fix its permissions." - else - echo "The log file $errlogfile could not be created." + echo "The directory $errlogdir does not exist." >&2 + exit 1 + elif [ -e "$errlogfile" -a ! -w "$errlogfile" ] ; then + echo "The log file $errlogfile cannot be written, please, fix its permissions." >&2 + echo "The daemon will be run under $myuser:$mygroup" >&2 + exit 1 fi - echo "The daemon will be run under $myuser:$mygroup" - exit 1 fi -chown "$myuser:$mygroup" "$errlogfile" -chmod 0640 "$errlogfile" -[ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" # Make the data directory if doesn't exist or empty if should_initialize "$datadir" ; then @@ -83,14 +85,14 @@ if should_initialize "$datadir" ; then [ -x /sbin/restorecon ] && /sbin/restorecon "$datadir" # Now create the database - echo "Initializing @NICE_PROJECT_NAME@ database" + echo "Initializing @NICE_PROJECT_NAME@ database" >&2 # Avoiding deletion of files not created by mysql_install_db is # guarded by time check and sleep should help work-arounded # potential issues on systems with 1 second resolution timestamps # 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" + @bindir@/mysql_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 @@ -113,8 +115,6 @@ if should_initialize "$datadir" ; then fi # upgrade does not need to be run on a fresh datadir echo "@VERSION@-MariaDB" >"$datadir/mysql_upgrade_info" - # In case we're running as root, make sure files are owned properly - chown -R "$myuser:$mygroup" "$datadir" else if [ -d "$datadir/mysql/" ] ; then # mysql dir exists, it seems data are initialized properly @@ -123,8 +123,8 @@ else else # if the directory is not empty but mysql/ directory is missing, then # print error and let user to initialize manually or empty the directory - echo "Database @NICE_PROJECT_NAME@ is not initialized, but the directory $datadir is not empty, so initialization cannot be done." - echo "Make sure the $datadir is empty before running `basename $0`." + echo "Database @NICE_PROJECT_NAME@ is not initialized, but the directory $datadir is not empty, so initialization cannot be done." >&2 + echo "Make sure the $datadir is empty before running `basename $0`." >&2 exit 1 fi fi diff --git a/database/mariadb/centos/files/mysql-scripts-common.sh b/database/mariadb/centos/files/mysql-scripts-common.sh index f77a8040b..aa25db1a8 100644 --- a/database/mariadb/centos/files/mysql-scripts-common.sh +++ b/database/mariadb/centos/files/mysql-scripts-common.sh @@ -18,13 +18,23 @@ get_mysql_option(){ sections="$1" option_name="$2" default_value="$3" - result=`@bindir@/my_print_defaults $sections | sed -n "s/^--${option_name}=//p" | tail -n 1` + result=`@bindir@/my_print_defaults $my_print_defaults_extra_args $sections | sed -n "s/^--${option_name}=//p" | tail -n 1` if [ -z "$result" ]; then # not found, use default result="${default_value}" fi } +# For the case of running more instances via systemd, scrits 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. +my_print_defaults_extra_args='' +while echo "$1" | grep -q '^--defaults' ; do + my_print_defaults_extra_args="${my_print_defaults_extra_args} $1" + shift +done + # Defaults here had better match what mysqld_safe will default to # The option values are generally defined on three important places # on the default installation: diff --git a/database/mariadb/centos/files/mysql-wait-ready.sh b/database/mariadb/centos/files/mysql-wait-ready.sh deleted file mode 100644 index 6d95800aa..000000000 --- a/database/mariadb/centos/files/mysql-wait-ready.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -# This script waits for mysqld to be ready to accept connections -# (which can be many seconds or even minutes after launch, if there's -# a lot of crash-recovery work to do). -# Running this as ExecStartPost is useful so that services declared as -# "After mysqld" won't be started until the database is really ready. - -if [ $# -ne 1 ] ; then - echo "You need to pass daemon pid as an argument for this script." - exit 20 -fi - -# Service file passes us the daemon's PID (actually, mysqld_safe's PID) -daemon_pid="$1" - -# Wait for the server to come up or for the mysqld process to disappear -ret=0 -while /bin/true; do - # Check process still exists - if ! [ -d "/proc/${daemon_pid}" ] ; then - ret=1 - break - fi - RESPONSE=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` - mret=$? - if [ $mret -eq 0 ] ; then - break - fi - # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, - # anything else suggests a configuration error - if [ $mret -ne 1 -a $mret -ne 11 ]; then - echo "Cannot check for @NICE_PROJECT_NAME@ Daemon startup because of mysqladmin failure." >&2 - ret=$mret - break - fi - # "Access denied" also means the server is alive - echo "$RESPONSE" | grep -q "Access denied for user" && break - - sleep 1 -done - -exit $ret diff --git a/database/mariadb/centos/files/mysql-wait-stop.sh b/database/mariadb/centos/files/mysql-wait-stop.sh deleted file mode 100644 index 0af45fd51..000000000 --- a/database/mariadb/centos/files/mysql-wait-stop.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" - -# This script waits for mysqld to be properly stopped -# (which can be many seconds in some large load). -# Running this as ExecStopPost is useful so that starting which is done -# as part of restart doesn't see the former process still running. - -# Wait for the server to properly end the main server -ret=0 -TIMEOUT=60 -SECONDS=0 - -if ! [ -f "$pidfile" ]; then - exit 0 -fi - -MYSQLPID=`cat "$pidfile" 2>/dev/null` -if [ -z "$MYSQLPID" ] ; then - exit 2 -fi - -while /bin/true; do - # Check process still exists - if ! [ -d "/proc/${MYSQLPID}" ] ; then - break - fi - if [ $SECONDS -gt $TIMEOUT ] ; then - ret=3 - break - fi - sleep 1 -done - -exit $ret diff --git a/database/mariadb/centos/files/mysql.init.in b/database/mariadb/centos/files/mysql.init.in deleted file mode 100644 index 0a022af97..000000000 --- a/database/mariadb/centos/files/mysql.init.in +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# @DAEMON_NAME@ This shell script takes care of starting and stopping -# the MySQL subsystem (mysqld). -# -# chkconfig: - 64 36 -# description: MySQL database server. -# processname: mysqld -# config: @sysconfdir@/my.cnf -# pidfile: /var/run/@DAEMON_NAME@/@DAEMON_NAME@.pid -### BEGIN INIT INFO -# Provides: mysqld -# Required-Start: $local_fs $remote_fs $network $named $syslog $time -# Required-Stop: $local_fs $remote_fs $network $named $syslog $time -# Short-Description: start and stop MySQL server -# Description: MySQL database server -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - - -exec="@bindir@/mysqld_safe" -prog="@DAEMON_NAME@" - -# Set timeouts here so they can be overridden from @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ -STARTTIMEOUT=300 -STOPTIMEOUT=60 - -# User and group the daemon will run under -MYUSER=mysql -MYGROUP=mysql - -# Edit the following file in order to re-write some of the environment -# variables defined above, like $STARTTIMEOUT, $STOPTIMEOUT, $exec -[ -e @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ ] && . @sysconfdir@/sysconfig/@DAEMON_NO_PREFIX@ - -lockfile=/var/lock/subsys/$prog - -# get options from my.cnf -source "@libexecdir@/mysql-scripts-common" - -start(){ - [ -x $exec ] || exit 5 - - # check permissions - if ! touch $(dirname $socketfile) &>/dev/null ; then - action $"Starting $prog: " /bin/false - return 4 - fi - - # check to see if it's already running - MYSQLDRUNNING=0 - if [ -f "$pidfile" ]; then - MYSQLPID=`cat "$pidfile" 2>/dev/null` - if [ -n "$MYSQLPID" ] && [ -d "/proc/$MYSQLPID" ] ; then - MYSQLDRUNNING=1 - fi - fi - RESPONSE=`@bindir@/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` - if [ $MYSQLDRUNNING = 1 ] && [ $? = 0 ]; then - # already running, do nothing - action $"Starting $prog: " /bin/true - ret=0 - elif [ $MYSQLDRUNNING = 1 ] && echo "$RESPONSE" | grep -q "Access denied for user" - then - # already running, do nothing - action $"Starting $prog: " /bin/true - ret=0 - else - @libexecdir@/mysql-prepare-db-dir $MYUSER $MYGROUP || return 4 - @libexecdir@/mysql-check-socket || return 1 - - # Pass all the options determined above, to ensure consistent behavior. - # In many cases mysqld_safe would arrive at the same conclusions anyway - # but we need to be sure. (An exception is that we don't force the - # log-error setting, since this script doesn't really depend on that, - # and some users might prefer to configure logging to syslog.) - # Note: set --basedir to prevent probes that might trigger SELinux - # alarms, per bug #547485 - $exec --datadir="$datadir" --socket="$socketfile" \ - --pid-file="$pidfile" \ - --basedir=@prefix@ --user=$MYUSER >/dev/null 2>&1 & - safe_pid=$! - - # Wait until the daemon is up - @libexecdir@/mysql-wait-ready "$safe_pid" - ret=$? - - if [ $ret -eq 0 ]; then - action $"Starting $prog: " /bin/true - chmod o+r $pidfile >/dev/null 2>&1 - touch $lockfile - else - action $"Starting $prog: " /bin/false - fi - fi - return $ret -} - -stop(){ - if [ ! -f "$pidfile" ]; then - # not running; per LSB standards this is "ok" - action $"Stopping $prog: " /bin/true - return 0 - fi - MYSQLPID=`cat "$pidfile" 2>/dev/null` - if [ -n "$MYSQLPID" ]; then - if ! [ -d "/proc/$MYSQLPID" ] ; then - # process doesn't run anymore - action $"Stopping $prog: " /bin/true - return 0 - fi - /bin/kill "$MYSQLPID" >/dev/null 2>&1 - ret=$? - if [ $ret -eq 0 ]; then - TIMEOUT="$STOPTIMEOUT" - while [ $TIMEOUT -gt 0 ]; do - /bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break - sleep 1 - let TIMEOUT=${TIMEOUT}-1 - done - if [ $TIMEOUT -eq 0 ]; then - echo "Timeout error occurred trying to stop MySQL Daemon." - ret=1 - action $"Stopping $prog: " /bin/false - else - rm -f $lockfile - rm -f "$socketfile" - action $"Stopping $prog: " /bin/true - fi - else - # kill command failed, probably insufficient permissions - action $"Stopping $prog: " /bin/false - ret=4 - fi - else - # failed to read pidfile, probably insufficient permissions - action $"Stopping $prog: " /bin/false - ret=4 - fi - return $ret -} - -restart(){ - stop - start -} - -condrestart(){ - [ -e $lockfile ] && restart || : -} - - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status -p "$pidfile" $prog - ;; - restart) - restart - ;; - condrestart|try-restart) - condrestart - ;; - reload) - exit 3 - ;; - force-reload) - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac - -exit $? diff --git a/database/mariadb/centos/files/mysql.service.in b/database/mariadb/centos/files/mysql.service.in index c385b4a70..6f84dd3ca 100644 --- a/database/mariadb/centos/files/mysql.service.in +++ b/database/mariadb/centos/files/mysql.service.in @@ -26,22 +26,28 @@ [Unit] Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server -After=syslog.target +Documentation=man:mysqld(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ After=network.target +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + [Service] Type=notify User=mysql Group=mysql ExecStartPre=@libexecdir@/mysql-check-socket +# '%n' expands to 'Full unit name'; man systemd.unit ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n # 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 -ExecStopPost=@libexecdir@/mysql-wait-stop # Setting this to true can break replication and the Type=notify settings # See also bind-address mysqld option. @@ -65,6 +71,3 @@ TimeoutSec=300 # Place temp files in a secure directory, not /tmp PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/database/mariadb/centos/files/mysql@.service.in b/database/mariadb/centos/files/mysql@.service.in index ab9a7cd1a..b36ce6d80 100644 --- a/database/mariadb/centos/files/mysql@.service.in +++ b/database/mariadb/centos/files/mysql@.service.in @@ -33,22 +33,27 @@ [Unit] Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server -After=syslog.target +Documentation=man:mysqld(8) +Documentation=https://mariadb.com/kb/en/library/systemd/ After=network.target +[Install] +WantedBy=multi-user.target +Alias=mysql.service +Alias=mysqld.service + [Service] Type=notify User=mysql Group=mysql -ExecStartPre=@libexecdir@/mysql-check-socket -ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n +ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I +ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n # 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 -ExecStopPost=@libexecdir@/mysql-wait-stop +ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I # Setting this to true can break replication and the Type=notify settings # See also bind-address mysqld option. @@ -72,6 +77,3 @@ TimeoutSec=300 # Place temp files in a secure directory, not /tmp PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/database/mariadb/centos/files/rh-skipped-tests-arm.list b/database/mariadb/centos/files/rh-skipped-tests-arm.list index d7e0b587c..1e5b7a90d 100644 --- a/database/mariadb/centos/files/rh-skipped-tests-arm.list +++ b/database/mariadb/centos/files/rh-skipped-tests-arm.list @@ -1,8 +1,21 @@ -main.partition_exchange : #1399847 -main.analyze_stmt_orderby : #1399847 -main.explain_json_innodb : #1399847 -main.explain_json_format_partitions : #1399847 -main.analyze_format_json : #1399847 -main.explain_json : #1399847 -main.subselect_cache : #1399847 -main.type_year : #1399847 +# Fails on aarch64 +encryption.create_or_replace : +innodb_gis.rtree_compress2 : +innodb.innodb_buffer_pool_resize : +innodb.innodb_defrag_concurrent : + +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 : + +# Check of testcase failed: +sys_vars.innodb_buffer_pool_size_basic : \ No newline at end of file diff --git a/database/mariadb/centos/files/rh-skipped-tests-arm32.list b/database/mariadb/centos/files/rh-skipped-tests-arm32.list new file mode 100644 index 000000000..3de55bc0d --- /dev/null +++ b/database/mariadb/centos/files/rh-skipped-tests-arm32.list @@ -0,0 +1,41 @@ +# Fails since 10.3.8, only on armv7hl +versioning.auto_increment : +versioning.commit_id : +versioning.delete : +versioning.foreign : +versioning.insert : +versioning.insert2 : +versioning.select2 : +versioning.update : + +# Fails since 10.3.8, on both armv7hl and aarch64 +mariabackup.system_versioning : + +# Fails since 10.3.9, on both armv7hl and aarch64 +disks.disks : +encryption.create_or_replace : +federated.federatedx_versioning : + +# Fails since 10.3.9, only on armv7hl +versioning.alter : +versioning.replace : +versioning.select : +versioning.truncate : +versioning.trx_id : +# Fails since 10.3.17, only on armv7hl +versioning.online : +versioning.partition : +versioning.replace : + +# Fails since 10.3.9, only on aarch64 +innodb_gis.kill_server : +innodb_gis.rtree_search : +innodb.innodb_defrag_concurrent : +parts.partition_alter1_1_2_innodb : +parts.partition_alter1_2_innodb : +parts.partition_alter2_1_1_innodb : +parts.partition_alter2_1_2_innodb : +parts.partition_alter2_2_1_innodb : +parts.partition_alter2_2_2_innodb : +parts.partition_basic_innodb : +parts.part_supported_sql_func_innodb : diff --git a/database/mariadb/centos/files/rh-skipped-tests-base.list b/database/mariadb/centos/files/rh-skipped-tests-base.list index 2992d7e57..59fc521cd 100644 --- a/database/mariadb/centos/files/rh-skipped-tests-base.list +++ b/database/mariadb/centos/files/rh-skipped-tests-base.list @@ -1,9 +1,27 @@ -main.userstat : #1399847 -main.multi_update : #1399847 -main.set_statement_notembedded_binlog : #1399847 -main.ssl_7937 : #1399847 -main.ssl_crl_clients : #1399847 -main.ssl_cert_verify : #1399847 -perfschema.nesting : #1399847 -perfschema.socket_summary_by_event_name_func : #1399847 -perfschema.socket_summary_by_instance_func : #1399847 +# Fails everywhere +innodb.innodb_defrag_binlog : +main.mysql : +main.ssl_7937 : +main.ssl_8k_key : +main.ssl_crl : +main.userstat : +perfschema.cnf_option : +perfschema.nesting : +perfschema.socket_summary_by_event_name_func : +perfschema.socket_summary_by_instance_func : +rpl.rpl_row_img_blobs : +rpl.rpl_row_img_eng_min : +rpl.rpl_row_img_eng_noblob : +sys_vars.slave_parallel_threads_basic : +unit.conc_ps_bugs : +versioning.update-big : +# Fails only on i686 +main.myisampack : + + + + + + + + diff --git a/database/mariadb/centos/files/rh-skipped-tests-ppc-s390.list b/database/mariadb/centos/files/rh-skipped-tests-ppc-s390.list deleted file mode 100644 index e69de29bb..000000000 diff --git a/database/mariadb/centos/files/rh-skipped-tests-ppc.list b/database/mariadb/centos/files/rh-skipped-tests-ppc.list new file mode 100644 index 000000000..19add8613 --- /dev/null +++ b/database/mariadb/centos/files/rh-skipped-tests-ppc.list @@ -0,0 +1,21 @@ +# Fails on ppc64le +encryption.create_or_replace : +innodb_gis.rtree_compress2 : +innodb.innodb_buffer_pool_resize : +innodb.innodb_defrag_concurrent : + +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 : + +# Check of testcase failed: +sys_vars.innodb_buffer_pool_size_basic : \ No newline at end of file diff --git a/database/mariadb/centos/files/rh-skipped-tests-s390.list b/database/mariadb/centos/files/rh-skipped-tests-s390.list new file mode 100644 index 000000000..869fa8f99 --- /dev/null +++ b/database/mariadb/centos/files/rh-skipped-tests-s390.list @@ -0,0 +1,2 @@ +# Fails on s390x +handler.heap : diff --git a/database/mariadb/centos/files/wsrep_sst_rsync_tunnel b/database/mariadb/centos/files/wsrep_sst_rsync_tunnel new file mode 100644 index 000000000..562d1911d --- /dev/null +++ b/database/mariadb/centos/files/wsrep_sst_rsync_tunnel @@ -0,0 +1,482 @@ +#!/bin/bash -ue + +# Copyright (C) 2010-2014 Codership Oy +# Copyright (C) 2017 Damien Ciabrini +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# This is a reference script for rsync-based state snapshot tansfer +# over an encrypted communication channel, managed by socat + +RSYNC_PID= # rsync pid file +RSYNC_CONF= # rsync configuration file +RSYNC_REAL_PID= # rsync process id + +SOCAT_PID= # socat pid file +SOCAT_REAL_PID= # socat process id + +SOCAT_OPTS= # openssl connection args + +MODULE="rsync_tunnel_sst" + +OS=$(uname) +[ "$OS" == "Darwin" ] && export -n LD_LIBRARY_PATH + +# Setting the path for lsof on CentOS +export PATH="/usr/sbin:/sbin:$PATH" + +. $(dirname $0)/wsrep_sst_common + +wsrep_check_programs rsync socat + +cleanup_pid() +{ + local real_pid=$1 + [ "0" != "$real_pid" ] && \ + kill $real_pid && \ + sleep 0.5 && \ + kill -9 $real_pid >/dev/null 2>&1 || \ + : +} + +cleanup_tunnel() +{ + wsrep_log_info "cleanup socat PID: $SOCAT_REAL_PID" + [ -n "$SOCAT_REAL_PID" ] && cleanup_pid $SOCAT_REAL_PID + rm -rf "$SOCAT_PID" +} + +cleanup_joiner() +{ + wsrep_log_info "Joiner cleanup. rsync PID: $RSYNC_REAL_PID" + [ -n "$RSYNC_REAL_PID" ] && cleanup_pid $RSYNC_REAL_PID + rm -rf "$RSYNC_CONF" + rm -rf "$MAGIC_FILE" + rm -rf "$RSYNC_PID" + + cleanup_tunnel + + wsrep_log_info "Joiner cleanup done." + if [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then + wsrep_cleanup_progress_file + fi +} + +# Check whether process is still running. +check_pid() +{ + local pid_file=$1 + [ -r "$pid_file" ] && ps -p $(cat $pid_file) >/dev/null 2>&1 +} + +check_pid_and_port() +{ + local pid_file=$1 + local service_pid=$2 + local service_port=$3 + local service_host=$4 + local service_name=$5 + + if ! which lsof > /dev/null; then + wsrep_log_error "lsof tool not found in PATH! Make sure you have it installed." + exit 2 # ENOENT + fi + + local port_info=$(lsof -i "@"$service_host:$service_port -Pn 2>/dev/null | \ + grep "(LISTEN)") + local is_service=$(echo $port_info | \ + grep -w '^'"$service_name"'[[:space:]]\+'"$service_pid" 2>/dev/null) + + if [ -n "$port_info" -a -z "$is_service" ]; then + wsrep_log_error "$service_name daemon port '$service_port' has been taken" + exit 16 # EBUSY + fi + + if ! check_pid $pid_file; then + wsrep_log_error "$service_name process terminated unexpectedly" + exit 10 # ECHILD + fi + + [ -n "$port_info" ] && [ -n "$is_service" ] && \ + [ $(cat $pid_file) -eq $service_pid ] +} + +config_from_cnf() +{ + local group=$1 + local key=$2 + echo $($MY_PRINT_DEFAULTS $group | grep -- "--$key=" | cut -d= -f2- | tail -1) +} + +setup_tunnel_args() +{ + tca=$(config_from_cnf sst tca) + tkey=$(config_from_cnf sst tkey) + tcert=$(config_from_cnf sst tcert) + sockopt=$(config_from_cnf sst sockopt) + + if [ -z "$tcert" ]; then + wsrep_log_error "Encryption certificate not found in my.cnf" + exit 3 + else + SOCAT_OPTS="cert=$tcert" + fi + [ -n "$tkey" ] && SOCAT_OPTS="$SOCAT_OPTS,key=$tkey" + [ -n "$tca" ] && SOCAT_OPTS="$SOCAT_OPTS,cafile=$tca" + wsrep_log_info "Encryption setting to be used for socat tunnel: $SOCAT_OPTS" + + [ -n "$sockopt" ] && SOCAT_OPTS="$SOCAT_OPTS,$sockopt" +} + +MAGIC_FILE="$WSREP_SST_OPT_DATA/rsync_tunnel_sst_complete" +rm -rf "$MAGIC_FILE" + +BINLOG_TAR_FILE="$WSREP_SST_OPT_DATA/wsrep_sst_binlog.tar" +BINLOG_N_FILES=1 +rm -f "$BINLOG_TAR_FILE" || : + +if ! [ -z $WSREP_SST_OPT_BINLOG ] +then + BINLOG_DIRNAME=$(dirname $WSREP_SST_OPT_BINLOG) + BINLOG_FILENAME=$(basename $WSREP_SST_OPT_BINLOG) +fi + +WSREP_LOG_DIR=${WSREP_LOG_DIR:-""} +# if WSREP_LOG_DIR env. variable is not set, try to get it from my.cnf +if [ -z "$WSREP_LOG_DIR" ]; then + WSREP_LOG_DIR=$($MY_PRINT_DEFAULTS --mysqld \ + | grep -- '--innodb[-_]log[-_]group[-_]home[-_]dir=' \ + | cut -b 29- ) +fi + +if [ -n "$WSREP_LOG_DIR" ]; then + # handle both relative and absolute paths + WSREP_LOG_DIR=$(cd $WSREP_SST_OPT_DATA; mkdir -p "$WSREP_LOG_DIR"; cd $WSREP_LOG_DIR; pwd -P) +else + # default to datadir + WSREP_LOG_DIR=$(cd $WSREP_SST_OPT_DATA; pwd -P) +fi + +# Old filter - include everything except selected +# FILTER=(--exclude '*.err' --exclude '*.pid' --exclude '*.sock' \ +# --exclude '*.conf' --exclude core --exclude 'galera.*' \ +# --exclude grastate.txt --exclude '*.pem' \ +# --exclude '*.[0-9][0-9][0-9][0-9][0-9][0-9]' --exclude '*.index') + +# New filter - exclude everything except dirs (schemas) and innodb files +FILTER=(-f '- /lost+found' -f '- /.fseventsd' -f '- /.Trashes' + -f '+ /wsrep_sst_binlog.tar' -f '+ /ib_lru_dump' -f '+ /ibdata*' -f '+ /*/' -f '- /*') + +SOCAT_PID="$WSREP_SST_OPT_DATA/$MODULE-socat.pid" + +if check_pid $SOCAT_PID +then + wsrep_log_error "socat tunnel already running." + exit 114 # EALREADY +fi +rm -rf "$SOCAT_PID" + +setup_tunnel_args + +if [ "$WSREP_SST_OPT_ROLE" = "donor" ] +then + + SOCAT_JOINER_ADDR=$(echo $WSREP_SST_OPT_ADDR | awk -F'/' '{print $1}') + # map to name in case we received an IP + SOCAT_JOINER_HOST=$(getent hosts $SOCAT_JOINER_ADDR | awk '{ print $2 }') + if [ -z "$SOCAT_JOINER_HOST" ]; then + SOCAT_JOINER_HOST=$SOCAT_JOINER_ADDR + fi + SOCAT_PORT=$(echo $SOCAT_JOINER_ADDR | awk -F ':' '{ print $2 }') + if [ -z "$SOCAT_PORT" ] + then + SOCAT_PORT=4444 + fi + TARGET_ADDR=localhost:$SOCAT_PORT/$MODULE + + trap cleanup_tunnel EXIT + + # Socat forwards rsync connections to the joiner + SOCAT_SRC=tcp-listen:$SOCAT_PORT,bind=localhost,reuseaddr,fork + SOCAT_DST=openssl:$SOCAT_JOINER_HOST,$SOCAT_OPTS + wsrep_log_info "Setting up tunnel for donor: socat $SOCAT_SRC $SOCAT_DST" + socat $SOCAT_SRC $SOCAT_DST & + SOCAT_REAL_PID=$! + # This is ok because a local galera node doesn't run SST concurrently + echo $SOCAT_REAL_PID >"$SOCAT_PID" + until check_pid_and_port $SOCAT_PID $SOCAT_REAL_PID $SOCAT_PORT localhost "socat" + do + sleep 0.2 + done + + if [ $WSREP_SST_OPT_BYPASS -eq 0 ] + then + + FLUSHED="$WSREP_SST_OPT_DATA/tables_flushed" + ERROR="$WSREP_SST_OPT_DATA/sst_error" + + rm -rf "$FLUSHED" + rm -rf "$ERROR" + + # Use deltaxfer only for WAN + inv=$(basename $0) + [ "$inv" = "wsrep_sst_rsync_wan" ] && WHOLE_FILE_OPT="" \ + || WHOLE_FILE_OPT="--whole-file" + + echo "flush tables" + + # Wait for : + # (a) Tables to be flushed, AND + # (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR + # (c) ERROR file, in case flush tables operation failed. + + while [ ! -r "$FLUSHED" ] && ! grep -q ':' "$FLUSHED" >/dev/null 2>&1 + do + # Check whether ERROR file exists. + if [ -f "$ERROR" ] + then + # Flush tables operation failed. + rm -rf "$ERROR" + exit 255 + fi + + sleep 0.2 + done + + STATE="$(cat $FLUSHED)" + rm -rf "$FLUSHED" + + sync + + if ! [ -z $WSREP_SST_OPT_BINLOG ] + then + # Prepare binlog files + pushd $BINLOG_DIRNAME &> /dev/null + binlog_files_full=$(tail -n $BINLOG_N_FILES ${BINLOG_FILENAME}.index) + binlog_files="" + for ii in $binlog_files_full + do + binlog_files="$binlog_files $(basename $ii)" + done + if ! [ -z "$binlog_files" ] + then + wsrep_log_info "Preparing binlog files for transfer:" + tar -cvf $BINLOG_TAR_FILE $binlog_files >&2 + fi + popd &> /dev/null + fi + + # first, the normal directories, so that we can detect incompatible protocol + RC=0 + rsync --owner --group --perms --links --specials \ + --ignore-times --inplace --dirs --delete --quiet \ + $WHOLE_FILE_OPT "${FILTER[@]}" "$WSREP_SST_OPT_DATA/" \ + rsync://$TARGET_ADDR >&2 || RC=$? + + if [ "$RC" -ne 0 ]; then + wsrep_log_error "rsync returned code $RC:" + + case $RC in + 12) RC=71 # EPROTO + wsrep_log_error \ + "rsync server on the other end has incompatible protocol. " \ + "Make sure you have the same version of rsync on all nodes." + ;; + 22) RC=12 # ENOMEM + ;; + *) RC=255 # unknown error + ;; + esac + exit $RC + fi + + # second, we transfer InnoDB log files + rsync --owner --group --perms --links --specials \ + --ignore-times --inplace --dirs --delete --quiet \ + $WHOLE_FILE_OPT -f '+ /ib_logfile[0-9]*' -f '- **' "$WSREP_LOG_DIR/" \ + rsync://$TARGET_ADDR-log_dir >&2 || RC=$? + + if [ $RC -ne 0 ]; then + wsrep_log_error "rsync innodb_log_group_home_dir returned code $RC:" + exit 255 # unknown error + fi + + # then, we parallelize the transfer of database directories, use . so that pathconcatenation works + pushd "$WSREP_SST_OPT_DATA" >/dev/null + + count=1 + [ "$OS" == "Linux" ] && count=$(grep -c processor /proc/cpuinfo) + [ "$OS" == "Darwin" -o "$OS" == "FreeBSD" ] && count=$(sysctl -n hw.ncpu) + + find . -maxdepth 1 -mindepth 1 -type d -not -name "lost+found" -print0 | \ + xargs -I{} -0 -P $count \ + rsync --owner --group --perms --links --specials \ + --ignore-times --inplace --recursive --delete --quiet \ + $WHOLE_FILE_OPT --exclude '*/ib_logfile*' "$WSREP_SST_OPT_DATA"/{}/ \ + rsync://$TARGET_ADDR/{} >&2 || RC=$? + + popd >/dev/null + + if [ $RC -ne 0 ]; then + wsrep_log_error "find/rsync returned code $RC:" + exit 255 # unknown error + fi + + else # BYPASS + wsrep_log_info "Bypassing state dump." + + # Store donor's wsrep GTID (state ID) and wsrep_gtid_domain_id + # (separated by a space). + STATE="$WSREP_SST_OPT_GTID $WSREP_SST_OPT_GTID_DOMAIN_ID" + fi + + echo "continue" # now server can resume updating data + + echo "$STATE" > "$MAGIC_FILE" + rsync --archive --quiet --checksum "$MAGIC_FILE" rsync://$TARGET_ADDR + + echo "done $STATE" + +elif [ "$WSREP_SST_OPT_ROLE" = "joiner" ] +then + wsrep_check_programs lsof socat + + touch $SST_PROGRESS_FILE + MYSQLD_PID=$WSREP_SST_OPT_PARENT + + RSYNC_PID="$WSREP_SST_OPT_DATA/$MODULE.pid" + + if check_pid $RSYNC_PID + then + wsrep_log_error "rsync daemon already running." + exit 114 # EALREADY + fi + rm -rf "$RSYNC_PID" + + ADDR=$WSREP_SST_OPT_ADDR + RSYNC_PORT=$(echo $ADDR | awk -F ':' '{ print $2 }') + if [ -z "$RSYNC_PORT" ] + then + RSYNC_PORT=4444 + ADDR="$(echo $ADDR | awk -F ':' '{ print $1 }'):$RSYNC_PORT" + fi + + SOCAT_ADDR=$(echo $ADDR | awk -F ':' '{ print $1 }') + # map to name in case we received an IP + SOCAT_HOST=$(getent hosts $SOCAT_ADDR | awk '{ print $2 }') + if [ -z "$SOCAT_HOST" ]; then + SOCAT_HOST=$SOCAT_ADDR + fi + SOCAT_PORT=$RSYNC_PORT + + trap "exit 32" HUP PIPE + trap "exit 3" INT TERM ABRT + trap cleanup_joiner EXIT + + RSYNC_CONF="$WSREP_SST_OPT_DATA/$MODULE.conf" + + if [ -n "${MYSQL_TMP_DIR:-}" ] ; then + SILENT="log file = $MYSQL_TMP_DIR/rsynd.log" + else + SILENT="" + fi + +cat << EOF > "$RSYNC_CONF" +pid file = $RSYNC_PID +use chroot = no +read only = no +timeout = 300 +$SILENT +[$MODULE] + path = $WSREP_SST_OPT_DATA +[$MODULE-log_dir] + path = $WSREP_LOG_DIR +EOF + +# rm -rf "$DATA"/ib_logfile* # we don't want old logs around + + # Socat receives rsync connections from the donor + SOCAT_SRC=openssl-listen:$SOCAT_PORT,bind=$SOCAT_HOST,reuseaddr,fork,$SOCAT_OPTS + SOCAT_DST=tcp:localhost:$RSYNC_PORT + wsrep_log_info "Setting up tunnel for joiner: socat $SOCAT_SRC $SOCAT_DST" + socat $SOCAT_SRC $SOCAT_DST & + SOCAT_REAL_PID=$! + # This is ok because a local galera node doesn't run SST concurrently + echo $SOCAT_REAL_PID >"$SOCAT_PID" + until check_pid_and_port $SOCAT_PID $SOCAT_REAL_PID $SOCAT_PORT $SOCAT_HOST "socat" + do + sleep 0.2 + done + + wsrep_log_info "rsync --daemon --no-detach --address localhost --port $RSYNC_PORT --config \"$RSYNC_CONF\"" + rsync --daemon --no-detach --address localhost --port $RSYNC_PORT --config "$RSYNC_CONF" & + RSYNC_REAL_PID=$! + + until check_pid_and_port $RSYNC_PID $RSYNC_REAL_PID $RSYNC_PORT localhost "rsync" + do + sleep 0.2 + done + + echo "ready $ADDR/$MODULE" + + # wait for SST to complete by monitoring magic file + while [ ! -r "$MAGIC_FILE" ] && check_pid "$RSYNC_PID" && \ + check_pid "$SOCAT_PID" && ps -p $MYSQLD_PID >/dev/null + do + sleep 1 + done + + if ! ps -p $MYSQLD_PID >/dev/null + then + wsrep_log_error \ + "Parent mysqld process (PID:$MYSQLD_PID) terminated unexpectedly." + exit 32 + fi + + if ! [ -z $WSREP_SST_OPT_BINLOG ] + then + + pushd $BINLOG_DIRNAME &> /dev/null + if [ -f $BINLOG_TAR_FILE ] + then + # Clean up old binlog files first + rm -f ${BINLOG_FILENAME}.* + wsrep_log_info "Extracting binlog files:" + tar -xvf $BINLOG_TAR_FILE >&2 + for ii in $(ls -1 ${BINLOG_FILENAME}.*) + do + echo ${BINLOG_DIRNAME}/${ii} >> ${BINLOG_FILENAME}.index + done + fi + popd &> /dev/null + fi + if [ -r "$MAGIC_FILE" ] + then + # UUID:seqno & wsrep_gtid_domain_id is received here. + cat "$MAGIC_FILE" # Output : UUID:seqno wsrep_gtid_domain_id + else + # this message should cause joiner to abort + echo "rsync process ended without creating '$MAGIC_FILE'" + fi + wsrep_cleanup_progress_file +# cleanup_joiner +else + wsrep_log_error "Unrecognized role: '$WSREP_SST_OPT_ROLE'" + exit 22 # EINVAL +fi + +rm -f $BINLOG_TAR_FILE || : + +exit 0 diff --git a/database/mariadb/centos/mariadb.spec b/database/mariadb/centos/mariadb.spec index 5a1a82ac6..2d77bb248 100644 --- a/database/mariadb/centos/mariadb.spec +++ b/database/mariadb/centos/mariadb.spec @@ -3,214 +3,238 @@ %global pkgnamepatch mariadb # Regression tests may take a long time (many cores recommended), skip them by -# passing --nocheck to rpmbuild or by setting runselftest to 0 if defining -# --nocheck is not possible (e.g. in koji build) -%{!?runselftest:%global runselftest 0} +%{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 0 +%{!?ignore_testsuite_result:%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}} -# Use Full RELRO for all binaries (RHBZ#1092548) -%global _hardened_build 1 - # 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 -# TokuDB engine is now part of MariaDB, but it is available only for x86_64; -# variable tokudb allows to build with TokuDB storage engine -# Temporarily disabled in F21+ for https://mariadb.atlassian.net/browse/MDEV-6446 -# WRS: TokuDB has AGPL license, so disable it -%ifarch 0 #x86_64 -%bcond_without tokudb + + +# 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} +# STX: TokuDB has AGPL license, so disable it +%bcond_with tokudb +%bcond_without mroonga +%bcond_without rocksdb +%bcond_with cassandra %else %bcond_with tokudb -%endif - -# Mroonga engine is now part of MariaDB, but it only builds for x86_64; -# variable mroonga allows to build with Mroonga storage engine -%ifarch x86_64 i686 -%bcond_without mroonga -%else %bcond_with mroonga +%bcond_with rocksdb +%bcond_with cassandra %endif # The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing -# hierarchies and more complex graph structures to be handled in a relational -# fashion; enabled by default -# Temporarily disabling oqgraph: https://mariadb.atlassian.net/browse/MDEV-9479 -%bcond_with oqgraph +# hierarchies and more complex graph structures to be handled in a relational fashion +%bcond_without oqgraph -# For some use cases we do not need some parts of the package +# Other plugins +%if 0%{?fedora} +%bcond_without cracklib +%bcond_without connect +%bcond_without sphinx +%else +%bcond_with cracklib +%bcond_with connect +%bcond_with sphinx +%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 bench %bcond_without test -%bcond_without connect %bcond_without galera +%bcond_without backup +%if 0%{?fedora} +%bcond_without bench +%else +%bcond_with bench +%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 +%bcond_with debug + +# 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 + -# Include files for SysV init or systemd -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 -%bcond_without init_systemd -%bcond_with init_sysv -%global daemon_name %{name} -%global daemondir %{_unitdir} -%global daemon_no_prefix %{pkg_name} -%global mysqld_pid_dir mysqld -%else -%bcond_with init_systemd -%bcond_without init_sysv -%global daemon_name mysqld -%global daemondir %{_sysconfdir}/rc.d/init.d -%global daemon_no_prefix mysqld -%endif # MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use # the bundled library, since the package cannot be build with older version -%global pcre_version 8.41 -%if 0%{?fedora} >= 21 -%bcond_without pcre +%if 0%{?fedora} || 0%{?rhel} > 7 +%bcond_without unbundled_pcre %else -%bcond_with pcre +%bcond_with unbundled_pcre +%global pcre_bundled_version 8.43 %endif +# Include systemd files +%global daemon_name %{name} +%global daemondir %{_unitdir} +%global daemon_no_prefix %{pkg_name} +%global mysqld_pid_dir mariadb + # 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 - # Directory for storing pid file -%global pidfiledir %{_localstatedir}/run/%{daemon_name} - +%global pidfiledir %{_rundir}/%{mysqld_pid_dir} # 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 -# The evr of mysql we want to obsolete -%global obsoleted_mysql_evr 5.6-0 -%global obsoleted_mysql_case_evr 5.5.30-5 -# The evr of mariadb-galera we want to obsolete -%global obsoleted_mariadb_galera_evr 1:10.0.17-6 -%global obsoleted_mariadb_galera_common_evr 5.5.36-10 -%global obsoleted_mariadb_galera_server_evr 1:10.0.17-6 # Provide mysql names for compatibility +%if 0%{?fedora} %bcond_without mysql_names +%else +%bcond_with mysql_names +%endif +# Explicit conflicts with mysql +%if 0%{?scl:1} +%bcond_with conflicts +%else %bcond_without conflicts +%endif + + # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.1 -%global bugfixver 28 Name: mariadb -Version: %{compatver}.%{bugfixver} -Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} +Version: 10.3.17 +Release: 1.el8%{?_tis_dist}.%{tis_patch_ver} Epoch: 3 -Summary: A community developed branch of MySQL -Group: Applications/Databases +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 +# 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 -#Source0: http://mirrors.syringanetworks.net/mariadb/mariadb-%{version}/source/mariadb-%{version}.tar.gz -Source0: mariadb-%{version}.tar.gz +Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz Source2: mysql_config_multilib.sh Source3: my.cnf.in -Source5: README.mysql-cnf Source6: README.mysql-docs Source7: README.mysql-license -Source9: mysql-embedded-check.c +Source8: README.wsrep_sst_rsync_tunnel Source10: mysql.tmpfiles.d.in Source11: mysql.service.in Source12: mysql-prepare-db-dir.sh -Source13: mysql-wait-ready.sh Source14: mysql-check-socket.sh Source15: mysql-scripts-common.sh Source16: mysql-check-upgrade.sh -Source17: mysql-wait-stop.sh Source18: mysql@.service.in -Source19: mysql.init.in Source50: rh-skipped-tests-base.list Source51: rh-skipped-tests-arm.list -Source52: rh-skipped-tests-ppc-s390.list -# TODO: clustercheck contains some hard-coded paths, these should be expanded using template system +Source52: rh-skipped-tests-s390.list +Source53: rh-skipped-tests-ppc.list +Source9999: rh-skipped-tests-arm32.list +# Proposed 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 +# 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 -# Comments for these patches are in the patch files -# Patches common for more mysql-like packages -Patch1: %{pkgnamepatch}-strmov.patch -Patch2: %{pkgnamepatch}-install-test.patch +# 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 -Patch5: %{pkgnamepatch}-file-contents.patch +# Patch7: add to the CMake file all files where we want macros to be expanded Patch7: %{pkgnamepatch}-scripts.patch -Patch8: %{pkgnamepatch}-install-db-sharedir.patch +# Patch9: pre-configure to comply with guidelines Patch9: %{pkgnamepatch}-ownsetup.patch -Patch12: %{pkgnamepatch}-admincrash.patch -Patch13: %{pkgnamepatch}-ssl-cypher.patch -Patch14: %{pkgnamepatch}-example-config-files.patch +# Patch10: Add RHEL8 required security +Patch10: %{pkgnamepatch}-annocheck.patch +# Patch11: Fix issues found by static analysis +Patch11: %{pkgnamepatch}-covscan.patch +# Patch12: Downstream fix for a correct pkgconfig file location +Patch12: %{pkgnamepatch}-pcdir.patch -# Patches specific for this mysql package -Patch30: %{pkgnamepatch}-errno.patch -# Patch31: %{pkgnamepatch}-string-overflow.patch -Patch32: %{pkgnamepatch}-basedir.patch -# Patch34: %{pkgnamepatch}-covscan-stroverflow.patch -Patch37: %{pkgnamepatch}-notestdb.patch -# Due to LP https://bugs.launchpad.net/tripleo/+bug/1638864 -# Reverts 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 until we fix the -# galera resource agent to cope with this change -# When RHBZ#1391470 gets fixed and released in centos we can remove this patch -Patch38: %{pkgnamepatch}-revert-stdouterr-closing.patch +Patch999: mariadb-spider_on_armv7hl.patch -# Patches for galera -Patch40: %{pkgnamepatch}-galera.cnf.patch -# Patch41: %{pkgnamepatch}-galera-new-cluster-help.patch - -BuildRequires: cmake -BuildRequires: bison -BuildRequires: gcc-c++ -BuildRequires: libaio-devel -BuildRequires: libedit-devel -BuildRequires: ncurses-devel -BuildRequires: perl -%if 0%{?fedora} >= 22 || 0%{?rhel} > 7 -BuildRequires: perl-generators -%endif -BuildRequires: systemtap-sdt-devel -BuildRequires: zlib-devel +BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config +BuildRequires: selinux-policy-devel +BuildRequires: systemd systemd-devel + +# Page compression algorithms for InnoDB & XtraDB +BuildRequires: zlib-devel +%{?with_lz4:BuildRequires: lz4-devel} + +# asynchornous operations stuff; needed also for wsrep API +BuildRequires: libaio-devel +# commands history features +BuildRequires: libedit-devel +# CLI graphic; needed also for wsrep API +BuildRequires: ncurses-devel +# debugging stuff +BuildRequires: systemtap-sdt-devel +# Bison SQL parser; needed also for wsrep API +BuildRequires: bison bison-devel -# Mariabackup -BuildRequires: libarchive libarchive-devel # 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_pcre:BuildRequires: pcre-devel >= 8.35} -%{!?with_pcre:Provides: bundled(pcre) = %{pcre_version}} +%{?with_unbundled_pcre:BuildRequires: pcre-devel >= 8.35 pkgconf} +%{!?with_unbundled_pcre:Provides: bundled(pcre) = %{pcre_bundled_version}} +# 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 @@ -227,32 +251,20 @@ BuildRequires: perl(Sys::Hostname) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) BuildRequires: perl(Symbol) - -# Temporary workaound to build with OpenSSL 1.0 on Fedora >=26 (wich requires OpenSSL 1.1) -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -Requires: compat-openssl10 -%else # for running some openssl tests rhbz#1189180 -BuildRequires: openssl -BuildRequires: openssl-devel -%endif +BuildRequires: openssl openssl-devel -BuildRequires: krb5-devel +Requires: bash coreutils grep -BuildRequires: selinux-policy-devel -%{?with_init_systemd:BuildRequires: systemd systemd-devel} - -BuildRequires: krb5-devel - -Requires: bash -Requires: fileutils -Requires: grep Requires: %{name}-common%{?_isa} = %{sameevr} -# Explicit EVR requirement for -libs is needed for -# https://bugzilla.redhat.com/show_bug.cgi?id=1406320 +%if %{with clibrary} +# Explicit EVR requirement for -libs is needed for RHBZ#1406320 Requires: %{name}-libs%{?_isa} = %{sameevr} +%else +# If not built with client library in this package, use connector-c +Requires: mariadb-connector-c >= 3.0 +%endif %if %{with mysql_names} Provides: mysql = %{sameevr} @@ -261,62 +273,58 @@ Provides: mysql-compat-client = %{sameevr} Provides: mysql-compat-client%{?_isa} = %{sameevr} %endif - +Suggests: %{name}-server%{?_isa} = %{sameevr} # MySQL (with caps) is upstream's spelling of their own RPMs for mysql -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql} +%{?with_conflicts:Conflicts: mysql} # obsoletion of mariadb-galera Provides: mariadb-galera = %{sameevr} -Obsoletes: mariadb-galera < %{obsoleted_mariadb_galera_evr} # Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 %global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) -%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$ -%else -%filter_from_requires /perl(\(hostnames\|lib::mtr\|lib::v1\|mtr_\|My::\)/d -%filter_provides_in -P (%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\.so) -%filter_setup -%endif +%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/%{pkg_name}/plugin/.*\\.so)$ # Define license macro if not present %{!?_licensedir:%global license %doc} %description -MariaDB is a community developed branch of MySQL. -MariaDB is 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. The base package -contains the standard MariaDB/MySQL client programs and generic MySQL files. +MariaDB is a community developed branch of 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. +The base package contains the standard MariaDB/MySQL client programs and +generic MySQL files. %if %{with clibrary} %package libs Summary: The shared libraries required for MariaDB/MySQL clients -Group: Applications/Databases Requires: %{name}-common%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-libs = %{sameevr} Provides: mysql-libs%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-libs < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-libs < %{obsoleted_mysql_evr}} +%endif # mysql_names %description 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. MariaDB is a community developed branch of MySQL. -%endif +to a MariaDB/MySQL server. +%endif #clibrary +# 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), +# 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) +# is supposed to be defined as Requires: /etc/my.cnf rather than requiring +# a specific package, so installer app can choose whatever package fits to +# the transaction. %if %{with config} %package config Summary: The config files required by server and client -Group: Applications/Databases %description config The package provides the config file my.cnf and my.cnf.d directory used by any @@ -329,12 +337,14 @@ package itself. %if %{with common} %package common Summary: The shared files required by server and client -Group: Applications/Databases Requires: %{_sysconfdir}/my.cnf # obsoletion of mariadb-galera-common Provides: mariadb-galera-common = %{sameevr} -Obsoletes: mariadb-galera-common < %{obsoleted_mariadb_galera_common_evr} + +%if %{without clibrary} +Obsoletes: %{name}-libs <= %{sameevr} +%endif %description common The package provides the essential shared files for any MariaDB program. @@ -345,7 +355,6 @@ You will need to install this package to use any other MariaDB package. %if %{with errmsg} %package errmsg Summary: The error messages files required by server and embedded -Group: Applications/Databases Requires: %{name}-common%{?_isa} = %{sameevr} %description errmsg @@ -358,16 +367,22 @@ MariaDB packages. %if %{with galera} %package server-galera Summary: The configuration files and scripts for galera replication -Group: Applications/Databases 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 +# wsrep requirements +Requires: lsof +# Default wsrep_sst_method +Requires: rsync # obsoletion of mariadb-galera-server Provides: mariadb-galera-server = %{sameevr} -Obsoletes: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr} %description server-galera MariaDB is a multi-user, multi-threaded SQL database server. It is a @@ -380,47 +395,48 @@ MariaDB is a community developed branch of MySQL. %package server Summary: The MariaDB server and related files -Group: Applications/Databases # 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} %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}} + +Suggests: mytop +Suggests: logrotate + Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -Requires: sh-utils + +# for fuser in mysql-check-socket +Requires: psmisc + +Requires: coreutils Requires(pre): /usr/sbin/useradd -%if %{with init_systemd} # We require this to be present for %%{_tmpfilesdir} Requires: systemd # Make sure it's there when scriptlets run, too -Requires(pre): systemd -Requires(posttrans): systemd -%{?systemd_requires: %systemd_requires} -%endif -# mysqlhotcopy needs DBI/DBD support -Requires: perl(DBI) -Requires: perl(DBD::mysql) -# wsrep requirements -Requires: lsof -Requires: net-tools -Requires: sh-utils -Requires: rsync +%{?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 -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}} -%{?with_conflicts:Conflicts: community-mysql-server} -%{?with_conflicts:Conflicts: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-server < %{obsoleted_mysql_evr}} +%{?with_conflicts:Conflicts: mysql-server} %description server MariaDB is a multi-user, multi-threaded SQL database server. It is a @@ -433,11 +449,9 @@ MariaDB is a community developed branch of MySQL. %if %{with oqgraph} %package oqgraph-engine Summary: The Open Query GRAPH engine for MariaDB -Group: Applications/Databases Requires: %{name}-server%{?_isa} = %{sameevr} # boost and Judy required for oograph -BuildRequires: boost-devel -BuildRequires: Judy-devel +BuildRequires: boost-devel Judy-devel %description oqgraph-engine The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB @@ -451,7 +465,6 @@ standard SQL syntax, and results joined onto other tables. %if %{with connect} %package connect-engine Summary: The CONNECT storage engine for MariaDB -Group: Applications/Databases Requires: %{name}-server%{?_isa} = %{sameevr} %description connect-engine @@ -463,41 +476,144 @@ or products (such as Excel), or data retrieved from the environment %endif +%if %{with backup} +%package backup +Summary: The mariabackup tool for physical online backups +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: libarchive-devel + +%description 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. +%endif + + +%if %{with rocksdb} +%package rocksdb-engine +Summary: The RocksDB storage engine for MariaDB +Requires: %{name}-server%{?_isa} = %{sameevr} +Provides: bundled(rocksdb) + +%description 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 +Summary: The password strength checking plugin +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: cracklib-dicts cracklib-devel +Requires: cracklib-dicts + +%description 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. +Now, with the cracklib_password_check password validation plugin, one can +also use it to check MariaDB account passwords. +%endif + + +%if %{with gssapi} +%package gssapi-server +Summary: GSSAPI authentication plugin for server +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: krb5-devel + +%description gssapi-server +GSSAPI authentication server-side plugin for MariaDB for passwordless login. +This plugin includes support for Kerberos on Unix. +%endif + + +%if %{with sphinx} +%package sphinx-engine +Summary: The Sphinx storage engine for MariaDB +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: sphinx libsphinxclient libsphinxclient-devel +Requires: sphinx libsphinxclient + +%description 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! +%endif + + +%package server-utils +Summary: Non-essential server utilities for MariaDB/MySQL applications +Requires: %{name}-server%{?_isa} = %{sameevr} +%if %{with mysql_names} +Provides: mysql-perl = %{sameevr} +%endif +# mysqlhotcopy needs DBI/DBD support +Requires: perl(DBI) perl(DBD::mysql) + +%description 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. + + %if %{with devel} %package devel Summary: Files for development of MariaDB/MySQL applications -Group: Applications/Databases %{?with_clibrary:Requires: %{name}-libs%{?_isa} = %{sameevr}} -# avoid issues with openssl1.0 / openssl1.1 / compat -Requires: pkgconfig(openssl) +Requires: openssl-devel +%if %{without clibrary} +Requires: mariadb-connector-c-devel >= 3.0 +%endif %if %{with mysql_names} Provides: mysql-devel = %{sameevr} Provides: mysql-devel%{?_isa} = %{sameevr} %endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql-devel} +%{?with_conflicts:Conflicts: mysql-devel} %description devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the libraries and header files that are needed for -developing MariaDB/MySQL client applications. +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. +%else +This package contains everything needed for developing MariaDB/MySQL server +applications. For developing client applications, use mariadb-connector-c +package. +%endif %endif %if %{with embedded} %package embedded Summary: MariaDB as an embeddable library -Group: Applications/Databases Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-errmsg%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-embedded = %{sameevr} Provides: mysql-embedded%{?_isa} = %{sameevr} %endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded < %{obsoleted_mysql_evr}} %description embedded MariaDB is a multi-user, multi-threaded SQL database server. This @@ -508,7 +624,6 @@ MariaDB is a community developed branch of MySQL. %package embedded-devel Summary: Development files for MariaDB as an embeddable library -Group: Applications/Databases Requires: %{name}-embedded%{?_isa} = %{sameevr} Requires: %{name}-devel%{?_isa} = %{sameevr} # embedded-devel should require libaio-devel (rhbz#1290517) @@ -517,43 +632,37 @@ Requires: libaio-devel Provides: mysql-embedded-devel = %{sameevr} Provides: mysql-embedded-devel%{?_isa} = %{sameevr} %endif -%{?with_conflicts:Conflicts: community-mysql-embedded-devel} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded-devel < %{obsoleted_mysql_evr}} +%{?with_conflicts:Conflicts: mysql-embedded-devel} %description embedded-devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains files needed for developing and testing with -the embedded version of the MariaDB server. +MariaDB is a multi-user, multi-threaded SQL database server. MariaDB is a community developed branch of 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 -Group: Applications/Databases Requires: %{name}%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-bench = %{sameevr} Provides: mysql-bench%{?_isa} = %{sameevr} %endif -%{?with_conflicts:Conflicts: community-mysql-bench} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-bench < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-bench < %{obsoleted_mysql_evr}} +%{?with_conflicts:Conflicts: mysql-bench} %description bench -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains benchmark scripts and data for use when benchmarking -MariaDB. +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 Summary: The test suite distributed with MariaDB -Group: Applications/Databases Requires: %{name}%{?_isa} = %{sameevr} Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-server%{?_isa} = %{sameevr} @@ -568,88 +677,102 @@ Requires: perl(Socket) Requires: perl(Sys::Hostname) Requires: perl(Test::More) Requires: perl(Time::HiRes) -%{?with_conflicts:Conflicts: community-mysql-test} +%{?with_conflicts:Conflicts: mysql-test} %if %{with mysql_names} Provides: mysql-test = %{sameevr} Provides: mysql-test%{?_isa} = %{sameevr} %endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}} %description test -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the regression test suite distributed with -the MariaDB sources. +MariaDB is a multi-user, multi-threaded SQL database server. MariaDB is a community developed branch of MySQL. +This package contains the regression test suite distributed with the MariaDB +sources. %endif + %prep %setup -q -n mariadb-%{version} -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch30 -p1 -# %patch31 -p1 -%patch32 -p1 -# %patch34 -p1 -%patch37 -p1 -%patch38 -p1 -%patch40 -p1 -# %patch41 -p1 +# Remove JAR files that upstream puts into tarball +find . -name "*.jar" -type f -exec rm --verbose -f {} \; -sed -i -e 's/2.8.7/2.6.4/g' cmake/cpack_rpm.cmake -# workaround to deploy mariadb@.service on EL7 -sed -i 's/IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)/IF(TRUE)/g' support-files/CMakeLists.txt +%patch4 -p1 +%patch7 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 + +%ifarch %{arm} +%patch999 -p1 +%endif # workaround for upstream bug #56342 -rm -f mysql-test/t/ssl_8k_key-master.opt +#rm mysql-test/t/ssl_8k_key-master.opt # generate a list of tests that fail, but are not disabled by upstream -cat %{SOURCE50} | tee mysql-test/rh-skipped-tests.list +cat %{SOURCE50} | tee -a mysql-test/unstable-tests # disable some tests failing on different architectures -%ifarch %{arm} aarch64 -cat %{SOURCE51} | tee -a mysql-test/rh-skipped-tests.list +%ifarch aarch64 +cat %{SOURCE51} | tee -a mysql-test/unstable-tests %endif -%ifarch ppc ppc64 ppc64p7 s390 s390x -cat %{SOURCE52} | tee -a mysql-test/rh-skipped-tests.list +%ifarch %{arm} +cat %{SOURCE9999} | tee -a mysql-test/unstable-tests %endif -cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ - %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \ - %{SOURCE70} scripts +%ifarch s390 s390x +cat %{SOURCE52} | tee -a mysql-test/unstable-tests +%endif + +%ifarch ppc ppc64 ppc64p7 ppc64le +cat %{SOURCE53} | tee -a mysql-test/unstable-tests +%endif + +cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ + %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE18} %{SOURCE70} %{SOURCE73} scripts %if %{with galera} # prepare selinux policy mkdir selinux sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{name}-server-galera.te -cat selinux/%{name}-server-galera.te %endif -# Check if PCRE version is actual -%{!?with_pcre: + +# 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/'` -if [ %{pcre_version} != "$pcre_maj.$pcre_min" ] +%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 PCRE version is outdated. \n\tIncluded version:%{pcre_version} \n\tUpstream version: $pcre_maj.$pcre_min\n" + 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" 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" +fi +%endif # PCRE +%if %{without rocksdb} +rm -r storage/rocksdb/ +%endif + +# STX: tokudb has been removed in tarball +# 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 @@ -661,29 +784,13 @@ fi fi %endif -CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# force PIC mode so that we can build libmysqld.so -CFLAGS="$CFLAGS -fPIC" -# GCC 4.9 causes segfaults: https://mariadb.atlassian.net/browse/MDEV-6360 -CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" -# gcc seems to have some bugs on sparc as of 4.4.1, back off optimization -# submitted as bz #529298 -%ifarch sparc sparcv9 sparc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` -%endif -# significant performance gains can be achieved by compiling with -O3 optimization -# rhbz#1051069 -%ifarch ppc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O3|g" ` -%endif -CXXFLAGS="$CFLAGS" -export CFLAGS CXXFLAGS +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"} -%if 0%{?_hardened_build} -# building with PIE -LDFLAGS="$LDFLAGS -pie -Wl,-z,relro,-z,now" -export LDFLAGS -%endif +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. @@ -704,41 +811,55 @@ export LDFLAGS -DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_INFODIR=share/info \ - -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_LIBDIR="%{_lib}" \ -DINSTALL_MANDIR=share/man \ -DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \ - -DINSTALL_MYSQLTESTDIR=share/mysql-test \ - -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DINSTALL_MYSQLTESTDIR=%{?with_test:share/mysql-test}%{!?with_test:} \ + -DINSTALL_PLUGINDIR="%{_lib}/%{pkg_name}/plugin" \ -DINSTALL_SBINDIR=libexec \ -DINSTALL_SCRIPTDIR=bin \ -DINSTALL_SQLBENCHDIR=share \ -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ + -DINSTALL_PCDIR=%{_lib}/pkgconfig \ -DMYSQL_DATADIR="%{dbdatadir}" \ -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ + -DTMPDIR=/var/tmp \ -DENABLED_LOCAL_INFILE=ON \ -DENABLE_DTRACE=ON \ - -DWITH_EMBEDDED_SERVER=ON \ + -DSECURITY_HARDENED=ON \ + -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} \ + -DWITH_MARIABACKUP=%{?with_backup:ON}%{!?with_backup:NO} \ + -DWITH_UNIT_TESTS=%{?with_test:ON}%{!?with_test:NO} \ + -DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -%{?with_pcre: -DWITH_PCRE=system}\ - -DWITH_JEMALLOC=no \ -%{!?with_tokudb: -DWITHOUT_TOKUDB=ON}\ -%{!?with_mroonga: -DWITHOUT_MROONGA=ON}\ -%{!?with_oqgraph: -DWITHOUT_OQGRAPH=ON}\ - -DTMPDIR=/var/tmp \ -%{?with_debug: -DCMAKE_BUILD_TYPE=Debug}\ - %{?_hardened_build:-DWITH_MYSQLD_LDFLAGS="-pie -Wl,-z,relro,-z,now"} + -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_ROCKSDB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ + -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} \ + -DWITH_CASSANDRA=%{?with_cassandra:TRUE}%{!?with_cassandra:FALSE} \ + -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ + -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ + -DCONNECT_WITH_MONGO=OFF \ + -DCONNECT_WITH_JDBC=OFF \ +%{?with_debug: -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON -DWITH_VALGRIND=ON} -make %{?_smp_mflags} VERBOSE=1 +# Print all Cmake options values +# cmake -LAH for List Advanced Help +cmake -LA + +%make_build VERBOSE=1 -# debuginfo extraction scripts fail to find source files in their real -# location -- satisfy them by copying these files into location, which -# is expected by scripts -for e in innobase xtradb ; do - for f in pars0grm.y pars0lex.l ; do - cp -p "storage/$e/pars/$f" "storage/$e/$f" - done -done # build selinux policy %if %{with galera} @@ -747,39 +868,37 @@ make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp %endif %install -make DESTDIR=%{buildroot} install +%make_install -# cmake generates some completely wacko references to -lprobes_mysql when -# building with dtrace support. Haven't found where to shut that off, -# so resort to this blunt instrument. While at it, let's not reference -# libmysqlclient_r anymore either. -sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ - %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp -cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config -chmod 755 %{buildroot}%{_bindir}/mysql_config - -# multilib header support -for header in mysql/my_config.h mysql/private/config.h; do +# multilib header support #1625157 +for header in mysql/server/my_config.h mysql/server/private/config.h; do %multilib_fix_c_header --file %{_includedir}/$header done +ln -s mysql_config.1.gz %{buildroot}%{_mandir}/man1/mariadb_config.1.gz + # multilib support for shell scripts # we only apply this to known Red Hat multilib arches, per bug #181335 -if %multilib_capable; then +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 +# 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 -# Upstream install this into arch-independent directory, TODO: report -mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig +%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}/mysql/ -install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/ +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} @@ -793,72 +912,74 @@ install -p -m 0755 -d %{buildroot}%{dbdatadir} %if %{with config} install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf %else -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf +rm scripts/my.cnf %endif -# use different config file name for each variant of server +# 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 +# Rename sysusers and tmpfiles config files, they should be named after the software they belong to +mv %{buildroot}%{_sysusersdir}/sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf + +# remove SysV init script and a symlink to that, we pack our very own +rm %{buildroot}%{_sysconfdir}/init.d/mysql +rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup -%if %{with init_systemd} 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}/tmpfiles.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 %{_localstatedir}/run/%{mysqld_pid_dir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf -%endif -%endif - -# install SysV init script -%if %{with init_sysv} -install -D -p -m 755 scripts/mysql.init %{buildroot}%{daemondir}/%{daemon_name} -%endif +echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf +%endif #pid # 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-wait-ready %{buildroot}%{_libexecdir}/mysql-wait-ready -install -p -m 755 scripts/mysql-wait-stop %{buildroot}%{_libexecdir}/mysql-wait-stop 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 selinux policy +# 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 %endif -# install -p -m 644 -D selinux/%{name}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.pp -# install -p -m 644 -D selinux/%{name}.te %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.te - -# Remove libmysqld.a -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a - -# libmysqlclient_r is no more. Upstream tries to replace it with symlinks -# but that really doesn't work (wrong soname in particular). We'll keep -# just the devel libmysqlclient_r.so link, so that rebuilding without any -# source change is enough to get rid of dependency on libmysqlclient_r. -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so* -ln -s libmysqlclient.so %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so - -# mysql-test includes one executable that doesn't belong under /usr/share, -# so move it and provide a symlink +%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 +# Provide symlink expected by RH QA tests +ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/rh-skipped-tests.list +%endif -# should move this to /etc/ ? -rm -f %{buildroot}%{_bindir}/mysql_embedded -rm -f %{buildroot}%{_libdir}/mysql/*.a -rm -f %{buildroot}%{_datadir}/%{pkg_name}/binary-configure -rm -f %{buildroot}%{_datadir}/%{pkg_name}/magic -rm -f %{buildroot}%{_datadir}/%{pkg_name}/ndb-config-2-node.ini -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysql.server -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server -rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* -rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* -rm -f %{buildroot}%{_bindir}/mytop -#WRS +# 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 +# FS files first-bytes recoginiton +# Not updated by upstream since nobody realy use that +rm %{buildroot}%{_datadir}/%{pkg_name}/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 + +# Binary for monitoring MySQL performance +# Shipped as a standalona package in Fedora +rm %{buildroot}%{_bindir}/mytop + +# STX rm -rf %{buildroot}/usr/DESTINATION/JdbcInterface.jar # put logrotate script where it needs to be @@ -866,121 +987,162 @@ mkdir -p %{buildroot}%{logrotateddir} mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} -mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf - # copy additional docs into build tree so %%doc will find them -install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}} 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 - # install the clustercheck script mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck -# install the list of skipped tests to be available for user runs -install -p -m 0644 mysql-test/rh-skipped-tests.list %{buildroot}%{_datadir}/mysql-test - -# remove unneeded RHEL-4 SELinux stuff -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/SELinux/ - -# remove SysV init script and a symlink to that -rm -f %{buildroot}%{_sysconfdir}/init.d/mysql -rm -f %{buildroot}%{_libexecdir}/rcmysql - # remove duplicate logrotate script -rm -f %{buildroot}%{_sysconfdir}/logrotate.d/mysql +rm %{buildroot}%{logrotateddir}/mysql +# Remove AppArmor files +rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor -# remove solaris files -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/solaris/ +# script without shebang: https://jira.mariadb.org/browse/MDEV-14266 +chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf -# rename the wsrep README so it corresponds with the other README names -mv Docs/README-wsrep Docs/README.wsrep +# Add wsrep_sst_rsync_tunnel script +install -p -m 0755 scripts/wsrep_sst_rsync_tunnel %{buildroot}%{_bindir}/wsrep_sst_rsync_tunnel -# remove *.jar file from mysql-test -rm -rf %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar - -%if %{without clibrary} -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient.so -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so -rm -rf %{buildroot}%{_libdir}/mysql/libmysqlclient*.so.* -rm -rf %{buildroot}%{_sysconfdir}/ld.so.conf.d -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf +# 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 +%endif +%if %{with cracklib} +sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf %endif %if %{without embedded} -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.so* -rm -f %{buildroot}%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} -rm -f %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +%endif + + +%if %{without clibrary} +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 +# Client plugins +rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/{dialog.so,mysql_clear_password.so,sha256_password.so,auth_gssapi_client.so} +%endif + +%if %{without clibrary} || %{without devel} +rm %{buildroot}%{_bindir}/mysql_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} +# This files are already included in mariadb-connector-c +rm %{buildroot}%{_includedir}/mysql/mysql_version.h +rm %{buildroot}%{_includedir}/mysql/{errmsg.h,ma_list.h,ma_pvio.h,mariadb_com.h,\ +mariadb_ctype.h,mariadb_dyncol.h,mariadb_stmt.h,mariadb_version.h,ma_tls.h,mysqld_error.h,mysql.h} +rm -r %{buildroot}%{_includedir}/mysql/{mariadb,mysql} %endif %if %{without devel} -rm -f %{buildroot}%{_bindir}/mysql_config* -rm -rf %{buildroot}%{_includedir}/mysql -rm -f %{buildroot}%{_datadir}/aclocal/mysql.m4 -rm -f %{buildroot}%{_libdir}/pkgconfig/mariadb.pc -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient*.so -rm -f %{buildroot}%{_mandir}/man1/mysql_config.1* -%endif +rm -r %{buildroot}%{_includedir}/mysql +rm %{buildroot}%{_datadir}/aclocal/mysql.m4 +rm %{buildroot}%{_libdir}/pkgconfig/mariadb.pc +%if %{with clibrary} +rm %{buildroot}%{_libdir}/libmariadb*.so +unlink %{buildroot}%{_libdir}/libmysqlclient.so +unlink %{buildroot}%{_libdir}/libmysqlclient_r.so +%endif # clibrary +%endif # devel %if %{without client} -rm -f %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ +rm %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap,my_print_defaults} -rm -f %{buildroot}%{_mandir}/man1/{msql2mysql,mysql,mysql_find_rows,\ +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,my_print_defaults}.1* -%endif - -%if %{without connect} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/connect.cnf -%endif - -%if %{without oqgraph} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/oqgraph.cnf -%endif - -%if %{without config} -rm -f %{buildroot}%{_sysconfdir}/my.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%endif - -%if %{without common} -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/charsets -%endif - -%if %{without errmsg} -rm -f %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ -french,german,greek,hungarian,italian,japanese,korean,norwegian,norwegian-ny,\ -polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian} -%endif - -%if %{without bench} -rm -rf %{buildroot}%{_datadir}/sql-bench -%endif - -%if %{without test} -rm -f %{buildroot}%{_bindir}/{mysql_client_test,my_safe_process} -rm -rf %{buildroot}%{_datadir}/mysql-test -rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1* +mysqldump,mysqlimport,mysqlshow,mysqlslap}.1* +rm %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf %endif %if %{without tokudb} +# STX: disable tokudb rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf +# because upstream ships manpages for tokudb even on architectures that tokudb doesn't support +# rm %{buildroot}%{_mandir}/man1/tokuftdump.1* +# rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* +%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 +%endif + +%if %{without gssapi} +rm -r %{buildroot}/etc/my.cnf.d/auth_gssapi.cnf +%endif + +%if %{without errmsg} +rm %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt +rm -r %{buildroot}%{_datadir}/%{pkg_name}/{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 +%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,mysqltest} +rm %{buildroot}%{_mandir}/man1/{mysql_client_test,my_safe_process,mysqltest}.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 +%endif + +%if %{without rocksdb} +rm %{buildroot}%{_mandir}/man1/mysql_ldb.1* %endif %check %if %{with test} %if %runselftest -make test VERBOSE=1 + +# 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 @@ -995,23 +1157,43 @@ export MTR_BUILD_THREAD=%{__isa_bits} # skip tests that are listed in rh-skipped-tests.list # avoid redundant test runs with --binlog-format=mixed # increase timeouts to prevent unwanted failures during mass rebuilds + +# Usefull arguments: +# --do-test=mysql_client_test_nonblock \ +# --skip-rpl +# --suite=roles +# --mem for running in the RAM; Not enough space in KOJI for this + ( - set -e + set -ex + cd mysql-test - perl ./mysql-test-run.pl --force --retry=0 --ssl \ - --suite-timeout=720 --testcase-timeout=30 --skip-rpl \ + perl ./mysql-test-run.pl --parallel=auto --force --retry=1 --ssl \ + --suite-timeout=900 --testcase-timeout=30 \ --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=0 \ + --shutdown-timeout=60 --max-test-fail=10 --big-test \ + --skip-test=spider \ %if %{ignore_testsuite_result} - || : + --max-test-fail=9999 || : %else - --skip-test-list=rh-skipped-tests.list + --skip-test-list=unstable-tests +%endif + +# 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 \ +%if %{ignore_testsuite_result} + --max-test-fail=999 || : %endif - # cmake build scripts will install the var cruft if left alone :-( - rm -rf var ) -%endif -%endif + +%endif # if dry run +%endif # with test + + %pre server /usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : @@ -1019,47 +1201,30 @@ export MTR_BUILD_THREAD=%{__isa_bits} -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : %if %{with clibrary} -%post libs -p /sbin/ldconfig +# Can be dropped on F27 EOL +%ldconfig_scriptlets libs %endif %if %{with embedded} -%post embedded -p /sbin/ldconfig +# 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 %post server -%if %{with init_systemd} %systemd_post %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 1 ]; then - /sbin/chkconfig --add %{daemon_name} -fi -%endif %preun server -%if %{with init_systemd} %systemd_preun %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 0 ]; then - /sbin/service %{daemon_name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{daemon_name} -fi -%endif - -%if %{with clibrary} -%postun libs -p /sbin/ldconfig -%endif - -%if %{with embedded} -%postun embedded -p /sbin/ldconfig -%endif %if %{with galera} %postun server-galera @@ -1069,14 +1234,9 @@ fi %endif %postun server -%if %{with init_systemd} %systemd_postun_with_restart %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 -ge 1 ]; then - /sbin/service %{daemon_name} condrestart >/dev/null 2>&1 || : -fi -%endif + + %if %{with client} %files @@ -1093,7 +1253,6 @@ fi %{_bindir}/mysqlimport %{_bindir}/mysqlshow %{_bindir}/mysqlslap -%{_bindir}/my_print_defaults %{_mandir}/man1/msql2mysql.1* %{_mandir}/man1/mysql.1* @@ -1108,38 +1267,33 @@ fi %{_mandir}/man1/mysqlimport.1* %{_mandir}/man1/mysqlshow.1* %{_mandir}/man1/mysqlslap.1* -%{_mandir}/man1/my_print_defaults.1* +%config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf %endif %if %{with clibrary} %files libs -%{_libdir}/mysql/libmysqlclient.so.* -%{_sysconfdir}/ld.so.conf.d/* +%{_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 +# 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 -%config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset %endif %if %{with common} %files common -%license COPYING -%license storage/innobase/COPYING.Percona storage/innobase/COPYING.Google -%doc README README.mysql-license README.mysql-docs -%dir %{_libdir}/mysql -%dir %{_libdir}/mysql/plugin +%doc %{_datadir}/doc/%{_pkgdocdirname} %dir %{_datadir}/%{pkg_name} -%{_libdir}/mysql/plugin/dialog.so -%{_libdir}/mysql/plugin/mysql_clear_password.so %{_datadir}/%{pkg_name}/charsets -%endif +%if %{with clibrary} +%{_libdir}/%{pkg_name}/plugin/dialog.so +%{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so +%endif # clibrary +%endif # common %if %{with errmsg} %files errmsg @@ -1152,6 +1306,7 @@ fi %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 @@ -1171,79 +1326,68 @@ fi %if %{with galera} %files server-galera -%doc Docs/README.wsrep +%doc Docs/README-wsrep %license LICENSE.clustercheck %{_bindir}/clustercheck -%if %{with init_systemd} %{_bindir}/galera_new_cluster %{_bindir}/galera_recovery %{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf -%endif %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.mysql-cnf +%doc README.wsrep_sst_rsync_tunnel %{_bindir}/aria_chk %{_bindir}/aria_dump_log %{_bindir}/aria_ftdump %{_bindir}/aria_pack %{_bindir}/aria_read_log -%{_bindir}/mariabackup %{_bindir}/mariadb-service-convert -%{_bindir}/mbstream %{_bindir}/myisamchk %{_bindir}/myisam_ftdump %{_bindir}/myisamlog %{_bindir}/myisampack -%{_bindir}/mysql_convert_table_format -%{_bindir}/mysql_fix_extensions +%{_bindir}/my_print_defaults %{_bindir}/mysql_install_db %{_bindir}/mysql_secure_installation -%{_bindir}/mysql_setpermission %{_bindir}/mysql_tzinfo_to_sql -%{_bindir}/mysql_upgrade -%{_bindir}/mysql_zap -%{_bindir}/mysqlbug -%{_bindir}/mysqldumpslow -%{_bindir}/mysqld_multi %{_bindir}/mysqld_safe -%{_bindir}/mysqlhotcopy -%{_bindir}/mysqltest %{_bindir}/innochecksum -%{_bindir}/perror %{_bindir}/replace %{_bindir}/resolve_stack_dump %{_bindir}/resolveip -%{_bindir}/wsrep_sst_common -%{_bindir}/wsrep_sst_mariabackup -%{_bindir}/wsrep_sst_mysqldump -%{_bindir}/wsrep_sst_rsync -%{_bindir}/wsrep_sst_xtrabackup -%{_bindir}/wsrep_sst_xtrabackup-v2 -%{?with_tokudb:%{_bindir}/tokuftdump} -%{?with_tokudb:%{_bindir}/tokuft_logprint} +# 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/auth_gssapi.cnf -%{?with_tokudb:%config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf} +%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset %{_libexecdir}/mysqld -%{_libdir}/mysql/INFO_SRC -%{_libdir}/mysql/INFO_BIN +%{_libdir}/%{pkg_name}/INFO_SRC +%{_libdir}/%{pkg_name}/INFO_BIN %if %{without common} %dir %{_datadir}/%{pkg_name} %endif -%{_libdir}/mysql/plugin/* -%{?with_oqgraph:%exclude %{_libdir}/mysql/plugin/ha_oqgraph.so} -%{?with_connect:%exclude %{_libdir}/mysql/plugin/ha_connect.so} -%exclude %{_libdir}/mysql/plugin/dialog.so -%exclude %{_libdir}/mysql/plugin/mysql_clear_password.so +%dir %{_libdir}/%{pkg_name} +%dir %{_libdir}/%{pkg_name}/plugin +%{_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* @@ -1256,32 +1400,20 @@ fi %{_mandir}/man1/myisamchk.1* %{_mandir}/man1/myisamlog.1* %{_mandir}/man1/myisampack.1* -%{_mandir}/man1/mysql_convert_table_format.1* %{_mandir}/man1/myisam_ftdump.1* +%{_mandir}/man1/my_print_defaults.1* %{_mandir}/man1/mysql.server.1* -%{_mandir}/man1/mysql_fix_extensions.1* %{_mandir}/man1/mysql_install_db.1* %{_mandir}/man1/mysql_secure_installation.1* -%{_mandir}/man1/mysql_upgrade.1* -%{_mandir}/man1/mysql_zap.1* -%{_mandir}/man1/mysqlbug.1* -%{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqld_multi.1* +%{_mandir}/man1/mysql_tzinfo_to_sql.1* %{_mandir}/man1/mysqld_safe.1* %{_mandir}/man1/mysqld_safe_helper.1* -%{_mandir}/man1/my_safe_process.1* %{_mandir}/man1/innochecksum.1* -%{_mandir}/man1/perror.1* %{_mandir}/man1/replace.1* -%{_mandir}/man1/resolve_stack_dump.1* %{_mandir}/man1/resolveip.1* -%{_mandir}/man1/mysql_tzinfo_to_sql.1* +%{_mandir}/man1/resolve_stack_dump.1* %{_mandir}/man8/mysqld.8* -%{_mandir}/man1/wsrep_sst_common.1* -%{_mandir}/man1/wsrep_sst_mysqldump.1* -%{_mandir}/man1/wsrep_sst_rsync.1* -%{_mandir}/man1/wsrep_sst_xtrabackup.1* -%{_mandir}/man1/wsrep_sst_xtrabackup-v2.1* +%{_mandir}/man1/wsrep_*.1* %{_datadir}/%{pkg_name}/fill_help_tables.sql %{_datadir}/%{pkg_name}/install_spider.sql @@ -1292,117 +1424,551 @@ fi %{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql %{_datadir}/%{pkg_name}/mysql_to_mariadb.sql %{_datadir}/%{pkg_name}/mysql_performance_tables.sql -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/install.sql} -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/uninstall.sql} -%{_datadir}/%{pkg_name}/my-*.cnf +%{_datadir}/%{pkg_name}/mysql_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}/groonga-normalizer-mysql/lgpl-2.0.txt +%license %{_datadir}/groonga/COPYING +%doc %{_datadir}/groonga-normalizer-mysql/README.md +%doc %{_datadir}/groonga/README.md +%endif %{_datadir}/%{pkg_name}/wsrep.cnf %{_datadir}/%{pkg_name}/wsrep_notify %dir %{_datadir}/%{pkg_name}/policy -%dir %{_datadir}/%{pkg_name}/policy/apparmor %dir %{_datadir}/%{pkg_name}/policy/selinux -%{_datadir}/%{pkg_name}/policy/apparmor/README -%{_datadir}/%{pkg_name}/policy/apparmor/usr.sbin.mysqld* %{_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} > 22 || 0%{?rhel} > 6 +%if 0%{?fedora} || 0%{?rhel} > 7 %{_datadir}/%{pkg_name}/systemd/mariadb@.service %endif -%{daemondir}/%{daemon_name}* +%{_unitdir}/%{daemon_name}* +%{?with_tokudb:%exclude %{_unitdir}/mariadb.service.d/tokudb.conf} + %{_libexecdir}/mysql-prepare-db-dir -%{_libexecdir}/mysql-wait-ready -%{_libexecdir}/mysql-wait-stop %{_libexecdir}/mysql-check-socket %{_libexecdir}/mysql-check-upgrade %{_libexecdir}/mysql-scripts-common -%{?with_init_systemd:%{_tmpfilesdir}/%{name}.conf} %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} %config(noreplace) %{logrotateddir}/%{daemon_name} +%{_tmpfilesdir}/%{name}.conf +%{_sysusersdir}/%{name}.conf + +%if %{with cracklib} +%files cracklib-password-check +%config(noreplace) %{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf +%{_libdir}/%{pkg_name}/plugin/cracklib_password_check.so +%endif + +%if %{with backup} +%files backup +%{_bindir}/mariabackup +%{_bindir}/mbstream +%{_mandir}/man1/mariabackup.1* +%{_mandir}/man1/mbstream.1* +%endif + +%if %{with rocksdb} +%files rocksdb-engine +%config(noreplace) %{_sysconfdir}/my.cnf.d/rocksdb.cnf +%{_bindir}/myrocks_hotbackup +%{_bindir}/mysql_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 +%endif + +%if %{with gssapi} +%files gssapi-server +%{_libdir}/%{pkg_name}/plugin/auth_gssapi.so +%config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf +%endif + +%if %{with sphinx} +%files sphinx-engine +%{_libdir}/%{pkg_name}/plugin/ha_sphinx.so +%endif + %if %{with oqgraph} %files oqgraph-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/oqgraph.cnf -%{_libdir}/mysql/plugin/ha_oqgraph.so +%{_libdir}/%{pkg_name}/plugin/ha_oqgraph.so %endif %if %{with connect} %files connect-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/connect.cnf -%{_libdir}/mysql/plugin/ha_connect.so +%{_libdir}/%{pkg_name}/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 +%endif + +%files 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* -%{_mandir}/man1/mysqltest.1* - +# Utilities that can be used remotely +%{_bindir}/mysql_upgrade +%{_bindir}/perror +%{_mandir}/man1/mysql_upgrade.1* +%{_mandir}/man1/perror.1* # Other utilities %{_bindir}/mysqld_safe_helper %if %{with devel} %files devel -%{_bindir}/mysql_config* -%{_includedir}/mysql +%{_includedir}/* %{_datadir}/aclocal/mysql.m4 %{_libdir}/pkgconfig/mariadb.pc %if %{with clibrary} -%{_libdir}/mysql/libmysqlclient.so -%{_libdir}/mysql/libmysqlclient_r.so +%{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so} +%{_bindir}/mysql_config* +%{_bindir}/mariadb_config* +%{_libdir}/libmariadb.so +%{_libdir}/libmysqlclient.so +%{_libdir}/libmysqlclient_r.so +%{_mandir}/man1/mysql_config* +%{_mandir}/man1/mariadb_config* %endif -%{_mandir}/man1/mysql_config.1* %endif %if %{with embedded} %files embedded -%{_libdir}/mysql/libmysqld.so.* +%{_libdir}/libmariadbd.so.* %files embedded-devel -%{_libdir}/mysql/libmysqld.so -%{_bindir}/mysql_client_test_embedded -%{_bindir}/mysqltest_embedded -%{_mandir}/man1/mysql_client_test_embedded.1* -%{_mandir}/man1/mysqltest_embedded.1* +%{_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 +%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* +%endif %{_bindir}/mysql_client_test %{_bindir}/my_safe_process +%{_bindir}/mysqltest %attr(-,mysql,mysql) %{_datadir}/mysql-test %{_mandir}/man1/mysql_client_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 -* Tue Jan 10 2017 Michael Bayer - 3:10.1.20-1 -- Update to version 10.1.20 +* 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 +- Related: #1406320 + +* Tue Dec 20 2016 Honza Horak - 3:10.1.20-2 - Use correct macro when removing doc files - Resolves: #1400981 +- 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 +- 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 -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-3 -- Actually apply the revert added as patch in the previous release - -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-2 -- Back out upstream commit 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 as it - breaks the resource agent - * Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 - Update to 10.1.18 @@ -1411,7 +1977,7 @@ fi * Mon Aug 29 2016 Jakub Dorňák - 3:10.1.16-2 - Fixed galera replication - Resolves: #1352946 +- Resolves: #1352946 * Tue Jul 19 2016 Jakub Dorňák - 3:10.1.16-1 - Update to 10.1.16 @@ -1426,7 +1992,7 @@ fi * Thu Jul 14 2016 Honza Horak - 2:10.1.15-3 - Check datadir more carefully to avoid unwanted data corruption - Related: #1335849 +- Related: #1335849 * Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 - Bump epoch @@ -1436,7 +2002,7 @@ fi - Update to 10.1.15 * Fri Jul 1 2016 Jakub Dorňák - 1:10.1.14-3 - Revert "Update to 10.2.0" +- 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 @@ -1445,7 +2011,7 @@ fi * Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 - Fix mysql-prepare-db-dir - Resolves: #1335849 +- Resolves: #1335849 * Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 - Update to 10.2.0 @@ -1460,8 +2026,8 @@ fi * 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 + 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 @@ -1471,7 +2037,7 @@ fi * Tue Mar 22 2016 Jakub Dorňák - 1:10.1.12-3 - Add subpackage mariadb-server-galera - Resolves: 1310622 +- Resolves: 1310622 * Tue Mar 01 2016 Honza Horak - 1:10.1.12-2 - Rebuild for BZ#1309199 (symbol versioning) @@ -1487,9 +2053,9 @@ fi * Fri Feb 12 2016 Honza Horak - 1:10.1.11-7 - Add Provides: bundled(pcre) in case we build with bundled pcre - Related: #1302296 +- Related: #1302296 - embedded-devel should require libaio-devel - Resolves: #1290517 +- Resolves: #1290517 * Fri Feb 12 2016 Honza Horak - 1:10.1.11-6 - Fix typo s/obsolate/obsolete/ @@ -1497,9 +2063,9 @@ fi * 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 +- Resolves: #1279753 - Re-enable using libedit, which should be now fixed - Related: #1201988 +- Related: #1201988 - Remove mariadb-wait-ready call from systemd unit, we have now systemd notify support - Make mariadb@.service similar to mariadb.service @@ -1548,7 +2114,7 @@ fi * Wed Jun 03 2015 Dan Horák - 1:10.0.19-2 - Update lists of failing tests (jdornak) - Related: #1149647 +- Related: #1149647 * Mon May 11 2015 Honza Horak - 1:10.0.19-1 - Update to 10.0.19 @@ -1560,23 +2126,23 @@ fi - Include client plugins into -common package since they are used by both -libs and base packages. - Do not use libedit - Related: #1201988 +- Related: #1201988 - Let plugin dir to be owned by -common - Use correct comment in the init script - Related: #1184604 +- Related: #1184604 - Add openssl as BuildRequires to run some openssl tests during build - Related: #1189180 +- Related: #1189180 - Fail in case any command in check fails - Related: #1124791 +- Related: #1124791 - Fix mysqladmin crash if run with -u root -p - Resolves: #1207170 +- 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 +- 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 @@ -1587,9 +2153,9 @@ fi * Tue Mar 03 2015 Honza Horak - 1:10.0.16-6 - Check permissions when starting service on RHEL-6 - Resolves: #1194699 +- Resolves: #1194699 - Do not create test database by default - Related: #1194611 +- Related: #1194611 * Fri Feb 13 2015 Matej Muzila - 1:10.0.16-4 - Enable tokudb @@ -1600,11 +2166,11 @@ fi * Wed Feb 4 2015 Jakub Dorňák - 1:10.0.16-2 - Include new certificate for tests - Update lists of failing tests - Related: #1186110 +- Related: #1186110 * Tue Feb 3 2015 Jakub Dorňák - 1:10.0.16-9 - Rebase to version 10.0.16 - Resolves: #1187895 +- Resolves: #1187895 * Tue Jan 27 2015 Petr Machata - 1:10.0.15-9 - Rebuild for boost 1.57.0 @@ -1638,15 +2204,15 @@ fi * Thu Nov 20 2014 Jan Stanek - 1:10.0.14-8 - Applied upstream fix for mysql_config --cflags output. - Resolves: #1160845 +- Resolves: #1160845 * Fri Oct 24 2014 Jan Stanek - 1:10.0.14-7 - Fixed compat service file. - Resolves: #1155700 +- Resolves: #1155700 * Mon Oct 13 2014 Honza Horak - 1:10.0.14-6 - Remove bundled cmd-line-utils - Related: #1079637 +- Related: #1079637 - Move mysqlimport man page to proper package - Disable main.key_cache test on s390 Releated: #1149647 @@ -1654,7 +2220,7 @@ fi * Wed Oct 08 2014 Honza Horak - 1:10.0.14-5 - Disable tests connect.part_file, connect.part_table and connect.updelx - Related: #1149647 +- Related: #1149647 * Wed Oct 01 2014 Honza Horak - 1:10.0.14-4 - Add bcond_without mysql_names @@ -1662,7 +2228,7 @@ fi * Wed Oct 01 2014 Honza Horak - 1:10.0.14-3 - Build with system libedit - Resolves: #1079637 +- Resolves: #1079637 * Mon Sep 29 2014 Honza Horak - 1:10.0.14-2 - Add with_debug option @@ -1681,17 +2247,17 @@ fi * Wed Sep 24 2014 Matej Muzila - 1:10.0.13-7 - Client related libraries moved from mariadb-server to mariadb-libs - Related: #1138843 +- 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 +- 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 +- Resolves: #1134328 - Use %%cmake macro * Tue Aug 19 2014 Honza Horak - 1:10.0.13-4 @@ -1775,7 +2341,7 @@ fi * 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 +- Resolves: #1065676 - Fix paths in helper scripts - Move language files into mariadb directory @@ -1788,11 +2354,11 @@ fi * Tue Feb 11 2014 Honza Horak 1:5.5.35-4 - Fix typo in mysqld.service - Resolves: #1063981 +- 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 +- Resolves: #1061045 * Thu Jan 30 2014 Honza Horak 1:5.5.35-1 - Rebase to 5.5.35 @@ -1800,23 +2366,23 @@ fi 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 +- Resolves: #1054043 +- Resolves: #1059546 * Tue Jan 14 2014 Honza Horak - 1:5.5.34-9 - Adopt compatible system versioning - Related: #1045013 +- Related: #1045013 - Use compatibility mysqld.service instead of link - Related: #1014311 +- 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 +- Related: #1051069 - Move mysql_config to -devel sub-package and remove Require: mariadb - Related: #1050920 +- Related: #1050920 * Fri Jan 10 2014 Marcin Juszkiewicz 1:5.5.34-6 - Disable main.gis-precise test also for AArch64 @@ -1832,14 +2398,14 @@ fi * 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 +- Related: #1044565 - Use upstream's layout for symbols version in client library - Related: #1045013 +- Related: #1045013 - Check if socket file is not being used by another process at a time of starting the service - Related: #1045435 +- Related: #1045435 - Use %%ghost directive for the log file - Related: 1043501 +- Related: 1043501 * Wed Nov 27 2013 Honza Horak 1:5.5.34-2 - Fix mariadb-wait-ready script @@ -1849,13 +2415,13 @@ fi * Mon Nov 4 2013 Honza Horak 1:5.5.33a-4 - Fix spec file to be ready for backport by Oden Eriksson - Resolves: #1026404 +- 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 +- Related: #1019945 - Check if correct process is running in mysql-wait-ready script - Related: #1026313 +- Related: #1026313 * Mon Oct 14 2013 Honza Horak 1:5.5.33a-2 - Turn on test suite @@ -1869,10 +2435,10 @@ fi * Mon Sep 2 2013 Honza Horak - 1:5.5.32-12 - Re-organize my.cnf to include only generic settings - Resolves: #1003115 +- 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 +- Related: #999589 * Thu Aug 29 2013 Honza Horak - 1:5.5.32-11 - Move log file into /var/log/mariadb/mariadb.log @@ -1884,7 +2450,7 @@ fi * Tue Aug 13 2013 Honza Horak - 1:5.5.32-9 - Multilib issues solved by alternatives - Resolves: #986959 +- Resolves: #986959 * Sat Aug 03 2013 Petr Pisar - 1:5.5.32-8 - Perl 5.18 rebuild @@ -1926,14 +2492,14 @@ fi * 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 +- 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 +- Resolves: #975348 * Fri Jun 14 2013 Honza Horak 1:5.5.31-3 - Explicitly enable mysqld if it was enabled in the beginning @@ -1948,7 +2514,7 @@ fi - 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 +- Resolves: #962087 - Fix test suite requirements * Sun May 5 2013 Honza Horak 1:5.5.30-2 @@ -1977,7 +2543,7 @@ fi * Thu Feb 28 2013 Honza Horak 5.5.29-7 - Use configured prefix value instead of guessing basedir in mysql_config -Resolves: #916189 +- Resolves: #916189 - Export dynamic columns and non-blocking API functions documented by upstream @@ -2006,7 +2572,7 @@ Resolves: #916189 - 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 +- Resolves: #890535 * Thu Jan 31 2013 Honza Horak 5.5.28a-8 - Enable obsoleting mysql diff --git a/database/mariadb/centos/mariadb.spec.unmodified b/database/mariadb/centos/mariadb.spec.unmodified index 0ed5cc9bb..7448cdc0e 100644 --- a/database/mariadb/centos/mariadb.spec.unmodified +++ b/database/mariadb/centos/mariadb.spec.unmodified @@ -3,207 +3,237 @@ %global pkgnamepatch mariadb # Regression tests may take a long time (many cores recommended), skip them by -# passing --nocheck to rpmbuild or by setting runselftest to 0 if defining -# --nocheck is not possible (e.g. in koji build) -%{!?runselftest:%global runselftest 0} +%{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 0 +%{!?ignore_testsuite_result:%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}} -# Use Full RELRO for all binaries (RHBZ#1092548) -%global _hardened_build 1 - # 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 -# TokuDB engine is now part of MariaDB, but it is available only for x86_64; -# variable tokudb allows to build with TokuDB storage engine -# Temporarily disabled in F21+ for https://mariadb.atlassian.net/browse/MDEV-6446 -%ifarch x86_64 + + +# 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 %else %bcond_with tokudb -%endif - -# Mroonga engine is now part of MariaDB, but it only builds for x86_64; -# variable mroonga allows to build with Mroonga storage engine -%ifarch x86_64 i686 -%bcond_without mroonga -%else %bcond_with mroonga +%bcond_with rocksdb +%bcond_with cassandra %endif # The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing -# hierarchies and more complex graph structures to be handled in a relational -# fashion; enabled by default -# Temporarily disabling oqgraph: https://mariadb.atlassian.net/browse/MDEV-9479 -%bcond_with oqgraph +# hierarchies and more complex graph structures to be handled in a relational fashion +%bcond_without oqgraph -# For some use cases we do not need some parts of the package +# Other plugins +%if 0%{?fedora} +%bcond_without cracklib +%bcond_without connect +%bcond_without sphinx +%else +%bcond_with cracklib +%bcond_with connect +%bcond_with sphinx +%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 bench %bcond_without test -%bcond_without connect %bcond_without galera +%bcond_without backup +%if 0%{?fedora} +%bcond_without bench +%else +%bcond_with bench +%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 +%bcond_with debug + +# 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 + -# Include files for SysV init or systemd -%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 -%bcond_without init_systemd -%bcond_with init_sysv -%global daemon_name %{name} -%global daemondir %{_unitdir} -%global daemon_no_prefix %{pkg_name} -%global mysqld_pid_dir mysqld -%else -%bcond_with init_systemd -%bcond_without init_sysv -%global daemon_name mysqld -%global daemondir %{_sysconfdir}/rc.d/init.d -%global daemon_no_prefix mysqld -%endif # MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use # the bundled library, since the package cannot be build with older version -%global pcre_version 8.39 -%if 0%{?fedora} >= 21 -%bcond_without pcre +%if 0%{?fedora} || 0%{?rhel} > 7 +%bcond_without unbundled_pcre %else -%bcond_with pcre +%bcond_with unbundled_pcre +%global pcre_bundled_version 8.43 %endif +# Include systemd files +%global daemon_name %{name} +%global daemondir %{_unitdir} +%global daemon_no_prefix %{pkg_name} +%global mysqld_pid_dir mariadb + # 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 - # Directory for storing pid file -%global pidfiledir %{_localstatedir}/run/%{daemon_name} - +%global pidfiledir %{_rundir}/%{mysqld_pid_dir} # 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 -# The evr of mysql we want to obsolete -%global obsoleted_mysql_evr 5.6-0 -%global obsoleted_mysql_case_evr 5.5.30-5 -# The evr of mariadb-galera we want to obsolete -%global obsoleted_mariadb_galera_evr 1:10.0.17-6 -%global obsoleted_mariadb_galera_common_evr 5.5.36-10 -%global obsoleted_mariadb_galera_server_evr 1:10.0.17-6 # Provide mysql names for compatibility +%if 0%{?fedora} %bcond_without mysql_names +%else +%bcond_with mysql_names +%endif +# Explicit conflicts with mysql +%if 0%{?scl:1} +%bcond_with conflicts +%else %bcond_without conflicts +%endif + + # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.1 -%global bugfixver 20 Name: mariadb -Version: %{compatver}.%{bugfixver} +Version: 10.3.17 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 -Summary: A community developed branch of MySQL -Group: Applications/Databases +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 +# 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 -Source0: http://mirrors.syringanetworks.net/mariadb/mariadb-%{version}/source/mariadb-%{version}.tar.gz +Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz Source2: mysql_config_multilib.sh Source3: my.cnf.in -Source5: README.mysql-cnf Source6: README.mysql-docs Source7: README.mysql-license -Source9: mysql-embedded-check.c +Source8: README.wsrep_sst_rsync_tunnel Source10: mysql.tmpfiles.d.in Source11: mysql.service.in Source12: mysql-prepare-db-dir.sh -Source13: mysql-wait-ready.sh Source14: mysql-check-socket.sh Source15: mysql-scripts-common.sh Source16: mysql-check-upgrade.sh -Source17: mysql-wait-stop.sh Source18: mysql@.service.in -Source19: mysql.init.in Source50: rh-skipped-tests-base.list Source51: rh-skipped-tests-arm.list -Source52: rh-skipped-tests-ppc-s390.list -# TODO: clustercheck contains some hard-coded paths, these should be expanded using template system +Source52: rh-skipped-tests-s390.list +Source53: rh-skipped-tests-ppc.list +Source9999: rh-skipped-tests-arm32.list +# Proposed 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 +# 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 -# Comments for these patches are in the patch files -# Patches common for more mysql-like packages -Patch1: %{pkgnamepatch}-strmov.patch -Patch2: %{pkgnamepatch}-install-test.patch +# 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 -Patch5: %{pkgnamepatch}-file-contents.patch +# Patch7: add to the CMake file all files where we want macros to be expanded Patch7: %{pkgnamepatch}-scripts.patch -Patch8: %{pkgnamepatch}-install-db-sharedir.patch +# Patch9: pre-configure to comply with guidelines Patch9: %{pkgnamepatch}-ownsetup.patch -Patch12: %{pkgnamepatch}-admincrash.patch -Patch13: %{pkgnamepatch}-ssl-cypher.patch -Patch14: %{pkgnamepatch}-example-config-files.patch +# Patch10: Add RHEL8 required security +Patch10: %{pkgnamepatch}-annocheck.patch +# Patch11: Fix issues found by static analysis +Patch11: %{pkgnamepatch}-covscan.patch +# Patch12: Downstream fix for a correct pkgconfig file location +Patch12: %{pkgnamepatch}-pcdir.patch -# Patches specific for this mysql package -Patch30: %{pkgnamepatch}-errno.patch -Patch31: %{pkgnamepatch}-string-overflow.patch -Patch32: %{pkgnamepatch}-basedir.patch -Patch34: %{pkgnamepatch}-covscan-stroverflow.patch -Patch37: %{pkgnamepatch}-notestdb.patch -# Due to LP https://bugs.launchpad.net/tripleo/+bug/1638864 -# Reverts 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 until we fix the -# galera resource agent to cope with this change -# When RHBZ#1391470 gets fixed and released in centos we can remove this patch -Patch38: %{pkgnamepatch}-10.1.20-revert-stdouterr-closing.patch +Patch999: mariadb-spider_on_armv7hl.patch -# Patches for galera -Patch40: %{pkgnamepatch}-galera.cnf.patch -Patch41: %{pkgnamepatch}-galera-new-cluster-help.patch - -BuildRequires: cmake -BuildRequires: libaio-devel -BuildRequires: libedit-devel -BuildRequires: ncurses-devel -BuildRequires: perl -%if 0%{?fedora} >= 22 || 0%{?rhel} > 7 -BuildRequires: perl-generators -%endif -BuildRequires: systemtap-sdt-devel -BuildRequires: zlib-devel +BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config +BuildRequires: selinux-policy-devel +BuildRequires: systemd systemd-devel + +# Page compression algorithms for InnoDB & XtraDB +BuildRequires: zlib-devel +%{?with_lz4:BuildRequires: lz4-devel} + +# asynchornous operations stuff; needed also for wsrep API +BuildRequires: libaio-devel +# commands history features +BuildRequires: libedit-devel +# CLI graphic; needed also for wsrep API +BuildRequires: ncurses-devel +# debugging stuff +BuildRequires: systemtap-sdt-devel +# Bison SQL parser; needed also for wsrep API +BuildRequires: bison bison-devel + # 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_pcre:BuildRequires: pcre-devel >= 8.35} -%{!?with_pcre:Provides: bundled(pcre) = %{pcre_version}} +%{?with_unbundled_pcre:BuildRequires: pcre-devel >= 8.35 pkgconf} +%{!?with_unbundled_pcre:Provides: bundled(pcre) = %{pcre_bundled_version}} +# 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 @@ -220,32 +250,20 @@ BuildRequires: perl(Sys::Hostname) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) BuildRequires: perl(Symbol) - -# Temporary workaound to build with OpenSSL 1.0 on Fedora >=26 (wich requires OpenSSL 1.1) -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -Requires: compat-openssl10 -%else # for running some openssl tests rhbz#1189180 -BuildRequires: openssl -BuildRequires: openssl-devel -%endif +BuildRequires: openssl openssl-devel -BuildRequires: krb5-devel +Requires: bash coreutils grep -BuildRequires: selinux-policy-devel -%{?with_init_systemd:BuildRequires: systemd systemd-devel} - -BuildRequires: krb5-devel - -Requires: bash -Requires: fileutils -Requires: grep Requires: %{name}-common%{?_isa} = %{sameevr} -# Explicit EVR requirement for -libs is needed for -# https://bugzilla.redhat.com/show_bug.cgi?id=1406320 +%if %{with clibrary} +# Explicit EVR requirement for -libs is needed for RHBZ#1406320 Requires: %{name}-libs%{?_isa} = %{sameevr} +%else +# If not built with client library in this package, use connector-c +Requires: mariadb-connector-c >= 3.0 +%endif %if %{with mysql_names} Provides: mysql = %{sameevr} @@ -254,62 +272,58 @@ Provides: mysql-compat-client = %{sameevr} Provides: mysql-compat-client%{?_isa} = %{sameevr} %endif - +Suggests: %{name}-server%{?_isa} = %{sameevr} # MySQL (with caps) is upstream's spelling of their own RPMs for mysql -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql} +%{?with_conflicts:Conflicts: mysql} # obsoletion of mariadb-galera Provides: mariadb-galera = %{sameevr} -Obsoletes: mariadb-galera < %{obsoleted_mariadb_galera_evr} # Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering -%if 0%{?fedora} > 14 || 0%{?rhel} > 6 %global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) -%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$ -%else -%filter_from_requires /perl(\(hostnames\|lib::mtr\|lib::v1\|mtr_\|My::\)/d -%filter_provides_in -P (%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\.so) -%filter_setup -%endif +%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/%{pkg_name}/plugin/.*\\.so)$ # Define license macro if not present %{!?_licensedir:%global license %doc} %description -MariaDB is a community developed branch of MySQL. -MariaDB is 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. The base package -contains the standard MariaDB/MySQL client programs and generic MySQL files. +MariaDB is a community developed branch of 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. +The base package contains the standard MariaDB/MySQL client programs and +generic MySQL files. %if %{with clibrary} %package libs Summary: The shared libraries required for MariaDB/MySQL clients -Group: Applications/Databases Requires: %{name}-common%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-libs = %{sameevr} Provides: mysql-libs%{?_isa} = %{sameevr} -%endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-libs < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-libs < %{obsoleted_mysql_evr}} +%endif # mysql_names %description 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. MariaDB is a community developed branch of MySQL. -%endif +to a MariaDB/MySQL server. +%endif #clibrary +# 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), +# 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) +# is supposed to be defined as Requires: /etc/my.cnf rather than requiring +# a specific package, so installer app can choose whatever package fits to +# the transaction. %if %{with config} %package config Summary: The config files required by server and client -Group: Applications/Databases %description config The package provides the config file my.cnf and my.cnf.d directory used by any @@ -322,12 +336,14 @@ package itself. %if %{with common} %package common Summary: The shared files required by server and client -Group: Applications/Databases Requires: %{_sysconfdir}/my.cnf # obsoletion of mariadb-galera-common Provides: mariadb-galera-common = %{sameevr} -Obsoletes: mariadb-galera-common < %{obsoleted_mariadb_galera_common_evr} + +%if %{without clibrary} +Obsoletes: %{name}-libs <= %{sameevr} +%endif %description common The package provides the essential shared files for any MariaDB program. @@ -338,7 +354,6 @@ You will need to install this package to use any other MariaDB package. %if %{with errmsg} %package errmsg Summary: The error messages files required by server and embedded -Group: Applications/Databases Requires: %{name}-common%{?_isa} = %{sameevr} %description errmsg @@ -351,16 +366,22 @@ MariaDB packages. %if %{with galera} %package server-galera Summary: The configuration files and scripts for galera replication -Group: Applications/Databases 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 +# wsrep requirements +Requires: lsof +# Default wsrep_sst_method +Requires: rsync # obsoletion of mariadb-galera-server Provides: mariadb-galera-server = %{sameevr} -Obsoletes: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr} %description server-galera MariaDB is a multi-user, multi-threaded SQL database server. It is a @@ -373,47 +394,48 @@ MariaDB is a community developed branch of MySQL. %package server Summary: The MariaDB server and related files -Group: Applications/Databases # 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} %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}} + +Suggests: mytop +Suggests: logrotate + Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d -Requires: %{name}-errmsg%{?_isa} = %{sameevr} -Requires: sh-utils + +# for fuser in mysql-check-socket +Requires: psmisc + +Requires: coreutils Requires(pre): /usr/sbin/useradd -%if %{with init_systemd} # We require this to be present for %%{_tmpfilesdir} Requires: systemd # Make sure it's there when scriptlets run, too -Requires(pre): systemd -Requires(posttrans): systemd -%{?systemd_requires: %systemd_requires} -%endif -# mysqlhotcopy needs DBI/DBD support -Requires: perl(DBI) -Requires: perl(DBD::mysql) -# wsrep requirements -Requires: lsof -Requires: net-tools -Requires: sh-utils -Requires: rsync +%{?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 -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}} -%{?with_conflicts:Conflicts: community-mysql-server} -%{?with_conflicts:Conflicts: mariadb-galera-server <= %{obsoleted_mariadb_galera_server_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-server < %{obsoleted_mysql_evr}} +%{?with_conflicts:Conflicts: mysql-server} %description server MariaDB is a multi-user, multi-threaded SQL database server. It is a @@ -426,11 +448,9 @@ MariaDB is a community developed branch of MySQL. %if %{with oqgraph} %package oqgraph-engine Summary: The Open Query GRAPH engine for MariaDB -Group: Applications/Databases Requires: %{name}-server%{?_isa} = %{sameevr} # boost and Judy required for oograph -BuildRequires: boost-devel -BuildRequires: Judy-devel +BuildRequires: boost-devel Judy-devel %description oqgraph-engine The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB @@ -444,7 +464,6 @@ standard SQL syntax, and results joined onto other tables. %if %{with connect} %package connect-engine Summary: The CONNECT storage engine for MariaDB -Group: Applications/Databases Requires: %{name}-server%{?_isa} = %{sameevr} %description connect-engine @@ -456,41 +475,144 @@ or products (such as Excel), or data retrieved from the environment %endif +%if %{with backup} +%package backup +Summary: The mariabackup tool for physical online backups +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: libarchive-devel + +%description 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. +%endif + + +%if %{with rocksdb} +%package rocksdb-engine +Summary: The RocksDB storage engine for MariaDB +Requires: %{name}-server%{?_isa} = %{sameevr} +Provides: bundled(rocksdb) + +%description 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 +Summary: The password strength checking plugin +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: cracklib-dicts cracklib-devel +Requires: cracklib-dicts + +%description 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. +Now, with the cracklib_password_check password validation plugin, one can +also use it to check MariaDB account passwords. +%endif + + +%if %{with gssapi} +%package gssapi-server +Summary: GSSAPI authentication plugin for server +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: krb5-devel + +%description gssapi-server +GSSAPI authentication server-side plugin for MariaDB for passwordless login. +This plugin includes support for Kerberos on Unix. +%endif + + +%if %{with sphinx} +%package sphinx-engine +Summary: The Sphinx storage engine for MariaDB +Requires: %{name}-server%{?_isa} = %{sameevr} +BuildRequires: sphinx libsphinxclient libsphinxclient-devel +Requires: sphinx libsphinxclient + +%description 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! +%endif + + +%package server-utils +Summary: Non-essential server utilities for MariaDB/MySQL applications +Requires: %{name}-server%{?_isa} = %{sameevr} +%if %{with mysql_names} +Provides: mysql-perl = %{sameevr} +%endif +# mysqlhotcopy needs DBI/DBD support +Requires: perl(DBI) perl(DBD::mysql) + +%description 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. + + %if %{with devel} %package devel Summary: Files for development of MariaDB/MySQL applications -Group: Applications/Databases %{?with_clibrary:Requires: %{name}-libs%{?_isa} = %{sameevr}} -# avoid issues with openssl1.0 / openssl1.1 / compat -Requires: pkgconfig(openssl) +Requires: openssl-devel +%if %{without clibrary} +Requires: mariadb-connector-c-devel >= 3.0 +%endif %if %{with mysql_names} Provides: mysql-devel = %{sameevr} Provides: mysql-devel%{?_isa} = %{sameevr} %endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}} -%{?with_conflicts:Conflicts: community-mysql-devel} +%{?with_conflicts:Conflicts: mysql-devel} %description devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the libraries and header files that are needed for -developing MariaDB/MySQL client applications. +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. +%else +This package contains everything needed for developing MariaDB/MySQL server +applications. For developing client applications, use mariadb-connector-c +package. +%endif %endif %if %{with embedded} %package embedded Summary: MariaDB as an embeddable library -Group: Applications/Databases Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-errmsg%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-embedded = %{sameevr} Provides: mysql-embedded%{?_isa} = %{sameevr} %endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded < %{obsoleted_mysql_evr}} %description embedded MariaDB is a multi-user, multi-threaded SQL database server. This @@ -501,7 +623,6 @@ MariaDB is a community developed branch of MySQL. %package embedded-devel Summary: Development files for MariaDB as an embeddable library -Group: Applications/Databases Requires: %{name}-embedded%{?_isa} = %{sameevr} Requires: %{name}-devel%{?_isa} = %{sameevr} # embedded-devel should require libaio-devel (rhbz#1290517) @@ -510,43 +631,37 @@ Requires: libaio-devel Provides: mysql-embedded-devel = %{sameevr} Provides: mysql-embedded-devel%{?_isa} = %{sameevr} %endif -%{?with_conflicts:Conflicts: community-mysql-embedded-devel} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-embedded-devel < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-embedded-devel < %{obsoleted_mysql_evr}} +%{?with_conflicts:Conflicts: mysql-embedded-devel} %description embedded-devel -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains files needed for developing and testing with -the embedded version of the MariaDB server. +MariaDB is a multi-user, multi-threaded SQL database server. MariaDB is a community developed branch of 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 -Group: Applications/Databases Requires: %{name}%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-bench = %{sameevr} Provides: mysql-bench%{?_isa} = %{sameevr} %endif -%{?with_conflicts:Conflicts: community-mysql-bench} -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-bench < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-bench < %{obsoleted_mysql_evr}} +%{?with_conflicts:Conflicts: mysql-bench} %description bench -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains benchmark scripts and data for use when benchmarking -MariaDB. +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 Summary: The test suite distributed with MariaDB -Group: Applications/Databases Requires: %{name}%{?_isa} = %{sameevr} Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-server%{?_isa} = %{sameevr} @@ -561,88 +676,102 @@ Requires: perl(Socket) Requires: perl(Sys::Hostname) Requires: perl(Test::More) Requires: perl(Time::HiRes) -%{?with_conflicts:Conflicts: community-mysql-test} +%{?with_conflicts:Conflicts: mysql-test} %if %{with mysql_names} Provides: mysql-test = %{sameevr} Provides: mysql-test%{?_isa} = %{sameevr} %endif -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}} %description test -MariaDB is a multi-user, multi-threaded SQL database server. This -package contains the regression test suite distributed with -the MariaDB sources. +MariaDB is a multi-user, multi-threaded SQL database server. MariaDB is a community developed branch of MySQL. +This package contains the regression test suite distributed with the MariaDB +sources. %endif + %prep %setup -q -n mariadb-%{version} -%patch1 -p1 -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch34 -p1 -%patch37 -p1 -%patch38 -p1 -%patch40 -p1 -%patch41 -p1 +# Remove JAR files that upstream puts into tarball +find . -name "*.jar" -type f -exec rm --verbose -f {} \; -sed -i -e 's/2.8.7/2.6.4/g' cmake/cpack_rpm.cmake -# workaround to deploy mariadb@.service on EL7 -sed -i 's/IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)/IF(TRUE)/g' support-files/CMakeLists.txt +%patch4 -p1 +%patch7 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 + +%ifarch %{arm} +%patch999 -p1 +%endif # workaround for upstream bug #56342 -rm -f mysql-test/t/ssl_8k_key-master.opt +#rm mysql-test/t/ssl_8k_key-master.opt # generate a list of tests that fail, but are not disabled by upstream -cat %{SOURCE50} | tee mysql-test/rh-skipped-tests.list +cat %{SOURCE50} | tee -a mysql-test/unstable-tests # disable some tests failing on different architectures -%ifarch %{arm} aarch64 -cat %{SOURCE51} | tee -a mysql-test/rh-skipped-tests.list +%ifarch aarch64 +cat %{SOURCE51} | tee -a mysql-test/unstable-tests %endif -%ifarch ppc ppc64 ppc64p7 s390 s390x -cat %{SOURCE52} | tee -a mysql-test/rh-skipped-tests.list +%ifarch %{arm} +cat %{SOURCE9999} | tee -a mysql-test/unstable-tests %endif -cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \ - %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \ - %{SOURCE70} scripts +%ifarch s390 s390x +cat %{SOURCE52} | tee -a mysql-test/unstable-tests +%endif + +%ifarch ppc ppc64 ppc64p7 ppc64le +cat %{SOURCE53} | tee -a mysql-test/unstable-tests +%endif + +cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ + %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE18} %{SOURCE70} %{SOURCE73} scripts %if %{with galera} # prepare selinux policy mkdir selinux sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{name}-server-galera.te -cat selinux/%{name}-server-galera.te %endif -# Check if PCRE version is actual -%{!?with_pcre: + +# 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/'` -if [ %{pcre_version} != "$pcre_maj.$pcre_min" ] +%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 PCRE version is outdated. \n\tIncluded version:%{pcre_version} \n\tUpstream version: $pcre_maj.$pcre_min\n" + 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" 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" +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 @@ -654,29 +783,13 @@ fi fi %endif -CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# force PIC mode so that we can build libmysqld.so -CFLAGS="$CFLAGS -fPIC" -# GCC 4.9 causes segfaults: https://mariadb.atlassian.net/browse/MDEV-6360 -CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" -# gcc seems to have some bugs on sparc as of 4.4.1, back off optimization -# submitted as bz #529298 -%ifarch sparc sparcv9 sparc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` -%endif -# significant performance gains can be achieved by compiling with -O3 optimization -# rhbz#1051069 -%ifarch ppc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O3|g" ` -%endif -CXXFLAGS="$CFLAGS" -export CFLAGS CXXFLAGS +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"} -%if 0%{?_hardened_build} -# building with PIE -LDFLAGS="$LDFLAGS -pie -Wl,-z,relro,-z,now" -export LDFLAGS -%endif +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. @@ -697,41 +810,55 @@ export LDFLAGS -DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_INFODIR=share/info \ - -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_LIBDIR="%{_lib}" \ -DINSTALL_MANDIR=share/man \ -DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \ - -DINSTALL_MYSQLTESTDIR=share/mysql-test \ - -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DINSTALL_MYSQLTESTDIR=%{?with_test:share/mysql-test}%{!?with_test:} \ + -DINSTALL_PLUGINDIR="%{_lib}/%{pkg_name}/plugin" \ -DINSTALL_SBINDIR=libexec \ -DINSTALL_SCRIPTDIR=bin \ -DINSTALL_SQLBENCHDIR=share \ -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ + -DINSTALL_PCDIR=%{_lib}/pkgconfig \ -DMYSQL_DATADIR="%{dbdatadir}" \ -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ + -DTMPDIR=/var/tmp \ -DENABLED_LOCAL_INFILE=ON \ -DENABLE_DTRACE=ON \ - -DWITH_EMBEDDED_SERVER=ON \ + -DSECURITY_HARDENED=ON \ + -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} \ + -DWITH_MARIABACKUP=%{?with_backup:ON}%{!?with_backup:NO} \ + -DWITH_UNIT_TESTS=%{?with_test:ON}%{!?with_test:NO} \ + -DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -%{?with_pcre: -DWITH_PCRE=system}\ - -DWITH_JEMALLOC=no \ -%{!?with_tokudb: -DWITHOUT_TOKUDB=ON}\ -%{!?with_mroonga: -DWITHOUT_MROONGA=ON}\ -%{!?with_oqgraph: -DWITHOUT_OQGRAPH=ON}\ - -DTMPDIR=/var/tmp \ -%{?with_debug: -DCMAKE_BUILD_TYPE=Debug}\ - %{?_hardened_build:-DWITH_MYSQLD_LDFLAGS="-pie -Wl,-z,relro,-z,now"} + -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_ROCKSDB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ + -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} \ + -DWITH_CASSANDRA=%{?with_cassandra:TRUE}%{!?with_cassandra:FALSE} \ + -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ + -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ + -DCONNECT_WITH_MONGO=OFF \ + -DCONNECT_WITH_JDBC=OFF \ +%{?with_debug: -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON -DWITH_VALGRIND=ON} -make %{?_smp_mflags} VERBOSE=1 +# Print all Cmake options values +# cmake -LAH for List Advanced Help +cmake -LA + +%make_build VERBOSE=1 -# debuginfo extraction scripts fail to find source files in their real -# location -- satisfy them by copying these files into location, which -# is expected by scripts -for e in innobase xtradb ; do - for f in pars0grm.y pars0lex.l ; do - cp -p "storage/$e/pars/$f" "storage/$e/$f" - done -done # build selinux policy %if %{with galera} @@ -740,39 +867,37 @@ make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp %endif %install -make DESTDIR=%{buildroot} install +%make_install -# cmake generates some completely wacko references to -lprobes_mysql when -# building with dtrace support. Haven't found where to shut that off, -# so resort to this blunt instrument. While at it, let's not reference -# libmysqlclient_r anymore either. -sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \ - %{buildroot}%{_bindir}/mysql_config >mysql_config.tmp -cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config -chmod 755 %{buildroot}%{_bindir}/mysql_config - -# multilib header support -for header in mysql/my_config.h mysql/private/config.h; do +# multilib header support #1625157 +for header in mysql/server/my_config.h mysql/server/private/config.h; do %multilib_fix_c_header --file %{_includedir}/$header done +ln -s mysql_config.1.gz %{buildroot}%{_mandir}/man1/mariadb_config.1.gz + # multilib support for shell scripts # we only apply this to known Red Hat multilib arches, per bug #181335 -if %multilib_capable; then +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 +# 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 -# Upstream install this into arch-independent directory, TODO: report -mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig +%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}/mysql/ -install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/ +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} @@ -786,184 +911,232 @@ install -p -m 0755 -d %{buildroot}%{dbdatadir} %if %{with config} install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf %else -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf +rm scripts/my.cnf %endif -# use different config file name for each variant of server +# 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 +# Rename sysusers and tmpfiles config files, they should be named after the software they belong to +mv %{buildroot}%{_sysusersdir}/sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf + +# remove SysV init script and a symlink to that, we pack our very own +rm %{buildroot}%{_sysconfdir}/init.d/mysql +rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup -%if %{with init_systemd} 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}/tmpfiles.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 %{_localstatedir}/run/%{mysqld_pid_dir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf -%endif -%endif - -# install SysV init script -%if %{with init_sysv} -install -D -p -m 755 scripts/mysql.init %{buildroot}%{daemondir}/%{daemon_name} -%endif +echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf +%endif #pid # 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-wait-ready %{buildroot}%{_libexecdir}/mysql-wait-ready -install -p -m 755 scripts/mysql-wait-stop %{buildroot}%{_libexecdir}/mysql-wait-stop 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 selinux policy +# 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 %endif -# Remove libmysqld.a -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a - -# libmysqlclient_r is no more. Upstream tries to replace it with symlinks -# but that really doesn't work (wrong soname in particular). We'll keep -# just the devel libmysqlclient_r.so link, so that rebuilding without any -# source change is enough to get rid of dependency on libmysqlclient_r. -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so* -ln -s libmysqlclient.so %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so - -# mysql-test includes one executable that doesn't belong under /usr/share, -# so move it and provide a symlink +%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 +# Provide symlink expected by RH QA tests +ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/rh-skipped-tests.list +%endif -# should move this to /etc/ ? -rm -f %{buildroot}%{_bindir}/mysql_embedded -rm -f %{buildroot}%{_libdir}/mysql/*.a -rm -f %{buildroot}%{_datadir}/%{pkg_name}/binary-configure -rm -f %{buildroot}%{_datadir}/%{pkg_name}/magic -rm -f %{buildroot}%{_datadir}/%{pkg_name}/ndb-config-2-node.ini -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysql.server -rm -f %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server -rm -f %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* -rm -f %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* -rm -f %{buildroot}%{_bindir}/mytop + +# 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 +# FS files first-bytes recoginiton +# Not updated by upstream since nobody realy use that +rm %{buildroot}%{_datadir}/%{pkg_name}/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 + +# Binary for monitoring MySQL performance +# Shipped as a standalona package in Fedora +rm %{buildroot}%{_bindir}/mytop # 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} -mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf - # copy additional docs into build tree so %%doc will find them -install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}} 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 - # install the clustercheck script mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck -# install the list of skipped tests to be available for user runs -install -p -m 0644 mysql-test/rh-skipped-tests.list %{buildroot}%{_datadir}/mysql-test - -# remove unneeded RHEL-4 SELinux stuff -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/SELinux/ - -# remove SysV init script and a symlink to that -rm -f %{buildroot}%{_sysconfdir}/init.d/mysql -rm -f %{buildroot}%{_libexecdir}/rcmysql - # remove duplicate logrotate script -rm -f %{buildroot}%{_sysconfdir}/logrotate.d/mysql +rm %{buildroot}%{logrotateddir}/mysql +# Remove AppArmor files +rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor -# remove solaris files -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/solaris/ +# script without shebang: https://jira.mariadb.org/browse/MDEV-14266 +chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf -# rename the wsrep README so it corresponds with the other README names -mv Docs/README-wsrep Docs/README.wsrep +# Add wsrep_sst_rsync_tunnel script +install -p -m 0755 scripts/wsrep_sst_rsync_tunnel %{buildroot}%{_bindir}/wsrep_sst_rsync_tunnel -# remove *.jar file from mysql-test -rm -rf %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar - -%if %{without clibrary} -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient.so -unlink %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so -rm -rf %{buildroot}%{_libdir}/mysql/libmysqlclient*.so.* -rm -rf %{buildroot}%{_sysconfdir}/ld.so.conf.d -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf +# 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 +%endif +%if %{with cracklib} +sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf %endif %if %{without embedded} -rm -f %{buildroot}%{_libdir}/mysql/libmysqld.so* -rm -f %{buildroot}%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} -rm -f %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +%endif + + +%if %{without clibrary} +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 +# Client plugins +rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/{dialog.so,mysql_clear_password.so,sha256_password.so,auth_gssapi_client.so} +%endif + +%if %{without clibrary} || %{without devel} +rm %{buildroot}%{_bindir}/mysql_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} +# This files are already included in mariadb-connector-c +rm %{buildroot}%{_includedir}/mysql/mysql_version.h +rm %{buildroot}%{_includedir}/mysql/{errmsg.h,ma_list.h,ma_pvio.h,mariadb_com.h,\ +mariadb_ctype.h,mariadb_dyncol.h,mariadb_stmt.h,mariadb_version.h,ma_tls.h,mysqld_error.h,mysql.h} +rm -r %{buildroot}%{_includedir}/mysql/{mariadb,mysql} %endif %if %{without devel} -rm -f %{buildroot}%{_bindir}/mysql_config* -rm -rf %{buildroot}%{_includedir}/mysql -rm -f %{buildroot}%{_datadir}/aclocal/mysql.m4 -rm -f %{buildroot}%{_libdir}/pkgconfig/mariadb.pc -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient*.so -rm -f %{buildroot}%{_mandir}/man1/mysql_config.1* -%endif +rm -r %{buildroot}%{_includedir}/mysql +rm %{buildroot}%{_datadir}/aclocal/mysql.m4 +rm %{buildroot}%{_libdir}/pkgconfig/mariadb.pc +%if %{with clibrary} +rm %{buildroot}%{_libdir}/libmariadb*.so +unlink %{buildroot}%{_libdir}/libmysqlclient.so +unlink %{buildroot}%{_libdir}/libmysqlclient_r.so +%endif # clibrary +%endif # devel %if %{without client} -rm -f %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ +rm %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap,my_print_defaults} -rm -f %{buildroot}%{_mandir}/man1/{msql2mysql,mysql,mysql_find_rows,\ +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,my_print_defaults}.1* +mysqldump,mysqlimport,mysqlshow,mysqlslap}.1* +rm %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf %endif -%if %{without connect} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/connect.cnf +%if %{without tokudb} +# because upstream ships manpages for tokudb even on architectures that tokudb doesn't support +rm %{buildroot}%{_mandir}/man1/tokuftdump.1* +rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* +%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 - -%if %{without oqgraph} -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/oqgraph.cnf %endif %if %{without config} -rm -f %{buildroot}%{_sysconfdir}/my.cnf -rm -f %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf +rm %{buildroot}%{_sysconfdir}/my.cnf %endif %if %{without common} -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/charsets +rm -r %{buildroot}%{_datadir}/%{pkg_name}/charsets +%endif + +%if %{without gssapi} +rm -r %{buildroot}/etc/my.cnf.d/auth_gssapi.cnf %endif %if %{without errmsg} -rm -f %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt -rm -rf %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ +rm %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt +rm -r %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ french,german,greek,hungarian,italian,japanese,korean,norwegian,norwegian-ny,\ -polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian} +polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian,hindi} %endif %if %{without bench} -rm -rf %{buildroot}%{_datadir}/sql-bench +rm -r %{buildroot}%{_datadir}/sql-bench %endif %if %{without test} -rm -f %{buildroot}%{_bindir}/{mysql_client_test,my_safe_process} -rm -rf %{buildroot}%{_datadir}/mysql-test -rm -f %{buildroot}%{_mandir}/man1/mysql_client_test.1* +%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,mysqltest} +rm %{buildroot}%{_mandir}/man1/{mysql_client_test,my_safe_process,mysqltest}.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 +%endif + +%if %{without rocksdb} +rm %{buildroot}%{_mandir}/man1/mysql_ldb.1* %endif %check %if %{with test} %if %runselftest -make test VERBOSE=1 + +# 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 @@ -978,23 +1151,43 @@ export MTR_BUILD_THREAD=%{__isa_bits} # skip tests that are listed in rh-skipped-tests.list # avoid redundant test runs with --binlog-format=mixed # increase timeouts to prevent unwanted failures during mass rebuilds + +# Usefull arguments: +# --do-test=mysql_client_test_nonblock \ +# --skip-rpl +# --suite=roles +# --mem for running in the RAM; Not enough space in KOJI for this + ( - set -e + set -ex + cd mysql-test - perl ./mysql-test-run.pl --force --retry=0 --ssl \ - --suite-timeout=720 --testcase-timeout=30 --skip-rpl \ + perl ./mysql-test-run.pl --parallel=auto --force --retry=1 --ssl \ + --suite-timeout=900 --testcase-timeout=30 \ --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=0 \ + --shutdown-timeout=60 --max-test-fail=10 --big-test \ + --skip-test=spider \ %if %{ignore_testsuite_result} - || : + --max-test-fail=9999 || : %else - --skip-test-list=rh-skipped-tests.list + --skip-test-list=unstable-tests +%endif + +# 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 \ +%if %{ignore_testsuite_result} + --max-test-fail=999 || : %endif - # cmake build scripts will install the var cruft if left alone :-( - rm -rf var ) -%endif -%endif + +%endif # if dry run +%endif # with test + + %pre server /usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : @@ -1002,47 +1195,30 @@ export MTR_BUILD_THREAD=%{__isa_bits} -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : %if %{with clibrary} -%post libs -p /sbin/ldconfig +# Can be dropped on F27 EOL +%ldconfig_scriptlets libs %endif %if %{with embedded} -%post embedded -p /sbin/ldconfig +# 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 %post server -%if %{with init_systemd} %systemd_post %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 1 ]; then - /sbin/chkconfig --add %{daemon_name} -fi -%endif %preun server -%if %{with init_systemd} %systemd_preun %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 = 0 ]; then - /sbin/service %{daemon_name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{daemon_name} -fi -%endif - -%if %{with clibrary} -%postun libs -p /sbin/ldconfig -%endif - -%if %{with embedded} -%postun embedded -p /sbin/ldconfig -%endif %if %{with galera} %postun server-galera @@ -1052,14 +1228,9 @@ fi %endif %postun server -%if %{with init_systemd} %systemd_postun_with_restart %{daemon_name}.service -%endif -%if %{with init_sysv} -if [ $1 -ge 1 ]; then - /sbin/service %{daemon_name} condrestart >/dev/null 2>&1 || : -fi -%endif + + %if %{with client} %files @@ -1076,7 +1247,6 @@ fi %{_bindir}/mysqlimport %{_bindir}/mysqlshow %{_bindir}/mysqlslap -%{_bindir}/my_print_defaults %{_mandir}/man1/msql2mysql.1* %{_mandir}/man1/mysql.1* @@ -1091,38 +1261,33 @@ fi %{_mandir}/man1/mysqlimport.1* %{_mandir}/man1/mysqlshow.1* %{_mandir}/man1/mysqlslap.1* -%{_mandir}/man1/my_print_defaults.1* +%config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf %endif %if %{with clibrary} %files libs -%{_libdir}/mysql/libmysqlclient.so.* -%{_sysconfdir}/ld.so.conf.d/* +%{_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 +# 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 -%config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf -%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset %endif %if %{with common} %files common -%license COPYING COPYING.LESSER -%license storage/innobase/COPYING.Percona storage/innobase/COPYING.Google -%doc README README.mysql-license README.mysql-docs -%dir %{_libdir}/mysql -%dir %{_libdir}/mysql/plugin +%doc %{_datadir}/doc/%{_pkgdocdirname} %dir %{_datadir}/%{pkg_name} -%{_libdir}/mysql/plugin/dialog.so -%{_libdir}/mysql/plugin/mysql_clear_password.so %{_datadir}/%{pkg_name}/charsets -%endif +%if %{with clibrary} +%{_libdir}/%{pkg_name}/plugin/dialog.so +%{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so +%endif # clibrary +%endif # common %if %{with errmsg} %files errmsg @@ -1135,6 +1300,7 @@ fi %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 @@ -1154,21 +1320,19 @@ fi %if %{with galera} %files server-galera -%doc Docs/README.wsrep +%doc Docs/README-wsrep %license LICENSE.clustercheck %{_bindir}/clustercheck -%if %{with init_systemd} %{_bindir}/galera_new_cluster %{_bindir}/galera_recovery %{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf -%endif %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.mysql-cnf +%doc README.wsrep_sst_rsync_tunnel %{_bindir}/aria_chk %{_bindir}/aria_dump_log @@ -1180,81 +1344,70 @@ fi %{_bindir}/myisam_ftdump %{_bindir}/myisamlog %{_bindir}/myisampack -%{_bindir}/mysql_convert_table_format -%{_bindir}/mysql_fix_extensions +%{_bindir}/my_print_defaults %{_bindir}/mysql_install_db %{_bindir}/mysql_secure_installation -%{_bindir}/mysql_setpermission %{_bindir}/mysql_tzinfo_to_sql -%{_bindir}/mysql_upgrade -%{_bindir}/mysql_zap -%{_bindir}/mysqlbug -%{_bindir}/mysqldumpslow -%{_bindir}/mysqld_multi %{_bindir}/mysqld_safe -%{_bindir}/mysqlhotcopy -%{_bindir}/mysqltest %{_bindir}/innochecksum -%{_bindir}/perror %{_bindir}/replace %{_bindir}/resolve_stack_dump %{_bindir}/resolveip -%{_bindir}/wsrep_sst_common -%{_bindir}/wsrep_sst_mysqldump -%{_bindir}/wsrep_sst_rsync -%{_bindir}/wsrep_sst_xtrabackup -%{_bindir}/wsrep_sst_xtrabackup-v2 -%{?with_tokudb:%{_bindir}/tokuftdump} -%{?with_tokudb:%{_bindir}/tokuft_logprint} +# 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/auth_gssapi.cnf -%{?with_tokudb:%config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf} +%config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset %{_libexecdir}/mysqld -%{_libdir}/mysql/INFO_SRC -%{_libdir}/mysql/INFO_BIN +%{_libdir}/%{pkg_name}/INFO_SRC +%{_libdir}/%{pkg_name}/INFO_BIN %if %{without common} %dir %{_datadir}/%{pkg_name} %endif -%{_libdir}/mysql/plugin/* -%{?with_oqgraph:%exclude %{_libdir}/mysql/plugin/ha_oqgraph.so} -%{?with_connect:%exclude %{_libdir}/mysql/plugin/ha_connect.so} -%exclude %{_libdir}/mysql/plugin/dialog.so -%exclude %{_libdir}/mysql/plugin/mysql_clear_password.so +%dir %{_libdir}/%{pkg_name} +%dir %{_libdir}/%{pkg_name}/plugin +%{_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* +%{_mandir}/man1/galera_new_cluster.1* +%{_mandir}/man1/galera_recovery.1* +%{_mandir}/man1/mariadb-service-convert.1* %{_mandir}/man1/myisamchk.1* %{_mandir}/man1/myisamlog.1* %{_mandir}/man1/myisampack.1* -%{_mandir}/man1/mysql_convert_table_format.1* %{_mandir}/man1/myisam_ftdump.1* +%{_mandir}/man1/my_print_defaults.1* %{_mandir}/man1/mysql.server.1* -%{_mandir}/man1/mysql_fix_extensions.1* %{_mandir}/man1/mysql_install_db.1* %{_mandir}/man1/mysql_secure_installation.1* -%{_mandir}/man1/mysql_upgrade.1* -%{_mandir}/man1/mysql_zap.1* -%{_mandir}/man1/mysqlbug.1* -%{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqld_multi.1* -%{_mandir}/man1/mysqld_safe.1* -%{_mandir}/man1/mysqlhotcopy.1* -%{_mandir}/man1/mysql_setpermission.1* -%{_mandir}/man1/mysqltest.1* -%{_mandir}/man1/innochecksum.1* -%{_mandir}/man1/perror.1* -%{_mandir}/man1/replace.1* -%{_mandir}/man1/resolve_stack_dump.1* -%{_mandir}/man1/resolveip.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* +%{_mandir}/man1/wsrep_*.1* %{_datadir}/%{pkg_name}/fill_help_tables.sql %{_datadir}/%{pkg_name}/install_spider.sql @@ -1265,109 +1418,551 @@ fi %{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql %{_datadir}/%{pkg_name}/mysql_to_mariadb.sql %{_datadir}/%{pkg_name}/mysql_performance_tables.sql -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/install.sql} -%{?with_mroonga:%{_datadir}/%{pkg_name}/mroonga/uninstall.sql} -%{_datadir}/%{pkg_name}/my-*.cnf +%{_datadir}/%{pkg_name}/mysql_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}/groonga-normalizer-mysql/lgpl-2.0.txt +%license %{_datadir}/groonga/COPYING +%doc %{_datadir}/groonga-normalizer-mysql/README.md +%doc %{_datadir}/groonga/README.md +%endif %{_datadir}/%{pkg_name}/wsrep.cnf %{_datadir}/%{pkg_name}/wsrep_notify %dir %{_datadir}/%{pkg_name}/policy -%dir %{_datadir}/%{pkg_name}/policy/apparmor %dir %{_datadir}/%{pkg_name}/policy/selinux -%{_datadir}/%{pkg_name}/policy/apparmor/README -%{_datadir}/%{pkg_name}/policy/apparmor/usr.sbin.mysqld* %{_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} > 22 || 0%{?rhel} > 6 +%if 0%{?fedora} || 0%{?rhel} > 7 %{_datadir}/%{pkg_name}/systemd/mariadb@.service %endif -%{daemondir}/%{daemon_name}* +%{_unitdir}/%{daemon_name}* +%{?with_tokudb:%exclude %{_unitdir}/mariadb.service.d/tokudb.conf} + %{_libexecdir}/mysql-prepare-db-dir -%{_libexecdir}/mysql-wait-ready -%{_libexecdir}/mysql-wait-stop %{_libexecdir}/mysql-check-socket %{_libexecdir}/mysql-check-upgrade %{_libexecdir}/mysql-scripts-common -%{?with_init_systemd:%{_tmpfilesdir}/%{name}.conf} %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} %config(noreplace) %{logrotateddir}/%{daemon_name} +%{_tmpfilesdir}/%{name}.conf +%{_sysusersdir}/%{name}.conf + +%if %{with cracklib} +%files cracklib-password-check +%config(noreplace) %{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf +%{_libdir}/%{pkg_name}/plugin/cracklib_password_check.so +%endif + +%if %{with backup} +%files backup +%{_bindir}/mariabackup +%{_bindir}/mbstream +%{_mandir}/man1/mariabackup.1* +%{_mandir}/man1/mbstream.1* +%endif + +%if %{with rocksdb} +%files rocksdb-engine +%config(noreplace) %{_sysconfdir}/my.cnf.d/rocksdb.cnf +%{_bindir}/myrocks_hotbackup +%{_bindir}/mysql_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 +%endif + +%if %{with gssapi} +%files gssapi-server +%{_libdir}/%{pkg_name}/plugin/auth_gssapi.so +%config(noreplace) %{_sysconfdir}/my.cnf.d/auth_gssapi.cnf +%endif + +%if %{with sphinx} +%files sphinx-engine +%{_libdir}/%{pkg_name}/plugin/ha_sphinx.so +%endif + %if %{with oqgraph} %files oqgraph-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/oqgraph.cnf -%{_libdir}/mysql/plugin/ha_oqgraph.so +%{_libdir}/%{pkg_name}/plugin/ha_oqgraph.so %endif %if %{with connect} %files connect-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/connect.cnf -%{_libdir}/mysql/plugin/ha_connect.so +%{_libdir}/%{pkg_name}/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 +%endif + +%files 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* +# Other utilities +%{_bindir}/mysqld_safe_helper + %if %{with devel} %files devel -%{_bindir}/mysql_config* -%{_includedir}/mysql +%{_includedir}/* %{_datadir}/aclocal/mysql.m4 %{_libdir}/pkgconfig/mariadb.pc %if %{with clibrary} -%{_libdir}/mysql/libmysqlclient.so -%{_libdir}/mysql/libmysqlclient_r.so +%{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so} +%{_bindir}/mysql_config* +%{_bindir}/mariadb_config* +%{_libdir}/libmariadb.so +%{_libdir}/libmysqlclient.so +%{_libdir}/libmysqlclient_r.so +%{_mandir}/man1/mysql_config* +%{_mandir}/man1/mariadb_config* %endif -%{_mandir}/man1/mysql_config.1* %endif %if %{with embedded} %files embedded -%{_libdir}/mysql/libmysqld.so.* +%{_libdir}/libmariadbd.so.* %files embedded-devel -%{_libdir}/mysql/libmysqld.so -%{_bindir}/mysql_client_test_embedded -%{_bindir}/mysqltest_embedded -%{_mandir}/man1/mysql_client_test_embedded.1* -%{_mandir}/man1/mysqltest_embedded.1* +%{_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 +%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* +%endif %{_bindir}/mysql_client_test %{_bindir}/my_safe_process +%{_bindir}/mysqltest %attr(-,mysql,mysql) %{_datadir}/mysql-test %{_mandir}/man1/mysql_client_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 -* Tue Jan 10 2017 Michael Bayer - 3:10.1.20-1 -- Update to version 10.1.20 +* 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 +- Related: #1406320 + +* Tue Dec 20 2016 Honza Horak - 3:10.1.20-2 - Use correct macro when removing doc files - Resolves: #1400981 +- 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 +- 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 -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-3 -- Actually apply the revert added as patch in the previous release - -* Thu Nov 03 2016 Michele Baldessari - 3:10.1.18-2 -- Back out upstream commit 7497ebf8a49bfe30bb4110f2ac20a30f804b7946 as it - breaks the resource agent - * Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 - Update to 10.1.18 @@ -1376,7 +1971,7 @@ fi * Mon Aug 29 2016 Jakub Dorňák - 3:10.1.16-2 - Fixed galera replication - Resolves: #1352946 +- Resolves: #1352946 * Tue Jul 19 2016 Jakub Dorňák - 3:10.1.16-1 - Update to 10.1.16 @@ -1391,7 +1986,7 @@ fi * Thu Jul 14 2016 Honza Horak - 2:10.1.15-3 - Check datadir more carefully to avoid unwanted data corruption - Related: #1335849 +- Related: #1335849 * Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 - Bump epoch @@ -1401,7 +1996,7 @@ fi - Update to 10.1.15 * Fri Jul 1 2016 Jakub Dorňák - 1:10.1.14-3 - Revert "Update to 10.2.0" +- 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 @@ -1410,7 +2005,7 @@ fi * Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 - Fix mysql-prepare-db-dir - Resolves: #1335849 +- Resolves: #1335849 * Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 - Update to 10.2.0 @@ -1425,8 +2020,8 @@ fi * 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 + 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 @@ -1436,7 +2031,7 @@ fi * Tue Mar 22 2016 Jakub Dorňák - 1:10.1.12-3 - Add subpackage mariadb-server-galera - Resolves: 1310622 +- Resolves: 1310622 * Tue Mar 01 2016 Honza Horak - 1:10.1.12-2 - Rebuild for BZ#1309199 (symbol versioning) @@ -1452,9 +2047,9 @@ fi * Fri Feb 12 2016 Honza Horak - 1:10.1.11-7 - Add Provides: bundled(pcre) in case we build with bundled pcre - Related: #1302296 +- Related: #1302296 - embedded-devel should require libaio-devel - Resolves: #1290517 +- Resolves: #1290517 * Fri Feb 12 2016 Honza Horak - 1:10.1.11-6 - Fix typo s/obsolate/obsolete/ @@ -1462,9 +2057,9 @@ fi * 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 +- Resolves: #1279753 - Re-enable using libedit, which should be now fixed - Related: #1201988 +- Related: #1201988 - Remove mariadb-wait-ready call from systemd unit, we have now systemd notify support - Make mariadb@.service similar to mariadb.service @@ -1513,7 +2108,7 @@ fi * Wed Jun 03 2015 Dan Horák - 1:10.0.19-2 - Update lists of failing tests (jdornak) - Related: #1149647 +- Related: #1149647 * Mon May 11 2015 Honza Horak - 1:10.0.19-1 - Update to 10.0.19 @@ -1525,23 +2120,23 @@ fi - Include client plugins into -common package since they are used by both -libs and base packages. - Do not use libedit - Related: #1201988 +- Related: #1201988 - Let plugin dir to be owned by -common - Use correct comment in the init script - Related: #1184604 +- Related: #1184604 - Add openssl as BuildRequires to run some openssl tests during build - Related: #1189180 +- Related: #1189180 - Fail in case any command in check fails - Related: #1124791 +- Related: #1124791 - Fix mysqladmin crash if run with -u root -p - Resolves: #1207170 +- 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 +- 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 @@ -1552,9 +2147,9 @@ fi * Tue Mar 03 2015 Honza Horak - 1:10.0.16-6 - Check permissions when starting service on RHEL-6 - Resolves: #1194699 +- Resolves: #1194699 - Do not create test database by default - Related: #1194611 +- Related: #1194611 * Fri Feb 13 2015 Matej Muzila - 1:10.0.16-4 - Enable tokudb @@ -1565,11 +2160,11 @@ fi * Wed Feb 4 2015 Jakub Dorňák - 1:10.0.16-2 - Include new certificate for tests - Update lists of failing tests - Related: #1186110 +- Related: #1186110 * Tue Feb 3 2015 Jakub Dorňák - 1:10.0.16-9 - Rebase to version 10.0.16 - Resolves: #1187895 +- Resolves: #1187895 * Tue Jan 27 2015 Petr Machata - 1:10.0.15-9 - Rebuild for boost 1.57.0 @@ -1603,15 +2198,15 @@ fi * Thu Nov 20 2014 Jan Stanek - 1:10.0.14-8 - Applied upstream fix for mysql_config --cflags output. - Resolves: #1160845 +- Resolves: #1160845 * Fri Oct 24 2014 Jan Stanek - 1:10.0.14-7 - Fixed compat service file. - Resolves: #1155700 +- Resolves: #1155700 * Mon Oct 13 2014 Honza Horak - 1:10.0.14-6 - Remove bundled cmd-line-utils - Related: #1079637 +- Related: #1079637 - Move mysqlimport man page to proper package - Disable main.key_cache test on s390 Releated: #1149647 @@ -1619,7 +2214,7 @@ fi * Wed Oct 08 2014 Honza Horak - 1:10.0.14-5 - Disable tests connect.part_file, connect.part_table and connect.updelx - Related: #1149647 +- Related: #1149647 * Wed Oct 01 2014 Honza Horak - 1:10.0.14-4 - Add bcond_without mysql_names @@ -1627,7 +2222,7 @@ fi * Wed Oct 01 2014 Honza Horak - 1:10.0.14-3 - Build with system libedit - Resolves: #1079637 +- Resolves: #1079637 * Mon Sep 29 2014 Honza Horak - 1:10.0.14-2 - Add with_debug option @@ -1646,17 +2241,17 @@ fi * Wed Sep 24 2014 Matej Muzila - 1:10.0.13-7 - Client related libraries moved from mariadb-server to mariadb-libs - Related: #1138843 +- 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 +- 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 +- Resolves: #1134328 - Use %%cmake macro * Tue Aug 19 2014 Honza Horak - 1:10.0.13-4 @@ -1740,7 +2335,7 @@ fi * 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 +- Resolves: #1065676 - Fix paths in helper scripts - Move language files into mariadb directory @@ -1753,11 +2348,11 @@ fi * Tue Feb 11 2014 Honza Horak 1:5.5.35-4 - Fix typo in mysqld.service - Resolves: #1063981 +- 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 +- Resolves: #1061045 * Thu Jan 30 2014 Honza Horak 1:5.5.35-1 - Rebase to 5.5.35 @@ -1765,23 +2360,23 @@ fi 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 +- Resolves: #1054043 +- Resolves: #1059546 * Tue Jan 14 2014 Honza Horak - 1:5.5.34-9 - Adopt compatible system versioning - Related: #1045013 +- Related: #1045013 - Use compatibility mysqld.service instead of link - Related: #1014311 +- 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 +- Related: #1051069 - Move mysql_config to -devel sub-package and remove Require: mariadb - Related: #1050920 +- Related: #1050920 * Fri Jan 10 2014 Marcin Juszkiewicz 1:5.5.34-6 - Disable main.gis-precise test also for AArch64 @@ -1797,14 +2392,14 @@ fi * 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 +- Related: #1044565 - Use upstream's layout for symbols version in client library - Related: #1045013 +- Related: #1045013 - Check if socket file is not being used by another process at a time of starting the service - Related: #1045435 +- Related: #1045435 - Use %%ghost directive for the log file - Related: 1043501 +- Related: 1043501 * Wed Nov 27 2013 Honza Horak 1:5.5.34-2 - Fix mariadb-wait-ready script @@ -1814,13 +2409,13 @@ fi * Mon Nov 4 2013 Honza Horak 1:5.5.33a-4 - Fix spec file to be ready for backport by Oden Eriksson - Resolves: #1026404 +- 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 +- Related: #1019945 - Check if correct process is running in mysql-wait-ready script - Related: #1026313 +- Related: #1026313 * Mon Oct 14 2013 Honza Horak 1:5.5.33a-2 - Turn on test suite @@ -1834,10 +2429,10 @@ fi * Mon Sep 2 2013 Honza Horak - 1:5.5.32-12 - Re-organize my.cnf to include only generic settings - Resolves: #1003115 +- 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 +- Related: #999589 * Thu Aug 29 2013 Honza Horak - 1:5.5.32-11 - Move log file into /var/log/mariadb/mariadb.log @@ -1849,7 +2444,7 @@ fi * Tue Aug 13 2013 Honza Horak - 1:5.5.32-9 - Multilib issues solved by alternatives - Resolves: #986959 +- Resolves: #986959 * Sat Aug 03 2013 Petr Pisar - 1:5.5.32-8 - Perl 5.18 rebuild @@ -1891,14 +2486,14 @@ fi * 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 +- 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 +- Resolves: #975348 * Fri Jun 14 2013 Honza Horak 1:5.5.31-3 - Explicitly enable mysqld if it was enabled in the beginning @@ -1913,7 +2508,7 @@ fi - 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 +- Resolves: #962087 - Fix test suite requirements * Sun May 5 2013 Honza Horak 1:5.5.30-2 @@ -1942,7 +2537,7 @@ fi * Thu Feb 28 2013 Honza Horak 5.5.29-7 - Use configured prefix value instead of guessing basedir in mysql_config -Resolves: #916189 +- Resolves: #916189 - Export dynamic columns and non-blocking API functions documented by upstream @@ -1971,7 +2566,7 @@ Resolves: #916189 - 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 +- Resolves: #890535 * Thu Jan 31 2013 Honza Horak 5.5.28a-8 - Enable obsoleting mysql