Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > a00d0f1300d0d6796729cd82518482f4 > files > 1

MySQL-5.0.24-1mdv2007.0.src.rpm

#(ie. use with rpm --rebuild):
#
#	--with debug	Compile with debugging code
# 
#  enable build with debugging code: will _not_ strip away any debugging code,
#  will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to 
#  configure.

%define build_debug 0
%define build_test 1

# commandline overrides:
# rpm -ba|--rebuild --with 'xxx'
%{?_with_debug: %{expand: %%define build_debug 1}}
%{?_with_test: %{expand: %%define build_test 1}}
%{?_without_test: %global build_test 0}

%if %{build_debug}
# disable build root strip policy
%define __spec_install_post %{_libdir}/rpm/brp-compress || :

# This gives extra debuggin and huge binaries
%{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')}
%endif

%if %{build_debug}
%define build_debug 1
%endif

%if %{build_test}
%define build_test 1
%endif

%define _requires_exceptions perl(this)

%define major 15
%define libname %mklibname mysql %{major}
%define conflict1 %mklibname mysql 12
%define conflict2 %mklibname mysql 14

%define muser	mysql

Summary:	MySQL: a very fast and reliable SQL database engine
Name: 		MySQL
Version:	5.0.24
Release:	%mkrel 1
Group:		System/Servers
License:	GPL
URL:		http://www.mysql.com
Source0:	http://mysql.dataphone.se/Downloads/MySQL-5.0/mysql-%{version}.tar.gz
Source1:	http://mysql.dataphone.se/Downloads/MySQL-5.0/mysql-%{version}.tar.gz.asc
Source2:	http://downloads.mysql.com/docs/refman-5.0-en.html-chapter.tar.gz
Source3:	mysqld.sysconfig.bz2
Source4:	mysqld-ndbd.init.bz2
Source5:	mysqld-ndb.sysconfig.bz2
Source6:	mysqld-ndb_cpcd.init.bz2
Source7:	mysqld-ndb_cpcd.sysconfig.bz2
Source8:	mysqld-ndb_mgmd.init.bz2
Source9:	mysqld-ndb_mgmd.sysconfig.bz2
Source10:	config.ini.bz2
Patch1:		mysql-5.0.15-install_script_mysqld_safe.diff
Patch2:		mysql-5.0.23-lib64.diff
Patch3:		mysql-5.0.15-noproc.diff
Patch6:		mysql-errno.patch
# Add fast AMD64 mutexes
Patch7:		db-4.1.24-amd64-mutexes.diff
# NPTL pthreads mutex are evil
Patch8:		db-4.1.24-disable-pthreadsmutexes.diff
Patch9:		mysql-5.0.15-disable-pthreadsmutexes.diff
Patch10:	mysql-5.0.4-beta-libndbclient_soname.diff
Patch11:	mysql-5.0.6-beta-logrotate.diff
Patch12:	mysql-5.0.23-initscript.diff
Patch13:	mysql-5.0.19-instance-manager.diff
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(post): MySQL-common = %{version}-%{release}
Requires(preun): MySQL-common = %{version}-%{release}
Requires(post): MySQL-client = %{version}-%{release}
Requires(preun): MySQL-client = %{version}-%{release}
Requires:	MySQL-common = %{version}-%{release}
Requires:	MySQL-client = %{version}-%{release}
BuildRequires:	autoconf2.5
BuildRequires:	automake1.7
BuildRequires:	bison
BuildRequires:	doxygen
BuildRequires:	glibc-devel
BuildRequires:	libstdc++-devel
BuildRequires:	libtermcap-devel
BuildRequires:	ncurses-devel
BuildRequires:	openssl-devel
BuildRequires:	python
BuildRequires:	readline-devel
BuildRequires:	tetex
BuildRequires:	texinfo
BuildRequires:	zlib-devel
BuildRequires:	dos2unix
%if %mdkversion >= 1020
BuildRequires:	multiarch-utils >= 1.0.3
%endif
BuildConflicts: edit-devel
Provides:       msqlormysql MySQL-server mysqlserver mysql
Obsoletes:      mysql MySQL-devel <= 3.23.39
Conflicts:      MySQL-Max > 4.0.11
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
MySQL AB.

The MySQL software has Dual Licensing, which means you can use the MySQL
software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from MySQL AB if you do not wish to be bound by the terms of
the GPL. See the chapter "Licensing and Support" in the manual for
further info.

The MySQL web site (http://www.mysql.com/) provides the latest
news and information about the MySQL software. Also please see the
documentation and the manual for more information.

%package	Max
Summary:	MySQL - server with extended functionality
Group:		System/Servers
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(post): MySQL-common = %{version}-%{release}
Requires(preun): MySQL-common = %{version}-%{release}
Requires(post): MySQL-client = %{version}-%{release}
Requires(preun): MySQL-client = %{version}-%{release}
Requires:	MySQL-common = %{version}-%{release}
Requires:	MySQL-client = %{version}-%{release}
Provides:	mysql-Max = %{version}-%{release}
Provides:	msqlormysql MySQL-server mysqlserver mysql
Obsoletes:	mysql-Max
Obsoletes:	MySQL-NDB
Conflicts:	MySQL > 4.0.11

%description	Max 
Optional MySQL server binary that supports features
like transactional tables. You can use it as an alternate
to MySQL basic server.

 - Berkeley DB Storage Engine
 - Ndbcluster Storage Engine interface
 - Archive Storage Engine
 - CSV Storage Engine
 - Example Storage Engine
 - Federated Storage Engine
 - User Defined Functions (UDFs).

%package	ndb-storage
Summary:	MySQL - ndbcluster storage engine
Group:		System/Servers
Requires(post): rpm-helper
Requires(preun): rpm-helper

%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.
Note that this storage engine can only be used in conjunction
with the MySQL Max server.

%package	ndb-management
Summary:	MySQL - ndbcluster storage engine management
Group:		System/Servers
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(post): MySQL-common = %{version}-%{release}
Requires(preun): MySQL-common = %{version}-%{release}
Requires(post): MySQL-client = %{version}-%{release}
Requires(preun): MySQL-client = %{version}-%{release}
Requires:	MySQL-common = %{version}-%{release}
Requires:	MySQL-client = %{version}-%{release}

%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
Summary:	MySQL - ndbcluster storage engine basic tools
Group:		System/Servers

%description	ndb-tools
This package contains ndbcluster storage engine basic tools.

%package	ndb-extra
Summary:	MySQL - ndbcluster storage engine extra tools
Group:		System/Servers

%description	ndb-extra
This package contains some extra ndbcluster storage engine
tools for the advanced user. They should be used with caution.

%package	common
Summary:	MySQL: common files
Group:		System/Servers
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(post): MySQL-client = %{version}-%{release}
Requires(preun): MySQL-client = %{version}-%{release}
Requires(post): perl-DBD-mysql
Requires(preun): perl-DBD-mysql
Requires:	MySQL-client = %{version}-%{release}
Requires:	perl-DBD-mysql
Provides:       mysql-common
Obsoletes:      mysql-common

%description	common
Common files for the MySQL(TM) database server.

%package	client
Summary:	MySQL - Client
Group:		System/Servers
Requires(post): %{libname} = %{version}-%{release}
Requires(preun): %{libname} = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}
Provides:       mysql-client
Obsoletes:      mysql-client
# note to self: add a conflict here because files moved from -client (v4.0.x) to -common (v5.0.x) #19789
Conflicts:	MySQL-common < 5.0

%description	client
This package contains the standard MySQL clients.

%package	bench
Summary:	MySQL - Benchmarks and test system
Group:		System/Servers
Requires(post): MySQL-client = %{version}-%{release}
Requires(preun): MySQL-client = %{version}-%{release}
Requires:	MySQL-client = %{version}-%{release}
Requires:	perl
Provides:       mysql-bench
Obsoletes:      mysql-bench

%description	bench
This package contains MySQL benchmark scripts and data.

%package -n	%{libname}
Summary:	MySQL - Shared libraries
Group:		System/Libraries
Obsoletes:	MySQL-shared-libs MySQL-shared
Provides:	MySQL-shared-libs = %{version}-%{release}
Provides:	MySQL-shared = %{version}-%{release}

%description -n	%{libname}
This package contains the shared libraries (*.so*) which certain
languages and applications need to dynamically load and use MySQL.

%package -n	%{libname}-devel
Summary:	MySQL - Development header files and libraries
Group:		Development/Other
Requires(post): %{libname} = %{version}-%{release}
Requires(preun): %{libname} = %{version}-%{release}
Requires(post): MySQL-common = %{version}-%{release}
Requires(preun): MySQL-common = %{version}-%{release}
Requires(post): MySQL-client = %{version}-%{release}
Requires(preun): MySQL-client = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}
Requires:	MySQL-common = %{version}-%{release}
Requires:	MySQL-client = %{version}-%{release}
Obsoletes:	MySQL-devel mysql-devel
Provides:       mysql-devel = %{version}-%{release}
Provides:	libmysql-devel
Conflicts:	%{conflict1}-devel
Conflicts:	%{conflict2}-devel
Provides:	MySQL-devel = %{version}-%{release}

