Import mysql4-server 4.0.13.

This commit is contained in:
Juan Romero Pardines 2003-07-09 17:17:14 +00:00
parent ba39347c65
commit 10e6734e4c
13 changed files with 471 additions and 0 deletions

32
mysql4-server/DEINSTALL Normal file
View file

@ -0,0 +1,32 @@
#!/bin/sh
#
# $NetBSD: DEINSTALL,v 1.1.1.1 2003/07/09 17:17:14 xtraeme Exp $
: ${PKGNAME:=$1}
: ${STAGE:=$2}
MYSQL_DATADIR="@MYSQL_DATADIR@"
CAT="@CAT@"
case ${STAGE} in
DEINSTALL)
;;
POST-DEINSTALL)
${CAT} << EOF
===========================================================================
If you won't be using ${PKGNAME} any longer, you may want
to remove the following directories:
${MYSQL_DATADIR}
===========================================================================
EOF
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0

15
mysql4-server/DESCR Normal file
View file

@ -0,0 +1,15 @@
MySQL is a SQL (Structured Query Language) database server. SQL is the
most popular database language in the world. 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 and robustness.
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.
The official way to pronounce 'MySQL' is 'My Ess Que Ell' (Not MY-SEQUEL).
This package contains the MySQL server programs and libraries.

23
mysql4-server/INSTALL Normal file
View file

@ -0,0 +1,23 @@
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.1.1.1 2003/07/09 17:17:14 xtraeme Exp $
: ${PKGNAME:=$1}
: ${STAGE:=$2}
case ${STAGE} in
PRE-INSTALL)
;;
POST-INSTALL)
echo "-------------------------------"
echo "Initializing MySQL databases..."
echo "-------------------------------"
${PKG_PREFIX}/bin/mysql_install_db --force
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac

18
mysql4-server/MESSAGE Normal file
View file

@ -0,0 +1,18 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
The MySQL directory `${MYSQL_DATADIR}' should be owned by the
user `${MYSQL_USER}' and group `${MYSQL_GROUP}'. This can be done with:
chown -R ${MYSQL_USER}:${MYSQL_GROUP} ${MYSQL_DATADIR}
If this is a new installation, please remember to set a password for
the MySQL root user! This is done by running both:
${PREFIX}/bin/mysqladmin -u root -p password 'new-password'
${PREFIX}/bin/mysqladmin -h `hostname` -u root -p password 'new-password'
(The "Enter password:" prompt is asking for the existing password.
As there is no existing password, just press Return.)
See the manual for more instructions.
===========================================================================

71
mysql4-server/Makefile Normal file
View file

