summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
Diffstat (limited to 'support-files')
-rw-r--r--support-files/.cvsignore13
-rw-r--r--support-files/Attic/my-example.cnf.sh39
-rw-r--r--support-files/Attic/my-huge.cfg.sh60
-rw-r--r--support-files/Attic/my-large.cfg.sh60
-rw-r--r--support-files/Attic/my-medium.cfg.sh58
-rw-r--r--support-files/Attic/my-small.cfg.sh53
-rwxr-xr-xsupport-files/Makefile.am90
-rwxr-xr-xsupport-files/binary-configure.sh16
-rw-r--r--support-files/maxsql.spec.sh410
-rw-r--r--support-files/my-huge.cnf.sh64
-rw-r--r--support-files/my-large.cnf.sh64
-rw-r--r--support-files/my-medium.cnf.sh63
-rw-r--r--support-files/my-small.cnf.sh57
-rw-r--r--support-files/mysql-log-rotate.sh29
-rwxr-xr-xsupport-files/mysql.server-sys5.sh86
-rw-r--r--support-files/mysql.server.sh123
-rw-r--r--support-files/mysql.spec.sh396
17 files changed, 1681 insertions, 0 deletions
diff --git a/support-files/.cvsignore b/support-files/.cvsignore
new file mode 100644
index 00000000000..97f52806614
--- /dev/null
+++ b/support-files/.cvsignore
@@ -0,0 +1,13 @@
+Makefile
+Makefile.in
+binary-configure
+my-example.cnf
+my-huge.cnf
+my-large.cnf
+my-medium.cnf
+my-small.cnf
+mysql-3.*-alpha.spec
+mysql-3.23.21-beta.spec
+mysql-log-rotate
+mysql.server
+mysql.spec
diff --git a/support-files/Attic/my-example.cnf.sh b/support-files/Attic/my-example.cnf.sh
new file mode 100644
index 00000000000..f91478a3037
--- /dev/null
+++ b/support-files/Attic/my-example.cnf.sh
@@ -0,0 +1,39 @@
+# Example mysql config file.
+# You can copy this to one of:
+# @sysconfdir@/my.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can use all long options that the program supports.
+# Run the program with --help to get a list of available options
+
+# This will be passed to all mysql clients
+[client]
+#password = my_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here is entries for some specific programs
+# The following values assume you have at least 32M ram
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=128K
+# Start logging
+log
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+
+[isamchk]
+set-variable = key_buffer=16M
diff --git a/support-files/Attic/my-huge.cfg.sh b/support-files/Attic/my-huge.cfg.sh
new file mode 100644
index 00000000000..75faa1da276
--- /dev/null
+++ b/support-files/Attic/my-huge.cfg.sh
@@ -0,0 +1,60 @@
+# Example mysql config file for very large systems.
+#
+# This is for large system with memory of 1G-2G where the system runs mainly
+# MySQL.
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+#tmpdir = /tmp/ # Put this on a dedicated disk
+skip-locking
+set-variable = key_buffer=512M
+set-variable = max_allowed_packet=1M
+set-variable = table_cache=512
+set-variable = sort_buffer=2M
+set-variable = record_buffer=2M
+set-variable = thread_cache=8
+set-variable = thread_concurrency=8 # Try number of CPU's*2
+set-variable = myisam_sort_buffer_size=64M
+#set-variable = bdb_cache_size=256M
+# Only log updates
+log-update
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=256M
+set-variable = sort_buffer=256M
+set-variable = read-buffer=2M
+set-variable = write-buffer=2M
+
+[myisamchk]
+set-variable = key_buffer=256M
+set-variable = sort_buffer=256M
+set-variable = read-buffer=2M
+set-variable = write-buffer=2M
diff --git a/support-files/Attic/my-large.cfg.sh b/support-files/Attic/my-large.cfg.sh
new file mode 100644
index 00000000000..01e830ae16c
--- /dev/null
+++ b/support-files/Attic/my-large.cfg.sh
@@ -0,0 +1,60 @@
+# Example mysql config file for large systems.
+#
+# This is for large system with memory = 512M where the system runs mainly
+# MySQL.
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+#tmpdir = /tmp/ # Put this on a dedicated disk
+skip-locking
+set-variable = key_buffer=256M
+set-variable = max_allowed_packet=1M
+set-variable = table_cache=256
+set-variable = sort_buffer=1M
+set-variable = record_buffer=1M
+set-variable = myisam_sort_buffer_size=64M
+set-variable = thread_cache=8
+set-variable = thread_concurrency=8 # Try number of CPU's*2
+#set-variable = bdb_cache_size=64M
+# Only log updates
+log-update
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=128M
+set-variable = sort_buffer=128M
+set-variable = read-buffer=2M
+set-variable = write-buffer=2M
+
+[myisamchk]
+set-variable = key_buffer=128M
+set-variable = sort_buffer=128M
+set-variable = read-buffer=2M
+set-variable = write-buffer=2M
diff --git a/support-files/Attic/my-medium.cfg.sh b/support-files/Attic/my-medium.cfg.sh
new file mode 100644
index 00000000000..18c297fe151
--- /dev/null
+++ b/support-files/Attic/my-medium.cfg.sh
@@ -0,0 +1,58 @@
+# Example mysql config file for medium systems.
+#
+# This is for a system with little memory (32M - 64M) where MySQL plays
+# a important part and systems up to 128M very MySQL is used together with
+# other programs (like a web server)
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+#tmpdir = /tmp/ # Put this on a dedicated disk
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = table_cache=64
+set-variable = sort_buffer=512K
+set-variable = net_buffer_length=8K
+set-variable = myisam_sort_buffer_size=8M
+#set-variable = bdb_cache_size=1M
+log-update
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=20M
+set-variable = sort_buffer=20M
+set-variable = read-buffer=2M
+set-variable = write-buffer=2M
+
+[myisamchk]
+set-variable = key_buffer=20M
+set-variable = sort_buffer=20M
+set-variable = read-buffer=2M
+set-variable = write-buffer=2M
diff --git a/support-files/Attic/my-small.cfg.sh b/support-files/Attic/my-small.cfg.sh
new file mode 100644
index 00000000000..69a816da3fb
--- /dev/null
+++ b/support-files/Attic/my-small.cfg.sh
@@ -0,0 +1,53 @@
+# Example mysql config file for small systems.
+#
+# This is for a system with little memory (<= 64M) where MySQL is only used
+# from time to time and it's important that the mysqld deamon
+# doesn't use much resources.
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+skip-locking
+set-variable = key_buffer=16K
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=64K
+set-variable = table_cache=4
+set-variable = sort_buffer=64K
+set-variable = net_buffer_length=2K
+# Don't log things
+#log
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=8M
+set-variable = sort_buffer=8M
+
+[myisamchk]
+set-variable = key_buffer=8M
+set-variable = sort_buffer=8M
diff --git a/support-files/Makefile.am b/support-files/Makefile.am
new file mode 100755
index 00000000000..29d2e7cf235
--- /dev/null
+++ b/support-files/Makefile.am
@@ -0,0 +1,90 @@
+# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA
+
+## Process this file with automake to create Makefile.in
+
+EXTRA_DIST = mysql.spec.sh \
+ my-small.cnf.sh \
+ my-medium.cnf.sh \
+ my-large.cnf.sh \
+ my-huge.cnf.sh \
+ mysql-log-rotate.sh \
+ mysql.server.sh \
+ binary-configure.sh
+
+pkgdata_DATA = my-small.cnf \
+ my-medium.cnf \
+ my-large.cnf \
+ my-huge.cnf \
+ mysql-log-rotate \
+ mysql-@VERSION@.spec \
+ mysql.server \
+ binary-configure
+
+CLEANFILES = my-small.cnf \
+ my-medium.cnf \
+ my-large.cnf \
+ my-huge.cnf \
+ mysql.spec \
+ mysql-@VERSION@.spec \
+ mysql.server
+
+mysql-@VERSION@.spec: mysql.spec
+ rm -f $@
+ cp -p mysql.spec $@
+
+SUFFIXES = .sh
+
+.sh:
+ @RM@ -f $@ $@-t
+ @SED@ \
+ -e 's!@''bindir''@!$(bindir)!g' \
+ -e 's!@''scriptdir''@!$(bindir)!g' \
+ -e 's!@''prefix''@!$(prefix)!g' \
+ -e 's!@''datadir''@!$(datadir)!g' \
+ -e 's!@''localstatedir''@!$(localstatedir)!g' \
+ -e 's!@''libexecdir''@!$(libexecdir)!g' \
+ -e 's!@''CC''@!@CC@!'\
+ -e 's!@''CXX''@!@CXX@!'\
+ -e 's!@''GXX''@!@GXX@!'\
+ -e 's!@''PERL''@!@PERL@!' \
+ -e 's!@''CFLAGS''@!@SAVE_CFLAGS@!'\
+ -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
+ -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\
+ -e 's!@''VERSION''@!@VERSION@!' \
+ -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
+ -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \
+ -e 's!@''HOSTNAME''@!@HOSTNAME@!' \
+ -e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \
+ -e 's!@''CHECK_PID''@!@CHECK_PID@!' \
+ -e 's!@''FIND_PROC''@!@FIND_PROC@!' \
+ -e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
+ -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
+ -e 's!@''IS_LINUX''@!@IS_LINUX@!' \
+ -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
+ -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
+ -e 's!@''sysconfdir''@!@sysconfdir@!' \
+ -e 's!@''SHORT_MYSQL_INTRO''@!@SHORT_MYSQL_INTRO@!' \
+ -e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \
+ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
+ -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
+ -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
+ -e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \
+ -e 's!@''PERL_DBD_VERSION''@!@PERL_DBD_VERSION@!' \
+ -e 's!@''PERL_DATA_DUMPER''@!@PERL_DATA_DUMPER@!' \
+ $< > $@-t
+ @MV@ $@-t $@
diff --git a/support-files/binary-configure.sh b/support-files/binary-configure.sh
new file mode 100755
index 00000000000..c67d2ba2827
--- /dev/null
+++ b/support-files/binary-configure.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+if test ! -x ./scripts/mysql_install_db
+then
+ echo "I didn't find the script './scripts/mysql_install_db'."
+ echo "Please execute this script in the mysql distribution directory!"
+ exit 1;
+fi
+
+./scripts/mysql_install_db
+if [ $? = 0 ]
+then
+ echo "Starting the mysqld server. You can test that it is up and running"
+ echo "with the command:"
+ echo "./bin/mysqladmin version"
+ ./bin/safe_mysqld &
+fi
diff --git a/support-files/maxsql.spec.sh b/support-files/maxsql.spec.sh
new file mode 100644
index 00000000000..e410bc7a18d
--- /dev/null
+++ b/support-files/maxsql.spec.sh
@@ -0,0 +1,410 @@
+%define mysql_version @VERSION@
+%define shared_lib_version @SHARED_LIB_VERSION@
+%define release 2
+%define mysqld_user mysql
+%define db_version 3.1.14
+
+%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
+
+Name: MySQL
+Summary: MySQL: a very fast and reliable SQL database engine
+Group: Applications/Databases
+Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
+Group(pt_BR): Aplicações/Banco_de_Dados
+Version: @MYSQL_NO_DASH_VERSION@
+Release: %{release}
+Copyright: GPL / LGPL
+Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
+Source1: ftp://ftp.mysql.com/pub/mysql/Downloads/db/db-%{db_version}.tar.gz
+Icon: mysql.gif
+URL: http://www.mysql.com/
+Packager: David Axmark <david@mysql.com>
+Provides: msqlormysql MySQL-server
+Obsoletes: mysql
+
+# Think about what you use here since the first step is to
+# run a rm -rf
+BuildRoot: /var/tmp/mysql
+
+# 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 multiusuário e\
+multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de\
+dados no mundo. O MySQL é uma implementação cliente/servidor que\
+consiste de um servidor chamado mysqld e diversos\
+programas/bibliotecas clientes. Os principais objetivos do MySQL são:\
+velocidade, robustez e facilidade de uso. O MySQL foi originalmente\
+desenvolvido porque nós na Tcx precisávamos 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 têm mais de 7 milhões de linhas. Isto é o\
+equivalente a aproximadamente 50G de dados críticos. A base da construção do\
+MySQL é uma série de rotinas que foram usadas em um ambiente de produção com\
+alta demanda por muitos anos. Mesmo o MySQL estando ainda em desenvolvimento,\
+ele já oferece um conjunto de funções muito ricas e úteis. Veja a documentação\
+para maiores informações.
+
+%package client
+Release: %{release}
+Summary: MySQL - Client
+Group: Applications/Databases
+Summary(pt_BR): MySQL - Cliente
+Group(pt_BR): Aplicações/Banco_de_Dados
+Obsoletes: mysql-client
+
+%description client
+This package contains the standard MySQL clients.
+
+%{see_base}
+
+%description client -l pt_BR
+Este pacote contém os clientes padrão para o MySQL.
+
+%package bench
+Release: %{release}
+Requires: MySQL-client MySQL-DBI-perl-bin perl
+Summary: MySQL - Benchmarks
+Group: Applications/Databases
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
+Obsoletes: mysql-bench
+
+%description bench
+This package contains MySQL benchmark scripts and data.
+
+%{see_base}
+
+%description bench -l pt_BR
+Este pacote contém medições de desempenho de scripts e dados do MySQL.
+
+%package devel
+Release: %{release}
+Requires: MySQL-client
+Summary: MySQL - Development header files and libraries
+Group: Applications/Databases
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
+Obsoletes: mysql-devel
+
+%description devel
+This package contains the development header files and libraries
+necessary to develop MySQL client applications.
+
+%{see_base}
+
+%description devel -l pt_BR
+Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
+necessárias para desenvolver aplicações clientes do MySQL.
+
+%package shared
+Release: %{release}
+Summary: MySQL - Shared libraries
+Group: Applications/Databases
+
+%description shared
+This package contains the shared libraries (*.so*) which certain
+languages and applications need to dynamically load and use MySQL.
+
+%prep
+%setup -n mysql-%{mysql_version}
+%setup -T -D -a 1 -n mysql-%{mysql_version}
+
+%build
+# The all-static flag is to make the RPM work on different
+# distributions. This version tries to put shared mysqlcliet libraries
+# in a separate package.
+
+BuildMySQL() {
+# The --enable-assembler simply does nothing on systems that does not
+# support assembler speedups.
+sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
+ CC=\"${MYSQL_BUILD_CC:-egcs}\" \
+ CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -O6 -fomit-frame-pointer}\" \
+ CXX=\"${MYSQL_BUILD_CXX:-egcs}\" \
+ CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O6 -fomit-frame-pointer \
+ -felide-constructors -fno-exceptions -fno-rtti}\" \
+ ./configure \
+ $* \
+ --enable-assembler \
+ --with-mysqld-user=%{mysqld_user} \
+ --with-unix-socket-path=/var/lib/mysql/mysql.sock \
+ --prefix=/ \
+ --with-extra-charsets=complex \
+ --exec-prefix=/usr \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var/lib/mysql \
+ --infodir=/usr/info \
+ --includedir=/usr/include \
+ --mandir=/usr/man \
+ --with-berkeley-db=$RPM_BUILD_ROOT/usr/BDB \
+ --with-comment=\"Official MySQL RPM\";
+ # Add this for more debugging support
+ # --with-debug
+ "
+
+ # benchdir does not fit in above model. Maybe a separate bench distribution
+ make benchdir=$RPM_BUILD_ROOT/usr/share/sql-bench
+}
+
+# Use the build root for temporary storage of the shared libraries.
+
+RBR=$RPM_BUILD_ROOT
+MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
+if test -z "$RBR" -o "$RBR" = "/"
+then
+ echo "RPM_BUILD_ROOT has stupid value"
+ exit 1
+fi
+rm -rf $RBR
+mkdir -p $RBR
+
+cd $MBD/db-%{db_version}/dist
+./configure --prefix=$RBR/usr/BDB
+make install
+
+echo $RBR $MBD
+cd $MBD
+
+BuildMySQL "--enable-shared --enable-thread-safe-client --without-server"
+
+# Save everything for debus
+tar cf $RBR/all.tar .
+
+# Save shared libraries
+(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
+
+# Save manual to avoid rebuilding
+mv Docs/manual.ps Docs/manual.ps.save
+make distclean
+mv Docs/manual.ps.save Docs/manual.ps
+
+BuildMySQL "--disable-shared" \
+ "--with-mysqld-ldflags='-all-static'" \
+ "--with-client-ldflags='-all-static'"
+
+%install -n mysql-%{mysql_version}
+RBR=$RPM_BUILD_ROOT
+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/{sbin,share,man,include}
+install -d $RBR/usr/doc/MySQL-%{mysql_version}
+install -d $RBR/usr/lib
+# Make install
+make install DESTDIR=$RBR benchdir=/usr/share/sql-bench
+
+# Install shared libraries (Disable for architectures that don't support it)
+(cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar)
+
+# Install logrotate and autostart
+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
+ /etc/rc.d/init.d/mysql stop > /dev/null 2>&1
+ echo "Giving mysqld a couple of seconds to exit nicely"
+ sleep 5
+fi
+
+%post
+mysql_datadir=/var/lib/mysql
+
+# Create data directory if needed
+if test ! -d $mysql_datadir; then mkdir $mysql_datadir; fi
+if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
+if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
+
+# Make MySQL start/shutdown automatically when the machine does it.
+/sbin/chkconfig --add mysql
+
+# Create a MySQL user. Do not report any problems if it already
+# exists. This is redhat specific and should be handled more portable
+useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/null || true
+
+# Change permissions so that the user that will run the MySQL daemon
+# owns all database files.
+chown -R mysql $mysql_datadir
+
+# Initiate databases
+mysql_install_db -IN-RPM
+
+# Change permissions again to fix any new files.
+chown -R mysql $mysql_datadir
+
+# Fix permissions for the permission database so that only the user
+# can read them.
+chmod -R og-rw $mysql_datadir/mysql
+
+# Restart in the same way that mysqld will be started normally.
+/etc/rc.d/init.d/mysql start
+
+# Allow safe_mysqld to start mysqld and print a message before we exit
+sleep 2
+
+%preun
+if test -x /etc/rc.d/init.d/mysql
+then
+ /etc/rc.d/init.d/mysql stop > /dev/null
+fi
+# Remove autostart of mysql
+if test $1 = 0
+then
+ /sbin/chkconfig --del mysql
+fi
+# We do not remove the mysql user since it may still own a lot of
+# database files.
+
+%files
+%attr(-, root, root) %doc /usr/doc/MySQL-%{mysql_version}/
+
+%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/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_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/mysqlhotcopy
+%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/safe_mysqld
+%attr(755, root, root) /usr/bin/my_print_defaults
+
+%attr(644, root, root) /usr/info/mysql.info
+
+%attr(755, root, root) /usr/sbin/mysqld
+
+%attr(644, root, root) /etc/logrotate.d/mysql
+%attr(755, root, root) /etc/rc.d/init.d/mysql
+
+%attr(755, root, root) /usr/share/mysql/
+
+%files client
+%attr(755, root, root) /usr/bin/msql2mysql
+%attr(755, root, root) /usr/bin/mysql
+%attr(755, root, root) /usr/bin/mysqlaccess
+%attr(755, root, root) /usr/bin/mysqladmin
+%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
+
+%post shared
+/sbin/ldconfig
+
+%postun shared
+/sbin/ldconfig
+
+%files devel
+%attr(755, root, root) /usr/bin/comp_err
+%attr(755, root, root) /usr/include/mysql/
+%attr(755, root, root) /usr/lib/mysql/
+
+%files shared
+# Shared libraries (omit for architectures that don't support them)
+%attr(755, root, root) /usr/lib/*
+
+%files bench
+%attr(-, root, root) /usr/share/sql-bench
+
+%changelog
+
+* Fri Jun 29 2000 Steven Lawrance <slawrance@technologist.com>
+
+- Merged changes from official MySQL RPM and upgraded Berkeley DB to
+ 3.1.14 within this RPM.
+
+* 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.
diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh
new file mode 100644
index 00000000000..fd0d70b2d04
--- /dev/null
+++ b/support-files/my-huge.cnf.sh
@@ -0,0 +1,64 @@
+# Example mysql config file for very large systems.
+#
+# This is for large system with memory of 1G-2G where the system runs mainly
+# MySQL.
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+skip-locking
+set-variable = key_buffer=384M
+set-variable = max_allowed_packet=1M
+set-variable = table_cache=512
+set-variable = sort_buffer=2M
+set-variable = record_buffer=2M
+set-variable = thread_cache=8
+set-variable = thread_concurrency=8 # Try number of CPU's*2
+set-variable = myisam_sort_buffer_size=64M
+log-update
+
+# Uncomment the following if you are using BDB tables
+#set-variable = bdb_cache_size=384M
+
+# Point the following paths to different dedicated disks
+#tmpdir = /tmp/
+#log-update = /path-to-dedicated-directory/hostname
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=256M
+set-variable = sort_buffer=256M
+set-variable = read_buffer=2M
+set-variable = write_buffer=2M
+
+[myisamchk]
+set-variable = key_buffer=256M
+set-variable = sort_buffer=256M
+set-variable = read_buffer=2M
+set-variable = write_buffer=2M
diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh
new file mode 100644
index 00000000000..8b58bed642f
--- /dev/null
+++ b/support-files/my-large.cnf.sh
@@ -0,0 +1,64 @@
+# Example mysql config file for large systems.
+#
+# This is for large system with memory = 512M where the system runs mainly
+# MySQL.
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+skip-locking
+set-variable = key_buffer=256M
+set-variable = max_allowed_packet=1M
+set-variable = table_cache=256
+set-variable = sort_buffer=1M
+set-variable = record_buffer=1M
+set-variable = myisam_sort_buffer_size=64M
+set-variable = thread_cache=8
+set-variable = thread_concurrency=8 # Try number of CPU's*2
+log-update
+
+# Uncomment the following if you are using BDB tables
+#set-variable = bdb_cache_size=64M
+
+# Point the following paths to different dedicated disks
+#tmpdir = /tmp/
+#log-update = /path-to-dedicated-directory/hostname
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=128M
+set-variable = sort_buffer=128M
+set-variable = read_buffer=2M
+set-variable = write_buffer=2M
+
+[myisamchk]
+set-variable = key_buffer=128M
+set-variable = sort_buffer=128M
+set-variable = read_buffer=2M
+set-variable = write_buffer=2M
diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh
new file mode 100644
index 00000000000..13bf8e739ec
--- /dev/null
+++ b/support-files/my-medium.cnf.sh
@@ -0,0 +1,63 @@
+# Example mysql config file for medium systems.
+#
+# This is for a system with little memory (32M - 64M) where MySQL plays
+# a important part and systems up to 128M very MySQL is used together with
+# other programs (like a web server)
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = table_cache=64
+set-variable = sort_buffer=512K
+set-variable = net_buffer_length=8K
+set-variable = myisam_sort_buffer_size=8M
+log-update
+
+# Uncomment the following if you are using BDB tables
+#set-variable = bdb_cache_size=4M
+
+# Point the following paths to different dedicated disks
+#tmpdir = /tmp/
+#log-update = /path-to-dedicated-directory/hostname
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=20M
+set-variable = sort_buffer=20M
+set-variable = read_buffer=2M
+set-variable = write_buffer=2M
+
+[myisamchk]
+set-variable = key_buffer=20M
+set-variable = sort_buffer=20M
+set-variable = read_buffer=2M
+set-variable = write_buffer=2M
diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh
new file mode 100644
index 00000000000..48017226a51
--- /dev/null
+++ b/support-files/my-small.cnf.sh
@@ -0,0 +1,57 @@
+# Example mysql config file for small systems.
+#
+# This is for a system with little memory (<= 64M) where MySQL is only used
+# from time to time and it's important that the mysqld deamon
+# doesn't use much resources.
+#
+# You can copy this file to
+# /etc/mf.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can in this file use all long options that the program supports.
+# If you want to know which options a program support, run the program
+# with --help option.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+
+# Here follows entries for some specific programs
+
+# The MySQL server
+[mysqld]
+port = @MYSQL_TCP_PORT@
+socket = @MYSQL_UNIX_ADDR@
+skip-locking
+set-variable = key_buffer=16K
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=64K
+set-variable = table_cache=4
+set-variable = sort_buffer=64K
+set-variable = net_buffer_length=2K
+
+# Uncomment the following if you are NOT using BDB tables
+#skip-bdb
+
+# Uncomment the following if you want to log updates
+#log-update
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+#safe-updates # Remove the comment character if you are not familiar with SQL
+
+[isamchk]
+set-variable = key_buffer=8M
+set-variable = sort_buffer=8M
+
+[myisamchk]
+set-variable = key_buffer=8M
+set-variable = sort_buffer=8M
diff --git a/support-files/mysql-log-rotate.sh b/support-files/mysql-log-rotate.sh
new file mode 100644
index 00000000000..a1153c66f40
--- /dev/null
+++ b/support-files/mysql-log-rotate.sh
@@ -0,0 +1,29 @@
+# This logname is set in mysql.server.sh that ends up in /etc/rc.d/init.d/mysql
+#
+# If the root user has a password you have to create a
+# /root/.my.cnf configuration file with the following
+# content:
+#
+# [mysqladmin]
+# password = <secret>
+# user= root
+#
+# where "<secret>" is the password.
+#
+# ATTENTION: This /root/.my.cnf should be readable ONLY
+# for root !
+
+@localstatedir@/mysqld.log {
+ # create 600 mysql mysql
+ notifempty
+ daily
+ rotate 3
+ missingok
+ compress
+ postrotate
+ # just if mysqld is really running
+ if test -n "`ps acx|grep mysqld`"; then
+ @bindir@/mysqladmin flush-logs
+ fi
+ endscript
+}
diff --git a/support-files/mysql.server-sys5.sh b/support-files/mysql.server-sys5.sh
new file mode 100755
index 00000000000..4bda51acc4d
--- /dev/null
+++ b/support-files/mysql.server-sys5.sh
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# This is an example SysV-init-script by Winfried Truemper that you can use
+# and modify to your liking
+#
+
+PATH="$PATH:@prefix@"
+export PATH
+MY_CFG="@prefix@/mysql.cfg"
+
+read_mysql_config() {
+ # this routine requires a sed, which reads even the last line of input
+
+ MY_CONFIG_FILE="$1" # file to read setting from
+ MY_CONFIG_SECTION="$2" # section inside the file
+ MY_CONFIG_TAG="$3" # name of the setting inside the section
+ TAB=`printf "\t" ""` # makes the code cut&paste safe
+
+ sed -n -f - "$MY_CONFIG_FILE" <<EOF
+1,/^\[$MY_CONFIG_SECTION\]/ d
+/^\[[a-z]/ q
+/^$MY_CONFIG_TAG/ {
+s/^$MY_CONFIG_TAG[ $TAB]*=[ $TAB]*\([^ $TAB]*\)/\1/
+p
+q
+}
+EOF
+}
+
+
+
+do_start() {
+ nohup ./bin/mysqld --defaults-file="$MY_CFG" &
+}
+
+do_stop() {
+ ./bin/mysqladmin --defaults-file="$MY_CFG" shutdown
+}
+
+do_kill_all() {
+ PIDS=`ps -efo pid,args | grep mysql | sed -e "s, *.*,," | sort | uniq`
+ kill $PIDS
+ sleep 5
+ kill -9 $PIDS
+}
+
+do_kill() {
+ MY_PIDFILE=`read_mysql_config "$MY_CFG" "mysqld" "pidfile" `
+ read MY_PID < "$MY_PIDFILE"
+ kill "$MY_PID"
+ sleep 2
+ kill -KILL "$MY_PID"
+}
+
+# z.B. mysql.sh admin "ping"
+do_admin() {
+ shift
+ ./bin/mysqladmin --defaults-file="$MY_CFG" $@
+ exit
+}
+
+do_repair() {
+ MY_DATADIR=`read_mysql_config "$MY_CFG" "mysqld" "datadir" `
+ ./bin/isamchk --defaults-file="$MY_CFG" --repair "$MY_DATADIR/$1"
+ shift
+}
+
+
+do_repair_all() {
+ MY_DATADIR=`read_mysql_config "$MY_CFG" "mysqld" "datadir" `
+ for i in `find "$MY_DATADIR" -name "*.ISM"`
+ do
+ ./bin/isamchk --defaults-file="$MY_CFG" --repair "$MY_DATADIR/$i"
+ done
+}
+
+
+
+MY_BASEDIR=`read_mysql_config "$MY_CFG" "mysqld" "basedir"`
+cd "$MY_BASEDIR" || exit 1
+while test $# -gt 0
+do
+ MY_ARG="$1"
+ do_$MY_ARG $@
+ shift
+done
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
new file mode 100644
index 00000000000..f6a75e22fea
--- /dev/null
+++ b/support-files/mysql.server.sh
@@ -0,0 +1,123 @@
+#!/bin/sh
+# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
+# This file is public domain and comes with NO WARRANTY of any kind
+
+# Mysql daemon start/stop script.
+
+# Usually this is put in /etc/init.d (at least on machines SYSV R4
+# based systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/S01mysql.
+# When this is done the mysql server will be started when the machine is started
+# and shut down when the systems goes down.
+
+# Comments to support chkconfig on RedHat Linux
+# chkconfig: 2345 90 90
+# description: A very fast and reliable SQL database engine.
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+basedir=@prefix@
+bindir=@bindir@
+datadir=@localstatedir@
+pid_file=@localstatedir@/mysqld.pid
+log_file=@localstatedir@/mysqld.log
+# Run mysqld as this user.
+mysql_daemon_user=@MYSQLD_USER@
+export PATH
+
+mode=$1
+
+if test -w / # determine if we should look at the root config file
+then # or user config file
+ conf=/etc/my.cnf
+else
+ conf=$HOME/.my.cnf # Using the users config file
+fi
+
+# The following code tries to get the variables safe_mysqld needs from the
+# config file. This isn't perfect as this ignores groups, but it should
+# work as the options doesn't conflict with anything else.
+
+if test -f "$conf" # Extract those fields we need from config file.
+then
+ if grep "^datadir" $conf >/dev/null
+ then
+ datadir=`grep "^datadir" $conf | cut -f 2 -d= | tr -d ' '`
+ fi
+ if grep "^user" $conf >/dev/null
+ then
+ mysql_daemon_user=`grep "^user" $conf | cut -f 2 -d= | tr -d ' ' | head -1`
+ fi
+ if grep "^pid-file" $conf >/dev/null
+ then
+ pid_file=`grep "^pid-file" $conf | cut -f 2 -d= | tr -d ' '`
+ else
+ if test -d "$datadir"
+ then
+ pid_file=$datadir/`hostname`.pid
+ fi
+ fi
+ if grep "^basedir" $conf >/dev/null
+ then
+ basedir=`grep "^basedir" $conf | cut -f 2 -d= | tr -d ' '`
+ bindir=$basedir/bin
+ fi
+ if grep "^bindir" $conf >/dev/null
+ then
+ bindir=`grep "^bindir" $conf | cut -f 2 -d= | tr -d ' '`
+ fi
+ if grep "^log[ \t]*=" $conf >/dev/null
+ then
+ log_file=`grep "log[ \t]*=" $conf | cut -f 2 -d= | tr -d ' '`
+ fi
+fi
+
+
+# Safeguard (relative paths, core dumps..)
+cd $basedir
+
+case "$mode" in
+ 'start')
+ # Start daemon
+
+ if test -x $bindir/safe_mysqld
+ then
+ # Give extra arguments to mysqld with the my.cnf file. This script may
+ # be overwritten at next upgrade.
+ $bindir/safe_mysqld \
+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file &
+ else
+ echo "Can't execute $bindir/safe_mysqld"
+ fi
+ ;;
+
+ 'stop')
+ # Stop daemon. We use a signal here to avoid having to know the
+ # root password.
+ if test -f "$pid_file"
+ then
+ mysqld_pid=`cat $pid_file`
+ echo "Killing mysqld with pid $mysqld_pid"
+ kill $mysqld_pid
+ # mysqld should remove the pid_file when it exits, so wait for it.
+
+ sleep 1
+ while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
+ do [ -z "$flags" ] && echo "Wait for mysqld to exit\c" || echo ".\c"
+ flags=a$flags
+ sleep 1
+ done
+ if [ -s $pid_file ]
+ then echo " gave up waiting!"
+ elif [ -n "$flags" ]
+ then echo " done"
+ fi
+ else
+ echo "No mysqld pid file found. Looked for $pid_file."
+ fi
+ ;;
+
+ *)
+ # usage
+ echo "usage: $0 start|stop"
+ exit 1
+ ;;
+esac
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
new file mode 100644
index 00000000000..bd50f3cfc4b
--- /dev/null
+++ b/support-files/mysql.spec.sh
@@ -0,0 +1,396 @@
+%define mysql_version @VERSION@
+%define shared_lib_version @SHARED_LIB_VERSION@
+%define release 1
+%define mysqld_user mysql
+
+%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
+
+Name: MySQL
+Summary: MySQL: a very fast and reliable SQL database engine
+Group: Applications/Databases
+Summary(pt_BR): MySQL: Um servidor SQL rápido e confiável.
+Group(pt_BR): Aplicações/Banco_de_Dados
+Version: @MYSQL_NO_DASH_VERSION@
+Release: %{release}
+Copyright: GPL / LGPL
+Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
+Icon: mysql.gif
+URL: http://www.mysql.com/
+Packager: David Axmark <david@mysql.com>
+Provides: msqlormysql MySQL-server
+Obsoletes: mysql
+
+# Think about what you use here since the first step is to
+# run a rm -rf
+BuildRoot: /var/tmp/mysql
+
+# 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 multiusuário e\
+multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de\
+dados no mundo. O MySQL é uma implementação cliente/servidor que\
+consiste de um servidor chamado mysqld e diversos\
+programas/bibliotecas clientes. Os principais objetivos do MySQL são:\
+velocidade, robustez e facilidade de uso. O MySQL foi originalmente\
+desenvolvido porque nós na Tcx precisávamos 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 têm mais de 7 milhões de linhas. Isto é o\
+equivalente a aproximadamente 50G de dados críticos. A base da construção do\
+MySQL é uma série de rotinas que foram usadas em um ambiente de produção com\
+alta demanda por muitos anos. Mesmo o MySQL estando ainda em desenvolvimento,\
+ele já oferece um conjunto de funções muito ricas e úteis. Veja a documentação\
+para maiores informações.
+
+%package client
+Release: %{release}
+Summary: MySQL - Client
+Group: Applications/Databases
+Summary(pt_BR): MySQL - Cliente
+Group(pt_BR): Aplicações/Banco_de_Dados
+Obsoletes: mysql-client
+
+%description client
+This package contains the standard MySQL clients.
+
+%{see_base}
+
+%description client -l pt_BR
+Este pacote contém os clientes padrão para o MySQL.
+
+%package bench
+Release: %{release}
+Requires: MySQL-client MySQL-DBI-perl-bin perl
+Summary: MySQL - Benchmarks
+Group: Applications/Databases
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
+Obsoletes: mysql-bench
+
+%description bench
+This package contains MySQL benchmark scripts and data.
+
+%{see_base}
+
+%description bench -l pt_BR
+Este pacote contém medições de desempenho de scripts e dados do MySQL.
+
+%package devel
+Release: %{release}
+Requires: MySQL-client
+Summary: MySQL - Development header files and libraries
+Group: Applications/Databases
+Summary(pt_BR): MySQL - Medições de desempenho
+Group(pt_BR): Aplicações/Banco_de_Dados
+Obsoletes: mysql-devel
+
+%description devel
+This package contains the development header files and libraries
+necessary to develop MySQL client applications.
+
+%{see_base}
+
+%description devel -l pt_BR
+Este pacote contém os arquivos de cabeçalho (header files) e bibliotecas
+necessárias para desenvolver aplicações clientes do MySQL.
+
+%package shared
+Release: %{release}
+Summary: MySQL - Shared libraries
+Group: Applications/Databases
+
+%description shared
+This package contains the shared libraries (*.so*) which certain
+languages and applications need to dynamically load and use MySQL.
+
+%prep
+%setup -n mysql-%{mysql_version}
+
+%build
+# The all-static flag is to make the RPM work on different
+# distributions. This version tries to put shared mysqlcliet libraries
+# in a separate package.
+
+BuildMySQL() {
+# The --enable-assembler simply does nothing on systems that does not
+# support assembler speedups.
+sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
+ CC=\"${MYSQL_BUILD_CC:-egcs}\" \
+ CFLAGS=\"${MYSQL_BUILD_CFLAGS:- -O6 -fomit-frame-pointer}\" \
+ CXX=\"${MYSQL_BUILD_CXX:-egcs}\" \
+ CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:- -O6 -fomit-frame-pointer \
+ -felide-constructors -fno-exceptions -fno-rtti}\" \
+ ./configure \
+ $* \
+ --enable-assembler \
+ --with-mysqld-user=%{mysqld_user} \
+ --with-unix-socket-path=/var/lib/mysql/mysql.sock \
+ --prefix=/ \
+ --with-extra-charsets=complex \
+ --exec-prefix=/usr \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var/lib/mysql \
+ --infodir=/usr/info \
+ --includedir=/usr/include \
+ --mandir=/usr/man \
+ --with-comment=\"Official MySQL RPM\";
+ # Add this for more debugging support
+ # --with-debug
+ "
+
+ # benchdir does not fit in above model. Maybe a separate bench distribution
+ make benchdir=$RPM_BUILD_ROOT/usr/share/sql-bench
+}
+
+# Use the build root for temporary storage of the shared libraries.
+
+RBR=$RPM_BUILD_ROOT
+MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
+if test -z "$RBR" -o "$RBR" = "/"
+then
+ echo "RPM_BUILD_ROOT has stupid value"
+ exit 1
+fi
+rm -rf $RBR
+mkdir -p $RBR
+
+BuildMySQL "--enable-shared --enable-thread-safe-client --without-server"
+
+# Save everything for debus
+tar cf $RBR/all.tar .
+
+# Save shared libraries
+(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
+
+# Save manual to avoid rebuilding
+mv Docs/manual.ps Docs/manual.ps.save
+make distclean
+mv Docs/manual.ps.save Docs/manual.ps
+
+BuildMySQL "--disable-shared" \
+ "--with-mysqld-ldflags='-all-static'" \
+ "--with-client-ldflags='-all-static'"
+
+%install -n mysql-%{mysql_version}
+RBR=$RPM_BUILD_ROOT
+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/{sbin,share,man,include}
+install -d $RBR/usr/doc/MySQL-%{mysql_version}
+install -d $RBR/usr/lib
+# Make install
+make install DESTDIR=$RBR benchdir=/usr/share/sql-bench
+
+# Install shared libraries (Disable for architectures that don't support it)
+(cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar)
+
+# Install logrotate and autostart
+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
+ /etc/rc.d/init.d/mysql stop > /dev/null 2>&1
+ echo "Giving mysqld a couple of seconds to exit nicely"
+ sleep 5
+fi
+
+%post
+mysql_datadir=/var/lib/mysql
+
+# Create data directory if needed
+if test ! -d $mysql_datadir; then mkdir $mysql_datadir; fi
+if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
+if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
+
+# Make MySQL start/shutdown automatically when the machine does it.
+/sbin/chkconfig --add mysql
+
+# Create a MySQL user. Do not report any problems if it already
+# exists. This is redhat specific and should be handled more portable
+useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" mysql 2> /dev/null || true
+
+# Change permissions so that the user that will run the MySQL daemon
+# owns all database files.
+chown -R mysql $mysql_datadir
+
+# Initiate databases
+mysql_install_db -IN-RPM
+
+# Change permissions again to fix any new files.
+chown -R mysql $mysql_datadir
+
+# Fix permissions for the permission database so that only the user
+# can read them.
+chmod -R og-rw $mysql_datadir/mysql
+
+# Restart in the same way that mysqld will be started normally.
+/etc/rc.d/init.d/mysql start
+
+# Allow safe_mysqld to start mysqld and print a message before we exit
+sleep 2
+
+%preun
+if test -x /etc/rc.d/init.d/mysql
+then
+ /etc/rc.d/init.d/mysql stop > /dev/null
+fi
+# Remove autostart of mysql
+if test $1 = 0
+then
+ /sbin/chkconfig --del mysql
+fi
+# We do not remove the mysql user since it may still own a lot of
+# database files.
+
+%files
+%attr(-, root, root) %doc /usr/doc/MySQL-%{mysql_version}/
+
+%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/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_install_db
+%attr(755, root, root) /usr/bin/mysql_config
+%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/mysqlhotcopy
+%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/safe_mysqld
+%attr(755, root, root) /usr/bin/my_print_defaults
+
+%attr(644, root, root) /usr/info/mysql.info
+
+%attr(755, root, root) /usr/sbin/mysqld
+
+%attr(644, root, root) /etc/logrotate.d/mysql
+%attr(755, root, root) /etc/rc.d/init.d/mysql
+
+%attr(755, root, root) /usr/share/mysql/
+
+%files client
+%attr(755, root, root) /usr/bin/msql2mysql
+%attr(755, root, root) /usr/bin/mysql
+%attr(755, root, root) /usr/bin/mysqlaccess
+%attr(755, root, root) /usr/bin/mysqladmin
+%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
+
+%post shared
+/sbin/ldconfig
+
+%postun shared
+/sbin/ldconfig
+
+%files devel
+%attr(755, root, root) /usr/bin/comp_err
+%attr(755, root, root) /usr/include/mysql/
+%attr(755, root, root) /usr/lib/mysql/
+%attr(755, root, root) /usr/bin/mysql_config
+
+%files shared
+# Shared libraries (omit for architectures that don't support them)
+%attr(755, root, root) /usr/lib/*
+
+%files bench
+%attr(-, root, root) /usr/share/sql-bench
+
+%changelog
+
+* 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.