%description -n	%{libname}-devel
This package contains the development header files and libraries
necessary to develop MySQL client applications.

This package also contains the MySQL server as an embedded library.

The embedded MySQL server library makes it possible to run a
full-featured MySQL server inside the client application.
The main benefits are increased speed and more simple management
for embedded applications.

The API is identical for the embedded MySQL version and the
client/server version.

%package -n	%{libname}-static-devel
Summary:	MySQL - Static development libraries
Group:		Development/Other
Requires:	MySQL-devel = %{version}-%{release}
Conflicts:	MySQL-devel < 5.0.16-5mdk
Provides:       mysql-static-devel = %{version}-%{release}
Provides:	libmysql-static-devel
Provides:	MySQL-static-devel = %{version}-%{release}

%description -n	%{libname}-static-devel
This package contains the static development libraries.

%prep

%setup -q -n mysql-%{version} -a2

# put html docs in place
mv html-chapter Docs/html

find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;

for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
done

# strip away annoying ^M
find -type f | grep -v "\.gif" | grep -v "\.png" | grep -v "\.jpg" | xargs dos2unix -U

%patch1 -p0
%patch2 -p1
%patch3 -p0 -b .noproc
%patch6 -p1 -b .errno_as_defines
%patch7 -p1 -b .amd64-mutexes
%patch8 -p1 -b .pthreadsmutexes
%patch9 -p0 -b .disable-pthreadsmutexes
%patch10 -p0 -b .libndbclient_soname
%patch11 -p0 -b .logrotate
%patch12 -p0 -b .initscript
%patch13 -p0 -b .instance-manager

# fix annoyances
perl -pi -e "s|AC_PROG_RANLIB|AC_PROG_LIBTOOL|g" configure*
perl -pi -e "s|^MAX_C_OPTIMIZE.*|MAX_C_OPTIMIZE=\"\"|g" configure*
perl -pi -e "s|^MAX_CXX_OPTIMIZE.*|MAX_CXX_OPTIMIZE=\"\"|g" configure*

mkdir -p Mandriva
bzcat %{SOURCE3} > Mandriva/mysqld.sysconfig
bzcat %{SOURCE4} > Mandriva/mysqld-ndbd.init
bzcat %{SOURCE5} > Mandriva/mysqld-ndb.sysconfig
bzcat %{SOURCE6} > Mandriva/mysqld-ndb_cpcd.init
bzcat %{SOURCE7} > Mandriva/mysqld-ndb_cpcd.sysconfig
bzcat %{SOURCE8} > Mandriva/mysqld-ndb_mgmd.init
bzcat %{SOURCE9} > Mandriva/mysqld-ndb_mgmd.sysconfig
bzcat %{SOURCE10} > Mandriva/config.ini

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# construct a generic my.cnf file based on support-files/my-medium.cnf

cat > Mandriva/my.cnf << EOF
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#

# The following options will be passed to all MySQL clients
[client]
user		= root
#password	= your_password
port		= 3306
socket		= %{_localstatedir}/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
user		= %{muser}
datadir		= %{_localstatedir}/mysql
port		= 3306
socket		= %{_localstatedir}/mysql/mysql.sock
pid-file	= /var/run/mysqld/mysqld.pid
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Default to using old password format for compatibility with old and
# shorter password hash.
# Reference: http://dev.mysql.com/doc/mysql/en/Password_hashing.html
old_passwords

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
skip-networking

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id	= 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir		= /tmp/		
#log-update 	= /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

#bind-address=192.168.100.1

## Options for mysqld process:
#ndbcluster                      # run NDB engine
#ndb-connectstring=192.168.0.10  # location of MGM node

## Options for ndbd process:
#[mysql_cluster]                 
#ndb-connectstring=192.168.0.10  # location of MGM node

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysql.server]
user=%{muser}
basedir=%{_localstatedir}

[mysqld_safe]
err-log=/var/log/mysqld/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

# MySQL Instance Manager options section
[manager]
user=%{muser}
default-mysqld-path=%{_sbindir}/mysqld
socket=%{_localstatedir}/mysql/mysqlmanager.sock
pid-file=/var/run/mysqld/mysqlmanager.pid
password-file=%{_sysconfdir}/mysqlmanager.passwd
run-as-service
monitoring-interval=20
port=2273
#bind-address=192.168.100.1

EOF
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

%build
# Run aclocal in order to get an updated libtool.m4 in generated
# configure script for "new" architectures (aka. x86_64, mips)
export WANT_AUTOCONF_2_5=1
libtoolize --copy --force; aclocal-1.7; autoconf; automake-1.7 --foreign --add-missing --copy

%if %{mdkversion} < 1010
%define __libtoolize /bin/true
%endif

pushd bdb/dist
    sh ./s_config
popd

pushd bdb/build_unix
    CONFIGURE_TOP="../dist" %configure2_5x --disable-pthreadsmutexes
    CONFIGURE_TOP="."
popd

%serverbuild

# (gb) We shall always have the fully versioned binary
# FIXME: Please, please, do tell why you need fully qualified version
GCC_VERSION=`gcc -dumpversion`
CFLAGS="$CFLAGS"
%ifarch alpha
CXXFLAGS="$CXXFLAGS -fPIC"
%else
CXXFLAGS="$CXXFLAGS"
%endif

%if %{build_debug}
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
%endif

export MYSQL_BUILD_CC="gcc-$GCC_VERSION"
export MYSQL_BUILD_CXX="g++-$GCC_VERSION"

export MYSQL_BUILD_CFLAGS="$CFLAGS"
export MYSQL_BUILD_CXXFLAGS="$CXXFLAGS"

#
# Use MYSQL_BUILD_PATH so that we can use a dedicated version of gcc
#
export PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin}
export PS='/bin/ps'
export FIND_PROC='/bin/ps p $$PID'
export KILL='/bin/kill'
export CHECK_PID='/bin/kill -0 $$PID'

# The --enable-assembler simply does nothing on systems that does not
# support assembler speedups.
MYSQL_COMMON_CONFIGURE_LINE="--prefix=/ \
    --exec-prefix=%{_prefix} \
    --libexecdir=%{_sbindir} \
    --libdir=%{_libdir} \
    --sysconfdir=%{_sysconfdir} \
    --datadir=%{_datadir} \
    --localstatedir=%{_localstatedir}/mysql \
    --infodir=%{_infodir} \
    --includedir=%{_includedir} \
    --mandir=%{_mandir} \
    --enable-shared \
    --with-pic \
    --with-extra-charsets=all \
    --enable-assembler \
    --enable-local-infile \
    --enable-large-files=yes \
    --enable-largefile=yes \
    --without-readline \
    --without-libwrap \
    --without-mysqlfs \
    --with-openssl \
    --with-berkeley-db \
    --with-innodb \
    --with-big-tables \
    --enable-thread-safe-client \
%if %{build_debug}
    --enable-debug \
%else
    --without-debug \
%endif
    --with-mysqld-user=%{muser} \
    --with-unix-socket-path=%{_localstatedir}/mysql/mysql.sock"

################################################################################
# make the plain mysqld server
%configure2_5x $MYSQL_COMMON_CONFIGURE_LINE \
    --disable-shared \
%ifarch i386
    --with-mysqld-ldflags='-all-static' \
    --with-client-ldflags='-all-static' \
%endif
    --with-comment='Mandriva Linux - MySQL Standard Edition (GPL)' \
    --without-embedded-server \
    --without-berkeley-db \
    --without-vio

# benchdir does not fit in above model. Maybe a separate bench distribution
%make benchdir_root=%{buildroot}%{_datadir}

# tuck away various built files
make DESTDIR=`pwd`/STD benchdir_root=%{_datadir} testdir=%{_datadir}/mysql-test install

################################################################################
# cleanup
make clean

