Commit c5bdaee9 authored by lenz@mysql.com's avatar lenz@mysql.com

- added the init script to support the LSB init script spec

 - overhauled the RPM spec file (more macros, package descriptions)
parent e61c4480
......@@ -13,6 +13,18 @@
# chkconfig: 2345 90 90
# description: A very fast and reliable SQL database engine.
# Comments to support LSB init script conventions
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 3 5
# Default-Stop: 3 5
# Short-Description: start and stop MySLQ
# Description: MySQL is a very fast and reliable SQL database engine.
### END INIT INFO
# The following variables are only set for letting mysql.server find things.
# If you want to affect other MySQL variables, you should make your changes
# in the /etc/my.cnf or other configuration files.
......
......@@ -18,54 +18,32 @@ Icon: mysql.gif
URL: http://www.mysql.com/
Packager: Lenz Grimmer <lenz@mysql.com>
Vendor: MySQL AB
Requires: fileutils sh-utils
Provides: msqlormysql MySQL-server mysql
Obsoletes: mysql
# Think about what you use here since the first step is to
# run a rm -rf
BuildRoot: /var/tmp/mysql
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# From the manual
%description
MySQL is a true multi-user, multi-threaded SQL (Structured Query
Language) database server. MySQL is a client/server implementation
that consists of a server daemon (mysqld) and many different client
programs/libraries.
The main goals of MySQL are speed, robustness and ease of use. MySQL
was originally developed because we needed a SQL server that could
handle very big databases with magnitude higher speed than what any
database vendor could offer to us. And since we did not need all the
features that made their server slow we made our own. We have now been
using MySQL since 1996 in a environment with more than 40 databases,
10,000 tables, of which more than 500 have more than 7 million
rows. This is about 200G of data.
The base upon which MySQL is built is a set of routines that have been
used in a highly demanding production environment for many
years. While MySQL is still in development, it already offers a rich
and highly useful function set.
See the documentation for more information.
%description -l pt_BR
O MySQL um servidor de banco de dados SQL realmente multiusurio e\
multi-tarefa. A linguagem SQL a mais popular linguagem para banco de\
dados no mundo. O MySQL uma implementao cliente/servidor que\
consiste de um servidor chamado mysqld e diversos\
programas/bibliotecas clientes. Os principais objetivos do MySQL so:\
velocidade, robustez e facilidade de uso. O MySQL foi originalmente\
desenvolvido porque ns na Tcx precisvamos de um servidor SQL que\
pudesse lidar com grandes bases de dados e com uma velocidade muito\
maior do que a que qualquer vendedor podia nos oferecer. Estamos\
usando\
o MySQL desde 1996 em um ambiente com mais de 40 bases de dados com 10.000\
tabelas, das quais mais de 500 tm mais de 7 milhes de linhas. Isto o\
equivalente a aproximadamente 50G de dados crticos. A base da construo do\
MySQL uma srie de rotinas que foram usadas em um ambiente de produo com\
alta demanda por muitos anos. Mesmo o MySQL estando ainda em desenvolvimento,\
ele j oferece um conjunto de funes muito ricas e teis. Veja a documentao\
para maiores informaes.
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 client
Release: %{release}
......@@ -86,7 +64,7 @@ Este pacote cont
%package bench
Release: %{release}
Requires: MySQL-client MySQL-DBI-perl-bin perl
Requires: %{name}-client MySQL-DBI-perl-bin perl
Summary: MySQL - Benchmarks and test system
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
......@@ -104,7 +82,7 @@ Este pacote cont
%package devel
Release: %{release}
Requires: MySQL-client
Requires: %{name}-client
Summary: MySQL - Development header files and libraries
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
......@@ -174,9 +152,9 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var/lib/mysql \
--infodir=/usr/info \
--infodir=%{_infodir} \
--includedir=/usr/include \
--mandir=/usr/man \
--mandir=%{_mandir} \
--with-comment=\"Official MySQL RPM\";
# Add this for more debugging support
# --with-debug
......@@ -201,12 +179,9 @@ fi
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
if test -z "$RBR" -o "$RBR" = "/"
then
echo "RPM_BUILD_ROOT has insecure value"
exit 1
fi
rm -rf $RBR
# Clean up the BuildRoot first
[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR;
mkdir -p $RBR
#
......@@ -258,19 +233,18 @@ MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
# Ensure that needed directories exists
install -d $RBR/etc/{logrotate.d,rc.d/init.d}
install -d $RBR/var/lib/mysql/mysql
install -d $RBR/usr/share/sql-bench
install -d $RBR/usr/share/mysql-test
install -d $RBR/usr/{sbin,share,man,include}
install -d $RBR/usr/doc/MySQL-%{mysql_version}
install -d $RBR/usr/lib
# Make install
make install DESTDIR=$RBR benchdir_root=/usr/share/
install -d $RBR/usr/share/{sql-bench,mysql-test}
install -d $RBR%{_mandir}
install -d $RBR/usr/{sbin,lib,include}
# Install all binaries stripped
make install-strip DESTDIR=$RBR benchdir_root=/usr/share/
# Install shared libraries (Disable for architectures that don't support it)
(cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar)
# install saved mysqld-max
install -m755 $MBD/sql/mysqld-max $RBR/usr/sbin/mysqld-max
# install and strip saved mysqld-max
install -s -m755 $MBD/sql/mysqld-max $RBR/usr/sbin/mysqld-max
# install symbol files ( for stack trace resolution)
install -m644 $MBD/sql/mysqld-max.sym $RBR/usr/lib/mysql/mysqld-max.sym
......@@ -280,18 +254,6 @@ install -m644 $MBD/sql/mysqld.sym $RBR/usr/lib/mysql/mysqld.sym
install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
# Install docs
install -m644 $RPM_BUILD_DIR/mysql-%{mysql_version}/Docs/mysql.info \
$RBR/usr/info/mysql.info
for file in README COPYING COPYING.LIB Docs/manual_toc.html Docs/manual.html \
Docs/manual.txt Docs/manual.texi Docs/manual.ps \
support-files/my-huge.cnf support-files/my-large.cnf \
support-files/my-medium.cnf support-files/my-small.cnf
do
b=`basename $file`
install -m644 $MBD/$file $RBR/usr/doc/MySQL-%{mysql_version}/$b
done
%pre
if test -x /etc/rc.d/init.d/mysql
then
......@@ -358,33 +320,48 @@ fi
# We do not remove the mysql user since it may still own a lot of
# database files.
%clean
[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR;
%files
%attr(-, root, root) %doc /usr/doc/MySQL-%{mysql_version}/
%defattr(-, root, root)
%doc %attr(644, root, root) COPYING COPYING.LIB README
%doc %attr(644, root, root) Docs/manual.{html,ps,texi,txt} Docs/manual_toc.html
%doc %attr(644, root, root) support-files/my-*.cnf
%doc %attr(644, root, root) %{_infodir}/mysql.info*
%doc %attr(644, root, man) %{_mandir}/man1/isamchk.1*
%doc %attr(644, root, man) %{_mandir}/man1/isamlog.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1*
%doc %attr(644, root, man) %{_mandir}/man1/safe_mysqld.1*
%doc %attr(644, root, man) %{_mandir}/man1/perror.1*
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
%attr(755, root, root) /usr/bin/isamchk
%attr(755, root, root) /usr/bin/isamlog
%attr(755, root, root) /usr/bin/pack_isam
%attr(755, root, root) /usr/bin/my_print_defaults
%attr(755, root, root) /usr/bin/myisamchk
%attr(755, root, root) /usr/bin/myisamlog
%attr(755, root, root) /usr/bin/myisampack
%attr(755, root, root) /usr/bin/mysql_fix_privilege_tables
%attr(755, root, root) /usr/bin/mysql_convert_table_format
%attr(755, root, root) /usr/bin/mysql_fix_privilege_tables
%attr(755, root, root) /usr/bin/mysql_install_db
%attr(755, root, root) /usr/bin/mysql_setpermission
%attr(755, root, root) /usr/bin/mysql_zap
%attr(755, root, root) /usr/bin/mysqlbug
%attr(755, root, root) /usr/bin/mysqltest
%attr(755, root, root) /usr/bin/mysqld_multi
%attr(755, root, root) /usr/bin/mysqldumpslow
%attr(755, root, root) /usr/bin/mysqlhotcopy
%attr(755, root, root) /usr/bin/mysqltest
%attr(755, root, root) /usr/bin/pack_isam
%attr(755, root, root) /usr/bin/perror
%attr(755, root, root) /usr/bin/replace
%attr(755, root, root) /usr/bin/resolveip
%attr(755, root, root) /usr/bin/resolve_stack_dump
%attr(755, root, root) /usr/bin/resolveip
%attr(755, root, root) /usr/bin/safe_mysqld
%attr(755, root, root) /usr/bin/mysqld_multi
%attr(755, root, root) /usr/bin/my_print_defaults
%attr(755, root, root) /usr/bin/mysqldumpslow
%attr(644, root, root) /usr/info/mysql.info*
%attr(755, root, root) /usr/sbin/mysqld
%attr(644, root, root) /usr/lib/mysql/mysqld.sym
......@@ -395,30 +372,23 @@ fi
%attr(755, root, root) /usr/share/mysql/
%files client
%defattr(-, root, root)
%attr(755, root, root) /usr/bin/msql2mysql
%attr(755, root, root) /usr/bin/mysql
%attr(755, root, root) /usr/bin/mysql_find_rows
%attr(755, root, root) /usr/bin/mysqlaccess
%attr(755, root, root) /usr/bin/mysqladmin
%attr(755, root, root) /usr/bin/mysqlbinlog
%attr(755, root, root) /usr/bin/mysqlcheck
%attr(755, root, root) /usr/bin/mysql_find_rows
%attr(755, root, root) /usr/bin/mysqldump
%attr(755, root, root) /usr/bin/mysqlimport
%attr(755, root, root) /usr/bin/mysqlshow
%attr(755, root, root) /usr/bin/mysqlbinlog
%attr(644, root, man) %doc /usr/man/man1/mysql.1*
%attr(644, root, man) %doc /usr/man/man1/isamchk.1*
%attr(644, root, man) %doc /usr/man/man1/isamlog.1*
%attr(644, root, man) %doc /usr/man/man1/mysql_zap.1*
%attr(644, root, man) %doc /usr/man/man1/mysqlaccess.1*
%attr(644, root, man) %doc /usr/man/man1/mysqladmin.1*
%attr(644, root, man) %doc /usr/man/man1/mysqld.1*
%attr(644, root, man) %doc /usr/man/man1/mysqld_multi.1*
%attr(644, root, man) %doc /usr/man/man1/mysqldump.1*
%attr(644, root, man) %doc /usr/man/man1/mysqlshow.1*
%attr(644, root, man) %doc /usr/man/man1/perror.1*
%attr(644, root, man) %doc /usr/man/man1/replace.1*
%attr(644, root, man) %doc /usr/man/man1/safe_mysqld.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1*
%post shared
/sbin/ldconfig
......@@ -427,25 +397,41 @@ fi
/sbin/ldconfig
%files devel
%defattr(644 root, root)
%attr(755, root, root) /usr/bin/comp_err
%attr(755, root, root) /usr/include/mysql/
%attr(755, root, root) /usr/lib/mysql/*.a
%attr(755, root, root) /usr/bin/mysql_config
%dir %attr(755, root, root) /usr/include/mysql
%dir %attr(755, root, root) /usr/lib/mysql
/usr/include/mysql/*
/usr/lib/mysql/*.a
%files shared
%defattr(755 root, root)
# Shared libraries (omit for architectures that don't support them)
%attr(755, root, root) /usr/lib/*.so*
/usr/lib/*.so*
%files bench
%defattr(-, root, root)
%attr(-, root, root) /usr/share/sql-bench
%attr(-, root, root) /usr/share/mysql-test
%files Max
%defattr(-, root, root)
%attr(755, root, root) /usr/sbin/mysqld-max
%attr(644, root, root) /usr/lib/mysql/mysqld-max.sym
%changelog
* Thu Jul 30 2002 Lenz Grimmer <lenz@mysql.com>
- Use some more macros (mandir and infodir)
- Updated package description
- Install binaries stripped to save disk space
- Rearranged file list (make sure man pages are in
the same package as the binaries)
- clean up the BuildRoot directory afterwards
- added mysqldumpslow to the server package
* Mon Jul 15 2002 Lenz Grimmer <lenz@mysql.com>
- updated Packager tag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment