summaryrefslogtreecommitdiff
path: root/databases/mysql40-server
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-10-31 10:43:07 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-10-31 10:43:07 +0000
commitb6bdb8fc48366c28713092367a7f5e6751fa1503 (patch)
tree915073cffe08868bb42c711cf083240e7eea4c1b /databases/mysql40-server
parentMakefile was errornously committed. Revert the changes (diff)
Update to 4.0.22 release:
- Switch to rcNG startup script
Notes
Notes: svn path=/head/; revision=120517
Diffstat (limited to 'databases/mysql40-server')
-rw-r--r--databases/mysql40-server/Makefile7
-rw-r--r--databases/mysql40-server/distinfo4
-rw-r--r--databases/mysql40-server/files/mysql-server.sh74
-rw-r--r--databases/mysql40-server/files/patch-Makefile.in8
-rw-r--r--databases/mysql40-server/pkg-plist218
5 files changed, 168 insertions, 143 deletions
diff --git a/databases/mysql40-server/Makefile b/databases/mysql40-server/Makefile
index 3c497bc108d8..144e7037b5cd 100644
--- a/databases/mysql40-server/Makefile
+++ b/databases/mysql40-server/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME?= mysql
-PORTVERSION= 4.0.21
+PORTVERSION= 4.0.22
PORTREVISION?= 0
CATEGORIES= databases
MASTER_SITES= ftp://planetmirror.com/pub/mysql/Downloads/MySQL-4.0/ \
@@ -30,6 +30,7 @@ PKGINSTALL?= ${WRKDIR}/pkg-install
DB_DIR?= /var/db/mysql
USE_LIBTOOL_VER=15
USE_REINPLACE= yes
+USE_RC_SUBR= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=${DB_DIR} \
@@ -56,7 +57,7 @@ CONFIGURE_ARGS+=--with-extra-charsets=${WITH_XCHARSET}
.endif
.if defined(WITH_OPENSSL)
USE_OPENSSL= yes
-CONFIGURE_ARGS+=--with-openssl
+CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
.endif
.if defined(BUILD_STATIC)
CONFIGURE_ARGS+=--with-mysqld-ldflags=-all-static
@@ -164,7 +165,7 @@ post-install:
.endif
@${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
- @${SED} "s|%%PREFIX%%|${PREFIX}|g; s|%%DB_DIR%%|${DB_DIR}|g" < ${FILESDIR}/mysql-server.sh > ${PREFIX}/etc/rc.d/mysql-server.sh
+ @${SED} "s|%%RC_SUBR%%|${RC_SUBR}|g;s|%%PREFIX%%|${PREFIX}|g;s|%%DB_DIR%%|${DB_DIR}|g" < ${FILESDIR}/mysql-server.sh > ${PREFIX}/etc/rc.d/mysql-server.sh
@${CHMOD} 750 ${PREFIX}/etc/rc.d/mysql-server.sh
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/Flags
diff --git a/databases/mysql40-server/distinfo b/databases/mysql40-server/distinfo
index 6250caaf2bd7..64bc1793db54 100644
--- a/databases/mysql40-server/distinfo
+++ b/databases/mysql40-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (mysql-4.0.21.tar.gz) = 0a3dae16519afa5e59d8b9e252181243
-SIZE (mysql-4.0.21.tar.gz) = 14107388
+MD5 (mysql-4.0.22.tar.gz) = fab53259c3ba9f729a319bf271fc8587
+SIZE (mysql-4.0.22.tar.gz) = 14395535
diff --git a/databases/mysql40-server/files/mysql-server.sh b/databases/mysql40-server/files/mysql-server.sh
index 5180b9c0c1eb..708ad57df4b3 100644
--- a/databases/mysql40-server/files/mysql-server.sh
+++ b/databases/mysql40-server/files/mysql-server.sh
@@ -1,27 +1,51 @@
#!/bin/sh
+#
+# $FreeBSD$
+#
-DB_DIR=%%DB_DIR%%
-PIDFILE=${DB_DIR}/`/bin/hostname -s`.pid
-
-case "$1" in
- start)
- if [ -x %%PREFIX%%/bin/mysqld_safe ]; then
- /usr/bin/limits -U mysql \
- %%PREFIX%%/bin/mysqld_safe --user=mysql --datadir=${DB_DIR} --pid-file=${PIDFILE} > /dev/null &
- echo -n ' mysqld'
- fi
- ;;
- stop)
- if [ -f ${PIDFILE} ]; then
- /bin/kill `cat ${PIDFILE}` > /dev/null 2>&1 && echo -n ' mysqld'
- else
- echo "mysql-server isn't running"
- fi
- ;;
- *)
- echo ""
- echo "Usage: `basename $0` { start | stop }"
- echo ""
- exit 64
- ;;
-esac
+# PROVIDE: mysql
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable mysql:
+# mysql_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable MySQL.
+# mysqllimits_enable (bool): Set to "NO" by default.
+# Set it to yes to run `limits $limits_args`
+# just before mysql starts.
+# mysqllimits_args (str): Default to "-e -U mysql"
+# Arguments of pre-start limits run.
+#
+
+. %%RC_SUBR%%
+
+name="mysql"
+rcvar=`set_rcvar`
+mysql_dbdir="%%DB_DIR%%"
+mysql_user="mysql"
+pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
+command="%%PREFIX%%/bin/mysqld_safe"
+command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} > /dev/null &"
+procname="%%PREFIX%%/libexec/mysqld"
+start_precmd="${name}_prestart"
+
+[ -z "$mysql_enable" ] && mysql_enable="NO"
+[ -z "$mysqllimits_enable" ] && mysqllimits_enable="NO"
+[ -z "$mysqllimits_args" ] && mysqllimits_args="-e -U ${mysql_user}"
+
+mysql_prestart()
+{
+ if checkyesno mysqllimits_enable; then
+ eval `/usr/bin/limits ${mysqllimits_args}` 2>/dev/null
+ else
+ return 0
+ fi
+}
+
+required_dirs="${mysql_dbdir}"
+required_files="${mysql_dbdir}/mysql/host.frm ${mysql_dbdir}/mysql/user.frm ${mysql_dbdir}/mysql/db.frm"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/databases/mysql40-server/files/patch-Makefile.in b/databases/mysql40-server/files/patch-Makefile.in
index 30ca6d4888a4..3a30878bf33f 100644
--- a/databases/mysql40-server/files/patch-Makefile.in
+++ b/databases/mysql40-server/files/patch-Makefile.in
@@ -1,12 +1,12 @@
---- Makefile.in.orig Tue Sep 7 00:30:02 2004
-+++ Makefile.in Wed Sep 15 14:22:23 2004
-@@ -279,11 +279,7 @@
+--- Makefile.in.orig Thu Oct 28 02:48:54 2004
++++ Makefile.in Sun Oct 31 09:37:50 2004
+@@ -280,11 +280,7 @@
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT
-SUBDIRS = . include @docs_dirs@ @readline_dir@ \
- @thread_dirs@ pstack @sql_client_dirs@ \
-- @sql_server_dirs@ scripts man tests \
+- @sql_server_dirs@ scripts @man_dirs@ tests \
- BUILD netware os2 @libmysqld_dirs@ \
- @bench_dirs@ support-files @fs_dirs@ @tools_dirs@
+SUBDIRS =
diff --git a/databases/mysql40-server/pkg-plist b/databases/mysql40-server/pkg-plist
index 914c9acb95e4..a67b3aa65a9d 100644
--- a/databases/mysql40-server/pkg-plist
+++ b/databases/mysql40-server/pkg-plist
@@ -78,117 +78,117 @@ libexec/mysqld
%%PORTDOCS%%%%DOCSDIR%%/manual.html
%%PORTDOCS%%%%DOCSDIR%%/manual.txt
%%PORTDOCS%%%%DOCSDIR%%/manual_toc.html
-share/mysql/Description.plist
-share/mysql/Info.plist
-share/mysql/MySQL-shared-compat.spec
-share/mysql/StartupParameters.plist
-share/mysql/binary-configure
-share/mysql/postinstall
-share/mysql/preinstall
-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/my-huge.cnf
-share/mysql/my-innodb-heavy-4G.cnf
-share/mysql/my-large.cnf
-share/mysql/my-medium.cnf
-share/mysql/my-small.cnf
-share/mysql/mysql-%%MYSQL_VERSION%%.spec
-share/mysql/mysql-log-rotate
-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
+%%DATADIR%%/Description.plist
+%%DATADIR%%/Info.plist
+%%DATADIR%%/MySQL-shared-compat.spec
+%%DATADIR%%/StartupParameters.plist
+%%DATADIR%%/binary-configure
+%%DATADIR%%/postinstall
+%%DATADIR%%/preinstall
+%%DATADIR%%/charsets/Index
+%%DATADIR%%/charsets/README
+%%DATADIR%%/charsets/cp1251.conf
+%%DATADIR%%/charsets/cp1257.conf
+%%DATADIR%%/charsets/croat.conf
+%%DATADIR%%/charsets/danish.conf
+%%DATADIR%%/charsets/dec8.conf
+%%DATADIR%%/charsets/dos.conf
+%%DATADIR%%/charsets/estonia.conf
+%%DATADIR%%/charsets/german1.conf
+%%DATADIR%%/charsets/greek.conf
+%%DATADIR%%/charsets/hebrew.conf
+%%DATADIR%%/charsets/hp8.conf
+%%DATADIR%%/charsets/hungarian.conf
+%%DATADIR%%/charsets/koi8_ru.conf
+%%DATADIR%%/charsets/koi8_ukr.conf
+%%DATADIR%%/charsets/latin1.conf
+%%DATADIR%%/charsets/latin2.conf
+%%DATADIR%%/charsets/latin5.conf
+%%DATADIR%%/charsets/swe7.conf
+%%DATADIR%%/charsets/usa7.conf
+%%DATADIR%%/charsets/win1250.conf
+%%DATADIR%%/charsets/win1251.conf
+%%DATADIR%%/charsets/win1251ukr.conf
+%%DATADIR%%/czech/errmsg.sys
+%%DATADIR%%/czech/errmsg.txt
+%%DATADIR%%/danish/errmsg.sys
+%%DATADIR%%/danish/errmsg.txt
+%%DATADIR%%/dutch/errmsg.sys
+%%DATADIR%%/dutch/errmsg.txt
+%%DATADIR%%/english/errmsg.sys
+%%DATADIR%%/english/errmsg.txt
+%%DATADIR%%/estonian/errmsg.sys
+%%DATADIR%%/estonian/errmsg.txt
+%%DATADIR%%/french/errmsg.sys
+%%DATADIR%%/french/errmsg.txt
+%%DATADIR%%/german/errmsg.sys
+%%DATADIR%%/german/errmsg.txt
+%%DATADIR%%/greek/errmsg.sys
+%%DATADIR%%/greek/errmsg.txt
+%%DATADIR%%/hungarian/errmsg.sys
+%%DATADIR%%/hungarian/errmsg.txt
+%%DATADIR%%/italian/errmsg.sys
+%%DATADIR%%/italian/errmsg.txt
+%%DATADIR%%/japanese/errmsg.sys
+%%DATADIR%%/japanese/errmsg.txt
+%%DATADIR%%/korean/errmsg.sys
+%%DATADIR%%/korean/errmsg.txt
+%%DATADIR%%/mi_test_all
+%%DATADIR%%/mi_test_all.res
+%%DATADIR%%/my-huge.cnf
+%%DATADIR%%/my-innodb-heavy-4G.cnf
+%%DATADIR%%/my-large.cnf
+%%DATADIR%%/my-medium.cnf
+%%DATADIR%%/my-small.cnf
+%%DATADIR%%/mysql-%%MYSQL_VERSION%%.spec
+%%DATADIR%%/mysql-log-rotate
+%%DATADIR%%/mysql.server
+%%DATADIR%%/norwegian-ny/errmsg.sys
+%%DATADIR%%/norwegian-ny/errmsg.txt
+%%DATADIR%%/norwegian/errmsg.sys
+%%DATADIR%%/norwegian/errmsg.txt
+%%DATADIR%%/polish/errmsg.sys
+%%DATADIR%%/polish/errmsg.txt
+%%DATADIR%%/portuguese/errmsg.sys
+%%DATADIR%%/portuguese/errmsg.txt
+%%DATADIR%%/romanian/errmsg.sys
+%%DATADIR%%/romanian/errmsg.txt
+%%DATADIR%%/russian/errmsg.sys
+%%DATADIR%%/russian/errmsg.txt
+%%DATADIR%%/slovak/errmsg.sys
+%%DATADIR%%/slovak/errmsg.txt
+%%DATADIR%%/spanish/errmsg.sys
+%%DATADIR%%/spanish/errmsg.txt
+%%DATADIR%%/swedish/errmsg.sys
+%%DATADIR%%/swedish/errmsg.txt
+%%DATADIR%%/ukrainian/errmsg.sys
+%%DATADIR%%/ukrainian/errmsg.txt
@unexec rmdir %D/lib/mysql 2> /dev/null || true
%%PORTDOCS%%@dirrm %%DOCSDIR%%/Flags
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm share/mysql/charsets
-@dirrm share/mysql/czech
-@dirrm share/mysql/danish
-@dirrm share/mysql/dutch
-@dirrm share/mysql/english
-@dirrm share/mysql/estonian
-@dirrm share/mysql/french
-@dirrm share/mysql/german
-@dirrm share/mysql/greek
-@dirrm share/mysql/hungarian
-@dirrm share/mysql/italian
-@dirrm share/mysql/japanese
-@dirrm share/mysql/korean
-@dirrm share/mysql/norwegian
-@dirrm share/mysql/norwegian-ny
-@dirrm share/mysql/polish
-@dirrm share/mysql/portuguese
-@dirrm share/mysql/romanian
-@dirrm share/mysql/russian
-@dirrm share/mysql/slovak
-@dirrm share/mysql/spanish
-@dirrm share/mysql/swedish
-@dirrm share/mysql/ukrainian
-@dirrm share/mysql
+@dirrm %%DATADIR%%/charsets
+@dirrm %%DATADIR%%/czech
+@dirrm %%DATADIR%%/danish
+@dirrm %%DATADIR%%/dutch
+@dirrm %%DATADIR%%/english
+@dirrm %%DATADIR%%/estonian
+@dirrm %%DATADIR%%/french
+@dirrm %%DATADIR%%/german
+@dirrm %%DATADIR%%/greek
+@dirrm %%DATADIR%%/hungarian
+@dirrm %%DATADIR%%/italian
+@dirrm %%DATADIR%%/japanese
+@dirrm %%DATADIR%%/korean
+@dirrm %%DATADIR%%/norwegian
+@dirrm %%DATADIR%%/norwegian-ny
+@dirrm %%DATADIR%%/polish
+@dirrm %%DATADIR%%/portuguese
+@dirrm %%DATADIR%%/romanian
+@dirrm %%DATADIR%%/russian
+@dirrm %%DATADIR%%/slovak
+@dirrm %%DATADIR%%/spanish
+@dirrm %%DATADIR%%/swedish
+@dirrm %%DATADIR%%/ukrainian
+@dirrm %%DATADIR%%
@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%%
@unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true