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