2010-05-05 23:42:29 +02:00
|
|
|
#
|
2011-08-17 09:42:39 +02:00
|
|
|
# spec file for package mariadb
|
2010-05-05 23:42:29 +02:00
|
|
|
#
|
2011-08-17 09:42:39 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2010-05-05 23:42:29 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
# Few definitions which will alter build
|
|
|
|
%define prefered 0
|
|
|
|
%define cluster 0
|
2011-01-11 12:12:56 +01:00
|
|
|
%define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb
|
2010-05-05 23:42:29 +02:00
|
|
|
|
|
|
|
%if %{?rel:0}%{!?rel:1}
|
|
|
|
%define rel 1
|
|
|
|
%endif
|
|
|
|
#Distribution: %dist
|
|
|
|
#Packager: %packager
|
|
|
|
#Vendor: %vendor
|
|
|
|
|
2011-03-14 16:49:42 +01:00
|
|
|
Name: mariadb
|
2010-05-05 23:42:29 +02:00
|
|
|
Summary: A True Multiuser, Multithreaded SQL Database Server
|
2011-10-03 14:02:00 +02:00
|
|
|
Version: 5.2.9
|
2011-08-17 09:42:39 +02:00
|
|
|
Release: 1
|
2011-05-16 11:42:12 +02:00
|
|
|
%define srv_vers 5.1.57
|
2010-05-05 23:42:29 +02:00
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Group: Productivity/Databases/Servers
|
|
|
|
Url: http://www.mysql.com
|
2011-01-11 12:12:56 +01:00
|
|
|
# http://askmonty.org/downloads/r/http://ftp.rediris.es/mirror/MariaDB/mariadb-5.1.47/kvm-tarbake-jaunty-x86/%{name}-%{version}.tar.gz
|
|
|
|
Source: mariadb-%{version}.tar.bz2
|
2010-05-05 23:42:29 +02:00
|
|
|
Source2: baselibs.conf
|
|
|
|
Source3: README.debug
|
|
|
|
Source4: suse-test-run
|
|
|
|
Source5: mysql.SuSEfirewall2
|
|
|
|
Source7: rc.mysql-multi
|
|
|
|
Source8: README.SuSE
|
2011-01-11 12:12:56 +01:00
|
|
|
Source9: mysql-patches.tar.bz2
|
|
|
|
Source10: build.inc
|
|
|
|
Source11: install.inc
|
|
|
|
Source12: series
|
2010-05-05 23:42:29 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
PreReq: pwdutils
|
|
|
|
PreReq: coreutils sed grep
|
|
|
|
PreReq: %install_info_prereq %insserv_prereq
|
|
|
|
%endif
|
|
|
|
BuildRequires: gcc-c++ ncurses-devel openssl-devel procps readline-devel zlib-devel
|
|
|
|
%if 0%{?suse_version}
|
2011-08-17 09:42:39 +02:00
|
|
|
BuildRequires: libevent-devel pwdutils tcpd-devel
|
2010-05-05 23:42:29 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1030 || 0%{?fedora_version} > 8
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
2011-01-11 12:12:56 +01:00
|
|
|
%if 0%{?fedora_version} > 11
|
|
|
|
BuildRequires: sqlite
|
|
|
|
%endif
|
2010-05-05 23:42:29 +02:00
|
|
|
%if 0%{?suse_version} > 1030
|
|
|
|
Recommends: logrotate
|
|
|
|
%else
|
|
|
|
Requires: logrotate
|
|
|
|
%endif
|
|
|
|
# required by rcmysql
|
|
|
|
Requires: %{name}-client perl-base
|
|
|
|
Provides: mysql-Max = %{srv_vers}
|
|
|
|
Provides: mysql = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql)
|
2011-07-26 16:30:07 +02:00
|
|
|
Patch1: mariadb-strict-aliasing.patch
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%description
|
|
|
|
MariaDB is a backward compatible, drop-in replacement branch of the MySQL
|
|
|
|
Database Server. It includes all major open source storage engines, including
|
|
|
|
the Maria storage engine.
|
|
|
|
|
|
|
|
This package only contains the server-side programs.
|
|
|
|
|
|
|
|
%if ! 0%{?prefered} > 0
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-03-14 16:49:42 +01:00
|
|
|
%package -n libmariadbclient16
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
Summary: MariaDB Shared Libraries
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
2011-03-14 16:49:42 +01:00
|
|
|
%description -n libmariadbclient16
|
2010-05-05 23:42:29 +02:00
|
|
|
This package contains the shared libraries (.so) which certain
|
|
|
|
languages and applications need to dynamically load and use MariaDB.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-03-14 16:49:42 +01:00
|
|
|
%package -n libmariadbclient_r16
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
Summary: MariaDB Shared Libraries
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
2011-03-14 16:49:42 +01:00
|
|
|
%description -n libmariadbclient_r16
|
2010-05-05 23:42:29 +02:00
|
|
|
This package contains the shared libraries (.so) which certain
|
|
|
|
languages and applications need to dynamically load and use MariaDB.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%if 0%{?prefered} > 0
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%package -n libmysqlclient-devel
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# mysql-devel was last used in openSUSE 10.2
|
|
|
|
Provides: mysql-devel = %srv_vers-%release
|
2011-07-27 13:56:09 +02:00
|
|
|
Requires: libmysqlclient16 = %{version} libmysqlclient_r16 = %{version} glibc-devel zlib-devel openssl-devel
|
2010-05-05 23:42:29 +02:00
|
|
|
Summary: MariaDB Development Header Files and Libraries
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libmysqlclient-devel
|
|
|
|
This package contains the development header files and libraries
|
|
|
|
necessary to develop MariaDB client applications.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package -n libmysqld0
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB embedded server development files
|
|
|
|
# the headers files are the shared
|
2011-07-27 13:56:09 +02:00
|
|
|
Requires: libmysqlclient-devel = %{version}
|
2010-05-05 23:42:29 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libmysqld0
|
|
|
|
This package contains the development header files and libraries
|
|
|
|
for developing application that embed the MariaDB server
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package -n libmysqld-devel
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB embedded server development files
|
|
|
|
# the headers files are the shared
|
2011-07-27 13:56:09 +02:00
|
|
|
Requires: libmysqlclient-devel = %{version}
|
|
|
|
Requires: libmysqld0 = %{version}
|
2010-05-05 23:42:29 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
|
|
|
%description -n libmysqld-devel
|
|
|
|
This package contains the development header files and libraries
|
|
|
|
for developing application that embed the MariaDB server
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package -n libmysqlclient16
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
Summary: MariaDB Shared Libraries
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
|
|
|
%description -n libmysqlclient16
|
|
|
|
This package contains the shared libraries (.so) which certain
|
|
|
|
languages and applications need to dynamically load and use MariaDB.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package -n libmysqlclient_r16
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
Summary: MariaDB Shared Libraries
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
|
|
|
%description -n libmysqlclient_r16
|
|
|
|
This package contains the shared libraries (.so) which certain
|
|
|
|
languages and applications need to dynamically load and use MariaDB.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%package client
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB Client
|
|
|
|
Group: Productivity/Databases/Clients
|
|
|
|
Provides: mysql-client = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-client)
|
|
|
|
|
|
|
|
%description client
|
|
|
|
This package contains the standard MariaDB clients.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package bench
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
Requires: %{name}-client perl-DBD-mysql
|
|
|
|
License: LGPLv2.1
|
|
|
|
Summary: MariaDB - Benchmarks
|
|
|
|
Group: Productivity/Databases/Tools
|
|
|
|
Provides: mysql-bench = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-bench)
|
|
|
|
|
|
|
|
%description bench
|
|
|
|
This package contains MariaDB benchmark scripts and data.
|
|
|
|
|
|
|
|
To run these database benchmarks, start the script "run-all-tests" in
|
|
|
|
the directory /usr/share/sql-bench after starting MariaDB.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-01-11 12:12:56 +01:00
|
|
|
%if %{defined mdkversion}
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%package debuging
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%else
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%package debug
|
2011-01-11 12:12:56 +01:00
|
|
|
%endif
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB server with debug options turned on
|
|
|
|
Group: Productivity/Databases/Servers
|
2011-07-27 13:56:09 +02:00
|
|
|
Requires: %{name} = %{version}
|
2010-05-05 23:42:29 +02:00
|
|
|
Provides: mysql-debug = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-debug)
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%if %{defined mdkversion}
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%description debuging
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%else
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%description debug
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%endif
|
2010-05-05 23:42:29 +02:00
|
|
|
A version of the mysql server that has some debug code turned on.
|
|
|
|
It should be only used to track down problems with the standard
|
|
|
|
servers. Note that merely installing this package won't replace the
|
|
|
|
standard server. Read /usr/share/doc/packages/mysql/README.debug for
|
|
|
|
information on how to use the debug server.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%package test
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB testsuite
|
|
|
|
Group: Productivity/Databases/Servers
|
2011-07-27 13:56:09 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: %{name}-client = %{version}
|
2010-05-05 23:42:29 +02:00
|
|
|
Requires: perl-DBD-mysql
|
2011-07-27 13:56:09 +02:00
|
|
|
Requires: %{name}-tools = %{version}
|
|
|
|
Requires: %{name}-bench = %{version}
|
2010-05-05 23:42:29 +02:00
|
|
|
Provides: mysql-test = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-test)
|
|
|
|
|
|
|
|
%description test
|
|
|
|
This package contains the MariaDB test scripts and data.
|
|
|
|
|
|
|
|
To run the testsuite, run /usr/share/mysql-test/suse-test-run.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package tools
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB tools
|
|
|
|
Group: Productivity/Databases/Servers
|
|
|
|
Requires: perl-DBD-mysql
|
|
|
|
# make sure this package is installed when updating from 10.2 and older
|
|
|
|
Provides: mysql:/usr/bin/mysqlhotcopy mysql-client:/usr/bin/perror
|
|
|
|
Provides: mysql-tools = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-tools)
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
A set of scripts for administering a MariaDB server or developing
|
|
|
|
applications with MariaDB.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Widenius <monty@mysql.com>
|
|
|
|
David Axmark <davida@mysql.com>
|
|
|
|
|
|
|
|
%if 0%{?cluster} > 0
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%package ndb-storage
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB - ndbcluster storage engine
|
|
|
|
Group: Productivity/Databases/Servers
|
|
|
|
Provides: mysql-ndb-storage = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-ndb-storage)
|
|
|
|
|
|
|
|
%description ndb-storage
|
|
|
|
This package contains the ndbcluster storage engine.
|
|
|
|
It is necessary to have this package installed on all
|
|
|
|
computers that should store ndbcluster table data.
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package ndb-management
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB - ndbcluster storage engine management
|
|
|
|
Group: Productivity/Databases/Servers
|
|
|
|
Provides: mysql-ndb-management = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-ndb-management)
|
|
|
|
|
|
|
|
%description ndb-management
|
|
|
|
This package contains ndbcluster storage engine management.
|
|
|
|
It is necessary to have this package installed on at least
|
|
|
|
one computer in the cluster.
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package ndb-tools
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB - ndbcluster storage engine basic tools
|
|
|
|
Group: Productivity/Databases/Servers
|
|
|
|
Provides: mysql-ndb-tools = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-ndb-tools)
|
|
|
|
|
|
|
|
%description ndb-tools
|
|
|
|
This package contains ndbcluster storage engine basic tools.
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%package ndb-extra
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT
|
|
|
|
Summary: MariaDB - ndbcluster storage engine extra tools
|
|
|
|
Group: Productivity/Databases/Servers
|
|
|
|
Provides: mysql-ndb-extra = %{srv_vers}
|
|
|
|
Conflicts: otherproviders(mysql-ndb-extra)
|
|
|
|
|
|
|
|
%description ndb-extra
|
|
|
|
This package contains some extra ndbcluster storage engine tools for the
|
|
|
|
advanced user. They should be used with caution.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%prep
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-05-16 11:42:12 +02:00
|
|
|
%setup -q -n mariadb-%version -D -a 9
|
2010-05-05 23:42:29 +02:00
|
|
|
cp %_sourcedir/README.SuSE .
|
|
|
|
cp %_sourcedir/suse-test-run .
|
2011-01-11 12:12:56 +01:00
|
|
|
# apply patches from series
|
2011-05-16 11:42:12 +02:00
|
|
|
mysql-patches/tools/quilt-setup.sh "%{S:12}"
|
|
|
|
mysql-patches/tools/apply-series.sh "%{S:12}"
|
2010-05-05 23:42:29 +02:00
|
|
|
# remove unneeded manpages ('make install' basically installs everything under
|
|
|
|
# man/*)
|
|
|
|
rm -f man/mysqlman.1 # dummy fallback manpage
|
|
|
|
rm -f man/mysql.server.1 # init script, not installed in our rpm
|
|
|
|
rm -f man/make_win_*.1 # windows build scripts
|
|
|
|
rm -f man/comp_err.1 # built-time utility
|
|
|
|
# 5.1 Carrier Grade Edition only / still under development as of 5.1.22
|
|
|
|
rm -f man/ndbd_redo_log_reader.1
|
|
|
|
# breaks VPATH builds when in sourcedir, is generated in the builddirs
|
|
|
|
rm -f sql/sql_builtin.cc
|
|
|
|
sed -i 's|@localstatedir@|/var/log|' support-files/mysql-log-rotate.sh
|
|
|
|
%if ! 0%{?prefered} > 0
|
|
|
|
for i in `grep -Rl mysqlclient .`; do
|
2011-03-14 16:49:42 +01:00
|
|
|
sed -i 's|mysqlclient|mariadbclient|g' $i
|
2010-05-05 23:42:29 +02:00
|
|
|
done
|
|
|
|
%endif
|
2011-07-26 16:30:07 +02:00
|
|
|
%patch1
|
2010-05-05 23:42:29 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%build
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-01-11 12:12:56 +01:00
|
|
|
%{expand:%(cat %_sourcedir/build.inc)}
|
2010-05-05 23:42:29 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%install
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-01-11 12:12:56 +01:00
|
|
|
%{expand:%(cat %_sourcedir/install.inc)}
|
2010-05-05 23:42:29 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%pre
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
|
2011-10-18 14:28:51 +02:00
|
|
|
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
|
2010-05-05 23:42:29 +02:00
|
|
|
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
|
|
|
|
/usr/sbin/usermod -g mysql -s /bin/false mysql || :
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%preun
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
[ $1 = 1 ] || /usr/sbin/rcmysql stop
|
|
|
|
%pretrans
|
|
|
|
if [ -x /usr/sbin/rcmysql ]; then
|
|
|
|
RESTART=""
|
|
|
|
/usr/sbin/rcmysql status > /dev/null && RESTART="yes"
|
|
|
|
/usr/sbin/rcmysql stop
|
|
|
|
[ "$RESTART" ] && mkdir -p /var/run/mysql/restart
|
|
|
|
fi
|
|
|
|
dbfile=var/mysql/mysql/db.ISM
|
|
|
|
olddir=var/mysql
|
|
|
|
newdir=var/lib/mysql
|
|
|
|
# Do the database files still belong to root (very old installation)?
|
|
|
|
# Change ownerships
|
|
|
|
if [ -O $dbfile ]
|
|
|
|
then
|
|
|
|
chown -Rv mysql:mysql var/mysql/
|
|
|
|
fi
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%posttrans
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-01-11 12:12:56 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
2010-05-05 23:42:29 +02:00
|
|
|
if [ -d /var/lib/mysql ]; then
|
|
|
|
touch /var/lib/mysql/.run-mysql_upgrade
|
|
|
|
chown -R mysql:mysql /var/lib/mysql
|
|
|
|
fi
|
|
|
|
for i in /var/lib/mysql/{.protected,.tmp}; do
|
|
|
|
( [ -d "$i" ] && rmdir "$i" ) || :
|
|
|
|
done
|
|
|
|
# start mysql again if it should run
|
|
|
|
if [ "`ls /etc/rc.d/rc*.d/S*mysql 2> /dev/null`" ] || [ -d /var/run/mysql/restart ]; then
|
|
|
|
[ -x /usr/sbin/rcmysql ] && /usr/sbin/rcmysql start
|
|
|
|
rmdir /var/run/mysql/restart || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%if ! 0%{prefered} > 0
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%post -n libmariadbclient16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%postun -n libmariadbclient16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%post -n libmariadbclient_r16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%postun -n libmariadbclient_r16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-01-11 12:12:56 +01:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{prefered} > 0
|
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%post -n libmysqlclient16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%postun -n libmysqlclient16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%post -n libmysqlclient_r16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%postun -n libmysqlclient_r16 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%post -n libmysqld0 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-10-03 14:02:00 +02:00
|
|
|
%postun -n libmysqld0 -p /sbin/ldconfig
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%postun
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
if [ $1 = 0 ]; then
|
2011-01-11 12:12:56 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.*
|
2010-05-05 23:42:29 +02:00
|
|
|
%{insserv_cleanup}
|
|
|
|
fi
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%clean
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files -f mysql.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf
|
2011-01-11 12:12:56 +01:00
|
|
|
%dir %attr(0750, root, mysql) /etc/mysql
|
|
|
|
%config(noreplace) %attr(0640, root, mysql) /etc/mysql/*
|
2010-05-05 23:42:29 +02:00
|
|
|
%config /etc/logrotate.d/mysql
|
|
|
|
%doc %{_defaultdocdir}/%{name}
|
2011-01-11 12:12:56 +01:00
|
|
|
%doc %{_infodir}/mysql.info.*
|
2010-05-05 23:42:29 +02:00
|
|
|
/etc/init.d/mysql
|
|
|
|
/usr/sbin/rcmysql
|
|
|
|
/usr/share/mysql/
|
|
|
|
%dir %{_libdir}/mysql
|
|
|
|
%{_libdir}/mysql/mysqld.sym
|
|
|
|
%config /etc/sysconfig/SuSEfirewall2.d/services/mysql
|
|
|
|
%dir %_libdir/mysql/plugin
|
|
|
|
%_libdir/mysql/plugin/*.so
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files client -f mysql-client.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%config /etc/mysqlaccess.conf
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%if ! 0%{prefered} > 0
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-03-14 16:49:42 +01:00
|
|
|
%files -n libmariadbclient16
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
2011-03-14 16:49:42 +01:00
|
|
|
%{_libdir}/libmariadbclient.so.*
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-03-14 16:49:42 +01:00
|
|
|
%files -n libmariadbclient_r16
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
2011-03-14 16:49:42 +01:00
|
|
|
%{_libdir}/libmariadbclient_r.so.*
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%if 0%{prefered} > 0
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files -n libmysqlclient-devel -f libmysqlclient-devel.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
/usr/include/mysql
|
|
|
|
%{_libdir}/libmysqlclient.so
|
|
|
|
%{_libdir}/libmysqlclient_r.so
|
|
|
|
/usr/share/aclocal/mysql.m4
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files -n libmysqld-devel
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libmysqld.a
|
|
|
|
%_libdir/libmysqld.so
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files -n libmysqld0
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libmysqld.so.*
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files -n libmysqlclient16
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/libmysqlclient.so.*
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files -n libmysqlclient_r16
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/libmysqlclient_r.so.*
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files bench -f mysql-bench.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
/usr/share/sql-bench
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-01-11 12:12:56 +01:00
|
|
|
%if %{defined mdkversion}
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2011-01-11 12:12:56 +01:00
|
|
|
%files debuging
|
|
|
|
%else
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files debug
|
2011-01-11 12:12:56 +01:00
|
|
|
%endif
|
2010-05-05 23:42:29 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
/usr/sbin/mysqld-debug
|
|
|
|
%{_libdir}/mysql/mysqld-debug.sym
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files test -f mysql-test.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_bindir}/my_safe_process
|
|
|
|
%_mandir/man1/mysql-test-run.pl.1*
|
|
|
|
%_mandir/man1/mysql-stress-test.pl.1*
|
|
|
|
/usr/share/mysql-test/valgrind.supp
|
|
|
|
%dir %attr(755, root, root)/usr/share/mysql-test
|
|
|
|
/usr/share/mysql-test/[^v]*
|
|
|
|
%dir %attr(755, mysql, mysql) /usr/share/mysql-test/var
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files tools -f mysql-tools.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%_bindir/mysqlrepair
|
|
|
|
%_bindir/mysqlanalyze
|
|
|
|
%_bindir/mysqloptimize
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%if 0%{cluster} > 0
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files ndb-storage -f mysql-ndb-storage.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files ndb-management -f mysql-ndb-management.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files ndb-tools -f mysql-ndb-tools.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2011-08-17 09:42:39 +02:00
|
|
|
|
2010-05-05 23:42:29 +02:00
|
|
|
%files ndb-extra -f mysql-ndb-extra.files
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|