Summary(zh_CN): MySQLÊý¾Ý¿â·þÎñÆ÷
Name: mysql
Group: Applications/Databases
-Version: 4.1.12
-Release: 1.4
+Version: 4.1.14
+Release: 2
License: GPL + MySQL FLOSS Exception
Source0: http://mysql.dataphone.se/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
-# Source0-md5: 56a6f5cacd97ae290e07bbe19f279af1
+# Source0-md5: 98ba9caea24b0a48ee06bb242ff2e37f
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.logrotate
BuildRequires: perl-devel >= 1:5.6.1
BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.228
BuildRequires: texinfo
BuildRequires: zlib-devel
PreReq: rc-scripts >= 0.2.0
Provides: user(mysql)
Obsoletes: MySQL
Obsoletes: mysql-server
-Obsoletes: mysql-doc < 4.1.12
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _libexecdir %{_sbindir}
Summary(pl): Biblioteki dzielone MySQL
Group: Applications/Databases
Obsoletes: libmysql10
+Obsoletes: mysql-doc < 4.1.12
%description libs
Shared libraries for MySQL.
mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}comp_err
mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump
-# not our OS
-rm $RPM_BUILD_ROOT%{_bindir}/make_win_*_distribution
-rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.plist
-# unuseful stuff
-rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*.spec
-
# functionality in initscript / rpm
rm $RPM_BUILD_ROOT%{_bindir}/mysql_create_system_tables
rm $RPM_BUILD_ROOT%{_bindir}/mysql_install_db
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}/{pre,post}install
+rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure
rm $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid
# in %doc
%post
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
/sbin/chkconfig --add mysql
-if [ -f /var/lock/subsys/mysql ]; then
- /etc/rc.d/init.d/mysql restart >&2 || :
-else
- echo "Run \"/etc/rc.d/init.d/mysql start\" to start mysql." >&2
+
+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 || :
+
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/mysql ]; then
- /etc/rc.d/init.d/mysql stop
- fi
+ %service -q mysql stop
/sbin/chkconfig --del mysql
fi
config_file=/etc/mysql/$config
else
clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/mysql/clusters.conf)
+ if [ -z "$clusterdir" ]; then
+ echo >&2 "Can't find cluster dir for $config!"
+ echo >&2 "Please remove extra (leading) spaces from /etc/mysql/clusters.conf"
+ exit 1
+ fi
config_file="$clusterdir/mysqld.conf"
fi
+
+ if [ ! -f "$config_file" ]; then
+ echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/"
+ exit 1
+ fi
echo "Adding option old-passwords to config: $config_file"
echo "If you want to use new, better passwords - remove it"
' $config_file
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
+EOF
+#'
+
%files
%defattr(644,root,root,755)
-%doc support-files/*.cnf support-files/*.ini
+%doc support-files/*.cnf support-files/*.ini scripts/fill_help_tables.sql
%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(751,root,root) /var/lib/mysql
%attr(750,mysql,mysql) %dir /var/log/mysql
%attr(750,mysql,mysql) %dir /var/log/archiv/mysql
-%attr(640,mysql,mysql) %config(noreplace) %verify(not md5 mtime size) /var/log/mysql/*
+%attr(640,mysql,mysql) %ghost /var/log/mysql/*
%{_infodir}/mysql.info*
%dir %{_datadir}/mysql