HOUSEKEEPING COMMIT - get to the same content as 'master' 4e9605

This commit is contained in:
Michal Schorm 2020-10-22 13:54:39 +02:00
parent 6fa4237c6e
commit 5fc6992062
10 changed files with 163 additions and 236 deletions

View File

@ -1,14 +0,0 @@
Based on this upstream commit:
https://github.com/MariaDB/server/commit/92d6c13206b199f24384ed2504ed479b0f59c314
--- mariadb-10.5.0/sql/CMakeLists.txt 2019-11-28 16:19:01.000000000 +0100
+++ mariadb-10.5.0/sql/CMakeLists.txt_patched 2020-01-22 00:52:28.858844312 +0100
@@ -277,7 +277,7 @@ IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS)
SET_TARGET_PROPERTIES(mysqld_import_lib PROPERTIES IMPORTED_LOCATION ${MYSQLD_LIB})
ENDIF()
-ADD_LIBRARY( sql_builtins ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc)
+ADD_LIBRARY(sql_builtins STATIC ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc)
TARGET_LINK_LIBRARIES(sql_builtins ${MYSQLD_STATIC_PLUGIN_LIBS})
MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)

View File

@ -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

View File

@ -1,17 +1,17 @@
diff -Naup mariadb-10.1.8/support-files/CMakeLists.txt mariadb-10.1.8/support-files/CMakeLists.txt_patched
--- mariadb-10.5.2/support-files/CMakeLists.txt 2020-03-25 11:13:19.000000000 +0100
+++ mariadb-10.5.2/support-files/CMakeLists.txt_patched 2020-04-01 01:29:52.140847301 +0200
@@ -91,6 +91,7 @@ IF(UNIX)
ENDIF()
--- mariadb-10.4.14/support-files/CMakeLists.txt 2020-08-06 17:28:28.000000000 +0200
+++ mariadb-10.4.14/support-files/CMakeLists.txt_patched 2020-09-03 13:21:07.826658279 +0200
@@ -187,6 +187,7 @@ IF(UNIX)
COMPONENT SharedLibraries)
INSTALL(FILES rpm/mysql-clients.cnf DESTINATION ${INSTALL_SYSCONF2DIR}
COMPONENT Client)
+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_SOURCE_DIR}/rpm/server.cnf @ONLY)
INSTALL(FILES rpm/server.cnf DESTINATION ${INSTALL_SYSCONF2DIR}
COMPONENT IniFiles)
INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR}
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)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/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]

View File

@ -1,19 +0,0 @@
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.5.2/support-files/CMakeLists.txt 2020-04-01 01:31:21.426832942 +0200
+++ mariadb-10.5.2/support-files/CMakeLists.txt_patched 2020-04-01 01:35:05.808309914 +0200
@@ -92,7 +92,11 @@ 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_LIBDIR}/pkgconfig COMPONENT Development)
+ENDIF()
INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)

View File

@ -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 <hhorak@redhat.com>
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()

View File

@ -1,10 +1,9 @@
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.
# Install libgcc as mylibgcc.a
--- mariadb-10.5.2/scripts/CMakeLists.txt 2020-03-25 11:13:17.000000000 +0100
+++ mariadb-10.5.2/scripts/CMakeLists.txt_patched 2020-04-01 01:26:59.398940396 +0200
@@ -377,6 +377,34 @@ 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()

View File

@ -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

View File

