From 5d73f5f2493327f9560b4bb90a86d2481675bb9f Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 15 Nov 2016 12:05:47 +0100 Subject: [PATCH 01/11] Update to 10.1.19 - added temporary support to build with OpenSSL 1.0 on Fedora >= 26 --- mariadb.spec | 17 ++++++++++++++--- sources | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 8f7b3eb..fe496f8 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -119,7 +119,7 @@ # Make long macros shorter %global sameevr %{epoch}:%{version}-%{release} %global compatver 10.1 -%global bugfixver 18 +%global bugfixver 19 Name: mariadb Version: %{compatver}.%{bugfixver} @@ -212,8 +212,13 @@ BuildRequires: perl(Socket) BuildRequires: perl(Sys::Hostname) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) -# for running some openssl tests rhbz#1189180 -BuildRequires: openssl + + +# Temporary workaound to build with OpenSSL 1.0 on Fedora >=26 (wich requires OpenSSL 1.1) +BuildRequires: compat-openssl10 + # for running some openssl tests rhbz#1189180 + #BuildRequires: openssl + BuildRequires: selinux-policy-devel %{?with_init_systemd:BuildRequires: systemd systemd-devel} @@ -229,6 +234,8 @@ Provides: mysql-compat-client = %{sameevr} Provides: mysql-compat-client%{?_isa} = %{sameevr} %endif + + # 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}} @@ -1299,6 +1306,10 @@ fi %endif %changelog +* Tue Nov 15 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 + * Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 - Update to 10.1.18 diff --git a/sources b/sources index aaf924a..6061a52 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -173b88ab54bdd1fc51483b6b26bef849 mariadb-10.1.18.tar.gz +e22e491eb3766bc3151cc0e96a7531c2 mariadb-10.1.19.tar.gz From e03800e0e3d19ea3d56df86c30fd21d860000cd1 Mon Sep 17 00:00:00 2001 From: Michal Date: Tue, 15 Nov 2016 12:42:17 +0100 Subject: [PATCH 02/11] Added compat-openssl10-devel package as well. --- mariadb.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index fe496f8..cf15745 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -215,10 +215,12 @@ BuildRequires: perl(Time::HiRes) # Temporary workaound to build with OpenSSL 1.0 on Fedora >=26 (wich requires OpenSSL 1.1) -BuildRequires: compat-openssl10 +BuildRequires: compat-openssl10-devel +Requires: compat-openssl10 # for running some openssl tests rhbz#1189180 #BuildRequires: openssl + BuildRequires: selinux-policy-devel %{?with_init_systemd:BuildRequires: systemd systemd-devel} From 0a9c40135b2be1d99136fbeead661843459bba79 Mon Sep 17 00:00:00 2001 From: Michal Date: Tue, 15 Nov 2016 12:44:41 +0100 Subject: [PATCH 03/11] Disabled openssl-devel package --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index cf15745..599fa48 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -183,7 +183,6 @@ Patch41: %{pkgnamepatch}-galera-new-cluster-help.patch BuildRequires: cmake BuildRequires: libaio-devel BuildRequires: libedit-devel -BuildRequires: openssl-devel BuildRequires: ncurses-devel BuildRequires: perl %if 0%{?fedora} >= 22 || 0%{?rhel} > 7 @@ -219,6 +218,7 @@ BuildRequires: compat-openssl10-devel Requires: compat-openssl10 # for running some openssl tests rhbz#1189180 #BuildRequires: openssl + #BuildRequires: openssl-devel BuildRequires: selinux-policy-devel From 13aaaccfd003beda28f686d058fbb10a8447daa3 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 15 Nov 2016 20:13:02 +0100 Subject: [PATCH 04/11] Update to 10.1.19 - added temporary support to build with OpenSSL 1.0 on Fedora >= 26 - added krb5-devel pkg as Buldrquires to preven gssapi failure. --- mariadb.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mariadb.spec b/mariadb.spec index 599fa48..cc96d92 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -219,6 +219,7 @@ Requires: compat-openssl10 # for running some openssl tests rhbz#1189180 #BuildRequires: openssl #BuildRequires: openssl-devel +BuildRequires: krb5-devel BuildRequires: selinux-policy-devel @@ -1311,6 +1312,7 @@ fi * Tue Nov 15 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 preven gssapi failure. * Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 - Update to 10.1.18 From d1924a9dc6350f6579f4adea95fcdf5852301afb Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 15 Nov 2016 21:33:18 +0100 Subject: [PATCH 05/11] typo --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index cc96d92..8c2f515 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1312,7 +1312,7 @@ fi * Tue Nov 15 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 preven gssapi failure. +- added krb5-devel pkg as Buldrquires to prevent gssapi failure * Tue Oct 4 2016 Jakub Dorňák - 3:10.1.18-1 - Update to 10.1.18 From 873305ba7398c5442e9fa5794c7a74836495d0d0 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 16 Nov 2016 07:09:57 +0100 Subject: [PATCH 06/11] 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 --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 8c2f515..d82c73d 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1309,7 +1309,7 @@ fi %endif %changelog -* Tue Nov 15 2016 Michal Schorm - 3:10.1.19-1 +* 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 From 6409446a3466e81386fad24b928c58473b3ade05 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 16 Nov 2016 11:48:42 +0100 Subject: [PATCH 07/11] Update of mysql-prepare-db-dir.sh - Solves: https://bugzilla.redhat.com/show_bug.cgi?id=1382988 --- mysql-prepare-db-dir.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-prepare-db-dir.sh b/mysql-prepare-db-dir.sh index 81a90e7..b47fa9b 100644 --- a/mysql-prepare-db-dir.sh +++ b/mysql-prepare-db-dir.sh @@ -20,7 +20,7 @@ ls_check_datadir () should_initialize () { case `ls_check_datadir "$1"` in - ""|lost+found) true ;; + ""|lost+found|*.err) true ;; *) false ;; esac } From 5958df69b3622a412f301bd1209f34a63fe024da Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 16 Nov 2016 14:35:20 +0100 Subject: [PATCH 08/11] fixed bug 1382988 - added comment to the test suite - test suite DISABLED for most builds in Koji, see comments --- mariadb.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index d82c73d..fd9c9b7 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -5,7 +5,12 @@ # 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 1} +# UPDATE: checks should be run regularly, but mostly NOT at build time, since they +# extends build time by hundreds percents and steal resources from Koji +# 1) tests can be run alone, with "mariadb-test-..." package +# 2) tests can be run in COPR +# 3) tests still should be run in Koji too every major release +%{!?runselftest:%global runselftest 0} # Set this to 1 to see which tests fail %global check_testsuite 0 @@ -123,7 +128,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A community developed branch of MySQL @@ -221,7 +226,6 @@ Requires: compat-openssl10 #BuildRequires: openssl-devel BuildRequires: krb5-devel - BuildRequires: selinux-policy-devel %{?with_init_systemd:BuildRequires: systemd systemd-devel} @@ -1309,6 +1313,11 @@ fi %endif %changelog +* 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 From e27677ac0e051a1cce4d14e07275be1c52cf3b66 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 16 Nov 2016 14:57:34 +0100 Subject: [PATCH 09/11] test suite ENABLED, consensus was made it still should be run every build --- mariadb.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index fd9c9b7..7ba2e45 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -5,12 +5,7 @@ # 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) -# UPDATE: checks should be run regularly, but mostly NOT at build time, since they -# extends build time by hundreds percents and steal resources from Koji -# 1) tests can be run alone, with "mariadb-test-..." package -# 2) tests can be run in COPR -# 3) tests still should be run in Koji too every major release -%{!?runselftest:%global runselftest 0} +%{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail %global check_testsuite 0 @@ -128,7 +123,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A community developed branch of MySQL @@ -1313,6 +1308,9 @@ fi %endif %changelog +* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-3 +- 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 From 14c6fb26f08d5cd1469e1695f9855b12510147e5 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 24 Nov 2016 10:08:22 +0100 Subject: [PATCH 10/11] JdbcMariaDB.jar test removed - PCRE version check added - Resolves: #1382988 - Related: #1396945 --- mariadb.spec | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 7ba2e45..8fdbd53 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -82,6 +82,7 @@ # 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 %else @@ -123,7 +124,7 @@ Name: mariadb Version: %{compatver}.%{bugfixver} -Release: 3%{?with_debug:.debug}%{?dist} +Release: 4%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A community developed branch of MySQL @@ -195,7 +196,7 @@ BuildRequires: multilib-rpm-config 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) = 8.38} +%{!?with_pcre:Provides: bundled(pcre) = %{pcre_version}} # Tests requires time and ps and some perl modules BuildRequires: procps BuildRequires: time @@ -211,14 +212,18 @@ BuildRequires: perl(Socket) 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 - # for running some openssl tests rhbz#1189180 - #BuildRequires: openssl - #BuildRequires: openssl-devel +%else +# for running some openssl tests rhbz#1189180 +BuildRequires: openssl +BuildRequires: openssl-devel +%endif + BuildRequires: krb5-devel BuildRequires: selinux-policy-devel @@ -526,7 +531,7 @@ MariaDB is a community developed branch of MySQL. %if %{with test} %package test -Summary: The test suite distributed with MariaD +Summary: The test suite distributed with MariaDB Group: Applications/Databases Requires: %{name}%{?_isa} = %{sameevr} Requires: %{name}-common%{?_isa} = %{sameevr} @@ -604,6 +609,20 @@ sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{nam cat selinux/%{name}-server-galera.te %endif +# Check if PCRE version is actual +%{!?with_pcre: +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" ] +then + echo "\n PCRE version is outdated. \n\tIncluded version:%{pcre_version} \n\tUpstream version: $pcre_maj.$pcre_min\n" + exit 1 +fi +} + + + %build # fail quickly and obviously if user tries to build as root @@ -853,6 +872,9 @@ rm -rf %{buildroot}%{_datadir}/%{pkg_name}/solaris/ # rename the wsrep README so it corresponds with the other README names mv Docs/README-wsrep Docs/README.wsrep +# 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 @@ -1308,7 +1330,13 @@ fi %endif %changelog -* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-3 +* Wed Nov 16 2016 Michal Schorm - 3:10.1.19-4 +- JdbcMariaDB.jar test removed +- PCRE version check added +- Resolves: #1382988 +- Related: #1396945 + +* 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 From 684ad9995ad45e071e5b6bb151cd140d1690bf37 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 28 Nov 2016 01:09:55 +0100 Subject: [PATCH 11/11] JdbcMariaDB.jar test removed - PCRE version check added - Resolves: #1382988 - Related: #1396945, #1096787 --- mariadb-ssl-cypher.patch | 21 +++++++++++++++++++++ mariadb.spec | 10 ++++++---- rh-skipped-tests-base.list | 9 ++++----- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 mariadb-ssl-cypher.patch diff --git a/mariadb-ssl-cypher.patch b/mariadb-ssl-cypher.patch new file mode 100644 index 0000000..a1a9dcf --- /dev/null +++ b/mariadb-ssl-cypher.patch @@ -0,0 +1,21 @@ +diff -up mariadb-10.1.19/mysql-test/r/ssl_8k_key.result.sslbak mariadb-10.1.19/mysql-test/r/ssl_8k_key.result +--- mariadb-10.1.19/mysql-test/r/ssl_8k_key.result.sslbak 2016-11-24 08:55:21.637000000 -0500 ++++ mariadb-10.1.19/mysql-test/r/ssl_8k_key.result 2016-11-24 08:55:55.853000000 -0500 +@@ -1,2 +1,2 @@ +-Variable_name Value +-Ssl_cipher DHE-RSA-AES256-SHA ++have_ssl ++1 +diff -up mariadb-10.1.19/mysql-test/t/ssl_8k_key.test.sslbak mariadb-10.1.19/mysql-test/t/ssl_8k_key.test +--- mariadb-10.1.19/mysql-test/t/ssl_8k_key.test.sslbak 2016-11-24 08:54:10.485000000 -0500 ++++ mariadb-10.1.19/mysql-test/t/ssl_8k_key.test 2016-11-24 08:54:35.724000000 -0500 +@@ -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! + diff --git a/mariadb.spec b/mariadb.spec index 8fdbd53..6c7416d 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -7,8 +7,8 @@ # --nocheck is not possible (e.g. in koji build) %{!?runselftest:%global runselftest 1} -# Set this to 1 to see which tests fail -%global check_testsuite 0 +# Set this to 1 to see which tests fail, but 0 on production ready build +%global ignore_testsuite_result 0 # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} @@ -169,6 +169,7 @@ Patch7: %{pkgnamepatch}-scripts.patch Patch8: %{pkgnamepatch}-install-db-sharedir.patch Patch9: %{pkgnamepatch}-ownsetup.patch Patch12: %{pkgnamepatch}-admincrash.patch +Patch13: %{pkgnamepatch}-ssl-cypher.patch # Patches specific for this mysql package Patch30: %{pkgnamepatch}-errno.patch @@ -573,6 +574,7 @@ MariaDB is a community developed branch of MySQL. %patch8 -p1 %patch9 -p1 %patch12 -p1 +%patch13 -p1 %patch30 -p1 %patch31 -p1 %patch32 -p1 @@ -966,7 +968,7 @@ export MTR_BUILD_THREAD=%{__isa_bits} --suite-timeout=720 --testcase-timeout=30 --skip-rpl \ --mysqld=--binlog-format=mixed --force-restart \ --shutdown-timeout=60 --max-test-fail=0 \ -%if %{check_testsuite} +%if %{ignore_testsuite_result} || : %else --skip-test-list=rh-skipped-tests.list @@ -1334,7 +1336,7 @@ fi - JdbcMariaDB.jar test removed - PCRE version check added - Resolves: #1382988 -- Related: #1396945 +- Related: #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 diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index 207dbff..1d161c2 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -1,13 +1,12 @@ # These tests fail with MariaDB 10: +main.userstat : rhbz#1096787 main.multi_update : rhbz#1096787 main.set_statement_notembedded_binlog : rhbz#1096787 -main.ssl_cert_verify : rhbz#1096787 -main.ssl_crl_clients : rhbz#1096787 main.ssl_7937 : rhbz#1096787 -main.ssl_8k_key : rhbz#1096787 -main.userstat : rhbz#1096787 +main.ssl_crl_clients : rhbz#1096787 +main.ssl_cert_verify : rhbz#1096787 perfschema.nesting : rhbz#1096787 perfschema.socket_summary_by_event_name_func : rhbz#1096787 perfschema.socket_summary_by_instance_func : rhbz#1096787 -sys_vars.wsrep_provider_options_basic : rhbz#1096787 +