OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael van Elst
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web openpkg$ Date: 16-Jan-2003 16:02:08
Branch: HEAD Handle: 2003011615020502
Added files:
openpkg-re/vcheck vc.mysql4
openpkg-src/mysql4 my.cnf my.pwd mysql4.patch mysql4.spec rc.mysql4
Modified files:
openpkg-web news.txt
Log:
Made package
Summary:
Revision Changes Path
1.1 +9 -0 openpkg-re/vcheck/vc.mysql4
1.1 +55 -0 openpkg-src/mysql4/my.cnf
1.1 +3 -0 openpkg-src/mysql4/my.pwd
1.1 +57 -0 openpkg-src/mysql4/mysql4.patch
1.1 +191 -0 openpkg-src/mysql4/mysql4.spec
1.1 +60 -0 openpkg-src/mysql4/rc.mysql4
1.2857 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-re/vcheck/vc.mysql4
============================================================================
$ cvs diff -u -r0 -r1.1 vc.mysql4
--- /dev/null 2003-01-16 16:02:05.000000000 +0100
+++ vc.mysql4 2003-01-16 16:02:06.000000000 +0100
@@ -0,0 +1,9 @@
+config = {
+}
+
+prog mysql4 = {
+ version = 4.0.9-gamma
+ url = http://www.mysql.com/downloads/mysql-4.0.html
+ regex = mysql-(__VER__)\.tar\.gz
+}
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mysql4/my.cnf
============================================================================
$ cvs diff -u -r0 -r1.1 my.cnf
--- /dev/null 2003-01-16 16:02:08.000000000 +0100
+++ my.cnf 2003-01-16 16:02:08.000000000 +0100
@@ -0,0 +1,55 @@
+##
+## my.cnf -- MySQL configuration
+##
+
+[client]
+socket = @l_prefix@/var/mysql/mysql.sock
+port = 3306
+
+[safe_mysqld]
+datadir = @l_prefix@/var/mysql
+socket = @l_prefix@/var/mysql/mysql.sock
+set-variable = pid_file=@l_prefix@/var/mysql/mysqld.pid
+host = 127.0.0.1
+port = 3306
+user = @l_rusr@
+basedir = @l_prefix@
+
+# logfile destinations (update rc.mysql accordingly)
+log = @l_prefix@/var/mysql/common.log
+log-update = @l_prefix@/var/mysql/update.log
+
+# most important tuning parameters for mysqld
+set-variable = key_buffer_size=16M
+set-variable = table_cache=64
+
+# less important tuning paramaters (change if special problems occur)
+set-variable = join_buffer_size=1M
+set-variable = max_connections=1000
+set-variable = max_connect_errors=10
+set-variable = max_delayed_threads=20
+set-variable = max_heap_table_size=16777216
+set-variable = max_sort_length=1024
+set-variable = max_user_connections=0
+set-variable = record_buffer=131072
+set-variable = record_rnd_buffer=131072
+set-variable = sort_buffer=2M
+set-variable = key_buffer=1M
+set-variable = tmp_table_size=32M
+
+# Berkeley DB
+set-variable = bdb_cache_size=@mysql_bdb_cache_size@
+set-variable = bdb_log_buffer_size=@mysql_bdb_log_buffer_size@
+set-variable = bdb_max_lock=@mysql_bdb_max_lock@
+
+# Innobase
+#set-variable = innodb_buffer_pool_size=70M
+#set-variable = innodb_additional_mem_pool_size=2M
+#set-variable = innodb_log_files_in_group=3
+#set-variable = innodb_log_file_size=20M
+#set-variable = innodb_log_buffer_size=8M
+#set-variable = innodb_lock_wait_timeout=50
+#innodb_data_home_dir =
+#innodb_data_file_path = @innodb_data_file_path@
+#innodb_flush_log_at_trx_commit = 1
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mysql4/my.pwd
============================================================================
$ cvs diff -u -r0 -r1.1 my.pwd
--- /dev/null 2003-01-16 16:02:08.000000000 +0100
+++ my.pwd 2003-01-16 16:02:08.000000000 +0100
@@ -0,0 +1,3 @@
+[mysqladmin]
+user = root
+password =
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mysql4/mysql4.patch
============================================================================
$ cvs diff -u -r0 -r1.1 mysql4.patch
--- /dev/null 2003-01-16 16:02:08.000000000 +0100
+++ mysql4.patch 2003-01-16 16:02:08.000000000 +0100
@@ -0,0 +1,57 @@
+--- scripts/mysql_install_db.sh.dist Thu Jan 16 13:44:25 2003
++++ scripts/mysql_install_db.sh Thu Jan 16 13:59:19 2003
+@@ -138,9 +138,8 @@
+ then
+ if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
+ if test ! -d $ldata/mysql; then mkdir $ldata/mysql; chmod 700 $ldata/mysql ; fi
+- if test ! -d $ldata/test; then mkdir $ldata/test; chmod 700 $ldata/test ; fi
+ if test -w / -a ! -z "$user"; then
+- chown $user $ldata $ldata/mysql $ldata/test;
++ chown $user $ldata $ldata/mysql
+ fi
+ fi
+
+@@ -178,8 +177,6 @@
+ c_d="$c_d )"
+ c_d="$c_d comment='Database privileges';"
+
+- i_d="INSERT INTO db VALUES
('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
+- INSERT INTO db VALUES
('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');"
+ fi
+
+ if test ! -f $mdata/host.frm
+@@ -250,10 +247,7 @@
+ INSERT INTO user VALUES
('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+
+ REPLACE INTO user VALUES
('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+- REPLACE INTO user VALUES
('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+-
+- INSERT INTO user (host,user) values ('localhost','');
+- INSERT INTO user (host,user) values ('$hostname','');"
++ REPLACE INTO user VALUES
('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);"
+ fi
+
+ if test ! -f $mdata/func.frm
+@@ -351,10 +345,7 @@
+ if test "$IN_RPM" -eq 0
+ then
+ echo "You can start the MySQL daemon with:"
+- echo "cd @prefix@ ; $bindir/mysqld_safe &"
+- echo
+- echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench'
directory:"
+- echo "cd sql-bench ; perl run-all-tests"
++ echo "@l_prefix@/etc/rc mysql4 start"
+ echo
+ fi
+ echo "Please report any problems with the @scriptdir@/mysqlbug script!"
+--- mysys/default.c.dist Thu Jan 16 13:43:20 2003
++++ mysys/default.c Thu Jan 16 13:57:57 2003
+@@ -47,7 +47,7 @@
+ #ifdef __WIN__
+ "C:/",
+ #else
+-"/etc/",
++"@l_prefix@/etc/mysql4/",
+ #endif
+ #ifdef DATADIR
+ DATADIR,
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mysql4/mysql4.spec
============================================================================
$ cvs diff -u -r0 -r1.1 mysql4.spec
--- /dev/null 2003-01-16 16:02:08.000000000 +0100
+++ mysql4.spec 2003-01-16 16:02:08.000000000 +0100
@@ -0,0 +1,191 @@
+##
+## mysql4.spec -- OpenPKG RPM Specification
+## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
+## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
+## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package version
+%define V_major 4.0
+%define V_mysql %{V_major}.9-gamma
+%define V_opkg %{V_major}.9gamma
+
+# package information
+Name: mysql4
+Summary: Fast Relational Database Management System
+URL: http://www.mysql.com/
+Vendor: MySQL AB
+Packager: The OpenPKG Project
+Distribution: OpenPKG [EVAL]
+Group: Database
+License: GPL
+Version: %{V_opkg}
+Release: 20030116
+
+# package options
+%option with_berkeleydb yes
+%option with_innobase no
+
+# package option decisions
+%if "%{with_berkeleydb}" == "yes"
+%define mysql_bdb_cache_size 8M
+%define mysql_bdb_log_buffer_size 32k
+%define mysql_bdb_max_lock 10000
+%else
+%define mysql_bdb_cache_size 0
+%define mysql_bdb_log_buffer_size 0
+%define mysql_bdb_max_lock 0
+%endif
+%if "%{with_berkeleydb}" == "yes" || "%{with_innobase}" == "yes"
+%define mysqld mysqld
+%else
+%define mysqld mysqld-max
+%endif
+
+# list of sources
+Source0:
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-%{V_major}/mysql-%{V_mysql}.tar.gz
+Source1: my.cnf
+Source2: my.pwd
+Source3: rc.mysql4
+Patch0: mysql4.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20030103, gcc
+PreReq: OpenPKG, openpkg >= 20030103
+AutoReq: no
+AutoReqProv: no
+
+%description
+ MySQL is a multi-user Relational Database Management System (RDBMS),
+ which is controlled through Structured Query Language (SQL) operating in
+ full multi-threading mode. The main goals of MySQL are speed, robustness
+ and ease of use. MySQL was originally developed because of the need for
+ a SQL server that could handle very big databases with magnitude higher
+ speed than what any database vendor could offer.
+
+%prep
+ %setup -q -n mysql-%{V_mysql}
+ %patch -p0
+
+%build
+ # patch file search path
+ %{l_shtool} subst \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ mysys/default.c
+
+ # determine additional configure options
+ case "%{l_target}" in
+ *-freebsd* ) opt="--with-client-ldflags=-static
--with-mysqld-ldflags=-static" ;;
+ *-linux* ) opt="--with-client-ldflags=-static
--with-mysqld-ldflags=-static" ;;
+ *-solaris* ) opt="--with-client-ldflags=-static
--with-mysqld-ldflags=-static" ;;
+ esac
+
+ # configure source tree
+ CC="%{l_cc}" \
+ CXX="%{l_cxx}" \
+ CFLAGS="%{l_cflags -O}" \
+ CXXFLAGS="%{l_cxxflags -O}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --sysconfdir=%{l_prefix}/etc/mysql4 \
+ --localstatedir=%{l_prefix}/var/mysql \
+ --with-unix-socket-path=%{l_prefix}/var/mysql/mysql.sock \
+ --with-mysqld-user=%{l_musr} \
+ --enable-thread-safe-client \
+%if "%{with_berkeleydb}" == "yes"
+ --with-berkeley-db \
+%endif
+%if "%{with_innobase}" == "no"
+ --without-innodb \
+%endif
+ --with-low-memory \
+ --disable-shared \
+ $opt
+
+ # build source tree
+ %{l_make} %{l_mflags}
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+
+ # patch init script
+ %{l_shtool} subst \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ scripts/mysql_install_db.sh
+
+ # perform standard installation procedure
+ %{l_make} %{l_mflags} install \
+ AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
+ DESTDIR=$RPM_BUILD_ROOT
+
+ # install global configuration
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/mysql4
+ %{l_shtool} install -c -m 644 \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ -e 's;@l_rusr@;%{l_rusr};g' \
+ -e 's;@mysql_bdb_cache_size@;%{mysql_bdb_cache_size};g' \
+ -e 's;@mysql_bdb_log_buffer_size@;%{mysql_bdb_log_buffer_size};g' \
+ -e 's;@mysql_bdb_max_lock@;%{mysql_bdb_max_lock};g' \
+ %{SOURCE my.cnf} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/mysql4/
+ %{l_shtool} install -c -m 600 \
+ %{SOURCE my.pwd} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/mysql4/
+
+ # install run-command script
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
+ %{l_shtool} install -c -m 755 \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ -e 's;@l_rusr@;%{l_rusr};g' \
+ -e 's;@l_rgrp@;%{l_rgrp};g' \
+ -e 's;@mysqld@;%{mysqld};g' \
+ %{SOURCE rc.mysql4} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+ # make sure the database directory exists
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/mysql
+
+ # determine the package files
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/mysql4/my.cnf' \
+ '%config %{l_prefix}/etc/mysql4/my.pwd'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
+%post
+ # create initial database
+ $RPM_INSTALL_PREFIX/bin/mysql_install_db \
+ --defaults-file=$RPM_INSTALL_PREFIX/etc/mysql4/my.cnf
+ chown %{l_rusr}:%{l_rgrp} \
+ $RPM_INSTALL_PREFIX/etc/mysql4/my.cnf \
+ $RPM_INSTALL_PREFIX/etc/mysql4/my.pwd
+ chown -R %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/mysql/
+ ( echo "The MySQL package includes automated maintenance procedures"
+ echo "that require administrator access to the database. For this"
+ echo "to work you must keep a copy (plain text) of the administrator"
+ echo "account in '$RPM_INSTALL_PREFIX/etc/mysql4/my.pwd'."
+ ) | %{l_rpmtool} msg -b -t notice
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mysql4/rc.mysql4
============================================================================
$ cvs diff -u -r0 -r1.1 rc.mysql4
--- /dev/null 2003-01-16 16:02:08.000000000 +0100
+++ rc.mysql4 2003-01-16 16:02:08.000000000 +0100
@@ -0,0 +1,60 @@
+#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
+##
+## rc.mysql -- Run-Command for MySQL Database
+##
+
+%config
+ mysql_enable="yes"
+ mysql_pwd_file=@l_prefix@/etc/mysql/my.pwd
+ mysql_cnf_file=@l_prefix@/etc/mysql/my.cnf
+ mysql_log_prolog="true"
+ mysql_log_epilog="true"
+ mysql_log_numfiles="10"
+ mysql_log_minsize="1M"
+ mysql_log_complevel="9"
+
+%common
+ # same paths as in my.cnf
+ mysql_pid_file=@l_prefix@/var/mysql/mysqld.pid
+ mysql_log_err=@l_prefix@/var/mysql/mysqld.err
+ mysql_log_common=@l_prefix@/var/mysql/common.log
+ mysql_log_update=@l_prefix@/var/mysql/update.log
+
+%start -p 200 -u @l_rusr@
+ opServiceEnabled mysql || exit 0
+ cd @l_prefix@
+ @l_prefix@/bin/safe_mysqld >/dev/null 2>&1 \
+ --mysqld=@mysqld@ \
+ --pid-file="$mysql_pid_file" \
+ --err-log="$mysql_log_err" &
+
+%stop -p 200 -u @l_rusr@
+ opServiceEnabled mysql || exit 0
+ @l_prefix@/bin/mysqladmin \
+ --defaults-extra-file=${mysql_pwd_file} \
+ shutdown
+
+%restart -u @l_rusr@
+ opServiceEnabled mysql || exit 0
+ cd @l_prefix@
+ @l_prefix@/bin/mysqladmin \
+ --defaults-extra-file=${mysql_pwd_file} \
+ shutdown
+ @l_prefix@/bin/safe_mysqld >/dev/null 2>&1 \
+ --mysqld=@mysqld@ \
+ --pid-file="$mysql_pid_file" \
+ --err-log="$mysql_log_err" &
+
+%daily -u @l_rusr@
+ opServiceEnabled mysql || exit 0
+ shtool rotate -f \
+ -n${mysql_log_numfiles} -s${mysql_log_minsize} -d \
+ -z${mysql_log_complevel} -o@l_rusr@ -g@l_rgrp@ -m644 \
+ -P "${mysql_log_prolog}" \
+ -E "@l_prefix@/bin/mysqladmin \
+ --defaults-extra-file=${mysql_pwd_file} \
+ flush-logs; ${mysql_log_epilog}" \
+ ${mysql_log_common} \
+ ${mysql_log_update} \
+ ${mysql_log_err}
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.2856 -r1.2857 news.txt
--- openpkg-web/news.txt 16 Jan 2003 14:59:50 -0000 1.2856
+++ openpkg-web/news.txt 16 Jan 2003 15:02:06 -0000 1.2857
@@ -1,3 +1,4 @@
+16-Jan-2003: New package: P<mysql4-4.0.9gamma-20030116>
16-Jan-2003: Upgraded package: P<openpkg-tool-20030116-20030116>
16-Jan-2003: Upgraded package: P<apache-1.3.27-20030116>
16-Jan-2003: Upgraded package: P<guile-1.6.1-20030116>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]