################################################################################
# make the mysqld-max server
%configure2_5x $MYSQL_COMMON_CONFIGURE_LINE \
    --with-comment='Mandriva Linux - MySQL Max Edition (GPL)' \
    --with-embedded-server \
    --with-archive-storage-engine \
    --with-csv-storage-engine \
    --with-example-storage-engine \
    --with-blackhole-storage-engine \
    --with-federated-storage-engine \
    --with-big-tables \
    --with-ndbcluster \
    --with-ndb-shm \
    --with-ndb-docs \
    --with-server-suffix="-Max"

# --with-raid won't compile
# --with-ndb-sci requires stuff from http://www.dolphinics.no/
# --with-ndb-test won't compile

%make benchdir_root=%{buildroot}%{_datadir}

################################################################################
# run the tests
%if %{build_test}
# disable failing tests
echo "mysql_client_test : Unstable test case, bug#12258" >> mysql-test/t/disabled.def
echo "openssl_1 : Unstable test case" >> mysql-test/t/disabled.def
echo "rpl_openssl : Unstable test case" >> mysql-test/t/disabled.def
echo "rpl_trigger : Unstable test case" >> mysql-test/t/disabled.def
# set some test env, should be free high random ports...
export MYSQL_TEST_MANAGER_PORT=9305
export MYSQL_TEST_MASTER_PORT=9306
export MYSQL_TEST_SLAVE_PORT=9308
export MYSQL_TEST_NDB_PORT=9350
make check
%ifnarch s390x
pushd mysql-test
    ./mysql-test-run.pl \
    --force \
    --timer \
    --master_port=$MYSQL_TEST_MASTER_PORT \
    --slave_port=$MYSQL_TEST_SLAVE_PORT \
    --ndbcluster_port=$MYSQL_TEST_NDB_PORT \
    --testcase-timeout=5 \
    --suite-timeout=30 || true
popd

%endif
%endif

%install 
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

# don't fiddle with the initscript!
export DONT_GPRINTIFY=1

%if %{build_debug}
export DONT_STRIP=1
%endif

install -d %{buildroot}%{_sysconfdir}/{logrotate.d,sysconfig}
install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_var}/run/{mysqld,ndb_cpcd}
install -d %{buildroot}%{_var}/log/mysqld
install -d %{buildroot}%{_localstatedir}/mysql/{mysql,test,.tmp}
install -d %{buildroot}%{_localstatedir}/mysql-cluster

%makeinstall_std benchdir_root=%{_datadir} testdir=%{_datadir}/mysql-test 

mv %{buildroot}%{_sbindir}/mysqld %{buildroot}%{_sbindir}/mysqld-max
install -m0755 STD/usr/sbin/mysqld %{buildroot}%{_sbindir}/mysqld

# install init scripts
install -m0755 support-files/mysql.server %{buildroot}%{_initrddir}/mysqld
install -m0755 support-files/mysql.server %{buildroot}%{_initrddir}/mysqld-max
install -m0755 Mandriva/mysqld-ndbd.init %{buildroot}%{_initrddir}/mysqld-ndbd
install -m0755 Mandriva/mysqld-ndb_cpcd.init %{buildroot}%{_initrddir}/mysqld-ndb_cpcd
install -m0755 Mandriva/mysqld-ndb_mgmd.init %{buildroot}%{_initrddir}/mysqld-ndb_mgmd

# fix status and subsys
perl -pi -e 's/status mysqld\b/status mysqld-max/g;s,(/var/lock/subsys/mysqld\b),${1}-max,' %{buildroot}%{_initrddir}/mysqld-max

# force the instance manager to use the correct server
perl -pi -e 's,\$manager --user=\$user,\$manager --default-mysqld-path=%{_sbindir}/mysqld --user=\$user,' %{buildroot}%{_initrddir}/mysqld

# mysqld-max needs special treatment running under the instance manager...
perl -pi -e 's,\$manager --user=\$user,\$manager --default-mysqld-path=%{_sbindir}/mysqld-max --user=\$user,' %{buildroot}%{_initrddir}/mysqld-max

# install configuration files
install -m0644 Mandriva/mysqld.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld
install -m0644 Mandriva/mysqld-ndb.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld-ndb
install -m0644 Mandriva/mysqld-ndb_cpcd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld-ndb_cpcd
install -m0644 Mandriva/mysqld-ndb_mgmd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/mysqld-ndb_mgmd
install -m0644 Mandriva/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
install -m0644 Mandriva/config.ini %{buildroot}%{_localstatedir}/mysql-cluster/config.ini
install -m0644 support-files/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysqld

# Install docs
install -m0644 Docs/mysql.info %{buildroot}%{_infodir}/mysql.info

