Reformating spec and removing unnecessary snippets
This commit is contained in:
parent
8d19c178ae
commit
4bc1433e50
185
mariadb.spec
185
mariadb.spec
@ -1,6 +1,14 @@
|
|||||||
|
# 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}
|
||||||
|
|
||||||
# In f20+ use unversioned docdirs, otherwise the old versioned one
|
# In f20+ use unversioned docdirs, otherwise the old versioned one
|
||||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
|
# use Full RELRO for all binaries (RHBZ#1092548)
|
||||||
|
%global _hardened_build 1
|
||||||
|
|
||||||
# When there is already another package that ships /etc/my.cnf,
|
# When there is already another package that ships /etc/my.cnf,
|
||||||
# rather include it than ship the file again, since conflicts between
|
# rather include it than ship the file again, since conflicts between
|
||||||
# those files may create issues
|
# those files may create issues
|
||||||
@ -34,16 +42,10 @@
|
|||||||
%bcond_with pcre
|
%bcond_with pcre
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# use Full RELRO for all binaries (RHBZ#1092548)
|
|
||||||
%global _hardened_build 1
|
|
||||||
|
|
||||||
# The evr of mysql we want to obsolete
|
# The evr of mysql we want to obsolete
|
||||||
%global obsoleted_mysql_evr 5.6-0
|
%global obsoleted_mysql_evr 5.6-0
|
||||||
%global obsoleted_mysql_case_evr 5.5.30-5
|
%global obsoleted_mysql_case_evr 5.5.30-5
|
||||||
|
|
||||||
# Regression tests take a long time, you can skip 'em with this
|
|
||||||
%{!?runselftest:%global runselftest 1}
|
|
||||||
|
|
||||||
# When replacing mysql by mariadb these packages are not upated, but rather
|
# When replacing mysql by mariadb these packages are not upated, but rather
|
||||||
# installed and uninstalled. Thus we loose information about mysqld service
|
# installed and uninstalled. Thus we loose information about mysqld service
|
||||||
# enablement. To address this we use a file to store that information within
|
# enablement. To address this we use a file to store that information within
|
||||||
@ -55,7 +57,7 @@
|
|||||||
|
|
||||||
Name: mariadb
|
Name: mariadb
|
||||||
Version: 10.0.12
|
Version: 10.0.12
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
Summary: A community developed branch of MySQL
|
Summary: A community developed branch of MySQL
|
||||||
@ -106,22 +108,32 @@ Patch14: mariadb-ssltest.patch
|
|||||||
Patch15: mariadb-mysql_config.patch
|
Patch15: mariadb-mysql_config.patch
|
||||||
Patch16: mariadb-scripts.patch
|
Patch16: mariadb-scripts.patch
|
||||||
|
|
||||||
BuildRequires: perl, readline-devel, openssl-devel
|
BuildRequires: cmake
|
||||||
BuildRequires: cmake, ncurses-devel, zlib-devel, libaio-devel
|
BuildRequires: libaio-devel
|
||||||
BuildRequires: systemd, systemtap-sdt-devel
|
BuildRequires: readline-devel
|
||||||
# make test requires time and ps
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: time procps
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: perl
|
||||||
|
BuildRequires: systemtap-sdt-devel
|
||||||
|
BuildRequires: zlib-devel
|
||||||
# auth_pam.so plugin will be build if pam-devel is installed
|
# auth_pam.so plugin will be build if pam-devel is installed
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
%{?with_pcre:BuildRequires: pcre-devel >= 8.35}
|
%{?with_pcre:BuildRequires: pcre-devel >= 8.35}
|
||||||
# perl modules needed to run regression tests
|
# Tests requires time and ps and some perl modules
|
||||||
BuildRequires: perl(Socket), perl(Time::HiRes)
|
BuildRequires: procps
|
||||||
BuildRequires: perl(Data::Dumper), perl(Test::More), perl(Env)
|
BuildRequires: time
|
||||||
|
BuildRequires: perl(Env)
|
||||||
|
BuildRequires: perl(Data::Dumper)
|
||||||
|
BuildRequires: perl(Socket)
|
||||||
|
BuildRequires: perl(Test::More)
|
||||||
|
BuildRequires: perl(Time::HiRes)
|
||||||
|
BuildRequires: systemd
|
||||||
|
|
||||||
Requires: grep, fileutils, bash
|
Requires: bash
|
||||||
|
Requires: fileutils
|
||||||
|
Requires: grep
|
||||||
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
%{?systemd_requires: %systemd_requires}
|
|
||||||
|
|
||||||
# MySQL (with caps) is upstream's spelling of their own RPMs for mysql
|
# 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_case_evr:Obsoletes: MySQL < %{obsoleted_mysql_case_evr}}
|
||||||
@ -129,6 +141,8 @@ Conflicts: community-mysql
|
|||||||
# MariaDB replaces mysql packages
|
# MariaDB replaces mysql packages
|
||||||
Provides: mysql = %{epoch}:%{version}-%{release}
|
Provides: mysql = %{epoch}:%{version}-%{release}
|
||||||
Provides: mysql%{?_isa} = %{epoch}:%{version}-%{release}
|
Provides: mysql%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
Provides: mysql-compat-client = %{epoch}:%{version}-%{release}
|
||||||
|
Provides: mysql-compat-client%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
%{?obsoleted_mysql_evr:Obsoletes: mysql < %{obsoleted_mysql_evr}}
|
%{?obsoleted_mysql_evr:Obsoletes: mysql < %{obsoleted_mysql_evr}}
|
||||||
|
|
||||||
# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
|
# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
|
||||||
@ -152,6 +166,7 @@ It is a client/server implementation consisting of a server daemon (mysqld)
|
|||||||
and many different client programs and libraries. The base package
|
and many different client programs and libraries. The base package
|
||||||
contains the standard MariaDB/MySQL client programs and generic MySQL files.
|
contains the standard MariaDB/MySQL client programs and generic MySQL files.
|
||||||
|
|
||||||
|
|
||||||
%package libs
|
%package libs
|
||||||
|
|
||||||
Summary: The shared libraries required for MariaDB/MySQL clients
|
Summary: The shared libraries required for MariaDB/MySQL clients
|
||||||
@ -168,6 +183,7 @@ MariaDB/MySQL client program or interface. You will need to install this
|
|||||||
package to use any other MariaDB package or any clients that need to connect
|
package to use any other MariaDB package or any clients that need to connect
|
||||||
to a MariaDB/MySQL server. MariaDB is a community developed branch of MySQL.
|
to a MariaDB/MySQL server. MariaDB is a community developed branch of MySQL.
|
||||||
|
|
||||||
|
|
||||||
%package common
|
%package common
|
||||||
|
|
||||||
Summary: The shared files required by server and client
|
Summary: The shared files required by server and client
|
||||||
@ -180,6 +196,7 @@ Requires: %{_sysconfdir}/my.cnf
|
|||||||
The package provides the essential shared files for any MariaDB program.
|
The package provides the essential shared files for any MariaDB program.
|
||||||
You will need to install this package to use any other MariaDB package.
|
You will need to install this package to use any other MariaDB package.
|
||||||
|
|
||||||
|
|
||||||
%package errmsg
|
%package errmsg
|
||||||
|
|
||||||
Summary: The error messages files required by server and embedded
|
Summary: The error messages files required by server and embedded
|
||||||
@ -191,11 +208,14 @@ The package provides error messages files for the MariaDB daemon and the
|
|||||||
embedded server. You will need to install this package to use any of those
|
embedded server. You will need to install this package to use any of those
|
||||||
MariaDB packages.
|
MariaDB packages.
|
||||||
|
|
||||||
|
|
||||||
%package server
|
%package server
|
||||||
|
|
||||||
Summary: The MariaDB server and related files
|
Summary: The MariaDB server and related files
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
||||||
|
# note: no version here = %{version}-%{release}
|
||||||
|
Requires: mysql-compat-client%{?_isa}
|
||||||
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
Requires: %{name}-errmsg%{?_isa} = %{epoch}:%{version}-%{release}
|
Requires: %{name}-errmsg%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
Requires: sh-utils
|
Requires: sh-utils
|
||||||
@ -204,18 +224,18 @@ Requires(pre): /usr/sbin/useradd
|
|||||||
Requires: systemd
|
Requires: systemd
|
||||||
# Make sure it's there when scriptlets run, too
|
# Make sure it's there when scriptlets run, too
|
||||||
Requires(pre): systemd
|
Requires(pre): systemd
|
||||||
Requires(post): systemd
|
|
||||||
Requires(preun): systemd
|
|
||||||
Requires(postun): systemd
|
|
||||||
Requires(posttrans): systemd
|
Requires(posttrans): systemd
|
||||||
|
%{?systemd_requires: %systemd_requires}
|
||||||
# mysqlhotcopy needs DBI/DBD support
|
# mysqlhotcopy needs DBI/DBD support
|
||||||
Requires: perl-DBI, perl-DBD-MySQL
|
Requires: perl-DBI
|
||||||
|
Requires: perl-DBD-MySQL
|
||||||
Provides: mysql-server = %{epoch}:%{version}-%{release}
|
Provides: mysql-server = %{epoch}:%{version}-%{release}
|
||||||
Provides: mysql-server%{?_isa} = %{epoch}:%{version}-%{release}
|
Provides: mysql-server%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
Provides: mysql-compat-server = %{epoch}:%{version}-%{release}
|
Provides: mysql-compat-server = %{epoch}:%{version}-%{release}
|
||||||
Provides: mysql-compat-server%{?_isa} = %{epoch}:%{version}-%{release}
|
Provides: mysql-compat-server%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}}
|
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-server < %{obsoleted_mysql_case_evr}}
|
||||||
Conflicts: community-mysql-server
|
Conflicts: community-mysql-server
|
||||||
|
Conflicts: mariadb-galera-server
|
||||||
%{?obsoleted_mysql_evr:Obsoletes: mysql-server < %{obsoleted_mysql_evr}}
|
%{?obsoleted_mysql_evr:Obsoletes: mysql-server < %{obsoleted_mysql_evr}}
|
||||||
|
|
||||||
%description server
|
%description server
|
||||||
@ -225,6 +245,7 @@ and many different client programs and libraries. This package contains
|
|||||||
the MariaDB server and some accompanying files and directories.
|
the MariaDB server and some accompanying files and directories.
|
||||||
MariaDB is a community developed branch of MySQL.
|
MariaDB is a community developed branch of MySQL.
|
||||||
|
|
||||||
|
|
||||||
%if %{with oqgraph}
|
%if %{with oqgraph}
|
||||||
%package oqgraph
|
%package oqgraph
|
||||||
|
|
||||||
@ -232,7 +253,8 @@ Summary: The Open Query GRAPH engine for MariaDB
|
|||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release}
|
Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
# boost and Judy required for oograph
|
# boost and Judy required for oograph
|
||||||
BuildRequires: boost-devel, Judy-devel
|
BuildRequires: boost-devel
|
||||||
|
BuildRequires: Judy-devel
|
||||||
|
|
||||||
%description oqgraph
|
%description oqgraph
|
||||||
The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB
|
The package provides Open Query GRAPH engine (OQGRAPH) as plugin for MariaDB
|
||||||
@ -242,6 +264,7 @@ tree structures and friend-of-a-friend style searches can now be done using
|
|||||||
standard SQL syntax, and results joined onto other tables.
|
standard SQL syntax, and results joined onto other tables.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
|
|
||||||
Summary: Files for development of MariaDB/MySQL applications
|
Summary: Files for development of MariaDB/MySQL applications
|
||||||
@ -251,8 +274,8 @@ Requires: openssl-devel%{?_isa}
|
|||||||
Provides: mysql-devel = %{epoch}:%{version}-%{release}
|
Provides: mysql-devel = %{epoch}:%{version}-%{release}
|
||||||
Provides: mysql-devel%{?_isa} = %{epoch}:%{version}-%{release}
|
Provides: mysql-devel%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}}
|
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-devel < %{obsoleted_mysql_case_evr}}
|
||||||
Conflicts: community-mysql-devel
|
|
||||||
%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}}
|
%{?obsoleted_mysql_evr:Obsoletes: mysql-devel < %{obsoleted_mysql_evr}}
|
||||||
|
Conflicts: community-mysql-devel
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
MariaDB is a multi-user, multi-threaded SQL database server. This
|
MariaDB is a multi-user, multi-threaded SQL database server. This
|
||||||
@ -260,6 +283,7 @@ package contains the libraries and header files that are needed for
|
|||||||
developing MariaDB/MySQL client applications.
|
developing MariaDB/MySQL client applications.
|
||||||
MariaDB is a community developed branch of MySQL.
|
MariaDB is a community developed branch of MySQL.
|
||||||
|
|
||||||
|
|
||||||
%package embedded
|
%package embedded
|
||||||
|
|
||||||
Summary: MariaDB as an embeddable library
|
Summary: MariaDB as an embeddable library
|
||||||
@ -277,6 +301,7 @@ package contains a version of the MariaDB server that can be embedded
|
|||||||
into a client application instead of running as a separate process.
|
into a client application instead of running as a separate process.
|
||||||
MariaDB is a community developed branch of MySQL.
|
MariaDB is a community developed branch of MySQL.
|
||||||
|
|
||||||
|
|
||||||
%package embedded-devel
|
%package embedded-devel
|
||||||
|
|
||||||
Summary: Development files for MariaDB as an embeddable library
|
Summary: Development files for MariaDB as an embeddable library
|
||||||
@ -295,6 +320,7 @@ package contains files needed for developing and testing with
|
|||||||
the embedded version of the MariaDB server.
|
the embedded version of the MariaDB server.
|
||||||
MariaDB is a community developed branch of MySQL.
|
MariaDB is a community developed branch of MySQL.
|
||||||
|
|
||||||
|
|
||||||
%package bench
|
%package bench
|
||||||
|
|
||||||
Summary: MariaDB benchmark scripts and data
|
Summary: MariaDB benchmark scripts and data
|
||||||
@ -312,6 +338,7 @@ package contains benchmark scripts and data for use when benchmarking
|
|||||||
MariaDB.
|
MariaDB.
|
||||||
MariaDB is a community developed branch of MySQL.
|
MariaDB is a community developed branch of MySQL.
|
||||||
|
|
||||||
|
|
||||||
%package test
|
%package test
|
||||||
|
|
||||||
Summary: The test suite distributed with MariaD
|
Summary: The test suite distributed with MariaD
|
||||||
@ -324,8 +351,11 @@ Provides: mysql-test%{?_isa} = %{epoch}:%{version}-%{release}
|
|||||||
Conflicts: community-mysql-test
|
Conflicts: community-mysql-test
|
||||||
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}}
|
%{?obsoleted_mysql_case_evr:Obsoletes: MySQL-test < %{obsoleted_mysql_case_evr}}
|
||||||
%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}}
|
%{?obsoleted_mysql_evr:Obsoletes: mysql-test < %{obsoleted_mysql_evr}}
|
||||||
Requires: perl(Socket), perl(Time::HiRes)
|
Requires: perl(Env)
|
||||||
Requires: perl(Data::Dumper), perl(Test::More), perl(Env)
|
Requires: perl(Data::Dumper)
|
||||||
|
Requires: perl(Socket)
|
||||||
|
Requires: perl(Test::More)
|
||||||
|
Requires: perl(Time::HiRes)
|
||||||
|
|
||||||
%description test
|
%description test
|
||||||
MariaDB is a multi-user, multi-threaded SQL database server. This
|
MariaDB is a multi-user, multi-threaded SQL database server. This
|
||||||
@ -383,10 +413,10 @@ cp %{SOURCE2} %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \
|
|||||||
|
|
||||||
# fail quickly and obviously if user tries to build as root
|
# fail quickly and obviously if user tries to build as root
|
||||||
%if %runselftest
|
%if %runselftest
|
||||||
if [ x"`id -u`" = x0 ]; then
|
if [ x"$(id -u)" = "x0" ]; then
|
||||||
echo "mariadb's regression tests fail if run as root."
|
echo "mysql's regression tests fail if run as root."
|
||||||
echo "If you really need to build the RPM as root, use"
|
echo "If you really need to build the RPM as root, use"
|
||||||
echo "--define='runselftest 0' to skip the regression tests."
|
echo "--nocheck to skip the regression tests."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
@ -416,7 +446,6 @@ export LDFLAGS
|
|||||||
|
|
||||||
# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
|
# The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
|
||||||
# so we can't use %%{_datadir} and so forth here.
|
# so we can't use %%{_datadir} and so forth here.
|
||||||
|
|
||||||
cmake . -DBUILD_CONFIG=mysql_release \
|
cmake . -DBUILD_CONFIG=mysql_release \
|
||||||
-DFEATURE_SET="community" \
|
-DFEATURE_SET="community" \
|
||||||
-DINSTALL_LAYOUT=RPM \
|
-DINSTALL_LAYOUT=RPM \
|
||||||
@ -424,11 +453,11 @@ cmake . -DBUILD_CONFIG=mysql_release \
|
|||||||
-DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora%{fedora}}" \
|
-DRPM="%{?rhel:rhel%{rhel}}%{!?rhel:fedora%{fedora}}" \
|
||||||
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
|
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
|
||||||
%if 0%{?fedora} >= 20
|
%if 0%{?fedora} >= 20
|
||||||
-DINSTALL_DOCDIR=share/doc/%{name} \
|
-DINSTALL_DOCDIR="share/doc/%{name}" \
|
||||||
-DINSTALL_DOCREADMEDIR=share/doc/%{name} \
|
-DINSTALL_DOCREADMEDIR="share/doc/%{name}" \
|
||||||
%else
|
%else
|
||||||
-DINSTALL_DOCDIR=share/doc/%{name}-%{version} \
|
-DINSTALL_DOCDIR="share/doc/%{name}-%{version}" \
|
||||||
-DINSTALL_DOCREADMEDIR=share/doc/%{name}-%{version} \
|
-DINSTALL_DOCREADMEDIR="share/doc/%{name}-%{version}" \
|
||||||
%endif
|
%endif
|
||||||
-DINSTALL_INCLUDEDIR=include/mysql \
|
-DINSTALL_INCLUDEDIR=include/mysql \
|
||||||
-DINSTALL_INFODIR=share/info \
|
-DINSTALL_INFODIR=share/info \
|
||||||
@ -466,49 +495,9 @@ for e in innobase xtradb ; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
%check
|
|
||||||
%if %runselftest
|
|
||||||
# hack to let 32- and 64-bit tests run concurrently on same build machine
|
|
||||||
case `uname -m` in
|
|
||||||
ppc64 | ppc64p7 | s390x | x86_64 | sparc64 )
|
|
||||||
MTR_BUILD_THREAD=7
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
MTR_BUILD_THREAD=11
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
export MTR_BUILD_THREAD
|
|
||||||
export MTR_PARALLEL=1
|
|
||||||
|
|
||||||
make test VERBOSE=1
|
|
||||||
|
|
||||||
# The cmake build scripts don't provide any simple way to control the
|
|
||||||
# options for mysql-test-run, so ignore the make target and just call it
|
|
||||||
# manually. Nonstandard options chosen are:
|
|
||||||
# --force to continue tests after a failure
|
|
||||||
# no retries please
|
|
||||||
# test SSL with --ssl
|
|
||||||
# skip tests that are listed in rh-skipped-tests.list
|
|
||||||
# avoid redundant test runs with --binlog-format=mixed
|
|
||||||
# increase timeouts to prevent unwanted failures during mass rebuilds
|
|
||||||
(
|
|
||||||
cd mysql-test
|
|
||||||
perl ./mysql-test-run.pl --force --retry=0 --ssl \
|
|
||||||
--skip-test-list=rh-skipped-tests.list \
|
|
||||||
--suite-timeout=720 --testcase-timeout=30 \
|
|
||||||
--mysqld=--binlog-format=mixed --force-restart \
|
|
||||||
--shutdown-timeout=60 --max-test-fail=0
|
|
||||||
# cmake build scripts will install the var cruft if left alone :-(
|
|
||||||
rm -rf var
|
|
||||||
)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=%{buildroot} install
|
make DESTDIR=%{buildroot} install
|
||||||
|
|
||||||
# List the installed tree for RPM package maintenance purposes.
|
|
||||||
find %{buildroot} -print | sed "s|^%{buildroot}||" | sort > ROOTFILES
|
|
||||||
|
|
||||||
# cmake generates some completely wacko references to -lprobes_mysql when
|
# cmake generates some completely wacko references to -lprobes_mysql when
|
||||||
# building with dtrace support. Haven't found where to shut that off,
|
# building with dtrace support. Haven't found where to shut that off,
|
||||||
# so resort to this blunt instrument. While at it, let's not reference
|
# so resort to this blunt instrument. While at it, let's not reference
|
||||||
@ -518,7 +507,7 @@ sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' \
|
|||||||
cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
|
cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config
|
||||||
chmod 755 %{buildroot}%{_bindir}/mysql_config
|
chmod 755 %{buildroot}%{_bindir}/mysql_config
|
||||||
|
|
||||||
# multilib header hacks
|
# multilib header support
|
||||||
# we only apply this to known Red Hat multilib arches, per bug #181335
|
# we only apply this to known Red Hat multilib arches, per bug #181335
|
||||||
unamei=$(uname -i)
|
unamei=$(uname -i)
|
||||||
%ifarch %{arm}
|
%ifarch %{arm}
|
||||||
@ -549,16 +538,14 @@ ln -s %{_localstatedir}/log/%{name}/%{name}.log %{buildroot}%{_localstatedir}/lo
|
|||||||
# as well because users can have od settings in their /etc/my.cnf
|
# as well because users can have od settings in their /etc/my.cnf
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/run/mysqld
|
mkdir -p %{buildroot}%{_localstatedir}/run/mysqld
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
|
mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
|
||||||
install -m 0755 -d %{buildroot}%{_localstatedir}/lib/mysql
|
install -p -m 0755 -d %{buildroot}%{_localstatedir}/lib/mysql
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}
|
|
||||||
%if %{ship_my_cnf}
|
%if %{ship_my_cnf}
|
||||||
install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/
|
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# install systemd unit files and scripts for handling server startup
|
# install systemd unit files and scripts for handling server startup
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
install -D -p -m 644 scripts/mariadb.service %{buildroot}%{_unitdir}/%{name}.service
|
||||||
install -p -m 644 scripts/mariadb.service %{buildroot}%{_unitdir}/%{name}.service
|
|
||||||
%if %{?with_mysqld_unit}
|
%if %{?with_mysqld_unit}
|
||||||
install -p -m 644 scripts/mysqld.service %{buildroot}%{_unitdir}/mysqld.service
|
install -p -m 644 scripts/mysqld.service %{buildroot}%{_unitdir}/mysqld.service
|
||||||
%endif
|
%endif
|
||||||
@ -567,8 +554,7 @@ install -p -m 755 scripts/mariadb-wait-ready %{buildroot}%{_libexecdir}/mariadb-
|
|||||||
install -p -m 755 scripts/mariadb-check-socket %{buildroot}%{_libexecdir}/mariadb-check-socket
|
install -p -m 755 scripts/mariadb-check-socket %{buildroot}%{_libexecdir}/mariadb-check-socket
|
||||||
install -p -m 644 scripts/mariadb-scripts-common %{buildroot}%{_libexecdir}/mariadb-scripts-common
|
install -p -m 644 scripts/mariadb-scripts-common %{buildroot}%{_libexecdir}/mariadb-scripts-common
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
install -D -p -m 0644 scripts/mariadb.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||||
install -p -m 0644 scripts/mariadb.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
||||||
|
|
||||||
# Remove libmysqld.a
|
# Remove libmysqld.a
|
||||||
rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a
|
rm -f %{buildroot}%{_libdir}/mysql/libmysqld.a
|
||||||
@ -626,6 +612,35 @@ rm -f %{buildroot}%{_sysconfdir}/logrotate.d/mysql
|
|||||||
# remove solaris files
|
# remove solaris files
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/solaris/
|
rm -rf %{buildroot}%{_datadir}/%{name}/solaris/
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %runselftest
|
||||||
|
make test VERBOSE=1
|
||||||
|
# hack to let 32- and 64-bit tests run concurrently on same build machine
|
||||||
|
export MTR_PARALLEL=1
|
||||||
|
# builds might happen at the same host, avoid collision
|
||||||
|
export MTR_BUILD_THREAD=%{__isa_bits}
|
||||||
|
|
||||||
|
# The cmake build scripts don't provide any simple way to control the
|
||||||
|
# options for mysql-test-run, so ignore the make target and just call it
|
||||||
|
# manually. Nonstandard options chosen are:
|
||||||
|
# --force to continue tests after a failure
|
||||||
|
# no retries please
|
||||||
|
# test SSL with --ssl
|
||||||
|
# skip tests that are listed in rh-skipped-tests.list
|
||||||
|
# avoid redundant test runs with --binlog-format=mixed
|
||||||
|
# increase timeouts to prevent unwanted failures during mass rebuilds
|
||||||
|
(
|
||||||
|
cd mysql-test
|
||||||
|
perl ./mysql-test-run.pl --force --retry=0 --ssl \
|
||||||
|
--skip-test-list=rh-skipped-tests.list \
|
||||||
|
--suite-timeout=720 --testcase-timeout=30 \
|
||||||
|
--mysqld=--binlog-format=mixed --force-restart \
|
||||||
|
--shutdown-timeout=60 --max-test-fail=0
|
||||||
|
# cmake build scripts will install the var cruft if left alone :-(
|
||||||
|
rm -rf var
|
||||||
|
)
|
||||||
|
%endif
|
||||||
|
|
||||||
%pre server
|
%pre server
|
||||||
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
|
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
|
||||||
/usr/sbin/useradd -M -N -g mysql -o -r -d %{_localstatedir}/lib/mysql -s /sbin/nologin \
|
/usr/sbin/useradd -M -N -g mysql -o -r -d %{_localstatedir}/lib/mysql -s /sbin/nologin \
|
||||||
@ -866,8 +881,6 @@ fi
|
|||||||
%{_mandir}/man1/mysql_config.1*
|
%{_mandir}/man1/mysql_config.1*
|
||||||
|
|
||||||
%files embedded
|
%files embedded
|
||||||
%doc README COPYING COPYING.LESSER README.mysql-license
|
|
||||||
%doc storage/innobase/COPYING.Percona storage/innobase/COPYING.Google
|
|
||||||
%{_libdir}/mysql/libmysqld.so.*
|
%{_libdir}/mysql/libmysqld.so.*
|
||||||
|
|
||||||
%files embedded-devel
|
%files embedded-devel
|
||||||
@ -884,10 +897,12 @@ fi
|
|||||||
%{_bindir}/mysql_client_test
|
%{_bindir}/mysql_client_test
|
||||||
%{_bindir}/my_safe_process
|
%{_bindir}/my_safe_process
|
||||||
%attr(-,mysql,mysql) %{_datadir}/mysql-test
|
%attr(-,mysql,mysql) %{_datadir}/mysql-test
|
||||||
|
|
||||||
%{_mandir}/man1/mysql_client_test.1*
|
%{_mandir}/man1/mysql_client_test.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 21 2014 Honza Horak <hhorak@redhat.com> - 1:10.0.12-4
|
||||||
|
- Reformating spec and removing unnecessary snippets
|
||||||
|
|
||||||
* Tue Jul 15 2014 Honza Horak <hhorak@redhat.com> - 1:10.0.12-3
|
* Tue Jul 15 2014 Honza Horak <hhorak@redhat.com> - 1:10.0.12-3
|
||||||
- Enable OQGRAPH engine and package it as a sub-package
|
- Enable OQGRAPH engine and package it as a sub-package
|
||||||
- Add support for TokuDB engine for x86_64 (currently still disabled)
|
- Add support for TokuDB engine for x86_64 (currently still disabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user