From 782ee2120959d517fb61ceb1001944b88c96314b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= Date: Wed, 20 Apr 2016 15:39:01 +0200 Subject: [PATCH 01/11] Update to 10.2.0 --- mariadb.spec | 12 +++++------- sources | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 7d9e3cd..9905e52 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -118,8 +118,8 @@ # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.1 -%global bugfixver 14 +%global compatver 10.2 +%global bugfixver 0 Name: mariadb Version: %{compatver}.%{bugfixver} @@ -1124,8 +1124,6 @@ fi %{_bindir}/mysql_setpermission %{_bindir}/mysql_tzinfo_to_sql %{_bindir}/mysql_upgrade -%{_bindir}/mysql_zap -%{_bindir}/mysqlbug %{_bindir}/mysqldumpslow %{_bindir}/mysqld_multi %{_bindir}/mysqld_safe @@ -1177,8 +1175,6 @@ fi %{_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* @@ -1200,7 +1196,6 @@ fi %{_datadir}/%{pkg_name}/mysql_system_tables.sql %{_datadir}/%{pkg_name}/mysql_system_tables_data.sql %{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql -%{_datadir}/%{pkg_name}/mysql_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} @@ -1284,6 +1279,9 @@ fi %endif %changelog +* Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 +- Update to 10.2.0 + * Thu May 12 2016 Jakub Dorňák - 1:10.1.14-1 - Add selinux policy - Update to 10.1.14 (includes various bug fixes) diff --git a/sources b/sources index 7a029da..cde7cfa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -294925531e0fd2f0461e3894496a5adc mariadb-10.1.14.tar.gz +28877798b5c69f9a53f68553d4b20016 mariadb-10.2.0.tar.gz From cb04c7ab875698414cfd3be4040e52630380eb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= Date: Thu, 26 May 2016 16:16:11 +0200 Subject: [PATCH 02/11] Fix mysql-prepare-db-dir Resolves: #1335849 --- mariadb.spec | 6 +++++- mysql-prepare-db-dir.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 9905e52..c200ee9 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -123,7 +123,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 1 Summary: A community developed branch of MySQL @@ -1279,6 +1279,10 @@ fi %endif %changelog +* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 +- Fix mysql-prepare-db-dir + Resolves: #1335849 + * Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 - Update to 10.2.0 diff --git a/mysql-prepare-db-dir.sh b/mysql-prepare-db-dir.sh index 1905f09..1873c1f 100644 --- a/mysql-prepare-db-dir.sh +++ b/mysql-prepare-db-dir.sh @@ -55,8 +55,8 @@ chown "$myuser:$mygroup" "$errlogfile" chmod 0640 "$errlogfile" [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" -# Make the data directory -if [ ! -d "$datadir/mysql" ] ; then +# Make the data directory if doesn't exist or empty +if ! ls $datadir/* &>/dev/null; then # First, make sure $datadir is there with correct permissions # (note: if it's not, and we're not root, this'll fail ...) if [ ! -e "$datadir" -a ! -h "$datadir" ] From e0a9f3e25e2a83d476964e59efbc256263b99aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 10:01:21 +0200 Subject: [PATCH 03/11] Mandatory Perl build-requires added --- mariadb.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/mariadb.spec b/mariadb.spec index c200ee9..7e95d53 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -187,6 +187,7 @@ BuildRequires: libedit-devel BuildRequires: openssl-devel BuildRequires: ncurses-devel BuildRequires: perl +BuildRequires: perl-generators BuildRequires: systemtap-sdt-devel BuildRequires: zlib-devel # auth_pam.so plugin will be build if pam-devel is installed From cd3275f872684fa9d7acf4867aaf4a883a7dc4b2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 22 Jun 2016 14:03:19 +0200 Subject: [PATCH 04/11] multilib fixes Delegate most of the multilib decisions to multilib-rpm-config, this allows us to maintain the rules at central place. Move the pkgconfig file to architecture dependant location. Version: 10.2.0-3 --- mariadb.spec | 39 ++++++++++++++++++++------------------- my_config.h | 33 --------------------------------- 2 files changed, 20 insertions(+), 52 deletions(-) delete mode 100644 my_config.h diff --git a/mariadb.spec b/mariadb.spec index 7e95d53..f96f561 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -123,7 +123,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 1 Summary: A community developed branch of MySQL @@ -136,7 +136,6 @@ License: GPLv2 with exceptions and LGPLv2 and BSD Source0: http://mirrors.syringanetworks.net/mariadb/mariadb-%{version}/source/mariadb-%{version}.tar.gz Source2: mysql_config_multilib.sh Source3: my.cnf.in -Source4: my_config.h Source5: README.mysql-cnf Source6: README.mysql-docs Source7: README.mysql-license @@ -190,6 +189,7 @@ BuildRequires: perl BuildRequires: perl-generators BuildRequires: systemtap-sdt-devel BuildRequires: zlib-devel +BuildRequires: multilib-rpm-config # 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) @@ -699,22 +699,20 @@ 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_fix_c_header --file %{_includedir}/$header +done + +# multilib support for shell scripts # we only apply this to known Red Hat multilib arches, per bug #181335 -unamei=$(uname -i) -%ifarch %{arm} -unamei=arm -%endif -%ifarch %{power64} -unamei=ppc64 -%endif -%ifarch %{arm} aarch64 %{ix86} x86_64 ppc %{power64} %{sparc} s390 s390x -mv %{buildroot}%{_includedir}/mysql/my_config.h %{buildroot}%{_includedir}/mysql/my_config_${unamei}.h -mv %{buildroot}%{_includedir}/mysql/private/config.h %{buildroot}%{_includedir}/mysql/private/my_config_${unamei}.h -install -p -m 644 %{SOURCE4} %{buildroot}%{_includedir}/mysql/ -install -p -m 644 %{SOURCE4} %{buildroot}%{_includedir}/mysql/private/config.h +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 -%endif +fi + +# Upstream install this into arch-independent directory, TODO: report +mkdir -p %{buildroot}/%{_libdir}/pkgconfig +mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig # install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, # but that's pretty wacko --- see also %%{name}-file-contents.patch) @@ -858,7 +856,7 @@ rm -f %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded rm -f %{buildroot}%{_bindir}/mysql_config* rm -rf %{buildroot}%{_includedir}/mysql rm -f %{buildroot}%{_datadir}/aclocal/mysql.m4 -rm -f %{buildroot}%{_datadir}/pkgconfig/mariadb.pc +rm -f %{buildroot}%{_libdir}/pkgconfig/mariadb.pc rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient*.so rm -f %{buildroot}%{_mandir}/man1/mysql_config.1* %endif @@ -1242,11 +1240,10 @@ fi %if %{with devel} %files devel -%{_bindir}/mysql_config -%{_bindir}/mysql_config-%{__isa_bits} +%{_bindir}/mysql_config* %{_includedir}/mysql %{_datadir}/aclocal/mysql.m4 -%{_datadir}/pkgconfig/mariadb.pc +%{_libdir}/pkgconfig/mariadb.pc %if %{with clibrary} %{_libdir}/mysql/libmysqlclient.so %{_libdir}/mysql/libmysqlclient_r.so @@ -1280,6 +1277,10 @@ fi %endif %changelog +* Tue Jun 21 2016 Pavel Raiskup - 10.2.0-3 +- BR multilib-rpm-config and use it for multilib workarounds +- install architecture dependant pc file to arch-dependant location + * Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 - Fix mysql-prepare-db-dir Resolves: #1335849 diff --git a/my_config.h b/my_config.h deleted file mode 100644 index 02baa3d..0000000 --- a/my_config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Kluge to support multilib installation of both 32- and 64-bit RPMS: - * we need to arrange that header files that appear in both RPMs are - * identical. Hence, this file is architecture-independent and calls - * in an arch-dependent file that will appear in just one RPM. - * - * To avoid breaking arches not explicitly supported by Red Hat, we - * use this indirection file *only* on known multilib arches. - * - * Note: this may well fail if user tries to use gcc's -I- option. - * But that option is deprecated anyway. - */ -#if defined(__x86_64__) -#include "my_config_x86_64.h" -#elif defined(__i386__) -#include "my_config_i386.h" -#elif defined(__ppc64__) || defined(__powerpc64__) -#include "my_config_ppc64.h" -#elif defined(__ppc__) || defined(__powerpc__) -#include "my_config_ppc.h" -#elif defined(__s390x__) -#include "my_config_s390x.h" -#elif defined(__s390__) -#include "my_config_s390.h" -#elif defined(__sparc__) && defined(__arch64__) -#include "my_config_sparc64.h" -#elif defined(__sparc__) -#include "my_config_sparc.h" -#elif defined(__arm__) -#include "my_config_arm.h" -#elif defined(__aarch64__) -#include "my_config_aarch64.h" -#endif From d34bef2a31231b1f6ce3205b400d3ac2719a56c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= Date: Fri, 1 Jul 2016 19:48:49 +0200 Subject: [PATCH 05/11] Revert "Update to 10.2.0" This reverts commit 782ee2120959d517fb61ceb1001944b88c96314b. It is possible that MariaDB 10.2.0 won't be stable till f25 GA. --- mariadb.spec | 16 +++++++++------- sources | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index f96f561..9ad644f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -118,8 +118,8 @@ # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} -%global compatver 10.2 -%global bugfixver 0 +%global compatver 10.1 +%global bugfixver 14 Name: mariadb Version: %{compatver}.%{bugfixver} @@ -1123,6 +1123,8 @@ fi %{_bindir}/mysql_setpermission %{_bindir}/mysql_tzinfo_to_sql %{_bindir}/mysql_upgrade +%{_bindir}/mysql_zap +%{_bindir}/mysqlbug %{_bindir}/mysqldumpslow %{_bindir}/mysqld_multi %{_bindir}/mysqld_safe @@ -1174,6 +1176,8 @@ fi %{_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* @@ -1195,6 +1199,7 @@ fi %{_datadir}/%{pkg_name}/mysql_system_tables.sql %{_datadir}/%{pkg_name}/mysql_system_tables_data.sql %{_datadir}/%{pkg_name}/mysql_test_data_timezone.sql +%{_datadir}/%{pkg_name}/mysql_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} @@ -1277,17 +1282,14 @@ fi %endif %changelog -* Tue Jun 21 2016 Pavel Raiskup - 10.2.0-3 +* Tue Jun 21 2016 Pavel Raiskup - 1:10.1.14-3 - BR multilib-rpm-config and use it for multilib workarounds - install architecture dependant pc file to arch-dependant location -* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 +* Thu May 26 2016 Jakub Dorňák - 1:10.1.14-2 - Fix mysql-prepare-db-dir Resolves: #1335849 -* Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 -- Update to 10.2.0 - * Thu May 12 2016 Jakub Dorňák - 1:10.1.14-1 - Add selinux policy - Update to 10.1.14 (includes various bug fixes) diff --git a/sources b/sources index cde7cfa..7a029da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -28877798b5c69f9a53f68553d4b20016 mariadb-10.2.0.tar.gz +294925531e0fd2f0461e3894496a5adc mariadb-10.1.14.tar.gz From e6d72a834bd861ce44cba9b04b612668efb179fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= Date: Sat, 2 Jul 2016 08:52:36 +0200 Subject: [PATCH 06/11] Update to 10.1.15 --- mariadb-test-openssl_1.patch | 20 ++++++++++++++++++++ mariadb.spec | 14 ++++++++++---- rh-skipped-tests-arm.list | 12 ++++-------- rh-skipped-tests-base.list | 13 +++++++------ sources | 2 +- 5 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 mariadb-test-openssl_1.patch diff --git a/mariadb-test-openssl_1.patch b/mariadb-test-openssl_1.patch new file mode 100644 index 0000000..9e63524 --- /dev/null +++ b/mariadb-test-openssl_1.patch @@ -0,0 +1,20 @@ +--- mariadb-10.1.15/mysql-test/t/openssl_1.test.orig 2016-06-29 22:56:09.000000000 +0200 ++++ mariadb-10.1.15/mysql-test/t/openssl_1.test 2016-07-04 10:47:13.366522457 +0200 +@@ -134,7 +134,7 @@ drop table t1; + # verification of servers certificate by setting both ca certificate + # and ca path to NULL + # +---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA ++--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA AES256-GCM-SHA384 DHE-RSA-AES256-SHA + --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 + --echo End of 5.0 tests + +@@ -259,7 +259,7 @@ select 'is still running; no cipher requ + GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509; + FLUSH PRIVILEGES; + connect(con1,localhost,bug42158,,,,,SSL); +---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA ++--replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA AES256-GCM-SHA384 DHE-RSA-AES256-SHA + SHOW STATUS LIKE 'Ssl_cipher'; + disconnect con1; + connection default; diff --git a/mariadb.spec b/mariadb.spec index 9ad644f..e3c2301 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -8,7 +8,7 @@ %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail -%global check_testsuite 1 +%global check_testsuite 0 # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} @@ -119,11 +119,11 @@ # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} %global compatver 10.1 -%global bugfixver 14 +%global bugfixver 15 Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 3%{?with_debug:.debug}%{?dist} +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 1 Summary: A community developed branch of MySQL @@ -162,6 +162,7 @@ Source72: mariadb-server-galera.te # Patches common for more mysql-like packages Patch1: %{pkgnamepatch}-strmov.patch Patch2: %{pkgnamepatch}-install-test.patch +Patch3: %{pkgnamepatch}-test-openssl_1.patch Patch4: %{pkgnamepatch}-logrotate.patch Patch5: %{pkgnamepatch}-file-contents.patch Patch7: %{pkgnamepatch}-scripts.patch @@ -548,6 +549,7 @@ MariaDB is a community developed branch of MySQL. %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 @@ -1096,8 +1098,9 @@ fi %files server-galera %doc Docs/README.wsrep %license LICENSE.clustercheck -%{_bindir}/galera_new_cluster %{_bindir}/clustercheck +%{_bindir}/galera_new_cluster +%{_bindir}/galera_recovery %{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf %config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf %attr(0640,root,root) %ghost %config(noreplace) %{_sysconfdir}/sysconfig/clustercheck @@ -1282,6 +1285,9 @@ fi %endif %changelog +* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.15-1 +- Update to 10.1.15 + * Tue Jun 21 2016 Pavel Raiskup - 1:10.1.14-3 - BR multilib-rpm-config and use it for multilib workarounds - install architecture dependant pc file to arch-dependant location diff --git a/rh-skipped-tests-arm.list b/rh-skipped-tests-arm.list index 9b92367..c2fbe9d 100644 --- a/rh-skipped-tests-arm.list +++ b/rh-skipped-tests-arm.list @@ -1,12 +1,8 @@ - -connect.bin : rhbz#1096787 (pass on aarch64) -connect.endian : rhbz#1096787 - -main.partition_exchange : rhbz#1096787 -main.analyze_stmt_orderby : rhbz#1096787 -main.explain_json_innodb : rhbz#1096787 -main.explain_json_format_partitions : rhbz#1096787 main.analyze_format_json : rhbz#1096787 +main.analyze_stmt_orderby : rhbz#1096787 main.explain_json : rhbz#1096787 +main.explain_json_format_partitions : rhbz#1096787 +main.explain_json_innodb : rhbz#1096787 +main.partition_exchange : rhbz#1096787 main.subselect_cache : rhbz#1096787 main.type_year : rhbz#1096787 diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index fb33990..cb0ecbc 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -1,14 +1,15 @@ # These tests fail with MariaDB 10: - -main.userstat : rhbz#1096787 +main.multi_update : rhbz#1096787 main.set_statement_notembedded_binlog : rhbz#1096787 -main.ssl_7937 : rhbz#1096787 -main.ssl_crl_clients : rhbz#1096787 -main.openssl_1 : rhbz#1096787 main.ssl : rhbz#1096787 -main.ssl_8k_key : rhbz#1096787 +main.ssl_ca : rhbz#1096787 +main.ssl_cert_verify : rhbz#1096787 main.ssl_compress : rhbz#1096787 +main.ssl_crl_clients : rhbz#1096787 main.ssl_timeout : rhbz#1096787 +main.ssl_7937 : rhbz#1096787 +main.ssl_8k_key : rhbz#1096787 +main.userstat : rhbz#1096787 perfschema.nesting : rhbz#1096787 perfschema.socket_summary_by_event_name_func : rhbz#1096787 perfschema.socket_summary_by_instance_func : rhbz#1096787 diff --git a/sources b/sources index 7a029da..55c84ac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -294925531e0fd2f0461e3894496a5adc mariadb-10.1.14.tar.gz +21bd68cbc08b4195fbfcf29d1c385fe8 mariadb-10.1.15.tar.gz From 94956e3b320b16e04f8d7cbdca25ee61a0514eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= Date: Thu, 7 Jul 2016 12:42:21 +0200 Subject: [PATCH 07/11] bump epoch related to the downgrade from the pre-release version --- mariadb.spec | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index e3c2301..3f80dbf 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -124,7 +124,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} Release: 1%{?with_debug:.debug}%{?dist} -Epoch: 1 +Epoch: 2 Summary: A community developed branch of MySQL Group: Applications/Databases @@ -1285,17 +1285,28 @@ fi %endif %changelog +* Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-1 +- Bump epoch + (related to the downgrade from the pre-release version) + * Fri Jul 1 2016 Jakub Dorňák - 1:10.1.15-1 - Update to 10.1.15 -* Tue Jun 21 2016 Pavel Raiskup - 1:10.1.14-3 +* Fri Jul 1 2016 Jakub Dorňák - 1:10.1.14-3 + Revert "Update to 10.2.0" + It is possible that MariaDB 10.2.0 won't be stable till f25 GA. + +* Tue Jun 21 2016 Pavel Raiskup - 10.2.0-3 - BR multilib-rpm-config and use it for multilib workarounds - install architecture dependant pc file to arch-dependant location -* Thu May 26 2016 Jakub Dorňák - 1:10.1.14-2 +* Thu May 26 2016 Jakub Dorňák - 1:10.2.0-2 - Fix mysql-prepare-db-dir Resolves: #1335849 +* Thu May 12 2016 Jakub Dorňák - 1:10.2.0-1 +- Update to 10.2.0 + * Thu May 12 2016 Jakub Dorňák - 1:10.1.14-1 - Add selinux policy - Update to 10.1.14 (includes various bug fixes) From 69ae9856e2963fcde99e763819a9e21b4a825ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dor=C5=88=C3=A1k?= Date: Thu, 7 Jul 2016 14:33:31 +0200 Subject: [PATCH 08/11] need to bump release too to pass n-v-r check --- mariadb.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 3f80dbf..c11c485 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -123,7 +123,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 2 Summary: A community developed branch of MySQL @@ -1285,7 +1285,7 @@ fi %endif %changelog -* Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-1 +* Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 - Bump epoch (related to the downgrade from the pre-release version) From a8ba852168a3dfbbc05c411789c2bd1ce32c8d88 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Thu, 14 Jul 2016 00:10:50 +0200 Subject: [PATCH 09/11] Check datadir more carefully to avoid unwanted data corruption Related: #1335849 --- mysql-prepare-db-dir.sh | 56 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/mysql-prepare-db-dir.sh b/mysql-prepare-db-dir.sh index 1873c1f..ac7bc5e 100644 --- a/mysql-prepare-db-dir.sh +++ b/mysql-prepare-db-dir.sh @@ -5,6 +5,26 @@ source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common" +# 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 +# @param datadir +ls_check_datadir () +{ + ls -A "$1" 2>/dev/null + test $? -eq 0 || echo "fake-file" +} + +# Checks whether datadir should be initialized +# @param datadir +can_initialize () +{ + case `ls_check_datadir "$1"` in + ""|lost+found) true ;; + *) false ;; + esac +} + # If two args given first is user, second is group # otherwise the arg is the systemd service file if [ "$#" -eq 2 ] @@ -56,7 +76,7 @@ chmod 0640 "$errlogfile" [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" # Make the data directory if doesn't exist or empty -if ! ls $datadir/* &>/dev/null; then +if can_initialize "$datadir" ; then # First, make sure $datadir is there with correct permissions # (note: if it's not, and we're not root, this'll fail ...) if [ ! -e "$datadir" -a ! -h "$datadir" ] @@ -69,14 +89,30 @@ if ! ls $datadir/* &>/dev/null; then # Now create the database echo "Initializing @NICE_PROJECT_NAME@ database" + CURRENT_TIME=`LANG=C date -u` @bindir@/mysql_install_db --rpm --datadir="$datadir" --user="$myuser" ret=$? if [ $ret -ne 0 ] ; then echo "Initialization of @NICE_PROJECT_NAME@ database failed." >&2 - echo "Perhaps @sysconfdir@/my.cnf is misconfigured." >&2 + echo "Perhaps @sysconfdir@/my.cnf is misconfigured or there is some problem with permissions of $datadir." >&2 # Clean up any partially-created database files - if [ ! -e "$datadir/mysql/user.frm" ] ; then - rm -rf "$datadir"/* + if [ ! -e "$datadir/mysql/user.frm" ] && [ -d "$datadir" ] ; then + echo "Initialization of @NICE_PROJECT_NAME@ database was not finished successfully." >&2 + echo "Files created so far will be removed." >&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 + sleep 1 + find "$datadir" -mindepth 1 -maxdepth 1 -newermt "$CURRENT_TIME" \ + -not -name "lost+found" -exec rm -rf {} + + if [ $? -ne 0 ] ; then + echo "Removing of created files was not successfull." >&2 + echo "Please, clean directory $datadir manually." >&2 + fi + else + echo "However, part of data has been initialized and those will not be removed." >&2 + echo "Please, clean directory $datadir manually." >&2 fi exit $ret fi @@ -84,6 +120,18 @@ if ! ls $datadir/* &>/dev/null; then 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 + echo "Database MariaDB is probably initialized in $datadir already, nothing is done." + echo "If this is not the case, make sure the $datadir is empty before running `basename $0`." + 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 MariaDB 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`." + exit 1 + fi fi exit 0 From ff0bbd1d4f677f9987a2065c3db02cfb050d6a90 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Thu, 14 Jul 2016 19:38:46 +0200 Subject: [PATCH 10/11] Bump release for previous commit: Check datadir more carefully to avoid unwanted data corruption Related: #1335849 --- mariadb.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index c11c485..cf25749 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -123,7 +123,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 2 Summary: A community developed branch of MySQL @@ -1285,6 +1285,10 @@ fi %endif %changelog +* Thu Jul 14 2016 Honza Horak - 2:10.1.15-3 +- Check datadir more carefully to avoid unwanted data corruption + Related: #1335849 + * Thu Jul 7 2016 Jakub Dorňák - 2:10.1.15-2 - Bump epoch (related to the downgrade from the pre-release version) From 10ba86daf1aa8df0d3786fccf32e8c8403d1679b Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Thu, 14 Jul 2016 19:42:00 +0200 Subject: [PATCH 11/11] Re-enable checking test-suite result --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index cf25749..c7aeeab 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -8,7 +8,7 @@ %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail -%global check_testsuite 0 +%global check_testsuite 1 # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}}