@ -1,3 +1,7 @@
# This is a fix for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
# So the beaviour will be the same also in F31 nad F32
%undefine __cmake_in_source_build
# Prefix that is used for patches
%global pkg_name %{name}
%global pkgnamepatch mariadb
@ -11,7 +15,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.5.1
%global last_tested_version 10.4.14
# Set to 1 to force run the testsuite even if it was already tested in current version
%global force_run_testsuite 0
@ -28,10 +32,9 @@
# TokuDB engine - DEPRECATED !
# TokuDB engine
# https://mariadb.com/kb/en/mariadb/tokudb/
# TokuDB engine is available only for x86_64
# The Percona upstream deprecated the SE. It is not part of MariaDB 10.5
# Mroonga engine
# https://mariadb.com/kb/en/mariadb/about-mroonga/
# Current version in MariaDB, 7.07, only supports the x86_64
@ -40,9 +43,9 @@
# 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}
# TokuDB is deprecated in MariaDB 10.5 and later
%bcond_with tokudb
%ifarch x86_64
%if 0%{?fedora}
%bcond_without tokudb
%bcond_without mroonga
%bcond_without rocksdb
%else
@ -50,6 +53,7 @@
%bcond_with mroonga
%bcond_with rocksdb
%endif
%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
@ -100,13 +104,14 @@
# MariaDB 10.0 and later requires pcre >= 10.34, 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
%bcond_with unbundled_pcre
%global pcre_bundled_version 10.34
%global pcre_bundled_version 8.44
%endif
# Use main python interpretter version
@ -138,18 +143,16 @@
# Provide mysql names for compatibility
%if 0%{?fedora}
%bcond_without mysql_names
%bcond_without conflicts
%else
%bcond_with mysql_names
%bcond_with conflicts
%endif
# Make long macros shorter
%global sameevr %{epoch}:%{version}-%{release}
Name: mariadb
Version: 10.5.2
Release: 1%{?with_debug:.debug}%{?dist}
Version: 10.4.14
Release: 3%{?with_debug:.debug}%{?dist}
Epoch: 3
Summary: A very fast and robust SQL database server
@ -182,8 +185,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
@ -193,8 +194,6 @@ Patch7: %{pkgnamepatch}-scripts.patch
Patch9: %{pkgnamepatch}-ownsetup.patch
# Patch10: Fix cipher name in the SSL Cipher name test
Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch
# Patch11: Use PCDIR CMake option, if configured
Patch11: %{pkgnamepatch}-pcdir.patch
# Patch13: Fix Spider code on armv7hl; https://jira.mariadb.org/browse/MDEV-18737
Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch
# Patch15: Add option to edit groonga's and groonga-normalizer-mysql install path
@ -226,9 +225,9 @@ 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 pcre2 or provide bundles(pcre2)
%{?with_unbundled_pcre:BuildRequires: pcre2-devel >= 10.34 pkgconf}
%{!?with_unbundled_pcre:Provides: bundled(pcre2) = %{pcre_bundled_version}}
# use either new enough version of pcre or provide bundles(pcre)
%{?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
BuildRequires: perl-interpreter
@ -300,11 +299,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
%{?with_conflicts:Conflicts: community-mysql}
Conflicts: community-mysql
# Filtering: https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/
%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::)
%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::|wsrep)
%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/%{pkg_name}/plugin/.*\\.so)$
# Define license macro if not present
@ -458,7 +456,7 @@ Provides: mysql-server%{?_isa} = %{sameevr}
Provides: mysql-compat-server = %{sameevr}
Provides: mysql-compat-server%{?_isa} = %{sameevr}
%endif
%{?with_conflicts:Conflicts: community-mysql-server}
Conflicts: community-mysql-server
# Bench subpackage has been deprecated in F32
Obsoletes: %{name}-bench <= %{sameevr}
@ -586,6 +584,7 @@ Requires: %{name}-server%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql-perl = %{sameevr}
%endif
Conflicts: community-mysql-server
# mysqlhotcopy needs DBI/DBD support
Requires: perl(DBI) perl(DBD::mysql)
@ -607,7 +606,7 @@ Requires: mariadb-connector-c-devel >= 3.0
Provides: mysql-devel = %{sameevr}
Provides: mysql-devel%{?_isa} = %{sameevr}
%endif
%{?with_conflicts:Conflicts: community-mysql-devel}
Conflicts: community-mysql-devel
%description devel
MariaDB is a multi-user, multi-threaded SQL database server.
@ -650,7 +649,7 @@ Requires: libaio-devel
Provides: mysql-embedded-devel = %{sameevr}
Provides: mysql-embedded-devel%{?_isa} = %{sameevr}
%endif
%{?with_conflicts:Conflicts: community-mysql-embedded-devel}
Conflicts: community-mysql-embedded-devel
%description embedded-devel
MariaDB is a multi-user, multi-threaded SQL database server.
@ -677,7 +676,7 @@ Requires: perl(Socket)
Requires: perl(Sys::Hostname)
Requires: perl(Test::More)
Requires: perl(Time::HiRes)
%{?with_conflicts:Conflicts: community-mysql-test}
Conflicts: community-mysql-test
%if %{with mysql_names}
Provides: mysql-test = %{sameevr}
Provides: mysql-test%{?_isa} = %{sameevr}
@ -696,16 +695,21 @@ 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
%patch2 -p1
%patch4 -p1
%patch7 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
#%patch13 -p1
%patch13 -p1
%patch15 -p1
%patch16 -p1
@ -739,34 +743,32 @@ sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{nam
# Get version of PCRE, that upstream use
pcre_version=`grep -e "ftp.pcre.org/pub/pcre/pcre2" cmake/pcre.cmake | sed -r "s;[^0123456789]*2-([[:digit:]]+\.[[:digit:]]+)\.[^0123456789]*;\1;"`
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/'`
# Check if the PCRE version in macro 'pcre_bundled_version', used in Provides: bundled(...), is the same version as upstream actually bundles
%if %{without unbundled_pcre}
if [ %{pcre_bundled_version} != "$pcre_version" ] ; then
echo "\n Error: Bundled PCRE version is not correct. \n\tBundled version number:%{pcre_bundled_version} \n\tUpstream version number: $pcre_version\n"
# 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 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/libpcre2-*.pc --modversion 2>/dev/null | head -n 1`
if [ "$pcre_system_version" != "$pcre_version" ] ; then
echo "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number:$pcre_system_version \n\tUpstream version number: $pcre_version\n"
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
%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}
# This package has static probe points which do not currently
# work with LTO and result in undefined symbols at link time.
# This is being worked on in upstream GCC
%define _lto_cflags %{nil}
# fail quickly and obviously if user tries to build as root
%if %runselftest
@ -778,38 +780,6 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py
fi
%endif
CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
# force PIC mode so that we can build libmysqld.so
CFLAGS="$CFLAGS -fPIC"
%if %{with debug}
# Override all optimization flags when making a debug build
# -D_FORTIFY_SOURCE requires optimizations enabled. Disable the fortify.
CFLAGS=`echo "$CFLAGS" | sed -r 's/-D_FORTIFY_SOURCE=[012]/-D_FORTIFY_SOURCE=0/'`
CFLAGS=`echo "$CFLAGS" | sed -r 's/-O[0123]//'`
CFLAGS="$CFLAGS -O0 -g -D_FORTIFY_SOURCE=0"
# Fixes for Fedora 32 & Rawhide (GCC 10.0):
%if 0%{?fedora} >= 32
CFLAGS="$CFLAGS -Wno-error=class-memaccess"
%endif # f32
%endif # debug
CXXFLAGS="$CFLAGS"
CPPFLAGS="$CFLAGS"
# CFLAGS specific "-Wno-error"
%if %{with debug}
%if 0%{?fedora} >= 32
CFLAGS="$CFLAGS -Wno-error=enum-conversion"
%endif # f32
%endif # debug
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.
%cmake . \
@ -874,12 +844,35 @@ export CFLAGS CXXFLAGS CPPFLAGS
-DCONNECT_WITH_JDBC=OFF \
%{?with_debug: -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON -DWITH_VALGRIND=ON}
# Print all Cmake options values
# cmake ./ -LAH for List Advanced Help
cmake ./ -L
%make_build VERBOSE=1
CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
# force PIC mode so that we can build libmysqld.so
CFLAGS="$CFLAGS -fPIC"
%if %{with debug}
# Override all optimization flags when making a debug build
# -D_FORTIFY_SOURCE requires optimizations enabled. Disable the fortify.
CFLAGS=`echo "$CFLAGS" | sed -r 's/-D_FORTIFY_SOURCE=[012]/-D_FORTIFY_SOURCE=0/'`
CFLAGS=`echo "$CFLAGS" | sed -r 's/-O[0123]//'`
CFLAGS="$CFLAGS -O0 -g -D_FORTIFY_SOURCE=0"
# Fixes for Fedora 32 & Rawhide (GCC 10.0):
%if 0%{?fedora} >= 32
CFLAGS="$CFLAGS -Wno-error=class-memaccess"
CFLAGS="$CFLAGS -Wno-error=enum-conversion"
%endif # f32
%endif # debug
CXXFLAGS="$CFLAGS"
CPPFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS CPPFLAGS
# Print all Cmake options values; "-LAH" means "List Advanced Help"
cmake -B %{_vpath_builddir} -LAH
%cmake_build
# build selinux policy
%if %{with galera}
@ -887,8 +880,10 @@ pushd selinux
make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp
%endif
%install
%make_install
%cmake_install
# multilib header support #1625157
for header in mysql/server/my_config.h mysql/server/private/config.h; do
@ -902,7 +897,7 @@ ln -s mysql_config.1.gz %{buildroot}%{_mandir}/man1/mariadb_config.1.gz
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
install -p -m 0755 %{_vpath_builddir}/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
@ -914,8 +909,8 @@ rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc
# 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}/%{pkg_name}/
install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/%{pkg_name}/
install -p -m 644 %{_vpath_builddir}/Docs/INFO_SRC %{buildroot}%{_libdir}/%{pkg_name}/
install -p -m 644 %{_vpath_builddir}/Docs/INFO_BIN %{buildroot}%{_libdir}/%{pkg_name}/
rm -r %{buildroot}%{_datadir}/doc/%{_pkgdocdirname}/MariaDB-server-%{version}/
# Logfile creation
@ -930,9 +925,9 @@ mkdir -p %{buildroot}%{pidfiledir}
install -p -m 0755 -d %{buildroot}%{dbdatadir}
%if %{with config}
install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
install -D -p -m 0644 %{_vpath_builddir}/scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
%else
rm scripts/my.cnf
rm %{_vpath_builddir}/scripts/my.cnf
%endif
# use different config file name for each variant of server (mariadb / mysql)
@ -941,19 +936,21 @@ mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.
# 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
# Install downstream version of tmpfiles
install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -D -p -m 644 %{_vpath_builddir}/scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service
install -D -p -m 644 %{_vpath_builddir}/scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service
# Remove the upstream version
rm %{buildroot}%{_tmpfilesdir}/mariadb.conf
# Install downstream version
install -D -p -m 0644 %{_vpath_builddir}/scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf
%if 0%{?mysqld_pid_dir:1}
echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf
%endif
# 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-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 -p -m 755 %{_vpath_builddir}/scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir
install -p -m 755 %{_vpath_builddir}/scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket
install -p -m 755 %{_vpath_builddir}/scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade
install -p -m 644 %{_vpath_builddir}/scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common
# install aditional galera selinux policy
%if %{with galera}
@ -992,10 +989,6 @@ rm %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server
# Binary for monitoring MySQL performance
# Shipped as a standalone package in Fedora
rm %{buildroot}%{_bindir}/mytop
rm %{buildroot}%{_mandir}/man1/mytop.1*
# Should be shipped with mariadb-connector-c
rm %{buildroot}%{_mandir}/man1/mariadb-config.1*
# put logrotate script where it needs to be
mkdir -p %{buildroot}%{logrotateddir}
@ -1011,25 +1004,20 @@ install -p -m 0644 %{SOURCE71} %{basename:%{SOURCE71}}
# install galera config file
%if %{with galera}
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
sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' %{_vpath_builddir}/support-files/wsrep.cnf
install -p -m 0644 %{_vpath_builddir}/support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf
%endif
# install the clustercheck script
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck
install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck
install -p -m 0755 %{_vpath_builddir}/scripts/clustercheck %{buildroot}%{_bindir}/clustercheck
# remove duplicate logrotate script
rm %{buildroot}%{logrotateddir}/mysql
# Remove AppArmor files
rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor
# Buildroot does not have symlink /lib64 --> /usr/lib64
%if %{__isa_bits} == 64 && 0%{?fedora}
mv %{buildroot}/lib64/security %{buildroot}%{_libdir}
%else
mv %{buildroot}/lib/security %{buildroot}%{_libdir}
%endif
mv %{buildroot}/%{_lib}/security %{buildroot}%{_libdir}
# Disable plugins
%if %{with gssapi}
@ -1077,7 +1065,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
@ -1140,6 +1128,8 @@ rm %{buildroot}%{_bindir}/{mariadb-client-test,mariadb-test}
rm %{buildroot}%{_mandir}/man1/{mysql_client_test,mysqltest,my_safe_process}.1*
rm %{buildroot}%{_mandir}/man1/{mariadb-client-test,mariadb-test}.1*
rm %{buildroot}%{_mandir}/man1/{mysql-test-run,mysql-stress-test}.pl.1*
rm %{buildroot}/suite/plugins/pam/mariadb_mtr
rm %{buildroot}/suite/plugins/pam/pam_mariadb_mtr.so
%endif
%if %{without galera}
@ -1152,7 +1142,6 @@ rm %{buildroot}%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf
%if %{without rocksdb}
rm %{buildroot}%{_mandir}/man1/{mysql_,mariadb-}ldb.1*
rm %{buildroot}%{_mandir}/man1/myrocks_hotbackup.1*
%endif
%check
@ -1181,7 +1170,7 @@ export MTR_BUILD_THREAD=%{__isa_bits}
(
set -ex
cd mysql-test
cd %{buildroot}%{_datadir}/mysql-test
export common_testsuite_arguments=" --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --force-restart --shutdown-timeout=60 --max-test-fail=5 "
@ -1352,11 +1341,10 @@ fi
%{_bindir}/myisampack
%{_bindir}/my_print_defaults
%{_bindir}/mariadb-conv
%{_bindir}/mysql_{install_db,secure_installation,tzinfo_to_sql}
%{_bindir}/mariadb-{install-db,secure-installation,tzinfo-to-sql}
%{_bindir}/{mysqld_,mariadbd-}safe
%{_bindir}/{mysqld_safe_helper,mariadbd-safe-helper}
%{_bindir}/innochecksum
%{_bindir}/replace
@ -1405,11 +1393,10 @@ fi
%{_mandir}/man1/myisam_ftdump.1*
%{_mandir}/man1/my_print_defaults.1*
%{_mandir}/man1/mariadb-conv.1*
%{_mandir}/man1/mysql_{install_db,secure_installation,tzinfo_to_sql}.1*
%{_mandir}/man1/mariadb-{install-db,secure-installation,tzinfo-to-sql}.1*
%{_mandir}/man1/{mysqld_,mariadbd-}safe.1*
%{_mandir}/man1/{mysqld_safe_helper,mariadbd-safe-helper}.1*
%{_mandir}/man1/innochecksum.1*
%{_mandir}/man1/replace.1*
@ -1496,7 +1483,6 @@ fi
%{_bindir}/sst_dump
%{_libdir}/%{pkg_name}/plugin/ha_rocksdb.so
%{_mandir}/man1/{mysql_,mariadb-}ldb.1*
%{_mandir}/man1/myrocks_hotbackup.1*
%endif
%if %{with tokudb}
@ -1547,9 +1533,6 @@ fi
%{_bindir}/perror
%{_mandir}/man1/{mysql_,mariadb-}upgrade.1*
%{_mandir}/man1/perror.1*
# Other utilities
%{_bindir}/{mysqld_safe_helper,mariadbd-safe-helper}
%{_mandir}/man1/{mysqld_safe_helper,mariadbd-safe-helper}.1*
%if %{with devel}
%files devel
@ -1597,15 +1580,46 @@ fi
%endif
%changelog
* Thu Apr 09 2020 Michal Schorm <mschorm@redhat.com> - 10.5.2-1
- Test rebase to 10.5.2 - Beta
- TokuDB SE has been deprecated
* Sun Sep 06 2020 Michal Schorm <mschorm@redhat.com> - 10.4.14-3
- Resolves: #1851605
* Thu Apr 09 2020 Michal Schorm <mschorm@redhat.com> - 10.5.1-1
- Test rebase to 10.5.1 - Beta
* Thu Sep 03 2020 Michal Schorm <mschorm@redhat.com> - 10.4.14-2
- Resolves: #1873999, #1874446
* Thu Apr 09 2020 Michal Schorm <mschorm@redhat.com> - 10.5.0-1
- Test rebase to 10.5.0 - Alpha
* Thu Aug 20 2020 Michal Schorm <mschorm@redhat.com> - 10.4.14-1
- Rebase to 10.4.14
* Tue Aug 18 2020 Michal Schorm <mschorm@redhat.com> - 10.4.13-7
- Do CMake out-of-source builds
- Force the CMake change regarding the in-source builds also to F31 and F32
- Use CMake macros instead of cmake & make direct commands
- %%cmake macro covers the %%{set_build_flags}, so they are not needed
Other changes to compile flags must be specified *after* the %%cmake macro
* Wed Aug 05 2020 Jeff Law <law@redhat.com> - 3:10.4.13-6
- Disable LTO
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3:10.4.13-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3:10.4.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Michal Schorm <mschorm@redhat.com> - 10.4.13-3
- Make conflicts between corresponding mariadb and mysql packages explicit
- Get rid of the Conflicts macro, it was intended to mark conflicts with
*upstream* packages
* Fri Jun 05 2020 Michal Schorm <mschorm@redhat.com> - 10.4.13-2
- Extend Perl "Requires" filtering to wsrep
Resolves: #1845376
* Fri Jun 05 2020 Michal Schorm <mschorm@redhat.com> - 10.4.13-1
- Rebase to 10.4.13
* Sun May 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 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 <besser82@fedoraproject.org> - 3:10.4.12-5
- Fix string quoting for rpm >= 4.16

View File

@ -38,5 +38,6 @@ sys_vars.tcp_nodelay :
# Fails on i686
encryption.innodb-redo-badkey :
# Fails since 10.5.2
main.mysqld--help2 :
# Fails on all architectures since 10.4.14
main.ssl_system_ca :
disks.disks :

View File

@ -1 +1 @@
SHA512 (mariadb-10.5.2.tar.gz) = 7abfc4a5543c35ab49ca164a998ed4b31326cb63f57b15449a5de3b62523d99535f378c8a39835f1e8563cf0cea7fd96b13e4f089cbd1546b5e25256c5f9832f
SHA512 (mariadb-10.4.14.tar.gz) = c09817c1dd7962132bcf2886c97ad17ce43c00ee687724028e5f39f6a6a93877ae8695c2c795abba6a4f3bc40674f93a53d6d43f46788a4a8a42c4a65a22c91c