# TODO:
-# - trigger that prepares system from pre-cluster into cluster
-# - trigger /etc/mysqld.conf into /etc/mysql/mysqld.conf. Solve possible
-# conflict with /var/lib/mysql/mysqld.conf
-# - C(XX)FLAGS for innodb subdirs are overriden by ./configre!
+# - C(XX)FLAGS for innodb subdirs are overriden by ./configure!
# - http://bugs.mysql.com/bug.php?id=16470
#
# Conditional build:
-%bcond_with bdb # Berkeley DB support
-%bcond_without innodb # Without InnoDB support
-%bcond_without raid # Without raid
-%bcond_without ssl # Without OpenSSL
-%bcond_without tcpd # Without libwrap (tcp_wrappers) support
+%bcond_with bdb # Berkeley DB support
+%bcond_without innodb # Without InnoDB support
+%bcond_without raid # Without raid
+%bcond_without ssl # Without OpenSSL
+%bcond_without tcpd # Without libwrap (tcp_wrappers) support
%bcond_without big_tables # Support tables with more than 4G rows even on 32 bit platforms
#
%include /usr/lib/rpm/macros.perl
Summary(uk): MySQL - Û×ÉÄËÉÊ SQL-ÓÅÒ×ÅÒ
Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
Name: mysql
-Version: 5.0.18
+Version: 5.0.24a
Release: 4
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
Source0: http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/%{name}-%{version}.tar.gz
-# Source0-md5: f18153b0239aaa03fc5a751f2d82cb71
+# Source0-md5: 6b07546389f75c52611adb7af38c3667
#Source0: http://downloads.mysql.com/snapshots/mysql-5.0/%{name}-%{version}-nightly-%{_snap}.tar.gz
Source1: %{name}.init
Source2: %{name}.sysconfig
Source12: %{name}-ndb-cpc.sysconfig
Source13: %{name}-client.conf
Patch0: %{name}-libs.patch
-Patch1: %{name}-libwrap.patch
+
Patch2: %{name}-c++.patch
Patch3: %{name}-info.patch
Patch4: %{name}-sql-cxx-pic.patch
Patch8: %{name}-client-config.patch
Patch9: %{name}-build.patch
Patch10: %{name}-alpha.patch
-Patch11: %{name}-bug-14057.patch
+Patch11: %{name}-ndb-ldflags.patch
+Patch12: %{name}-bug-20153.patch
+Patch13: %{name}-test_bug17667.patch
URL: http://www.mysql.com/
BuildRequires: autoconf
BuildRequires: automake
%define _mysqlhome /home/services/mysql
%define _noautoreqdep 'perl(DBD::mysql)'
+# CFLAGS for innodb are altered
+%undefine configure_cache
%description
MySQL is a true multi-user, multi-threaded SQL (Structured Query
%package libs
Summary: Shared libraries for MySQL
Summary(pl): Biblioteki dzielone MySQL
-Group: Applications/Databases
+Group: Libraries
Obsoletes: libmysql10
Obsoletes: mysql-doc < 4.1.12
%prep
%setup -q %{?_snap:-n %{name}-%{version}-nightly-%{_snap}}
%patch0 -p1
-%{?with_tcpd:%patch1 -p1}
+
%patch2 -p1
%patch3 -p1
%ifarch alpha
%patch8 -p1
%patch9 -p1
%patch11 -p1
-
-%{__perl} -pi -e 's@(ndb_bin_am_ldflags)="-static"@$1=""@' configure.in
+%patch12 -p1
+%patch13 -p1
%build
%{__libtoolize}
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*.txt
mv -f $RPM_BUILD_ROOT%{_libdir}/mysql/lib* $RPM_BUILD_ROOT%{_libdir}
-sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT%{_libdir}/libmysqlclient{,_r}.la
+sed -i -e 's,%{_libdir}/mysql,%{_libdir},' $RPM_BUILD_ROOT{%{_libdir}/libmysqlclient{,_r}.la,%{_bindir}/mysql_config}
# remove known unpackaged files
rm -rf $RPM_BUILD_ROOT%{_prefix}/mysql-test
# not useful without -debug build
%{!?debug:rm -f $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump}
# generate symbols file, so one can generate backtrace using it
-# mysql_resolve_stack_dump -s /usr/share/mysql/mysqld.sym -n mysqld.stack.
+# mysql_resolve_stack_dump -s %{_datadir}/mysql/mysqld.sym -n mysqld.stack.
# http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html
%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.sym}
rm $RPM_BUILD_ROOT%{_bindir}/mysqld_safe
rm $RPM_BUILD_ROOT%{_bindir}/mysqld_multi
rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}*
-rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fill_help_tables.sql
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
+rm $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg.txt
rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
rm $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server*
rm $RPM_BUILD_ROOT%{_mandir}/man1/safe_mysqld*
+rm $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1*
# in %doc
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.{ini,cnf}
%post
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
/sbin/chkconfig --add mysql
-
-if [ "$1" = 1 ]; then
- %banner -e %{name}-4.1.x <<-EOF
- If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
- zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
-EOF
-#'
-fi
-
%service mysql restart
-exit 0
%preun
if [ "$1" = "0" ]; then
done
%banner -e %{name}-4.1.x <<-EOF
- If you want to use new help tables in mysql 4.1.x then you'll need to import the help data:
- zcat %{_docdir}/%{name}-%{version}/fill_help_tables.sql.gz | mysql mysql
+ If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data:
+ mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql
EOF
#'
%files
%defattr(644,root,root,755)
-%doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
+%doc support-files/*.cnf support-files/*.ini
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mysql
%attr(754,root,root) /etc/rc.d/init.d/mysql
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql
%attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysql/clusters.conf
-%attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
%attr(755,root,root) %{_bindir}/innochecksum
%attr(755,root,root) %{_bindir}/myisamchk
%attr(755,root,root) %{_bindir}/myisamlog
%attr(755,root,root) %{_bindir}/myisampack
%attr(755,root,root) %{_bindir}/mysql_fix_privilege_tables
%attr(755,root,root) %{_bindir}/my_print_defaults
+%attr(755,root,root) %{_bindir}/mysql_upgrade
+%attr(755,root,root) %{_bindir}/mysql_upgrade_shell
%attr(755,root,root) %{_sbindir}/mysqld
%{_mandir}/man1/mysql_fix_privilege_tables.1*
%{_mandir}/man1/mysqld.1*
%{_mandir}/man1/myisamchk.1*
%{_mandir}/man1/myisamlog.1*
%{_mandir}/man1/myisampack.1*
+%{_mandir}/man1/mysql_upgrade.1*
%attr(700,mysql,mysql) %{_mysqlhome}
# root:root is proper here for AC mysql.rpm while mysql:mysql is potential security hole
# This is template for configuration file which is created after 'service mysql init'
%{_datadir}/mysql/mysqld.conf
%{_datadir}/mysql/english
+%{_datadir}/mysql/fill_help_tables.sql
%{_datadir}/mysql/mysql_fix_privilege_tables.sql
%lang(cs) %{_datadir}/mysql/czech
%lang(da) %{_datadir}/mysql/danish
%attr(755,root,root) %{_bindir}/replace
%attr(755,root,root) %{_bindir}/resolveip
%{_mandir}/man1/msql2mysql.1*
+%{_mandir}/man1/myisam_ftdump.1*
%{_mandir}/man1/mysqlcheck.1*
%{_mandir}/man1/perror.1*
%{_mandir}/man1/replace.1*
%files extras-perl
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/mysql_convert_table_format
-%attr(755,root,root) %{_bindir}/mysqldumpslow
-%attr(755,root,root) %{_bindir}/mysqlhotcopy
-%attr(755,root,root) %{_bindir}/mysql_setpermission
-%attr(755,root,root) %{_bindir}/mysql_zap
+%attr(755,root,root) %{_bindir}/mysql_explain_log
%attr(755,root,root) %{_bindir}/mysql_find_rows
-%attr(755,root,root) %{_bindir}/mysqlaccess
%attr(755,root,root) %{_bindir}/mysql_fix_extensions
-%attr(755,root,root) %{_bindir}/mysql_explain_log
+%attr(755,root,root) %{_bindir}/mysql_setpermission
%attr(755,root,root) %{_bindir}/mysql_tableinfo
+%attr(755,root,root) %{_bindir}/mysql_zap
+%attr(755,root,root) %{_bindir}/mysqlaccess
+%attr(755,root,root) %{_bindir}/mysqldumpslow
+%attr(755,root,root) %{_bindir}/mysqlhotcopy
+%{_mandir}/man1/mysql_explain_log.1*
%{_mandir}/man1/mysql_zap.1*
%{_mandir}/man1/mysqlaccess.1*
%{_mandir}/man1/mysqlhotcopy.1*
%files ndb-client
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ndb_*
+%attr(755,root,root) %{_datadir}/mysql/ndb_size.tmpl
%files ndb-mgm
%defattr(644,root,root,755)