@ -0,0 +1,71 @@
# $NetBSD: Makefile,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
SVR4_PKGNAME= mysqs
COMMENT= MySQL, a free SQL database (server)
.include "../mysql-client/Makefile.common"
CONFIGURE_ARGS+= --with-libwrap
CONFIGURE_ARGS+= --without-berkeley-db
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
USE_GMAKE= YES
ONLY_FOR_PLATFORM= SunOS-*-sparc Linux-*-*
# on NetBSD, if native threads are not available, hardwire
# included mit-pthreads, as this doesn't yet work properly with pth
.if ${OPSYS} == "NetBSD"
. if exists(/usr/include/pthread.h)
# native pthreads
ONLY_FOR_PLATFORM+= NetBSD-*-*
. else
# force included mit-pthreads
CONFIGURE_ARGS+= --with-mit-threads
# platforms on which included mit-pthreads is usable
ONLY_FOR_PLATFORM+= NetBSD-*-alpha NetBSD-*-arm NetBSD-*-arm32 \
NetBSD-*-i386 NetBSD-*-sparc NetBSD-*-m68k \
NetBSD-*-powerpc
. endif
.endif
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
PKG_USERS= ${MYSQL_USER}:${MYSQL_GROUP}::MySQL\\ database\\ administrator:${MYSQL_DATADIR}:${SH}
PKG_GROUPS= ${MYSQL_GROUP}
RCD_SCRIPTS= mysqld
CONFIGURE_ARGS+= --with-mysqld-user=${MYSQL_USER}
FILES_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}
MESSAGE_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR} \
MYSQL_USER=${MYSQL_USER} MYSQL_GROUP=${MYSQL_GROUP}
BUILD_DEFS+= MYSQL_DATADIR
MAKE_DIRS_PERMS+= ${MYSQL_DATADIR} ${MYSQL_USER} ${MYSQL_GROUP} 0700
post-configure:
cd ${WRKSRC} && ${CP} -f config.h include/my_config.h
post-build:
cd ${WRKSRC}/scripts && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} \
${MAKE_FLAGS} mysqld_safe mysql_install_db
pre-install:
${SED} -e "s|@MYSQL_DATADIR@|${MYSQL_DATADIR}|g" \
-e "s|@CAT@|${CAT}|g" \
${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/scripts/mysqld_safe ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/scripts/mysql_install_db ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/support-files/mysql.server ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/mysqld.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/mysqld_safe.1 ${PREFIX}/man/man1
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../databases/mysql-client/buildlink2.mk"
.include "../../security/tcp_wrappers/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"

122
mysql4-server/PLIST Normal file
View file

@ -0,0 +1,122 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
bin/comp_err
bin/isamchk
bin/isamlog
bin/my_print_defaults
bin/myisamchk
bin/myisamlog
bin/myisampack
bin/mysql.server
bin/mysql_install_db
bin/pack_isam
bin/perror
bin/replace
bin/resolve_stack_dump
bin/resolveip
bin/mysqld_safe
etc/rc.d/mysqld
lib/mysql/libdbug.a
lib/mysql/libheap.a
lib/mysql/libmerge.a
lib/mysql/libmyisam.a
lib/mysql/libmyisammrg.a
lib/mysql/libmystrings.a
lib/mysql/libmysys.a
lib/mysql/libnisam.a
libexec/mysqld
man/man1/mysqld.1
man/man1/mysqld_safe.1
share/mysql/charsets/Index
share/mysql/charsets/README
share/mysql/charsets/cp1251.conf
share/mysql/charsets/cp1257.conf
share/mysql/charsets/croat.conf
share/mysql/charsets/danish.conf
share/mysql/charsets/dec8.conf
share/mysql/charsets/dos.conf
share/mysql/charsets/estonia.conf
share/mysql/charsets/german1.conf
share/mysql/charsets/greek.conf
share/mysql/charsets/hebrew.conf
share/mysql/charsets/hp8.conf
share/mysql/charsets/hungarian.conf
share/mysql/charsets/koi8_ru.conf
share/mysql/charsets/koi8_ukr.conf
share/mysql/charsets/latin1.conf
share/mysql/charsets/latin2.conf
share/mysql/charsets/latin5.conf
share/mysql/charsets/swe7.conf
share/mysql/charsets/usa7.conf
share/mysql/charsets/win1250.conf
share/mysql/charsets/win1251.conf
share/mysql/charsets/win1251ukr.conf
share/mysql/czech/errmsg.sys
share/mysql/czech/errmsg.txt
share/mysql/danish/errmsg.sys
share/mysql/danish/errmsg.txt
share/mysql/dutch/errmsg.sys
share/mysql/dutch/errmsg.txt
share/mysql/english/errmsg.sys
share/mysql/english/errmsg.txt
share/mysql/estonian/errmsg.sys
share/mysql/estonian/errmsg.txt
share/mysql/french/errmsg.sys
share/mysql/french/errmsg.txt
share/mysql/german/errmsg.sys
share/mysql/german/errmsg.txt
share/mysql/greek/errmsg.sys
share/mysql/greek/errmsg.txt
share/mysql/hungarian/errmsg.sys
share/mysql/hungarian/errmsg.txt
share/mysql/italian/errmsg.sys
share/mysql/italian/errmsg.txt
share/mysql/japanese/errmsg.sys
share/mysql/japanese/errmsg.txt
share/mysql/korean/errmsg.sys
share/mysql/korean/errmsg.txt
share/mysql/mi_test_all
share/mysql/mi_test_all.res
share/mysql/mysql.server
share/mysql/norwegian-ny/errmsg.sys
share/mysql/norwegian-ny/errmsg.txt
share/mysql/norwegian/errmsg.sys
share/mysql/norwegian/errmsg.txt
share/mysql/polish/errmsg.sys
share/mysql/polish/errmsg.txt
share/mysql/portuguese/errmsg.sys
share/mysql/portuguese/errmsg.txt
share/mysql/romanian/errmsg.sys
share/mysql/romanian/errmsg.txt
share/mysql/russian/errmsg.sys
share/mysql/russian/errmsg.txt
share/mysql/slovak/errmsg.sys
share/mysql/slovak/errmsg.txt
share/mysql/spanish/errmsg.sys
share/mysql/spanish/errmsg.txt
share/mysql/swedish/errmsg.sys
share/mysql/swedish/errmsg.txt
share/mysql/ukrainian/errmsg.sys
share/mysql/ukrainian/errmsg.txt
@dirrm share/mysql/ukrainian
@dirrm share/mysql/swedish
@dirrm share/mysql/spanish
@dirrm share/mysql/slovak
@dirrm share/mysql/russian
@dirrm share/mysql/romanian
@dirrm share/mysql/portuguese
@dirrm share/mysql/polish
@dirrm share/mysql/norwegian-ny
@dirrm share/mysql/norwegian
@dirrm share/mysql/korean
@dirrm share/mysql/japanese
@dirrm share/mysql/italian
@dirrm share/mysql/hungarian
@dirrm share/mysql/greek
@dirrm share/mysql/german
@dirrm share/mysql/french
@dirrm share/mysql/estonian
@dirrm share/mysql/english
@dirrm share/mysql/dutch
@dirrm share/mysql/danish
@dirrm share/mysql/czech
@dirrm share/mysql/charsets

9
mysql4-server/distinfo Normal file
View file

@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
SHA1 (mysql-4.0.13.tar.gz) = f5adc736d1f453e5e7bd60a2d7cd335fbccc6213
Size (mysql-4.0.13.tar.gz) = 12511177 bytes
SHA1 (patch-aa) = 97756cfec05171ab7819f95af1377e6a11375baa
SHA1 (patch-ae) = 81fa0273261ea44c599cf44f5a3a56935c3a62bd
SHA1 (patch-af) = 78acdcd5a0f65ecaf545561eb3d450fa43746d1a
SHA1 (patch-al) = 75b237ea28da2b44f05c0c0fb3493bba060004dc
SHA1 (patch-am) = 8aad99e4910436f2ea9e784a54e783f0ebb27b8a

View file

@ -0,0 +1,31 @@
#!/bin/sh
#
# $NetBSD: mysqld.sh,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
#
# PROVIDE: mysqld
# REQUIRE: DAEMON LOGIN mountall
# KEYWORD: shutdown
# Note: this needs NetBSD 1.6 or newer
#
. /etc/rc.subr
name="mysqld"
rcvar=$name
command="@PREFIX@/bin/mysqld_safe"
procname="@PREFIX@/libexec/${name}"
pidfile="@MYSQL_DATADIR@/`hostname`.pid"
start_cmd="mysqld_start"
required_files="@MYSQL_DATADIR@/mysql/host.frm"
mysqld_start()
{
echo "Starting mysqld."
ulimit -n 4096
${command} ${mysqld_flags} &
}
load_rc_config $name
run_rc_command "$1"

View file

@ -0,0 +1,18 @@
$NetBSD: patch-aa,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
--- Makefile.in.orig 2003-05-27 20:52:11.000000000 +0200
+++ Makefile.in 2003-05-27 20:54:33.000000000 +0200
@@ -212,11 +212,8 @@
EXTRA_DIST = INSTALL-SOURCE README \
COPYING COPYING.LIB
-SUBDIRS = . include @docs_dirs@ @readline_dir@ \
- @thread_dirs@ pstack @sql_client_dirs@ \
- @sql_server_dirs@ scripts man tests \
- BUILD @netware_dir@ os2 @libmysqld_dirs@ \
- @bench_dirs@ support-files @fs_dirs@ @tools_dirs@
+SUBDIRS = . include @thread_dirs@ pstack @sql_server_dirs@ \
+ tests @bench_dirs@ support-files
# Relink after clean

View file

@ -0,0 +1,14 @@
$NetBSD: patch-ae,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
$NetBSD: patch-ae,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
--- configure.in.orig Thu Feb 14 18:30:15 2002
+++ configure.in Mon Mar 18 14:49:20 2002
@@ -1743,7 +1743,6 @@
else
bench_dirs=""
fi
-bench_dirs="$bench_dirs mysql-test"
AC_SUBST(bench_dirs)
# Don't build readline, i have it already

View file

@ -0,0 +1,12 @@
$NetBSD: patch-af,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
--- configure.orig Thu Feb 14 18:30:42 2002
+++ configure Mon Mar 18 14:49:41 2002
@@ -9509,7 +9509,6 @@
else
bench_dirs=""
fi
-bench_dirs="$bench_dirs mysql-test"
# Don't build readline, i have it already

View file

@ -0,0 +1,12 @@
$NetBSD: patch-al,v 1.1.1.1 2003/07/09 17:17:15 xtraeme Exp $
--- include/my_pthread.h.orig Mon Jan 20 18:40:49 2003
+++ include/my_pthread.h Mon Jan 20 18:40:58 2003
@@ -21,6 +21,7 @@
#define _my_pthread_h
#include <errno.h>
+#include <signal.h>
#ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif

View file

@ -0,0 +1,94 @@
$NetBSD: patch-am,v 1.1.1.1 2003/07/09 17:17:16 xtraeme Exp $
--- scripts/mysqld_safe.sh.orig 2003-05-27 21:05:44.000000000 +0200
+++ scripts/mysqld_safe.sh 2003-05-27 21:11:30.000000000 +0200
@@ -232,6 +232,15 @@
fi
fi
+datemsg()
+{
+ echo -n $(date +'%y%M%d %H:%M:%S')" "
+ echo "$*"
+}
+
+exec >>$err_log 2>&1
+
+
#
# If there exists an old pid file, check if the daemon is already running
# Note: The switches to 'ps' may depend on your operating system
@@ -242,18 +251,16 @@
then
if @FIND_PROC@
then # The pid contains a mysqld process
- echo "A mysqld process already exists"
- echo "A mysqld process already exists at " `date` >> $err_log
+ datemsg "A mysqld process already exists"
exit 1
fi
fi
rm -f $pid_file
if test -f $pid_file
then
- echo "Fatal error: Can't remove the pid file: $pid_file"
- echo "Fatal error: Can't remove the pid file: $pid_file at " `date` >> $err_log
- echo "Please remove it manually and start $0 again"
- echo "mysqld daemon not started"
+ datemsg "Fatal error: Can't remove the pid file: $pid_file"
+ datemsg "Please remove it manually and start $0 again"
+ datemsg "mysqld daemon not started"
exit 1
fi
fi
@@ -262,11 +269,11 @@
# Uncomment the following lines if you want all tables to be automaticly
# checked and repaired at start
#
-# echo "Checking tables in $DATADIR"
+# datemsg "Checking tables in $DATADIR"
# $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check -O key_buffer=64M -O sort_buffer=64M $DATADIR/*/*.MYI
# $MY_BASEDIR_VERSION/bin/isamchk --silent --force -O sort_buffer=64M $DATADIR/*/*.ISM
-echo "Starting $MYSQLD daemon with databases from $DATADIR"
+datemsg "Starting $MYSQLD daemon with databases from $DATADIR"
# Does this work on all systems?
#if type ulimit | grep "shell builtin" > /dev/null
@@ -274,7 +281,7 @@
# ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and FreeBSD systems
#fi
-echo "`date +'%y%m%d %H:%M:%S mysqld started'`" >> $err_log
+datemsg "mysqld started"
while true
do
rm -f $MYSQL_UNIX_PORT $pid_file # Some extra safety
@@ -297,7 +304,7 @@
# The only thing is ps x => redhat 5 gives warnings when using ps -x.
# kill -9 is used or the process won't react on the kill.
numofproces=`ps xa | grep -v "grep" | grep -c $ledir/$MYSQLD`
- echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
+ datemsg "Number of processes running now: $numofproces"
I=1
while test "$I" -le "$numofproces"
do
@@ -309,15 +316,14 @@
# echo "TEST $I - $T **"
if kill -9 $T
then
- echo "$MYSQLD process hanging, pid $T - killed" | tee -a $err_log
+ datemsg "$MYSQLD process hanging, pid $T - killed"
else
break
fi
I=`expr $I + 1`
done
fi
- echo "`date +'%y%m%d %H:%M:%S'` mysqld restarted" | tee -a $err_log
+ datemsg "mysqld restarted"
done
-echo "`date +'%y%m%d %H:%M:%S'` mysqld ended" | tee -a $err_log
-echo "" | tee -a $err_log
+datemsg "mysqld ended"