Hi.
Here's a proposed patch to update MySQL to production status.
Chears.
--
Regards // Oden Eriksson, Deserve-IT.com
--- MySQL.spec 2003-03-12 11:14:39.000000000 +0100
+++ MySQL.spec.oden 2003-03-31 09:42:32.000000000 +0200
@@ -1,6 +1,6 @@
%define name MySQL
-%define version 4.0.11a
-%define release 5mdk
+%define version 4.0.12
+%define release 1mdk
%define major 12
%define libname_orig mysql
%define libname %mklibname %{libname_orig} %{major}
@@ -21,13 +21,13 @@
Release: %{release}
License: GPL
#Source: http://www.mysql.com/Downloads/MySQL-3.23/
-Source: ftp.free.fr:/pub/MySQL/Downloads/MySQL-4.0/mysql-%{version}-gamma.tar.bz2
+Source0: mysql-%{version}.tar.gz
+Source1: mysql-%{version}.tar.gz.asc
Patch0: mysql-4.0.9-init.patch.bz2
Patch1: mysql-3.23.42-bench.patch.bz2
Patch2: mysql-3.23.51-other-libc.patch.bz2
Patch3: mysql-3.23.54a-errno.patch.bz2
Patch4: MySQL-4.0.11-fix-test-ssl-include.patch.bz2
-Patch5: MySQL-4.0.11a-fix_install_scripts.patch.bz2
Icon: mysql.gif
URL: http://www.mysql.com
Provides: msqlormysql MySQL-server mysqlserver mysql
@@ -101,7 +101,7 @@
Group: Development/Other
Obsoletes: MySQL-devel mysql-devel
Provides: MySQL-devel = %{version}-%{release} mysql-devel = %{version}-%{release} %{libname_orig}-devel = %{version}-%{release}
-Requires: %{libname} = %{version} MySQL-common = %{version}-%{release} MySQL-client = %{version}-%{release}
+Requires: %{libname} = %{version} MySQL = %{version}-%{release} MySQL-client = %{version}-%{release}
%description -n %{libname}-devel
This package contains the development header files and libraries
@@ -134,7 +134,7 @@
package after the MySQL package.
%prep
-%setup -q -n mysql-%{version}-gamma
+%setup -q -n mysql-%{version}
%patch0 -p1 -b .server-stop
##%patch1 -b .patch
@@ -143,7 +143,6 @@
#%patch3 -p1 -b .errno
%patch4 -p1 -b .my_net
-%patch5 -p1 -b .max
# 20021227 warly manual include files not in the archives
@@ -195,6 +194,7 @@
--infodir=%{_infodir} \
--includedir=%{_includedir} \
--mandir=%{_mandir} \
+ --with-query-cache \
--program-prefix= ;
# --with-comment=\"%{distribution} MySQL RPM\";
# Add this for more debugging support
@@ -217,7 +217,7 @@
# Use the build root for temporary storage of the shared libraries.
RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-%{version}-gamma
+MBD=$RPM_BUILD_DIR/mysql-%{version}
#
# Use MYSQL_BUILD_PATH so that we can use a dedicated version of gcc
@@ -229,7 +229,7 @@
# are using --with-other-libc
# BuildMySQL "--disable-shared $USE_OTHER_LIBC_DIR --with-berkeley-db --with-innodb --with-mysqld-ldflags='-all-static' --with-server-suffix='-Max'"
-BuildMySQL "--enable-shared --with-berkeley-db --with-innodb --with-openssl --with-server-suffix='-Max'"
+BuildMySQL "--enable-shared --with-berkeley-db --with-innodb --with-openssl=%{_prefix} --with-server-suffix='-Max'"
# Save mysqld-max
mv sql/mysqld sql/mysqld-max
@@ -268,7 +268,7 @@
%install -n mysql-%{version}
RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-%{version}-gamma
+MBD=$RPM_BUILD_DIR/mysql-%{version}
# Ensure that needed directories exists
install -d $RBR%{_sysconfdir}/{logrotate.d,rc.d/init.d}
install -d $RBR%{_localstatedir}/mysql/mysql
@@ -369,10 +369,9 @@
%pre common
%_pre_useradd mysql %{_localstatedir}/mysql /bin/bash
-%post common
+%post
%_install_info mysql.info
-%post
# Initiate databases
su - mysql -c "mysql_install_db -IN-RPM" > /dev/null
@@ -384,7 +383,7 @@
# try to fix privileges table, use a no password user table for that
fix_privileges()
{
- datadir=`my_print_defaults mysqld | grep '^--datadir=' | cut -d= -f2`
+ datadir=`my_print_defaults mysqld | grep '^--datadir' | cut -d \ -f2-`
if [ -z $datadir ]; then
datadir=%{_localstatedir}/mysql/
fi
@@ -418,9 +417,6 @@
fi
%post Max
-
-su - mysql -c "mysql_install_db -IN-RPM" > /dev/null
-
%_post_service mysql-max
# Allow mysqld_safe to start mysqld and print a message before we exit
sleep 2
@@ -428,7 +424,7 @@
# try to fix privileges table, use a no password user table for that
fix_privileges()
{
- datadir=`my_print_defaults mysqld | grep '^--datadir=' | cut -d= -f2`
+ datadir=`my_print_defaults mysqld | grep '^--datadir' | cut -d \ -f2-`
if [ -z $datadir ]; then
datadir=%{_localstatedir}/mysql/
fi
@@ -470,7 +466,7 @@
%_remove_install_info mysql.info
%preun Max
-%_preun_service mysql-max
+%_preun_service mysql
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
@@ -585,11 +581,9 @@
%config(noreplace) /etc/rc.d/init.d/mysql-max
%changelog
-* Wed Mar 12 2003 Warly <[EMAIL PROTECTED]> 4.0.11a-5mdk
-- Apply Benjamin Pflugmann patch to mysql_install_db
-
-* Sun Mar 9 2003 Warly <[EMAIL PROTECTED]> - 4.0.11a-4mdk
-- Correct post install scripts and requires
+* Mon Mar 31 2003 Oden Eriksson <[EMAIL PROTECTED]> 4.0.12-1mdk
+- 4.0.12
+- built for 9.x
* Thu Mar 6 2003 Warly <[EMAIL PROTECTED]> 4.0.11a-3mdk
- MySQL and MySQL-Max conflicts between each others