# Fix libraries
mv %{buildroot}%{_libdir}/mysql/libmysqlclient.* %{buildroot}%{_libdir}/
mv %{buildroot}%{_libdir}/mysql/libmysqlclient_r.* %{buildroot}%{_libdir}/
mv %{buildroot}%{_libdir}/mysql/libndbclient.* %{buildroot}%{_libdir}/
perl -pi -e "s|%{_libdir}/mysql|%{_libdir}|" %{buildroot}%{_libdir}/*.la

pushd %{buildroot}%{_bindir}
    ln -sf mysqlcheck mysqlrepair
    ln -sf mysqlcheck mysqlanalyze
    ln -sf mysqlcheck mysqloptimize
popd

# touch some files
touch %{buildroot}%{_sysconfdir}/mysqlmanager.passwd
echo "#" > %{buildroot}%{_sysconfdir}/ndb_cpcd.conf
echo "#" > %{buildroot}%{_localstatedir}/mysql/Ndb.cfg

# fix devel docs
rm -rf Docs/devel; mkdir -p Docs/devel
cp -rp ndb/docs/mgmapi.html Docs/devel/mgmapi
cp -rp ndb/docs/ndbapi.html Docs/devel/ndbapi

# house cleaning
rm -f %{buildroot}%{_datadir}/info/dir
rm -f %{buildroot}%{_bindir}/make_win_src_distribution
rm -f %{buildroot}%{_bindir}/make_win_binary_distribution
rm -f %{buildroot}%{_datadir}/mysql/*.spec
rm -f %{buildroot}%{_datadir}/mysql/postinstall
rm -f %{buildroot}%{_datadir}/mysql/preinstall
rm -f %{buildroot}%{_datadir}/mysql/mysql-log-rotate
rm -f %{buildroot}%{_datadir}/mysql/mysql.server
rm -f %{buildroot}%{_bindir}/client_test
#rm -f %{buildroot}%{_bindir}/mysql_client_test*
rm -f %{buildroot}%{_bindir}/mysqltest_embedded
rm -f %{buildroot}%{_datadir}/mysql/binary-configure

%if %mdkversion >= 1020
%multiarch_binaries %{buildroot}%{_bindir}/mysql_config
%multiarch_includes %{buildroot}%{_includedir}/mysql/my_config.h
%multiarch_includes %{buildroot}%{_includedir}/mysql/ndb/ndb_types.h
%multiarch_includes %{buildroot}%{_includedir}/mysql/ndb/ndb_constants.h
%endif

cat > README.urpmi <<EOF

The initscript used to start mysql has been reverted to use the one shipped
by MySQL AB. This means the following changes:

 * The MYSQLD_OPTIONS="--skip-networking" option in the /etc/sysconfig/mysqld
   file has been removed, this is now set in the /etc/my.cnf file.

 * The MySQL Instance Manager is used by default, set use_mysqld_safe="1" in
   the /etc/sysconfig/mysqld file to use the old mysqld_safe script.

The extra MySQL-NDB server package has been merged into the MySQL-Max package 
and ndb related pieces has been split into different sub packages as done by
MySQL AB. The MySQL libraries and the MySQL-common sub package uses the
MySQL-Max build so that no functionality required by for example the NDB
parts are lost.

The MySQL-common package now ships with a default /etc/my.cnf file that is 
based on the my-medium.cnf file that comes with the source code. The
/etc/my.cnf  file is constructed at build time of this package.

To connect to the Instance Manager you need to pass the correct command line 
options like in the following examples:

  * mysql -u root --password=my_password --port=2273 --protocol=TCP
  * mysql -u root --password=my_password --socket=/var/lib/mysql/mysqlmanager.sock

Please note you also need to add a user in the /etc/mysqlmanager.passwd file and 
make sure the file is owned by the user under which the Instance Manager service 
is running under.

EOF


%pre common
%_pre_useradd %{muser} %{_localstatedir}/mysql /bin/bash

%post common
%_install_info mysql.info
%create_ghostfile %{_sysconfdir}/mysqlmanager.passwd %{muser} %{muser} 0640

%preun common
%_remove_install_info mysql.info

%post
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
chown -R %{muser}:%{muser} %{_localstatedir}/mysql

# make sure the %{_localstatedir}/mysql directory can be accessed
chmod 711 %{_localstatedir}/mysql

%_post_service mysqld

# Initiate databases
export TMPDIR="%{_localstatedir}/mysql/.tmp"
export TMP="${TMPDIR}"
su - %{muser} -c "mysql_install_db --rpm --user=%{muser}" > /dev/null

# try to fix privileges table, use a no password user table for that
fix_privileges() 
{
    datadir=`my_print_defaults --defaults-file=/etc/my.cnf mysqld | grep '^--datadir=' | cut -d= -f2`
    if [ -z $datadir ]; then
        datadir=%{_localstatedir}/mysql/
    fi
    cd $datadir/mysql
    pid_file=$datadir/mysqld-fix_privileges.pid
    if [ -f $pid_file ]; then rm -f $pid_file; fi
    if %{_bindir}/mysqld_safe --skip-grant-tables --skip-networking --pid-file=$pid_file &> /dev/null & then  
        pid=$!
        i=1
        while [ $i -lt 10 -a ! -f $pid_file ]; do 
            i=$(($i+1))
            sleep 1
        done
        if [ -f $datadir/mysqld-fix_privileges.pid ]; then
            %{_bindir}/mysql_fix_privilege_tables &> /dev/null 
            kill `cat $pid_file` &> /dev/null
            rm -f $pid_file
        else 
            # just in case
            kill $pid &> /dev/null
        fi
        sleep 2
    fi
}

# Shut down a previously installed server first
manager_pid=`my_print_defaults --defaults-file=/etc/my.cnf manager | grep '^--pid-file=' | cut -d= -f2`
mysql_pid=`my_print_defaults --defaults-file=/etc/my.cnf mysqld | grep '^--pid-file=' | cut -d= -f2`

if [ -f /var/lock/subsys/mysqlmanager -o -f /var/lock/subsys/mysqld -o -f /var/lock/subsys/mysqld-max -o -f "$manager_pid" -o -f "$mysql_pid" ]; then
    if [ -x %{_sbindir}/mysqld-max -o -x %{_initrddir}/mysqld-max ]; then
	%{_initrddir}/mysqld-max stop && fix_privileges && %{_initrddir}/mysqld start
    else
	%{_initrddir}/mysqld stop && fix_privileges && %{_initrddir}/mysqld start
    fi
else
	fix_privileges
fi

%preun
if [ -x %{_sbindir}/mysqld-max -o -x %{_initrddir}/mysqld-max ]; then
    chkconfig --del mysqld-max
else
    %_preun_service mysqld
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/mysqld ]; then
        %{_initrddir}/mysqld restart 1>&2
    fi
fi

%post Max
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
chown -R %{muser}:%{muser} %{_localstatedir}/mysql

# make sure the %{_localstatedir}/mysql directory can be accessed
chmod 711 %{_localstatedir}/mysql

%_post_service mysqld-max

# Initiate databases
export TMPDIR="%{_localstatedir}/mysql/.tmp"
export TMP="${TMPDIR}"
su - %{muser} -c "mysql_install_db --rpm --user=%{muser}" > /dev/null

# try to fix privileges table, use a no password user table for that
fix_privileges() 
{
    datadir=`my_print_defaults --defaults-file=/etc/my.cnf mysqld | grep '^--datadir=' | cut -d= -f2`
    if [ -z $datadir ]; then
        datadir=%{_localstatedir}/mysql/
    fi
    cd $datadir/mysql
    pid_file=$datadir/mysqld-max-fix_privileges.pid
    if [ -f $pid_file ]; then rm -f $pid_file; fi
    if %{_bindir}/mysqld_safe --skip-grant-tables --skip-networking --pid-file=$pid_file &> /dev/null & then  
        pid=$!
        i=1
        while [ $i -lt 10 -a ! -f $pid_file ]; do 
            i=$(($i+1))
            sleep 1
        done
        if [ -f $datadir/mysqld-max-fix_privileges.pid ]; then
            %{_bindir}/mysql_fix_privilege_tables &> /dev/null 
            kill `cat $pid_file` &> /dev/null
            rm -f $pid_file
        else 
            # just in case
            kill $pid &> /dev/null
        fi
        sleep 2
    fi
}

# Shut down a previously installed server first
manager_pid=`my_print_defaults --defaults-file=/etc/my.cnf manager | grep '^--pid-file=' | cut -d= -f2`
mysql_pid=`my_print_defaults --defaults-file=/etc/my.cnf mysqld | grep '^--pid-file=' | cut -d= -f2`

if [ -f /var/lock/subsys/mysqlmanager -o -f /var/lock/subsys/mysqld -o -f /var/lock/subsys/mysqld-max -o -f "$manager_pid" -o -f "$mysql_pid" ]; then
    if [ -x %{_sbindir}/mysqld -o -x %{_initrddir}/mysqld ]; then
	%{_initrddir}/mysqld stop && fix_privileges && %{_initrddir}/mysqld-max start
    else
	%{_initrddir}/mysqld-max stop && fix_privileges && %{_initrddir}/mysqld-max start
    fi
else
	fix_privileges
fi

%preun Max
if [ -x %{_sbindir}/mysqld -o -x %{_initrddir}/mysqld ]; then
    chkconfig --del mysqld
else
    %_preun_service mysqld-max
fi

%postun Max
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/mysqld-max ]; then
        %{_initrddir}/mysqld-max restart 1>&2
    fi
fi

%post ndb-storage
%_post_service mysqld-ndbd

%preun ndb-storage
%_preun_service mysqld-ndbd

%postun ndb-storage
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/mysqld-ndbd ]; then
        %{_initrddir}/mysqld-ndbd restart 1>&2
    fi
fi

%post ndb-management
%create_ghostfile %{_sysconfdir}/ndb_cpcd.conf root root 0644
%create_ghostfile %{_localstatedir}/mysql/Ndb.cfg root root 0644
%_post_service mysqld-ndb_cpcd
%_post_service mysqld-ndb_mgmd

%preun ndb-management
%_preun_service mysqld-ndb_cpcd
%_preun_service mysqld-ndb_mgmd

%postun ndb-management
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/mysqld-ndb_cpcd ]; then
        %{_initrddir}/mysqld-ndb_cpcd restart 1>&2
    fi
    if [ -f /var/lock/subsys/mysqld-ndb_mgmd ]; then
        %{_initrddir}/mysqld-ndb_mgmd restart 1>&2
    fi
fi

%triggerin -n %{name} -- MySQL < 4.1.10
if [ -f /var/lock/subsys/mysql ]; then
    pidname="/var/lib/mysql/`/bin/hostname`.pid"
    if [ -f ${pidname} ]; then
	kill `cat ${pidname}`
	%{_initrddir}/mysqld start
    fi
fi

%triggerin -n %{name}-Max -- MySQL-Max < 4.1.10
if [ -f /var/lock/subsys/mysql-max ]; then
    pidname="/var/lib/mysql/`/bin/hostname`.pid"
    if [ -f ${pidname} ]; then
	kill `cat ${pidname}`
	%{_initrddir}/mysqld-max start
    fi
fi

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README.urpmi
%attr(0755,root,root) %{_initrddir}/mysqld
%attr(0755,root,root) %{_sbindir}/mysqld

%files Max
%defattr(-,root,root)
%doc README.urpmi
%attr(0755,root,root) %{_initrddir}/mysqld-max
%attr(0755,root,root) %{_sbindir}/mysqld-max

%files ndb-storage
%defattr(-,root,root)
%attr(0755,root,root) %{_initrddir}/mysqld-ndbd
%attr(0644,root,root) %config(noreplace,missingok) %{_sysconfdir}/sysconfig/mysqld-ndb
%attr(0755,root,root) %{_sbindir}/ndbd

%files ndb-management
%defattr(-,root,root)
%ghost %attr(0644,root,root) %config(noreplace,missingok) %{_sysconfdir}/ndb_cpcd.conf
%ghost %attr(0644,root,root) %config(noreplace,missingok) %{_localstatedir}/mysql/Ndb.cfg
%attr(0644,root,root) %config(noreplace,missingok) %{_localstatedir}/mysql-cluster/config.ini
%attr(0644,root,root) %config(noreplace,missingok) %{_sysconfdir}/sysconfig/mysqld-ndb_cpcd
%attr(0644,root,root) %config(noreplace,missingok) %{_sysconfdir}/sysconfig/mysqld-ndb_mgmd
%attr(0755,root,root) %{_initrddir}/mysqld-ndb_cpcd
%attr(0755,root,root) %{_initrddir}/mysqld-ndb_mgmd
%attr(0755,root,root) %{_sbindir}/ndb_mgmd
%attr(0755,root,root) %{_sbindir}/ndb_cpcd
%attr(0755,root,root) %{_bindir}/ndb_mgm
%attr(0755,%{muser},%{muser}) %dir %{_var}/run/ndb_cpcd

%files ndb-tools
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/ndb_config
%attr(0755,root,root) %{_bindir}/ndb_mgm
%attr(0755,root,root) %{_bindir}/ndb_restore
%attr(0755,root,root) %{_bindir}/ndb_waiter
%attr(0755,root,root) %{_bindir}/ndb_select_all
%attr(0755,root,root) %{_bindir}/ndb_select_count
%attr(0755,root,root) %{_bindir}/ndb_desc
%attr(0755,root,root) %{_bindir}/ndb_show_tables
%attr(0755,root,root) %{_bindir}/ndb_test_platform
%attr(0755,root,root) %{_bindir}/ndb_error_reporter
%attr(0755,root,root) %{_bindir}/ndb_size.pl

%files ndb-extra
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/ndb_drop_index
%attr(0755,root,root) %{_bindir}/ndb_drop_table
%attr(0755,root,root) %{_bindir}/ndb_delete_all

%files client
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/msql2mysql
%attr(0755,root,root) %{_bindir}/mysql
%attr(0755,root,root) %{_bindir}/mysqlaccess
%attr(0755,root,root) %{_bindir}/mysqladmin
%attr(0755,root,root) %{_bindir}/mysqlanalyze
%attr(0755,root,root) %{_bindir}/mysqlbinlog
%attr(0755,root,root) %{_bindir}/mysqlcheck
%attr(0755,root,root) %{_bindir}/mysqldump
%attr(0755,root,root) %{_bindir}/mysqldumpslow
%attr(0755,root,root) %{_bindir}/mysql_find_rows
%attr(0755,root,root) %{_bindir}/mysqlimport
%attr(0755,root,root) %{_bindir}/mysqloptimize
%attr(0755,root,root) %{_bindir}/mysqlrepair
%attr(0755,root,root) %{_bindir}/mysqlshow
%attr(0755,root,root) %{_bindir}/mysql_tableinfo
%attr(0755,root,root) %{_bindir}/mysql_waitpid
%attr(0644,root,root) %{_mandir}/man1/msql2mysql.1*
%attr(0644,root,root) %{_mandir}/man1/mysql.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlaccess.1*
%attr(0644,root,root) %{_mandir}/man1/mysqladmin.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlbinlog.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlcheck.1*
%attr(0644,root,root) %{_mandir}/man1/mysqldump.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlimport.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlshow.1*
%attr(0644,root,root) %{_mandir}/man1/myisam_ftdump.1*

%files bench
%defattr(-,root,root)
%doc sql-bench/README
%attr(0755,root,root) %{_bindir}/mysql_client_test
%attr(0755,root,root) %{_bindir}/mysql_client_test_embedded
%attr(0755,root,root) %{_bindir}/mysqltestmanager
%attr(0755,root,root) %{_bindir}/mysqltestmanager-pwgen
%attr(0755,root,root) %{_bindir}/mysqltestmanagerc
%{_datadir}/sql-bench
%{_datadir}/mysql-test

%files common
%defattr(-,root,root) 
%doc README COPYING support-files/*.cnf SSL/NOTES SSL/run* SSL/*.pem Docs/html
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/mysqld
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/mysqld
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/my.cnf
%ghost %attr(0640,%{muser},%{muser}) %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
%attr(0755,root,root) %{_bindir}/myisamchk
%attr(0755,root,root) %{_bindir}/myisam_ftdump
%attr(0755,root,root) %{_bindir}/myisamlog
%attr(0755,root,root) %{_bindir}/myisampack
%attr(0755,root,root) %{_bindir}/my_print_defaults
%attr(0755,root,root) %{_bindir}/mysqlbug
%attr(0755,root,root) %{_bindir}/mysql_convert_table_format
%attr(0755,root,root) %{_bindir}/mysql_create_system_tables
%attr(0755,root,root) %{_bindir}/mysqld_multi
%attr(0755,root,root) %{_bindir}/mysqld_safe
%attr(0755,root,root) %{_bindir}/mysql_explain_log 
%attr(0755,root,root) %{_bindir}/mysql_fix_extensions 
%attr(0755,root,root) %{_bindir}/mysql_fix_privilege_tables
%attr(0755,root,root) %{_bindir}/mysqlhotcopy
%attr(0755,root,root) %{_bindir}/mysql_install_db
%attr(0755,root,root) %{_bindir}/mysql_secure_installation 
%attr(0755,root,root) %{_bindir}/mysql_setpermission
%attr(0755,root,root) %{_bindir}/mysqltest
%attr(0755,root,root) %{_bindir}/mysql_tzinfo_to_sql
%attr(0755,root,root) %{_bindir}/mysql_zap
%attr(0755,root,root) %{_bindir}/mysql_upgrade
%attr(0755,root,root) %{_bindir}/perror
%attr(0755,root,root) %{_bindir}/replace
%attr(0755,root,root) %{_bindir}/resolveip
%attr(0755,root,root) %{_bindir}/resolve_stack_dump
%attr(0755,root,root) %{_bindir}/innochecksum
%attr(0755,root,root) %{_bindir}/mysql_upgrade_shell
%attr(0755,root,root) %{_sbindir}/mysqlmanager
%{_infodir}/mysql.info*
%attr(0711,%{muser},%{muser}) %dir %{_localstatedir}/mysql-cluster
%attr(0711,%{muser},%{muser}) %dir %{_localstatedir}/mysql
%attr(0711,%{muser},%{muser}) %dir %{_localstatedir}/mysql/mysql
%attr(0711,%{muser},%{muser}) %dir %{_localstatedir}/mysql/test
%attr(0711,%{muser},%{muser}) %dir %{_localstatedir}/mysql/.tmp
%attr(0755,%{muser},%{muser}) %dir %{_var}/run/mysqld
%attr(0755,%{muser},%{muser}) %dir %{_var}/log/mysqld
%dir %{_datadir}/mysql
%{_datadir}/mysql/mi_test_all
%{_datadir}/mysql/mi_test_all.res
%{_datadir}/mysql/*.cnf
%{_datadir}/mysql/charsets
%{_datadir}/mysql/fill_help_tables.sql
%{_datadir}/mysql/mysql_fix_privilege_tables.sql
%{_datadir}/mysql/*.ini
%{_datadir}/mysql/errmsg.txt
%{_datadir}/mysql/ndb_size.tmpl
%lang(cz) %{_datadir}/mysql/czech
%lang(da) %{_datadir}/mysql/danish
%lang(nl) %{_datadir}/mysql/dutch
%{_datadir}/mysql/english
%lang(et) %{_datadir}/mysql/estonian
%lang(fr) %{_datadir}/mysql/french
%lang(de) %{_datadir}/mysql/german
%lang(el) %{_datadir}/mysql/greek
%lang(hu) %{_datadir}/mysql/hungarian
%lang(it) %{_datadir}/mysql/italian
%lang(jp) %{_datadir}/mysql/japanese
%lang(ko) %{_datadir}/mysql/korean
%lang(no) %{_datadir}/mysql/norwegian
%lang(no_ny) %{_datadir}/mysql/norwegian-ny
%lang(pl) %{_datadir}/mysql/polish
%lang(pt) %{_datadir}/mysql/portuguese
%lang(ro) %{_datadir}/mysql/romanian
%lang(ru) %{_datadir}/mysql/russian
%lang(sr) %{_datadir}/mysql/serbian
%lang(sl) %{_datadir}/mysql/slovak
%lang(es) %{_datadir}/mysql/spanish
%lang(sv) %{_datadir}/mysql/swedish
%lang(uk) %{_datadir}/mysql/ukrainian
%attr(0644,root,root) %{_mandir}/man1/myisamchk.1*
%attr(0644,root,root) %{_mandir}/man1/myisamlog.1*
%attr(0644,root,root) %{_mandir}/man1/myisampack.1*
%attr(0644,root,root) %{_mandir}/man1/mysql.server.1*
%attr(0644,root,root) %{_mandir}/man1/mysql_fix_privilege_tables.1*
%attr(0644,root,root) %{_mandir}/man1/mysql_zap.1*
%attr(0644,root,root) %{_mandir}/man1/mysqld.1*
%attr(0644,root,root) %{_mandir}/man1/mysqld_multi.1*
%attr(0644,root,root) %{_mandir}/man1/mysqld_safe.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlhotcopy.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlman.1*
%attr(0644,root,root) %{_mandir}/man1/mysqlmanager.1*
%attr(0644,root,root) %{_mandir}/man1/perror.1*
%attr(0644,root,root) %{_mandir}/man1/replace.1*
%attr(0644,root,root) %{_mandir}/man1/safe_mysqld.1*
%attr(0644,root,root) %{_mandir}/man1/mysql_upgrade.1*
%attr(0644,root,root) %{_mandir}/man1/mysql_explain_log.1*

%files -n %{libname}
%defattr(-,root,root)
%doc ChangeLog
%attr(0755,root,root) %{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc INSTALL-SOURCE EXCEPTIONS-CLIENT Docs/devel/*
%attr(0755,root,root) %{_bindir}/comp_err
%if %mdkversion >= 1020
%multiarch %{multiarch_bindir}/mysql_config
%endif
%attr(0755,root,root) %{_bindir}/mysql_config
%attr(0644,root,root) %{_libdir}/*.la
%attr(0755,root,root) %{_libdir}/*.so
%dir %{_includedir}/mysql
%dir %{_includedir}/mysql/ndb
%dir %{_includedir}/mysql/ndb/mgmapi
%dir %{_includedir}/mysql/ndb/ndbapi
%attr(0644,root,root) %{_includedir}/mysql/*.h
%attr(0644,root,root) %{_includedir}/mysql/ndb/*.h
%attr(0644,root,root) %{_includedir}/mysql/ndb/mgmapi/*.h
%attr(0644,root,root) %{_includedir}/mysql/ndb/ndbapi/*.h*
%if %mdkversion >= 1020
%multiarch %{multiarch_includedir}/mysql/my_config.h
%multiarch %{multiarch_includedir}/mysql/ndb/ndb_types.h
%multiarch %{multiarch_includedir}/mysql/ndb/ndb_constants.h
%endif
%attr(0644,root,root) %{_mandir}/man1/mysql_config.1*

%files -n %{libname}-static-devel
%defattr(-,root,root)
%dir %{_libdir}/mysql
%attr(0644,root,root) %{_libdir}/mysql/libdbug.a
%attr(0644,root,root) %{_libdir}/mysql/libheap.a
%attr(0644,root,root) %{_libdir}/mysql/libmyisam.a
%attr(0644,root,root) %{_libdir}/mysql/libmyisammrg.a
%attr(0644,root,root) %{_libdir}/mysql/libmysqld.a
%attr(0644,root,root) %{_libdir}/mysql/libmystrings.a
%attr(0644,root,root) %{_libdir}/mysql/libmysys.a
%attr(0644,root,root) %{_libdir}/mysql/libvio.a
%attr(0644,root,root) %{_libdir}/*.a

%changelog
* Fri Aug 04 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.24-1mdv2007.0
- 5.0.24

* Tue Jul 11 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.23-1mdv2007.0
- 5.0.23 (fixes CVE-2006-0903)
- rediffed P2,P12
- drop the libwrap patch (P14) as it won't apply anymore
- run the test suite again

* Tue Jun 06 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.22-1mdv2007.0
- 5.0.22 (Minor security fixes)

* Wed May 03 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.21-1mdk
- 5.0.21 (Major security fixes)
- rediffed P2,P12
- added the --defaults-file=/etc/my.cnf switch to my_print_defaults

* Sun Apr 23 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.20a-1mdk
- 5.0.20a (Minor bugfixes)

* Thu Apr 13 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.20-1mdk
- 5.0.20

* Sat Mar 11 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.19-1mdk
- 5.0.19 (Major bugfixes)
- rediffed P13

* Thu Feb 23 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.18-5mdk
- fix deps

* Mon Jan 30 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.18-4mdk
- added P14 from PLD (libwrap fixes)
- added initscripts for the ndb-storage and ndb-management sub packages

* Tue Jan 17 2006 Oden Eriksson <oeriksson@mandriva.com> 5.0.18-3mdk
- fix the "line 48: [: too many arguments" error (rgs)

* Sat Dec 31 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.18-2mdk
- rebuild

* Sat Dec 31 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.18-1mdk
- 5.0.18 (Minor bugfixes)
- new documentation (S2)

* Tue Dec 20 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.17-1mdk
- 5.0.17 (Minor bugfixes)
- broke out the static development libraries into a new sub package 
  per request by Andreas Hasenack 

* Mon Nov 28 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.16-4mdk
- the %%{_datadir}/mysql/english/errmsg.sys is default

* Sun Nov 27 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.16-3mdk
- fix another file conflict dropping the *.sym files since the -debug 
  package should be enough

* Fri Nov 25 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.16-2mdk
- make the magic in %%post more robust and make switching betwen MySQL and MySQL-Max work
- fix the initscript again
- added run-as-service in the [manager] section in the default /etc/my.cnf file and
 --run-as-service in the initscript
- fix correct owner on the /etc/mysqlmanager.passwd file
- fix lang section because %%find_lang.sh does not see *.sys files
- fix deps again

* Thu Nov 24 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.16-1mdk
- 5.0.16 (Minor bugfixes)
- rediffed P2 (lib64)
- drop upstream patch P14 (bug14388)
- fix deps again (#19789) (thanks Rafael Garcia-Suarez)
- more man pages were added
- stop mysqld in %%post correctly
- drop the usage of update-alternatives as it won't work smoothly...
- made some minor corrections in the initscript (P12)

* Fri Nov 18 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-8mdk
- fix deps, MySQL-client was not properly upgraded under certain 
  circumstances (#19789) (thanks Thierry Vignaud)
  
* Thu Nov 17 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-7mdk
- fix deps, MySQL-client was not properly upgraded (#19789)
- ship README.urpmi with the server package only

* Sun Nov 13 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-6mdk
- rebuilt against openssl-0.9.8a
- fix deps
- reintroduced old_passwords to the my.cnf file
- added a new README.urpmi file
- reintroduced the /etc/sysconfig/mysqld file (S3) and fix P12 accordingly
- reintroduced the chroot build patch (P3)

* Thu Nov 03 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-5mdk
- make the update-alternatives work as intended
- change to root user for [client] in my.cnf (duh!)

* Sat Oct 29 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-4mdk
- rebuilt to provide a -debug package too

* Sat Oct 29 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-3mdk
- really fix "service mysqld status"...

* Fri Oct 28 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-2mdk
- added P14 to fix mysql bug 14388 (thanks to Tim Lee, cooker ml)
- fix "service mysqld status", maybe use status mysqlmanager too?

* Thu Oct 27 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.15-1mdk
- 5.0.15 (GA)
- drop upstream patches; P4
- rediffed patches; P1,P9,P12
- added P13 to set some defaults for the instance manager
- added the html docs (S2 + ndb/docs/*)
- construct a generic my.cnf file based on support-files/my-medium.cnf
- use the provided initscript, but slightly patched
- use alternatives for the mysqld binary
- spec file merge with MySQL50-5.0.4-0.beta.1mdk

* Sun Oct 23 2005 Oden Eriksson <oeriksson@mandriva.com> 4.1.15-1mdk
- 4.1.15
- rediffed patches; P9,P13

* Wed Oct 12 2005 Oden Eriksson <oeriksson@mandriva.com> 4.1.14-1mdk
- 4.1.14 (Minor bugfixes)
- fix deps
- enable bdb for -Max and -NDB only
- sync with fedora (P11 - P14) 4.1.12-3

* Tue Sep 13 2005 Oden Eriksson <oeriksson@mandriva.com> 4.1.12-3mdk
- P11: security update for CAN-2005-2558

* Tue Jul 05 2005 Oden Eriksson <oeriksson@mandriva.com> 4.1.12-2mdk
- make the devel package conflict with the other mysql devel 
  packages in contrib

* Mon May 23 2005 Oden Eriksson <oeriksson@mandriva.com> 4.1.12-1mdk
- 4.1.12
- the manual.texi is gone, as well as the manual in ps, pdf 
  and html. they are switching to docbook
- use new rpm-4.4.x pre,post magic
- make it build in a chroot with no proc mounted (PLD)
- disable the tests for now, i keep getting "mysql_client_test.c:3563: 
  check failed: '(int) i8_data == rc'" it may be a gcc4 problem...

* Wed Apr 06 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.11-1mdk
- 4.1.11 (adresses CAN-2004-0957 and contain bug fixes)
- rediff P6
- use --with-big-tables

* Mon Mar 14 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.10a-1mdk
- 4.1.10a addresses CAN-2005-0709, CAN-2005-0710 and CAN-2005-0711
- use the %%mkrel macro

* Wed Mar 09 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.10-2mdk
- use %%triggerin in case we update a running system

* Fri Feb 25 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.10-1mdk
- 4.1.10
- rediffed P0, P5
- drop P100 as the CAN-2005-0004 fix has been implemented upstream
- use a different pid name for the fix_privileges stuff in %%post

* Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-8mdk
- added P100 from PLD (CAN-2005-0004)

* Thu Feb 03 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-7mdk
- added rediffed P7 and P8 from the latest db-4.1.25 package, plus
  added P9 to use it in an attempt to address possible nptl issues.
- added README.urpmi after peeking at bash-completion

* Fri Jan 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-6mdk
- provide TMPDIR and TMP directory and environment (#13285)

* Wed Jan 26 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-5mdk
- really fix conditional deps and %%multiarch :)

* Tue Jan 25 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-4mdk
- fix conditional deps and %%multiarch

* Mon Jan 24 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-3mdk
- added missing pieces, with a twist
- added P4,P5,P6 from fedora
- run the test suite (man!, this takes time...)
- fixed a bug in the initscript spotted by Lionel VICTOR
- fixed a bug in the mysql_install_db.sh patch

* Sat Jan 22 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-2mdk
- fix deps
- cleanups

* Fri Jan 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-1mdk
- rename the package, drop the 41 in the name, adjust deps accordinly
- fixed the init script and default config
- drop redundant patches
- fix the mysql_install_db.sh and mysqld_safe.sh scripts
- misc spec file fixes

* Fri Jan 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-2mdk
- added some conflicts
- added P5 (fedora)
- added --enable-large-files=yes --enable-largefile=yes
- fixed an error in the init scripts
- link against system readline

* Fri Jan 14 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.9-1mdk
- 4.1.9

* Fri Dec 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.8-1mdk
- 4.1.8

* Tue Dec 14 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.7-4mdk
- added the ndb sub package
- fix deps

* Sat Oct 30 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.7-3mdk
- make it build on 10.0 too
- provide a by chapter split manual

* Thu Oct 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.7-2mdk
- fix P1

* Wed Oct 27 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.7-1mdk
- 4.1.7

* Sun Oct 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.6-0.1mdk
- 4.1.6-gamma
- misc spec file fixes

* Wed Sep 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.5-0.1mdk
- 4.1.5-gamma

* Tue Aug 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.4-0.1mdk
- 4.1.4-gamma

* Sat Jul 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.1.3-0.1mdk
- 4.1.3-beta
- rediffed some patches
- major spec file cleanups

* Thu Jun  3 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.0.20-3mdk
- rebuilt against gcc3.4
- fix buildrequires: libstdc++-static-devel

* Sat May 29 2004 Michael Scherer <misc@mandrake.org> 4.0.20-2mdk 
- [DIRM]
- fix rebuild
- added README.MDK

* Tue May 18 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.0.20-1mdk
- oops! 4.0.19 was broken (but works for me), pointed out by 
  Benjamin Pflugmann, thanks man!

* Mon May 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.0.19-1mdk
- 4.0.19
- fix for CAN-2004-0381, CAN-2004-0388 is included

* Mon May 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.0.18-2mdk
- security fix for CAN-2004-0381, CAN-2004-0388 (vdanen)
- misc spec file fixes
- remove unused patches (P1, P2, P3, P4, P9, P10)

* Sun Feb 22 2004 Warly <warly@mandrakesoft.com> 4.0.18-1mdk
- new version (bugfixes)
- add innodb support in default MySQL
- do not call logger in initscripts any more to close all local IO references

* Tue Jan 20 2004 Frederic Lepied <flepied@mandrakesoft.com> 4.0.17-2mdk
- fixed strings in init scripts
- add require perl-Mysql in MySQL-common

* Sun Dec 21 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.17-1mdk
- 4.0.17
- rediffed P0 and P8
- drop unused P7

* Thu Oct 23 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.16-1mdk
- 4.0.16
- rediffed P0 and P5
- make it start after network and before any other requiring it (P0)

* Sun Sep 14 2003 Warly <warly@mandrakesoft.com> 4.0.15-1mdk
- Security update

* Fri Aug  8 2003 Warly <warly@mandrakesoft.com> 4.0.14-1mdk
- new version (main changes):
   * Enabled `INSERT' from `SELECT' when the table into which the records are inserted is also a table listed in the `SELECT'.
   * Added `--nice' option to `mysqld_safe' to allow setting the  niceness of the `mysqld' process.
   * `RESET SLAVE' now clears the `Last_errno' and `Last_error' fields in the output of `SHOW SLAVE STATUS'.
   * Added `max_relay_log_size' variable; the relay log will be rotated
     automatically when its size exceeds `max_relay_log_size'. But if
     `max_relay_log_size' is 0 (the default), `max_binlog_size' will be
     used (as in older versions). `max_binlog_size' still applies to
     binary logs in any case.

* Fri Aug  1 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.0.13-4mdk
- lib64 fixes, quotes test fixes
- BuildRequires: termcap-devel for MDK 9.2

* Thu Jul 10 2003 Laurent MONTEL <lmontel@mandrakesoft.com> 4.0.13-3mdk
- Rebuild

* Wed Jun 04 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.13-2mdk
- brute fix the offending "perl(the)" stuff, remove this when perl.req is fixed.
- fix "no-prereq-on rpm-helper" for MySQL-common
- fix "no-provides libmysql-devel" for libmysql12-devel
- activated %%clean

* Fri May 30 2003 Warly <warly@mandrakesoft.com> 4.0.13-1mdk
- new version (main changes):
Functionality added or changed:
 - `PRIMARY KEY' now implies `NOT NULL'.
 - `SHOW MASTER STATUS' and `SHOW SLAVE STATUS' required the `SUPER'  privilege; now they accept `REPLICATION CLIENT' as well.
 - MySQL now issues a warning when it opens a table that was created with MySQL 4.1.
 - Option `--new' now changes binary items (`0xFFDF') to be treated
   as binary strings instead of numbers by default. This fixes some
   problems with character sets where it's convenient to input the
   string as a binary item.  After this change you have to convert
   the binary string to `INTEGER' with a `CAST' if you want to
   compare two binary items with each other and know which one is
   bigger than the other.  `SELECT CAST(0xfeff AS UNSIGNED) <
   CAST(0xff AS UNSIGNED)'.  This will be the default behaviour in
   MySQL 4.1. (Bug #152)
 - Fixed bug with `NATURAL LEFT JOIN', `NATURAL RIGHT JOIN' and
   `RIGHT JOIN' when using many joined tables.  The problem was that
   the `JOIN' method was not always associated with the tables
   surrounding the `JOIN' method.  If you have a query that uses many
   `RIGHT JOIN' or `NATURAL ... JOINS' you should check that they
   work as you expected after upgrading MySQL to this version.
 - Tuned optimizer to favour clustered index over table scan.
 - `BIT_AND()' and `BIT_OR()' now return an unsigned 64 bit value.
Bugs fixed:
 - Fixed `Unknown error' when using `UPDATE ... LIMIT'.
 - Fixed problem with ansi mode and `GROUP BY' with constants.
 - Fixed bug if one used a multi-table `UPDATE' and the query required a temporary table bigger than `tmp_table_size'.
 - `LOAD DATA INFILE' will now read `000000' as a zero date instead as `"2000-00-00"'.
 - Fixed bug that caused `DELETE FROM table WHERE const_expression' always to delete the whole table.
 - Fixed core dump bug when using `FORMAT('nan',#)'.
 - Fixed wrong result from truncation operator (`*') in `MATCH ... AGAINST()' in some complex joins.
 - Fixed a crash in `REPAIR ... USE_FRM' command, when used on read-only, nonexisting table or a table with a crashed index file.
 - Fixed bug in `LEFT', `RIGHT' and `MID' when used with multi-byte character sets and some `GROUP BY' queries.
 - Fix problem with `ORDER BY' being discarded for some `DISTINCT' queries.
 - Fixed that `SET SQL_BIG_SELECTS=1' works as documented (New bug in 4.0)
 - Fixed some serious bugs in `UPDATE ... ORDER BY'.
 - Fixed that `SET SQL_BIG_SELECTS=1' works again.
 - `FULLTEXT' index stopped working after `ALTER TABLE' that converts `TEXT' field to `CHAR'. 
 - Fixed a security problem with `SELECT' and wildcarded select list, when user only had partial column `SELECT' privileges on the table.
 - Only ignore world-writeable `my.cnf' files that are regular files (and not e.g. named pipes or character devices).
 - `SUM()' didn't return `NULL' when there was no rows in result or  when all values was `NULL'.
 - On Unix symbolic links handling was not enabled by default and there was no way to turn this on.
 - Fixed a bug with `NAN' in `FORMAT(...)' function ...
 - Fixed a bug with improperly cached database privileges.
 - Fixed a bug in `ALTER TABLE ENABLE / DISABLE KEYS' which failed to force a refresh of table data in the cache.
 - Fixed bugs in replication of `LOAD DATA INFILE' for custom parameters (`ENCLOSED',  `TERMINATED' and so on) and temporary tables.
 - Fixed a replication bug when the master is 3.23 and the slave 4.0:  the slave lost the replicated temporary tables if `FLUSH LOGS' was issued on the master.

* Sun May 11 2003 Stefan van der Eijk <stefan@eijk.nu> 4.0.12-3mdk
- BuildRequires openssl-static-devel
- removed redeundant BuildRequires
- fix build on alpha: add -fPIC to CXXFLAGS (thanks glee)

* Fri May  2 2003 Warly <warly@mandrakesoft.com> 4.0.12-2mdk
- buildrequires openssl-devel
- add splitted manual in 'chapter' subdir in doc dir (Steve White)

* Wed Apr  9 2003 Warly <warly@mandrakesoft.com> 4.0.12-1mdk
- new version (main changes):
 * `mysqld' no longer reads options from world-writeable config files.
 * Fixed `mysqld' crash on extremely small values of `sort_buffer' variable.
 * Fixed checking of random part of `WHERE' clause.
 * Don't allow `BACKUP TABLE' to overwrite existing files.
 * Fixed a bug with multi-table `UPDATE's when user had all privileges
   on the database where tables are located and there were any
   entries in `tables_priv' table, i.e. `grant_option' was true.
 * Fixed a bug that allowed a user with table or column grants on
   some table, `TRUNCATE' any table in the same database.
 * Fixed deadlock when doing `LOCK TABLE' followed by `DROP TABLE' in
   the same thread.  In this case one could still kill the thread
   with `KILL'.
 * Fixed query cache invalidation on `LOAD DATA'.
 * Fixed memory leak on `ANALYZE' procedure with error.
 * Fixed a bug in handling `CHAR(0)' columns that could cause wrong results from the query.
 * Fixed a crash when no database was selected and `LOAD DATA' command
   was issued with full table name specified, including database
   prefix.
- add Zdenek Mazanec patch for charset conversion fix

* Wed Mar 12 2003 Warly <warly@mandrakesoft.com> 4.0.11a-5mdk
- Apply Benjamin Pflugmann patch to mysql_install_db

* Sun Mar  9 2003 Warly <warly@mandrakesoft.com> - 4.0.11a-4mdk
- Correct post install scripts and requires

* Thu Mar  6 2003 Warly <warly@mandrakesoft.com> 4.0.11a-3mdk
- MySQL and MySQL-Max conflicts between each others
- include a separate service for mysql and mysql-max in respective server to have clean uninstall
- fix requires in MySQL MySQL-common and MySQL-max
- Try to correct post install script to fix privileges.
- fix initscripts problem with chkconfig --add

* Mon Mar  3 2003 Warly <warly@mandrakesoft.com> 4.0.11a-2mdk
- use --skip-grant-tables --skip-networking for the update process (Benjamin Pflugmann)

* Sat Mar  1 2003  <warly@ke.mandrakesoft.com> 4.0.11a-1mdk
- new version
- new MySQL-common package
- call mysql_fix_privilege_tables in post (but this will fail if
root access need a password)
- add openssl support in MySQL-Max

* Fri Feb  7 2003 Warly <warly@mandrakesoft.com> 4.0.10-1mdk
- new version
- fix initscript

* Thu Feb  6 2003 Warly <warly@mandrakesoft.com> 4.0.9-1mdk
- new version
- do not compile in static anymore
- check mysqld-max on status

* Tue Jan 28 2003 Vincent Danen <vdanen@mandrakesoft.com> 3.23.55-1mdk
- 3.23.55; fixes a double free() in COM_CHANGE_USER
- comment out --with-comment for %%configure as it doesn't seem to like us
  anymore

* Tue Dec 24 2002 Warly <warly@mandrakesoft.com> 3.23.54a-1mdk
- new version

* Wed Nov 20 2002 Warly <warly@mandrakesoft.com> 3.23.53-5mdk
- fix /var/lib/lib/ home dir typo
- remove lang tag to english

* Tue Nov 19 2002 Warly <warly@mandrakesoft.com> 3.23.53-4mdk
- add glibc-static-devel buildrequires

* Tue Nov 19 2002 Warly <warly@mandrakesoft.com> 3.23.53-3mdk
- fix file ownership problems in /var/lib/mysql
- put lang files in %%lang

* Sat Nov  9 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.23.53-2mdk
- Patch3: Fix build on x86-64

* Wed Oct 23 2002 Warly <warly@mandrakesoft.com> 3.23.53-1mdk
- new version
 
* Sun Aug 18 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.23.52-1mdk
- update from Oden Eriksson <oden.eriksson@kvikkjokk.net>:
	- new stable version

* Sat Aug 10 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.23.51-4mdk
- fix initscript.

* Wed Jul 17 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.23.51-3mdk
- Patch2: Fix --with-other-libc support
- Take care of new CFLAGS from %%serverbuild
- rpmlint fixes: configure-without-libdir-spec, hardcoded-library-path
- Stop hardcoding compiler versions. Why so? and why parts of the
  %%changelog were nuked away??

* Sat Jul  6 2002 Stefan van der Eijk <stefan@eijk.nu> 3.23.51-2mdk
- BuildRequires

* Fri Jun 14 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.23.51-1mdk
- New version.

* Thu Apr 25 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.23.50-1mdk
- Synchronize with MySQL official SPEC
- Add InnoDB support
- Build against gcc 3.

* Fri Feb 15 2002 Sasha

- changed build to use --with-other-libc

* Fri Apr 13 2001 Monty

- Added mysqld-max to the distribution

* Tue Jan 2  2001  Monty

- Added mysql-test to the bench package

* Fri Aug 18 2000 Tim Smith <tim@mysql.com>

- Added separate libmysql_r directory; now both a threaded
  and non-threaded library is shipped.

* Wed Sep 28 1999 David Axmark <davida@mysql.com>

- Added the support-files/my-example.cnf to the docs directory.

- Removed devel dependency on base since it is about client
  development.

* Wed Sep 8 1999 David Axmark <davida@mysql.com>

- Cleaned up some for 3.23.

* Thu Jul 1 1999 David Axmark <davida@mysql.com>

- Added support for shared libraries in a separate sub
  package. Original fix by David Fox (dsfox@cogsci.ucsd.edu)

- The --enable-assembler switch is now automatically disables on
  platforms there assembler code is unavailable. This should allow
  building this RPM on non i386 systems.

* Mon Feb 22 1999 David Axmark <david@detron.se>

- Removed unportable cc switches from the spec file. The defaults can
  now be overridden with environment variables. This feature is used
  to compile the official RPM with optimal (but compiler version
  specific) switches.

- Removed the repetitive description parts for the sub rpms. Maybe add
  again if RPM gets a multiline macro capability.

- Added support for a pt_BR translation. Translation contributed by
  Jorge Godoy <jorge@bestway.com.br>.

* Wed Nov 4 1998 David Axmark <david@detron.se>

- A lot of changes in all the rpm and install scripts. This may even
  be a working RPM :-)

* Sun Aug 16 1998 David Axmark <david@detron.se>

- A developers changelog for MySQL is available in the source RPM. And
  there is a history of major user visible changed in the Reference
  Manual.  Only RPM specific changes will be documented here.