From 3731874e5eafb1e30971ce6c3e77da710f2b67c3 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 27 Mar 2020 08:37:56 +0100 Subject: [PATCH 1/9] Add perl dependencies needed for tests --- mariadb.spec | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 2af4469..079ebd5 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -147,7 +147,7 @@ Name: mariadb Version: 10.4.12 -Release: 3%{?with_debug:.debug}%{?dist} +Release: 4%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -237,19 +237,39 @@ BuildRequires: python3 # Tests requires time and ps and some perl modules BuildRequires: procps BuildRequires: time +BuildRequires: perl(base) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(English) BuildRequires: perl(Env) +BuildRequires: perl(Errno) BuildRequires: perl(Exporter) BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(File::Temp) -BuildRequires: perl(Data::Dumper) BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IO::Select) +BuildRequires: perl(IO::Socket) +BuildRequires: perl(IO::Socket::INET) BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) BuildRequires: perl(Memoize) +BuildRequires: perl(POSIX) BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(Symbol) BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Term::ANSIColor) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) -BuildRequires: perl(Symbol) +BuildRequires: perl(Time::localtime) +BuildRequires: perl(warnings) # for running some openssl tests rhbz#1189180 BuildRequires: openssl openssl-devel @@ -1572,6 +1592,9 @@ fi %endif %changelog +* Thu Mar 26 2020 Jitka Plesnikova - 10.4.12-4 +- Add perl dependencies needed for tests + * Mon Mar 16 2020 Michal Schorm - 10.4.12-3 - Rebase mariadb-connector-c git submodule to commit fbf1db6 For fix: https://jira.mariadb.org/browse/CONC-441 From 333a690a999f61dc03f7affd326b579f5066d4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Thu, 2 Apr 2020 13:05:45 +0200 Subject: [PATCH 2/9] Fix string quoting for rpm >= 4.16 --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 079ebd5..eaea90a 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -39,7 +39,7 @@ # https://mariadb.com/kb/en/library/about-myrocks-for-mariadb/ # RocksDB engine is available only for x86_64 # RocksDB may be built with jemalloc, if specified in CMake -%if %_arch == x86_64 && 0%{?fedora} +%if "%_arch" == "x86_64" && 0%{?fedora} %bcond_without tokudb %bcond_without mroonga %bcond_without rocksdb From 6fa3c4c473a1fa621852a88f16a8d1420bc05f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Thu, 2 Apr 2020 13:32:14 +0200 Subject: [PATCH 3/9] Bump release --- mariadb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index eaea90a..b0dfbdf 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -147,7 +147,7 @@ Name: mariadb Version: 10.4.12 -Release: 4%{?with_debug:.debug}%{?dist} +Release: 5%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1592,6 +1592,9 @@ fi %endif %changelog +* Thu Apr 02 2020 Björn Esser - 3:10.4.12-5 +- Fix string quoting for rpm >= 4.16 + * Thu Mar 26 2020 Jitka Plesnikova - 10.4.12-4 - Add perl dependencies needed for tests From e0f70055394e9541b0100c85f8abed6d3c24623c Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Sun, 24 May 2020 10:48:58 +0200 Subject: [PATCH 4/9] Add mariadb_rpl.h to deleted libraries from devel package --- mariadb.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index b0dfbdf..17112d0 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -147,7 +147,7 @@ Name: mariadb Version: 10.4.12 -Release: 5%{?with_debug:.debug}%{?dist} +Release: 6%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1074,7 +1074,7 @@ unlink %{buildroot}%{_mandir}/man1/mariadb_config.1* # 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} +mariadb_ctype.h,mariadb_dyncol.h,mariadb_stmt.h,mariadb_version.h,ma_tls.h,mysqld_error.h,mysql.h,mariadb_rpl.h} rm -r %{buildroot}%{_includedir}/mysql/{mariadb,mysql} %endif @@ -1592,6 +1592,9 @@ fi %endif %changelog +* Sun May 24 2020 Lukas Javorsky - 3:10.4.12-6 +- Remove mariadb_rpl.h from includedir to prevent conflict with connector-c's libraries + * Thu Apr 02 2020 Björn Esser - 3:10.4.12-5 - Fix string quoting for rpm >= 4.16 From 383e14b547b8ae15a7ad2b67ee1a832ee258661e Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 8 Jun 2020 09:06:06 +0200 Subject: [PATCH 5/9] Rebase to 10.4.13 Patch mariadb-pythonver upstreamed (upstream now use only python 3) --- mariadb-ownsetup.patch | 16 +++++++++------- mariadb-pythonver.patch | 27 --------------------------- mariadb.spec | 23 ++++++++--------------- sources | 2 +- 4 files changed, 18 insertions(+), 50 deletions(-) delete mode 100644 mariadb-pythonver.patch diff --git a/mariadb-ownsetup.patch b/mariadb-ownsetup.patch index 23dcba8..3534c43 100644 --- a/mariadb-ownsetup.patch +++ b/mariadb-ownsetup.patch @@ -1,17 +1,19 @@ 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) +--- mariadb-10.2.32/support-files/CMakeLists.txt 2020-05-08 13:45:27.000000000 +0200 ++++ mariadb-10.2.32/support-files/CMakeLists.txt_pacthed 2020-05-13 10:11:30.884190396 +0200 +@@ -100,7 +100,8 @@ IF(UNIX) ENDIF() CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) +- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig COMPONENT Development) + CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) -diff -up mariadb-10.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 + +diff -up mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup mariadb-10.0.15/support-files/rpm/server.cnf +--- mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup 2015-01-24 23:55:55.110063592 +0100 ++++ mariadb-10.0.15/support-files/rpm/server.cnf 2015-01-24 23:57:42.308114387 +0100 @@ -9,7 +9,16 @@ [server] diff --git a/mariadb-pythonver.patch b/mariadb-pythonver.patch deleted file mode 100644 index eb8a1e7..0000000 --- a/mariadb-pythonver.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream PR: https://github.com/MariaDB/server/pull/1081 - -From d2cbf56d36e422802aa7e53ec0f4e6be8fd53cf5 Mon Sep 17 00:00:00 2001 -From: Honza Horak -Date: Wed, 9 Jan 2019 20:17:29 +0100 -Subject: [PATCH] Make the PYTHON_SHEBANG value configurable - -In Fedora 30 it is required to specify either /usr/bin/python2 or /usr/bin/python3 in the shebang, so we need a way to say explicit shebang, ideally in the cmake call. ---- - CMakeLists.txt | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a139c9e5fa4..ccccb08bef1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -342,7 +342,9 @@ MYSQL_CHECK_SSL() - MYSQL_CHECK_READLINE() - - SET(MALLOC_LIBRARY "system") --SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang") -+IF(NOT DEFINED PYTHON_SHEBANG) -+ SET(PYTHON_SHEBANG "/usr/bin/env python") -+ENDIF() - MARK_AS_ADVANCED(PYTHON_SHEBANG) - - CHECK_PCRE() diff --git a/mariadb.spec b/mariadb.spec index 17112d0..89468be 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -146,8 +146,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.4.12 -Release: 6%{?with_debug:.debug}%{?dist} +Version: 10.4.13 +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -180,8 +180,6 @@ Source71: LICENSE.clustercheck # https://jira.mariadb.org/browse/MDEV-12646 Source72: mariadb-server-galera.te -# Patch2: Make the python interpretter be configurable -Patch2: %{pkgnamepatch}-pythonver.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 @@ -697,7 +695,6 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; rm -rf libmariadb/unittest -%patch2 -p1 %patch4 -p1 %patch7 -p1 %patch9 -p1 @@ -939,16 +936,13 @@ rm scripts/my.cnf # 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 use systemd rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service # Remove the upstream version -rm %{buildroot}%{_tmpfilesdir}/tmpfiles.conf +rm %{buildroot}%{_tmpfilesdir}/mariadb.conf # Install downstream version install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf %if 0%{?mysqld_pid_dir:1} @@ -1026,7 +1020,7 @@ rm %{buildroot}%{logrotateddir}/mysql # Remove AppArmor files rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor -mv %{buildroot}/lib/security %{buildroot}%{_libdir} +mv %{buildroot}/%{_lib}/security %{buildroot}%{_libdir} # Disable plugins %if %{with gssapi} @@ -1101,11 +1095,7 @@ rm %{buildroot}%{_mandir}/man1/mysql{access,admin,binlog,check,dump,_find_rows,i rm %{buildroot}%{_mandir}/man1/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,waitpid}.1* %endif -%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 %{with tokudb} %if 0%{?fedora} || 0%{?rhel} > 7 # Move the upstream file to the correct location mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d @@ -1592,6 +1582,9 @@ fi %endif %changelog +* Fri Jun 05 2020 Michal Schorm - 10.4.13-1 +- Rebase to 10.4.13 + * Sun May 24 2020 Lukas Javorsky - 3:10.4.12-6 - Remove mariadb_rpl.h from includedir to prevent conflict with connector-c's libraries diff --git a/sources b/sources index 5a2560f..9743ec2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.4.12.tar.gz) = f26c45bbab765c979bbdb748da10ee314c1494e2ad7df7523bf4020b5f5036c06242739c1877fa0a21defcdd27f498cfff730289486ce9ced09d5740f3594657 +SHA512 (mariadb-10.4.13.tar.gz) = 68919ceffb3d4afdd0d94daa77439a954c82ce4e08fbe06044fc397940eeb88a39ec75932cbd08ff26ef3cf7636fdb779947cda5b2764aa1fd888be19c44b566 From 22a05804da5a37ed6da272d0ef2d31c1eac50258 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 8 Jun 2020 09:48:39 +0200 Subject: [PATCH 6/9] Remove ancient patch that wasn't used for ages The default MariaDB Galera replication is now DISABLED by default, because it needs to be configured prior enabling --- mariadb-galera.cnf.patch | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 mariadb-galera.cnf.patch diff --git a/mariadb-galera.cnf.patch b/mariadb-galera.cnf.patch deleted file mode 100644 index 095cdf4..0000000 --- a/mariadb-galera.cnf.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- mariadb-10.1.13/support-files/wsrep.cnf.sh.orig 2016-03-24 10:12:15.000000000 +0100 -+++ mariadb-10.1.13/support-files/wsrep.cnf.sh 2016-04-07 10:18:34.281155365 +0200 -@@ -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 - From 82422dc7ae581dd6906d9029652ebc36af4ea613 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 8 Jun 2020 09:52:33 +0200 Subject: [PATCH 7/9] Remove ancient patch that is no longer used All Python scripts are now written in Python 3 and their shebang is set by -DPYTHON_SHEBANG CMake option --- mariadb-shebang.patch | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 mariadb-shebang.patch diff --git a/mariadb-shebang.patch b/mariadb-shebang.patch deleted file mode 100644 index 4f0a267..0000000 --- a/mariadb-shebang.patch +++ /dev/null @@ -1,15 +0,0 @@ -*** WARNING: mangling shebang in /usr/bin/myrocks_hotbackup from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually! - -Maintainer's note: -This script is not python3 compatible: -ModuleNotFoundError: No module named 'commands' - -diff -Naurp mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py_patched ---- mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py 2019-01-04 16:28:50.000000000 +0100 -+++ mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py_patched 2019-01-08 12:00:54.468750863 +0100 -@@ -1,4 +1,4 @@ --#!@PYTHON_SHEBANG@ -+#!/usr/bin/python2 - - from __future__ import division - from optparse import OptionParser From 5df7c2e7c7920ca6372b787f712abc034e1d468a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 8 Jun 2020 09:58:21 +0200 Subject: [PATCH 8/9] The testsuite for 10.4.13 has been tested. There was one randomly failing test: "spider/bugfix.wait_timeout" --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 89468be..e3dd9ca 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -11,7 +11,7 @@ # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.4.12 +%global last_tested_version 10.4.13 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 From 99964e0b7fc6418e84229f76f0528103e5c593f9 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 8 Jun 2020 10:08:19 +0200 Subject: [PATCH 9/9] Minor tweaks - use %ifarch consistently through the SPECfile - update minimal PCRE version needed - reword %prep section (move all removals to one place) --- mariadb.spec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index e3dd9ca..dfb2794 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -39,7 +39,7 @@ # https://mariadb.com/kb/en/library/about-myrocks-for-mariadb/ # RocksDB engine is available only for x86_64 # RocksDB may be built with jemalloc, if specified in CMake -%if "%_arch" == "x86_64" && 0%{?fedora} +%ifarch x86_64 && 0%{?fedora} %bcond_without tokudb %bcond_without mroonga %bcond_without rocksdb @@ -98,8 +98,9 @@ -# MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use +# MariaDB 10.1.39 and later requires pcre >= 8.43, otherwise we need to use # the bundled library, since the package cannot be build with older version +# https://mariadb.com/kb/en/pcre/ %if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without unbundled_pcre %else @@ -223,7 +224,7 @@ 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_unbundled_pcre:BuildRequires: pcre-devel >= 8.35 pkgconf} +%{?with_unbundled_pcre:BuildRequires: pcre-devel >= 8.43 pkgconf} %{!?with_unbundled_pcre:Provides: bundled(pcre) = %{pcre_bundled_version}} # Few utilities needs Perl %if 0%{?fedora} || 0%{?rhel} > 7 @@ -692,8 +693,15 @@ sources. # Remove JAR files that upstream puts into tarball find . -name "*.jar" -type f -exec rm --verbose -f {} \; - +# Remove testsuite for the mariadb-connector-c rm -rf libmariadb/unittest +# Remove python scripts remains from tokudb upstream (those files are not used anyway) +rm -r storage/tokudb/mysql-test/tokudb/t/*.py +%if %{without rocksdb} +rm -r storage/rocksdb/ +%endif + + %patch4 -p1 %patch7 -p1 @@ -754,14 +762,6 @@ fi %endif -%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}