From 5007ecd667483f01fc67577548d6f9de0acbbafb Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 27 Jun 2018 16:01:22 +0200 Subject: [PATCH] Fix log rotation Add forgotten 10.3.7 changelog entry Remove galera and mysql obsoletion Tweak the testsuite runs Fix files section when build with test subpackage but without embedded subpackage --- mariadb-logrotate.patch | 75 ++++++++++++++++++++--------------------- mariadb.spec | 63 ++++++++++------------------------ 2 files changed, 54 insertions(+), 84 deletions(-) diff --git a/mariadb-logrotate.patch b/mariadb-logrotate.patch index a495c07..c11198f 100644 --- a/mariadb-logrotate.patch +++ b/mariadb-logrotate.patch @@ -21,59 +21,56 @@ Update 3/2017 during flushing, the operation is not atomic. We should not ship it in that state ---- mariadb-10.1.23/support-files/mysql-log-rotate.sh 2017-05-18 08:33:01.000000000 +0200 -+++ mariadb-10.1.23/support-files/mysql-log-rotate.sh.patched 2017-05-24 11:54:33.686860390 +0200 -@@ -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. + +--- 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: # -# [safe_mysqld] -# err-log=@localstatedir@/mysqld.log +-# +-# If the root user has a password you have to create a +-# /root/.my.cnf configuration file with the following +-# content: +-# +-# [mysqladmin] +-# password = +-# user= root +-# +-# where "" is the password. +-# +-# ATTENTION: This /root/.my.cnf should be readable ONLY +-# for root ! +# [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 ! -@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 -+#} -+ ++ if [ -e @PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid ] ++ then ++ kill -1 $(<@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid) ++ fi + endscript + } diff --git a/mariadb.spec b/mariadb.spec index 856a560..89a5915 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -25,6 +25,7 @@ # TokuDB does not yet support new Jemalloc 5, but on F>=28, there's only Jemalloc 5. Not a supported configuration. https://jira.percona.com/browse/PS-4393 # Also build of TokuDB without Jemalloc is not supported. # * It is better to build TokuDB without jemalloc than not at all. So far, this configuration works for users and they want the TokuDB. +# * Based on the latest uinformation from the upstream, the problems with Jemalloc should be resolved in the 10.3.8 release # Mroonga engine # https://mariadb.com/kb/en/mariadb/about-mroonga/ # Current version in MariaDB, 7.07, only supports the x86_64 @@ -124,14 +125,6 @@ %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} @@ -144,12 +137,10 @@ # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.3 -%global bugfixver 7 Name: mariadb -Version: %{compatver}.%{bugfixver} -Release: 1%{?with_debug:.debug}%{?dist} +Version: 10.3.7 +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A community developed branch of MySQL @@ -266,13 +257,10 @@ Provides: mysql-compat-client%{?_isa} = %{sameevr} 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} # obsoletion of mariadb-galera Provides: mariadb-galera = %{sameevr} -Obsoletes: mariadb-galera < %{obsoleted_mariadb_galera_evr} # Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering %global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) @@ -297,8 +285,6 @@ Requires: %{name}-common%{?_isa} = %{sameevr} Provides: mysql-libs = %{sameevr} Provides: mysql-libs%{?_isa} = %{sameevr} %endif # mysql_names -%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-libs < %{obsoleted_mysql_case_evr}} -%{?obsoleted_mysql_evr:Obsoletes: mysql-libs < %{obsoleted_mysql_evr}} %description libs The mariadb-libs package provides the essential shared libraries for any @@ -336,7 +322,6 @@ 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} @@ -374,7 +359,6 @@ 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 @@ -406,6 +390,7 @@ Recommends: %{name}-backup%{?_isa} = %{sameevr} %{?with_tokudb:Recommends: %{name}-tokudb-engine%{?_isa} = %{sameevr}} Suggests: mytop +Suggests: logrotate Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d @@ -427,10 +412,7 @@ 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}} %description server MariaDB is a multi-user, multi-threaded SQL database server. It is a @@ -584,8 +566,6 @@ Requires: mariadb-connector-c-devel >= 3.0 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} %description devel @@ -611,8 +591,6 @@ Requires: %{name}-errmsg%{?_isa} = %{sameevr} 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 @@ -632,8 +610,6 @@ 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}} %description embedded-devel MariaDB is a multi-user, multi-threaded SQL database server. @@ -652,8 +628,6 @@ 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}} %description bench MariaDB is a multi-user, multi-threaded SQL database server. @@ -685,8 +659,6 @@ Requires: perl(Time::HiRes) 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. @@ -781,17 +753,12 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py 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" -# Use -ldl for some plugins #1538990 -CFLAGS="$CFLAGS -ldl" -# gcc seems to have some bugs on sparc as of 4.4.1, back off optimization; rhbz#529298 -# Note: sparc = s390 -%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 +# Override all optimization flags when making a debug build +%{?with_debug: CFLAGS="$CFLAGS -0g"} CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS @@ -1149,7 +1116,7 @@ export MTR_BUILD_THREAD=%{__isa_bits} set -ex cd mysql-test - perl ./mysql-test-run.pl --force --retry=1 --ssl \ + perl ./mysql-test-run.pl --parallel=auto --mem --force --retry=1 --ssl \ --suite-timeout=900 --testcase-timeout=30 \ --mysqld=--binlog-format=mixed --force-restart \ --shutdown-timeout=60 --max-test-fail=0 --big-test \ @@ -1161,7 +1128,7 @@ export MTR_BUILD_THREAD=%{__isa_bits} %endif # Second run for the SPIDER suites that fail with SCA (ssl self signed certificate) - perl ./mysql-test-run.pl --force --retry=1 \ + perl ./mysql-test-run.pl --parallel=auto --mem --force --retry=1 \ --suite-timeout=60 --testcase-timeout=10 \ --mysqld=--binlog-format=mixed --force-restart \ --shutdown-timeout=60 --max-test-fail=0 --big-test \ @@ -1572,22 +1539,28 @@ fi %if %{with test} %files test +%if %{with embedded} +%{_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}/mysql_client_test_embedded %{_bindir}/mysqltest -%{_bindir}/mysqltest_embedded %attr(-,mysql,mysql) %{_datadir}/mysql-test %{_mandir}/man1/mysql_client_test.1* %{_mandir}/man1/my_safe_process.1* -%{_mandir}/man1/mysql_client_test_embedded.1* %{_mandir}/man1/mysqltest.1* -%{_mandir}/man1/mysqltest_embedded.1* %{_mandir}/man1/mysql-stress-test.pl.1* %{_mandir}/man1/mysql-test-run.pl.1* %endif %changelog +* 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.