From bd1e850d7249b66550078edcc36e27aa815d9a3b Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Wed, 6 Apr 2005 13:38:29 +0000 Subject: [PATCH] Update to 5.0.3 release: - Add the possibility to specify the database directory in rc.conf - Move database creation from post-install stage into startup script - Add the possibility to specify additional command-line arguments to be passed to mysqld_safe on startup --- databases/mysql50-server/Makefile | 39 +++----- databases/mysql50-server/distinfo | 4 +- .../mysql50-server/files/mysql-server.sh | 51 ----------- .../mysql50-server/files/mysql-server.sh.in | 64 +++++++++++++ .../files/patch-Docs::Makefile.in | 24 ++--- .../mysql50-server/files/patch-Makefile.in | 10 +-- .../files/patch-man::Makefile.in | 18 ++-- .../files/patch-scripts::Makefile.in | 20 ++--- .../files/patch-scripts::mysqlaccess.sh | 90 ------------------- .../mysql50-server/files/patch-sql::mysqld.cc | 36 -------- databases/mysql50-server/pkg-install | 12 +-- databases/mysql50-server/pkg-plist | 45 +++------- databases/mysql50-server/pkg-plist.client | 2 - databases/mysql51-server/Makefile | 39 +++----- databases/mysql51-server/distinfo | 4 +- .../mysql51-server/files/mysql-server.sh | 51 ----------- .../mysql51-server/files/mysql-server.sh.in | 64 +++++++++++++ .../files/patch-Docs::Makefile.in | 24 ++--- .../mysql51-server/files/patch-Makefile.in | 10 +-- .../files/patch-man::Makefile.in | 18 ++-- .../files/patch-scripts::Makefile.in | 20 ++--- .../files/patch-scripts::mysqlaccess.sh | 90 ------------------- .../mysql51-server/files/patch-sql::mysqld.cc | 36 -------- databases/mysql51-server/pkg-install | 12 +-- databases/mysql51-server/pkg-plist | 45 +++------- databases/mysql51-server/pkg-plist.client | 2 - databases/mysql54-server/Makefile | 39 +++----- databases/mysql54-server/distinfo | 4 +- .../mysql54-server/files/mysql-server.sh | 51 ----------- .../mysql54-server/files/mysql-server.sh.in | 64 +++++++++++++ .../files/patch-Docs::Makefile.in | 24 ++--- .../mysql54-server/files/patch-Makefile.in | 10 +-- .../files/patch-man::Makefile.in | 18 ++-- .../files/patch-scripts::Makefile.in | 20 ++--- .../files/patch-scripts::mysqlaccess.sh | 90 ------------------- .../mysql54-server/files/patch-sql::mysqld.cc | 36 -------- databases/mysql54-server/pkg-install | 12 +-- databases/mysql54-server/pkg-plist | 45 +++------- databases/mysql54-server/pkg-plist.client | 2 - databases/mysql55-server/Makefile | 39 +++----- databases/mysql55-server/distinfo | 4 +- .../mysql55-server/files/mysql-server.sh | 51 ----------- .../mysql55-server/files/mysql-server.sh.in | 64 +++++++++++++ .../files/patch-Docs::Makefile.in | 24 ++--- .../mysql55-server/files/patch-Makefile.in | 10 +-- .../files/patch-man::Makefile.in | 18 ++-- .../files/patch-scripts::Makefile.in | 20 ++--- .../files/patch-scripts::mysqlaccess.sh | 90 ------------------- .../mysql55-server/files/patch-sql::mysqld.cc | 36 -------- databases/mysql55-server/pkg-install | 12 +-- databases/mysql55-server/pkg-plist | 45 +++------- databases/mysql55-server/pkg-plist.client | 2 - databases/mysql60-server/Makefile | 39 +++----- databases/mysql60-server/distinfo | 4 +- .../mysql60-server/files/mysql-server.sh | 51 ----------- .../mysql60-server/files/mysql-server.sh.in | 64 +++++++++++++ .../files/patch-Docs::Makefile.in | 24 ++--- .../mysql60-server/files/patch-Makefile.in | 10 +-- .../files/patch-man::Makefile.in | 18 ++-- .../files/patch-scripts::Makefile.in | 20 ++--- .../files/patch-scripts::mysqlaccess.sh | 90 ------------------- .../mysql60-server/files/patch-sql::mysqld.cc | 36 -------- databases/mysql60-server/pkg-install | 12 +-- databases/mysql60-server/pkg-plist | 45 +++------- databases/mysql60-server/pkg-plist.client | 2 - databases/percona55-server/Makefile | 39 +++----- databases/percona55-server/distinfo | 4 +- .../percona55-server/files/mysql-server.sh | 51 ----------- .../percona55-server/files/mysql-server.sh.in | 64 +++++++++++++ .../files/patch-Docs::Makefile.in | 24 ++--- .../percona55-server/files/patch-Makefile.in | 10 +-- .../files/patch-man::Makefile.in | 18 ++-- .../files/patch-scripts::Makefile.in | 20 ++--- .../files/patch-scripts::mysqlaccess.sh | 90 ------------------- .../files/patch-sql::mysqld.cc | 36 -------- databases/percona55-server/pkg-install | 12 +-- databases/percona55-server/pkg-plist | 45 +++------- databases/percona55-server/pkg-plist.client | 2 - 78 files changed, 750 insertions(+), 1740 deletions(-) delete mode 100644 databases/mysql50-server/files/mysql-server.sh create mode 100644 databases/mysql50-server/files/mysql-server.sh.in delete mode 100644 databases/mysql50-server/files/patch-scripts::mysqlaccess.sh delete mode 100644 databases/mysql51-server/files/mysql-server.sh create mode 100644 databases/mysql51-server/files/mysql-server.sh.in delete mode 100644 databases/mysql51-server/files/patch-scripts::mysqlaccess.sh delete mode 100644 databases/mysql54-server/files/mysql-server.sh create mode 100644 databases/mysql54-server/files/mysql-server.sh.in delete mode 100644 databases/mysql54-server/files/patch-scripts::mysqlaccess.sh delete mode 100644 databases/mysql55-server/files/mysql-server.sh create mode 100644 databases/mysql55-server/files/mysql-server.sh.in delete mode 100644 databases/mysql55-server/files/patch-scripts::mysqlaccess.sh delete mode 100644 databases/mysql60-server/files/mysql-server.sh create mode 100644 databases/mysql60-server/files/mysql-server.sh.in delete mode 100644 databases/mysql60-server/files/patch-scripts::mysqlaccess.sh delete mode 100644 databases/percona55-server/files/mysql-server.sh create mode 100644 databases/percona55-server/files/mysql-server.sh.in delete mode 100644 databases/percona55-server/files/patch-scripts::mysqlaccess.sh diff --git a/databases/mysql50-server/Makefile b/databases/mysql50-server/Makefile index a3d67959066a..a40f9be8d2a7 100644 --- a/databases/mysql50-server/Makefile +++ b/databases/mysql50-server/Makefile @@ -6,27 +6,28 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.2 +PORTVERSION= 5.0.3 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-5.0 PKGNAMESUFFIX?= -server -DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha +DISTNAME= ${PORTNAME}-${PORTVERSION}-beta MAINTAINER= ale@FreeBSD.org COMMENT?= Multithreaded SQL database (server) -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-beta SLAVEDIRS= databases/mysql50-client -PKGINSTALL?= ${WRKDIR}/pkg-install -DB_DIR?= /var/db/mysql USE_LIBTOOL_VER=15 USE_REINPLACE= yes -USE_RC_SUBR= yes + +.if ${PKGNAMESUFFIX} == "-server" +USE_RC_SUBR= mysql-server.sh +.endif CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ +CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ --without-readline \ --without-libedit \ @@ -34,7 +35,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-extra-tools \ --with-libwrap \ --with-mysqlfs \ - --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client @@ -111,15 +111,14 @@ LATEST_LINK= mysql50-server CONFLICTS= mysql-server-3.* mysql-server-4.* -PLIST_SUB= DB_DIR=${DB_DIR} \ - VER=${PORTVERSION}-alpha +PLIST_SUB= VER=${PORTVERSION}-beta .if defined(WITH_NDB) PLIST_SUB+= NDB="" .else PLIST_SUB+= NDB="@comment " .endif -MAN1= isamchk.1 isamlog.1 mysqld.1 \ +MAN1= mysqld.1 \ mysqld_safe.1 perror.1 replace.1 .if !defined(NOPORTDOCS) @@ -136,12 +135,9 @@ pre-fetch: @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')." @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)." @${ECHO} " WITH_OPENSSL=yes Enable secure connections." - @${ECHO} " DB_DIR=directory Set alternate directory for database files" - @${ECHO} " (default is /var/db/mysql)." @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library." @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads" @${ECHO} " (try it if you use libpthread)." - @${ECHO} " OVERWRITE_DB=yes Re-initialize default databases." @${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations" @${ECHO} " (use it if you need speed)." @${ECHO} " BUILD_STATIC=yes Build a static version of mysqld." @@ -161,22 +157,10 @@ post-patch: @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc .endif -post-build: - @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install - post-install: .if !defined(PACKAGE_BUILDING) -.if exists(${DB_DIR}) && defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no" - @${RM} -r ${DB_DIR}/mysql ${DB_DIR}/test 2>/dev/null || true + @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif -.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no") - ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR} -.endif - @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - @${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} .for doc in ${PORTDOCS} @@ -224,7 +208,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp .endif - LATEST_LINK= mysql50-scripts CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* diff --git a/databases/mysql50-server/distinfo b/databases/mysql50-server/distinfo index 4221c4f3e0f5..16c251721a32 100644 --- a/databases/mysql50-server/distinfo +++ b/databases/mysql50-server/distinfo @@ -1,2 +1,2 @@ -MD5 (mysql-5.0.2-alpha.tar.gz) = 26fe5a7ca84e5c2540abf6d0a782ec36 -SIZE (mysql-5.0.2-alpha.tar.gz) = 22940908 +MD5 (mysql-5.0.3-beta.tar.gz) = 15913b736389992bd031fd1dbe6f4dfe +SIZE (mysql-5.0.3-beta.tar.gz) = 24068082 diff --git a/databases/mysql50-server/files/mysql-server.sh b/databases/mysql50-server/files/mysql-server.sh deleted file mode 100644 index 708ad57df4b3..000000000000 --- a/databases/mysql50-server/files/mysql-server.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# 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/mysql50-server/files/mysql-server.sh.in b/databases/mysql50-server/files/mysql-server.sh.in new file mode 100644 index 000000000000..e5870bdc1c9a --- /dev/null +++ b/databases/mysql50-server/files/mysql-server.sh.in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. %%RC_SUBR%% + +name="mysql" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_args=""} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +pidfile="${mysql_dbdir}/`/bin/hostname`.pid" +command="%%PREFIX%%/bin/mysqld_safe" +command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--ldata=${mysql_dbdir}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/mysql50-server/files/patch-Docs::Makefile.in b/databases/mysql50-server/files/patch-Docs::Makefile.in index e76340001630..7424656ab673 100644 --- a/databases/mysql50-server/files/patch-Docs::Makefile.in +++ b/databases/mysql50-server/files/patch-Docs::Makefile.in @@ -1,25 +1,25 @@ ---- Docs/Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Docs/Makefile.in Mon Jan 10 11:44:27 2005 -@@ -331,7 +331,7 @@ - check-recursive installcheck-recursive - DIST_COMMON = Makefile.am Makefile.in - DIST_SUBDIRS = $(SUBDIRS) +--- Docs/Makefile.in.orig Tue Mar 22 20:27:11 2005 ++++ Docs/Makefile.in Wed Apr 6 13:00:28 2005 +@@ -359,7 +359,7 @@ + + SUBDIRS = Images + GT = $(srcdir)/Support/generate-text-files.pl -all: $(BUILT_SOURCES) +all: $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -@@ -599,7 +599,7 @@ - installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) - +@@ -669,7 +669,7 @@ + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done -install: $(BUILT_SOURCES) +install: $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -@@ -718,7 +718,7 @@ - uninstall-info-am uninstall-info-recursive uninstall-recursive +@@ -793,7 +793,7 @@ + tags tags-recursive uninstall uninstall-am uninstall-info-am -all: $(targets) txt_files diff --git a/databases/mysql50-server/files/patch-Makefile.in b/databases/mysql50-server/files/patch-Makefile.in index df6774784d9b..56adfc29a52f 100644 --- a/databases/mysql50-server/files/patch-Makefile.in +++ b/databases/mysql50-server/files/patch-Makefile.in @@ -1,16 +1,16 @@ ---- Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Makefile.in Mon Jan 10 11:46:31 2005 -@@ -302,12 +302,7 @@ +--- Makefile.in.orig Tue Mar 22 20:27:12 2005 ++++ Makefile.in Wed Apr 6 13:07:04 2005 +@@ -358,12 +358,7 @@ # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT -SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ - @readline_topdir@ sql-common \ - @thread_dirs@ pstack \ -- @sql_server_dirs@ @sql_client_dirs@ scripts man tests \ +- @sql_union_dirs@ scripts man tests \ - netware @libmysqld_dirs@ \ - @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ +SUBDIRS = - DIST_SUBDIRS = . include @docs_dirs@ zlib \ + @readline_topdir@ sql-common \ diff --git a/databases/mysql50-server/files/patch-man::Makefile.in b/databases/mysql50-server/files/patch-man::Makefile.in index 86d18cec61b2..0f83c2ae8cad 100644 --- a/databases/mysql50-server/files/patch-man::Makefile.in +++ b/databases/mysql50-server/files/patch-man::Makefile.in @@ -1,13 +1,13 @@ ---- man/Makefile.in.orig Mon Feb 23 14:54:10 2004 -+++ man/Makefile.in Mon Feb 23 14:54:34 2004 -@@ -272,9 +272,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - --man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ +--- man/Makefile.in.orig Tue Mar 22 20:27:16 2005 ++++ man/Makefile.in Wed Apr 6 13:10:42 2005 +@@ -333,9 +333,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ +-man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 +man_MANS = - - EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ + EXTRA_DIST = mysql.1.in mysql_zap.1.in \ + mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ diff --git a/databases/mysql50-server/files/patch-scripts::Makefile.in b/databases/mysql50-server/files/patch-scripts::Makefile.in index ffef310f740c..405818e00304 100644 --- a/databases/mysql50-server/files/patch-scripts::Makefile.in +++ b/databases/mysql50-server/files/patch-scripts::Makefile.in @@ -1,9 +1,9 @@ ---- scripts/Makefile.in.orig Tue Jul 27 08:14:44 2004 -+++ scripts/Makefile.in Sat Oct 23 10:44:33 2004 -@@ -287,26 +287,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - +--- scripts/Makefile.in.orig Tue Mar 22 20:27:34 2005 ++++ scripts/Makefile.in Wed Apr 6 13:16:58 2005 +@@ -336,26 +336,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ @@ -26,18 +26,18 @@ - mysql_create_system_tables +bin_SCRIPTS = - EXTRA_SCRIPTS = make_binary_distribution.sh \ -@@ -340,7 +321,7 @@ + make_sharedlib_distribution.sh \ +@@ -386,7 +367,7 @@ + mysqlaccess.conf \ mysqlbug - -dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql +dist_pkgdata_DATA = # mysqlbug should be distributed built so that people can report build # failures with it. -@@ -616,8 +597,6 @@ +@@ -677,8 +658,6 @@ all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution diff --git a/databases/mysql50-server/files/patch-scripts::mysqlaccess.sh b/databases/mysql50-server/files/patch-scripts::mysqlaccess.sh deleted file mode 100644 index f1382fbad153..000000000000 --- a/databases/mysql50-server/files/patch-scripts::mysqlaccess.sh +++ /dev/null @@ -1,90 +0,0 @@ ---- scripts/mysqlaccess.sh.orig 2005-01-16 14:28:38 -08:00 -+++ scripts/mysqlaccess.sh 2005-01-16 14:28:38 -08:00 -@@ -2,7 +2,7 @@ - # **************************** - package MySQLaccess; - #use strict; --use POSIX qw(tmpnam); -+use File::Temp qw(tempfile tmpnam); - use Fcntl; - - BEGIN { -@@ -32,7 +32,6 @@ - $ACCESS_U_BCK = 'user_backup'; - $ACCESS_D_BCK = 'db_backup'; - $DIFF = '/usr/bin/diff'; -- $TMP_PATH = '/tmp'; #path to writable tmp-directory - $MYSQLDUMP = '@bindir@/mysqldump'; - #path to mysqldump executable - -@@ -432,7 +431,7 @@ - # no caching on STDOUT - $|=1; - -- $MYSQL_CNF = POSIX::tmpnam(); -+ $MYSQL_CNF = tmpnam(); - %MYSQL_CNF = (client => { }, - mysql => { }, - mysqldump => { }, -@@ -577,8 +576,6 @@ - push(@MySQLaccess::Grant::Error,'not_found_mysql') if !(-x $MYSQL); - push(@MySQLaccess::Grant::Error,'not_found_diff') if !(-x $DIFF); - push(@MySQLaccess::Grant::Error,'not_found_mysqldump') if !(-x $MYSQLDUMP); --push(@MySQLaccess::Grant::Error,'not_found_tmp') if !(-d $TMP_PATH); --push(@MySQLaccess::Grant::Error,'write_err_tmp') if !(-w $TMP_PATH); - if (@MySQLaccess::Grant::Error) { - MySQLaccess::Report::Print_Error_Messages() ; - exit 0; -@@ -1777,17 +1774,15 @@ - @before = sort(@before); - @after = sort(@after); - -- $before = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.before.$$"; -- $after = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.after.$$"; -- #$after = "/tmp/t0"; -- open(BEFORE,"> $before") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $before for writing"); -- open(AFTER,"> $after") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $after for writing"); -- print BEFORE join("\n",@before); -- print AFTER join("\n",@after); -- close(BEFORE); -- close(AFTER); -+ ($hb, $before) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ ($ha, $after) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ -+ print $hb join("\n",@before); -+ print $ha join("\n",@after); -+ close $hb; -+ close $ha; - - # ---------------------------------- - # compute difference -@@ -1800,8 +1795,8 @@ - - # ---------------------------------- - # cleanup temp. files -- unlink(BEFORE); -- unlink(AFTER); -+ unlink($before); -+ unlink($after); - - return \@diffs; - } -@@ -2316,14 +2311,6 @@ - => "The diff program <$MySQLaccess::DIFF> could not be found.\n" - ."+ Check your path, or\n" - ."+ edit the source of this script to point \$DIFF to the diff program.\n" -- ,'not_found_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> could not be found.\n" -- ."+ create this directory (writeable!), or\n" -- ."+ edit the source of this script to point \$TMP_PATH to the right directory.\n" -- ,'write_err_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> is not writable.\n" -- ."+ make this directory writeable!, or\n" -- ."+ edit the source of this script to point \$TMP_PATH to another directory.\n" - ,'Unrecognized_option' - => "Sorry,\n" - ."You are using an old version of the mysql-program,\n" diff --git a/databases/mysql50-server/files/patch-sql::mysqld.cc b/databases/mysql50-server/files/patch-sql::mysqld.cc index c98d38bcbd10..e79f985fcb69 100644 --- a/databases/mysql50-server/files/patch-sql::mysqld.cc +++ b/databases/mysql50-server/files/patch-sql::mysqld.cc @@ -9,39 +9,3 @@ #include #ifdef NEED_SYS_SYSLOG_H #include -@@ -136,15 +136,6 @@ - int allow_severity = LOG_INFO; - int deny_severity = LOG_WARNING; - --#ifdef __STDC__ --#define my_fromhost(A) fromhost(A) --#define my_hosts_access(A) hosts_access(A) --#define my_eval_client(A) eval_client(A) --#else --#define my_fromhost(A) fromhost() --#define my_hosts_access(A) hosts_access() --#define my_eval_client(A) eval_client() --#endif /* __STDC__ */ - #endif /* HAVE_LIBWRAP */ - - #ifdef HAVE_SYS_MMAN_H -@@ -3565,8 +3556,8 @@ - struct request_info req; - signal(SIGCHLD, SIG_DFL); - request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -- my_fromhost(&req); -- if (!my_hosts_access(&req)) -+ fromhost(&req); -+ if (!hosts_access(&req)) - { - /* - This may be stupid but refuse() includes an exit(0) -@@ -3574,7 +3565,7 @@ - clean_exit() - same stupid thing ... - */ - syslog(deny_severity, "refused connect from %s", -- my_eval_client(&req)); -+ eval_client(&req)); - - /* - C++ sucks (the gibberish in front just translates the supplied diff --git a/databases/mysql50-server/pkg-install b/databases/mysql50-server/pkg-install index 88a0b1c66915..586f846c5031 100644 --- a/databases/mysql50-server/pkg-install +++ b/databases/mysql50-server/pkg-install @@ -8,7 +8,6 @@ POST-INSTALL) GROUP=${USER} UID=88 GID=${UID} - DB_DIR=%%DB_DIR%% if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -23,16 +22,9 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${DB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." - exit 1 - fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" + -d /nonexistent -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -40,7 +32,5 @@ POST-INSTALL) exit 1 fi fi - - chown -R ${USER}:${GROUP} ${DB_DIR} ;; esac diff --git a/databases/mysql50-server/pkg-plist b/databases/mysql50-server/pkg-plist index 8d36cf62ba99..6373ea4c127f 100644 --- a/databases/mysql50-server/pkg-plist +++ b/databases/mysql50-server/pkg-plist @@ -1,6 +1,4 @@ bin/comp_err -bin/isamchk -bin/isamlog bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -22,23 +20,24 @@ bin/mysqld_safe %%NDB%%bin/ndb_show_tables %%NDB%%bin/ndb_test_platform %%NDB%%bin/ndb_waiter -bin/pack_isam bin/perror bin/replace bin/resolve_stack_dump bin/resolveip -etc/rc.d/mysql-server.sh +include/mysql/mysqld_ername.h +include/mysql/mysqld_error.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters_debug.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_debug.h +%%NDB%%include/mysql/ndb/mgmapi/ndb_logevent.h +%%NDB%%include/mysql/ndb/ndb_constants.h +%%NDB%%include/mysql/ndb/ndb_init.h %%NDB%%include/mysql/ndb/ndb_types.h %%NDB%%include/mysql/ndb/ndb_version.h %%NDB%%include/mysql/ndb/ndbapi/Ndb.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbApi.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbBlob.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbConnection.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbCursorOperation.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbDictionary.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbError.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbEventOperation.hpp @@ -48,15 +47,16 @@ etc/rc.d/mysql-server.sh %%NDB%%include/mysql/ndb/ndbapi/NdbPool.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbRecAttr.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbReceiver.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbResultSet.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanFilter.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanOperation.hpp +%%NDB%%include/mysql/ndb/ndbapi/NdbTransaction.hpp %%NDB%%include/mysql/ndb/ndbapi/ndbapi_limits.h %%NDB%%include/mysql/ndb/ndbapi/ndb_cluster_connection.hpp +%%NDB%%include/mysql/ndb/ndbapi/ndb_opt_defaults.h %%NDB%%include/mysql/ndb/ndbapi/ndberror.h +include/mysql/sql_state.h lib/mysql/libdbug.a lib/mysql/libheap.a -lib/mysql/libmerge.a lib/mysql/libmyisam.a lib/mysql/libmyisammrg.a lib/mysql/libmystrings.a @@ -64,7 +64,6 @@ lib/mysql/libmysys.a %%NDB%%lib/mysql/libndbclient.a %%NDB%%lib/mysql/libndbclient.so %%NDB%%lib/mysql/libndbclient.so.0 -lib/mysql/libnisam.a lib/mysql/libvio.a libexec/mysqld %%NDB%%libexec/ndb_cpcd @@ -103,30 +102,19 @@ libexec/mysqld %%DATADIR%%/charsets/macroman.xml %%DATADIR%%/charsets/swe7.xml %%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%%/errmsg.txt %%DATADIR%%/estonian/errmsg.sys -%%DATADIR%%/estonian/errmsg.txt %%DATADIR%%/fill_help_tables.sql %%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 @@ -137,32 +125,22 @@ libexec/mysqld %%DATADIR%%/mysql-log-rotate %%DATADIR%%/mysql-%%VER%%.spec %%DATADIR%%/mysql.server +%%DATADIR%%/ndb-config-2-node.ini %%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%%/serbian/errmsg.sys -%%DATADIR%%/serbian/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 %%NDB%%@dirrm include/mysql/ndb/mgmapi %%NDB%%@dirrm include/mysql/ndb/ndbapi %%NDB%%@dirrm include/mysql/ndb -%%NDB%%@unexec rmdir %D/include/mysql 2> /dev/null || true +@unexec rmdir %D/include/mysql 2> /dev/null || true @unexec rmdir %D/lib/mysql 2> /dev/null || true @dirrm %%DATADIR%%/charsets @dirrm %%DATADIR%%/czech @@ -189,5 +167,4 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @unexec rmdir %D/%%DATADIR%% 2> /dev/null || true -@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%% @unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true diff --git a/databases/mysql50-server/pkg-plist.client b/databases/mysql50-server/pkg-plist.client index ab0454713675..4792277db7f7 100644 --- a/databases/mysql50-server/pkg-plist.client +++ b/databases/mysql50-server/pkg-plist.client @@ -34,10 +34,8 @@ include/mysql/mysql_com.h include/mysql/mysql_embed.h include/mysql/mysql_time.h include/mysql/mysql_version.h -include/mysql/mysqld_error.h include/mysql/raid.h include/mysql/sql_common.h -include/mysql/sql_state.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h diff --git a/databases/mysql51-server/Makefile b/databases/mysql51-server/Makefile index a3d67959066a..a40f9be8d2a7 100644 --- a/databases/mysql51-server/Makefile +++ b/databases/mysql51-server/Makefile @@ -6,27 +6,28 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.2 +PORTVERSION= 5.0.3 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-5.0 PKGNAMESUFFIX?= -server -DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha +DISTNAME= ${PORTNAME}-${PORTVERSION}-beta MAINTAINER= ale@FreeBSD.org COMMENT?= Multithreaded SQL database (server) -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-beta SLAVEDIRS= databases/mysql50-client -PKGINSTALL?= ${WRKDIR}/pkg-install -DB_DIR?= /var/db/mysql USE_LIBTOOL_VER=15 USE_REINPLACE= yes -USE_RC_SUBR= yes + +.if ${PKGNAMESUFFIX} == "-server" +USE_RC_SUBR= mysql-server.sh +.endif CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ +CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ --without-readline \ --without-libedit \ @@ -34,7 +35,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-extra-tools \ --with-libwrap \ --with-mysqlfs \ - --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client @@ -111,15 +111,14 @@ LATEST_LINK= mysql50-server CONFLICTS= mysql-server-3.* mysql-server-4.* -PLIST_SUB= DB_DIR=${DB_DIR} \ - VER=${PORTVERSION}-alpha +PLIST_SUB= VER=${PORTVERSION}-beta .if defined(WITH_NDB) PLIST_SUB+= NDB="" .else PLIST_SUB+= NDB="@comment " .endif -MAN1= isamchk.1 isamlog.1 mysqld.1 \ +MAN1= mysqld.1 \ mysqld_safe.1 perror.1 replace.1 .if !defined(NOPORTDOCS) @@ -136,12 +135,9 @@ pre-fetch: @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')." @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)." @${ECHO} " WITH_OPENSSL=yes Enable secure connections." - @${ECHO} " DB_DIR=directory Set alternate directory for database files" - @${ECHO} " (default is /var/db/mysql)." @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library." @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads" @${ECHO} " (try it if you use libpthread)." - @${ECHO} " OVERWRITE_DB=yes Re-initialize default databases." @${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations" @${ECHO} " (use it if you need speed)." @${ECHO} " BUILD_STATIC=yes Build a static version of mysqld." @@ -161,22 +157,10 @@ post-patch: @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc .endif -post-build: - @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install - post-install: .if !defined(PACKAGE_BUILDING) -.if exists(${DB_DIR}) && defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no" - @${RM} -r ${DB_DIR}/mysql ${DB_DIR}/test 2>/dev/null || true + @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif -.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no") - ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR} -.endif - @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - @${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} .for doc in ${PORTDOCS} @@ -224,7 +208,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp .endif - LATEST_LINK= mysql50-scripts CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* diff --git a/databases/mysql51-server/distinfo b/databases/mysql51-server/distinfo index 4221c4f3e0f5..16c251721a32 100644 --- a/databases/mysql51-server/distinfo +++ b/databases/mysql51-server/distinfo @@ -1,2 +1,2 @@ -MD5 (mysql-5.0.2-alpha.tar.gz) = 26fe5a7ca84e5c2540abf6d0a782ec36 -SIZE (mysql-5.0.2-alpha.tar.gz) = 22940908 +MD5 (mysql-5.0.3-beta.tar.gz) = 15913b736389992bd031fd1dbe6f4dfe +SIZE (mysql-5.0.3-beta.tar.gz) = 24068082 diff --git a/databases/mysql51-server/files/mysql-server.sh b/databases/mysql51-server/files/mysql-server.sh deleted file mode 100644 index 708ad57df4b3..000000000000 --- a/databases/mysql51-server/files/mysql-server.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# 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/mysql51-server/files/mysql-server.sh.in b/databases/mysql51-server/files/mysql-server.sh.in new file mode 100644 index 000000000000..e5870bdc1c9a --- /dev/null +++ b/databases/mysql51-server/files/mysql-server.sh.in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. %%RC_SUBR%% + +name="mysql" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_args=""} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +pidfile="${mysql_dbdir}/`/bin/hostname`.pid" +command="%%PREFIX%%/bin/mysqld_safe" +command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--ldata=${mysql_dbdir}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/mysql51-server/files/patch-Docs::Makefile.in b/databases/mysql51-server/files/patch-Docs::Makefile.in index e76340001630..7424656ab673 100644 --- a/databases/mysql51-server/files/patch-Docs::Makefile.in +++ b/databases/mysql51-server/files/patch-Docs::Makefile.in @@ -1,25 +1,25 @@ ---- Docs/Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Docs/Makefile.in Mon Jan 10 11:44:27 2005 -@@ -331,7 +331,7 @@ - check-recursive installcheck-recursive - DIST_COMMON = Makefile.am Makefile.in - DIST_SUBDIRS = $(SUBDIRS) +--- Docs/Makefile.in.orig Tue Mar 22 20:27:11 2005 ++++ Docs/Makefile.in Wed Apr 6 13:00:28 2005 +@@ -359,7 +359,7 @@ + + SUBDIRS = Images + GT = $(srcdir)/Support/generate-text-files.pl -all: $(BUILT_SOURCES) +all: $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -@@ -599,7 +599,7 @@ - installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) - +@@ -669,7 +669,7 @@ + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done -install: $(BUILT_SOURCES) +install: $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -@@ -718,7 +718,7 @@ - uninstall-info-am uninstall-info-recursive uninstall-recursive +@@ -793,7 +793,7 @@ + tags tags-recursive uninstall uninstall-am uninstall-info-am -all: $(targets) txt_files diff --git a/databases/mysql51-server/files/patch-Makefile.in b/databases/mysql51-server/files/patch-Makefile.in index df6774784d9b..56adfc29a52f 100644 --- a/databases/mysql51-server/files/patch-Makefile.in +++ b/databases/mysql51-server/files/patch-Makefile.in @@ -1,16 +1,16 @@ ---- Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Makefile.in Mon Jan 10 11:46:31 2005 -@@ -302,12 +302,7 @@ +--- Makefile.in.orig Tue Mar 22 20:27:12 2005 ++++ Makefile.in Wed Apr 6 13:07:04 2005 +@@ -358,12 +358,7 @@ # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT -SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ - @readline_topdir@ sql-common \ - @thread_dirs@ pstack \ -- @sql_server_dirs@ @sql_client_dirs@ scripts man tests \ +- @sql_union_dirs@ scripts man tests \ - netware @libmysqld_dirs@ \ - @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ +SUBDIRS = - DIST_SUBDIRS = . include @docs_dirs@ zlib \ + @readline_topdir@ sql-common \ diff --git a/databases/mysql51-server/files/patch-man::Makefile.in b/databases/mysql51-server/files/patch-man::Makefile.in index 86d18cec61b2..0f83c2ae8cad 100644 --- a/databases/mysql51-server/files/patch-man::Makefile.in +++ b/databases/mysql51-server/files/patch-man::Makefile.in @@ -1,13 +1,13 @@ ---- man/Makefile.in.orig Mon Feb 23 14:54:10 2004 -+++ man/Makefile.in Mon Feb 23 14:54:34 2004 -@@ -272,9 +272,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - --man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ +--- man/Makefile.in.orig Tue Mar 22 20:27:16 2005 ++++ man/Makefile.in Wed Apr 6 13:10:42 2005 +@@ -333,9 +333,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ +-man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 +man_MANS = - - EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ + EXTRA_DIST = mysql.1.in mysql_zap.1.in \ + mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ diff --git a/databases/mysql51-server/files/patch-scripts::Makefile.in b/databases/mysql51-server/files/patch-scripts::Makefile.in index ffef310f740c..405818e00304 100644 --- a/databases/mysql51-server/files/patch-scripts::Makefile.in +++ b/databases/mysql51-server/files/patch-scripts::Makefile.in @@ -1,9 +1,9 @@ ---- scripts/Makefile.in.orig Tue Jul 27 08:14:44 2004 -+++ scripts/Makefile.in Sat Oct 23 10:44:33 2004 -@@ -287,26 +287,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - +--- scripts/Makefile.in.orig Tue Mar 22 20:27:34 2005 ++++ scripts/Makefile.in Wed Apr 6 13:16:58 2005 +@@ -336,26 +336,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ @@ -26,18 +26,18 @@ - mysql_create_system_tables +bin_SCRIPTS = - EXTRA_SCRIPTS = make_binary_distribution.sh \ -@@ -340,7 +321,7 @@ + make_sharedlib_distribution.sh \ +@@ -386,7 +367,7 @@ + mysqlaccess.conf \ mysqlbug - -dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql +dist_pkgdata_DATA = # mysqlbug should be distributed built so that people can report build # failures with it. -@@ -616,8 +597,6 @@ +@@ -677,8 +658,6 @@ all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution diff --git a/databases/mysql51-server/files/patch-scripts::mysqlaccess.sh b/databases/mysql51-server/files/patch-scripts::mysqlaccess.sh deleted file mode 100644 index f1382fbad153..000000000000 --- a/databases/mysql51-server/files/patch-scripts::mysqlaccess.sh +++ /dev/null @@ -1,90 +0,0 @@ ---- scripts/mysqlaccess.sh.orig 2005-01-16 14:28:38 -08:00 -+++ scripts/mysqlaccess.sh 2005-01-16 14:28:38 -08:00 -@@ -2,7 +2,7 @@ - # **************************** - package MySQLaccess; - #use strict; --use POSIX qw(tmpnam); -+use File::Temp qw(tempfile tmpnam); - use Fcntl; - - BEGIN { -@@ -32,7 +32,6 @@ - $ACCESS_U_BCK = 'user_backup'; - $ACCESS_D_BCK = 'db_backup'; - $DIFF = '/usr/bin/diff'; -- $TMP_PATH = '/tmp'; #path to writable tmp-directory - $MYSQLDUMP = '@bindir@/mysqldump'; - #path to mysqldump executable - -@@ -432,7 +431,7 @@ - # no caching on STDOUT - $|=1; - -- $MYSQL_CNF = POSIX::tmpnam(); -+ $MYSQL_CNF = tmpnam(); - %MYSQL_CNF = (client => { }, - mysql => { }, - mysqldump => { }, -@@ -577,8 +576,6 @@ - push(@MySQLaccess::Grant::Error,'not_found_mysql') if !(-x $MYSQL); - push(@MySQLaccess::Grant::Error,'not_found_diff') if !(-x $DIFF); - push(@MySQLaccess::Grant::Error,'not_found_mysqldump') if !(-x $MYSQLDUMP); --push(@MySQLaccess::Grant::Error,'not_found_tmp') if !(-d $TMP_PATH); --push(@MySQLaccess::Grant::Error,'write_err_tmp') if !(-w $TMP_PATH); - if (@MySQLaccess::Grant::Error) { - MySQLaccess::Report::Print_Error_Messages() ; - exit 0; -@@ -1777,17 +1774,15 @@ - @before = sort(@before); - @after = sort(@after); - -- $before = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.before.$$"; -- $after = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.after.$$"; -- #$after = "/tmp/t0"; -- open(BEFORE,"> $before") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $before for writing"); -- open(AFTER,"> $after") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $after for writing"); -- print BEFORE join("\n",@before); -- print AFTER join("\n",@after); -- close(BEFORE); -- close(AFTER); -+ ($hb, $before) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ ($ha, $after) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ -+ print $hb join("\n",@before); -+ print $ha join("\n",@after); -+ close $hb; -+ close $ha; - - # ---------------------------------- - # compute difference -@@ -1800,8 +1795,8 @@ - - # ---------------------------------- - # cleanup temp. files -- unlink(BEFORE); -- unlink(AFTER); -+ unlink($before); -+ unlink($after); - - return \@diffs; - } -@@ -2316,14 +2311,6 @@ - => "The diff program <$MySQLaccess::DIFF> could not be found.\n" - ."+ Check your path, or\n" - ."+ edit the source of this script to point \$DIFF to the diff program.\n" -- ,'not_found_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> could not be found.\n" -- ."+ create this directory (writeable!), or\n" -- ."+ edit the source of this script to point \$TMP_PATH to the right directory.\n" -- ,'write_err_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> is not writable.\n" -- ."+ make this directory writeable!, or\n" -- ."+ edit the source of this script to point \$TMP_PATH to another directory.\n" - ,'Unrecognized_option' - => "Sorry,\n" - ."You are using an old version of the mysql-program,\n" diff --git a/databases/mysql51-server/files/patch-sql::mysqld.cc b/databases/mysql51-server/files/patch-sql::mysqld.cc index c98d38bcbd10..e79f985fcb69 100644 --- a/databases/mysql51-server/files/patch-sql::mysqld.cc +++ b/databases/mysql51-server/files/patch-sql::mysqld.cc @@ -9,39 +9,3 @@ #include #ifdef NEED_SYS_SYSLOG_H #include -@@ -136,15 +136,6 @@ - int allow_severity = LOG_INFO; - int deny_severity = LOG_WARNING; - --#ifdef __STDC__ --#define my_fromhost(A) fromhost(A) --#define my_hosts_access(A) hosts_access(A) --#define my_eval_client(A) eval_client(A) --#else --#define my_fromhost(A) fromhost() --#define my_hosts_access(A) hosts_access() --#define my_eval_client(A) eval_client() --#endif /* __STDC__ */ - #endif /* HAVE_LIBWRAP */ - - #ifdef HAVE_SYS_MMAN_H -@@ -3565,8 +3556,8 @@ - struct request_info req; - signal(SIGCHLD, SIG_DFL); - request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -- my_fromhost(&req); -- if (!my_hosts_access(&req)) -+ fromhost(&req); -+ if (!hosts_access(&req)) - { - /* - This may be stupid but refuse() includes an exit(0) -@@ -3574,7 +3565,7 @@ - clean_exit() - same stupid thing ... - */ - syslog(deny_severity, "refused connect from %s", -- my_eval_client(&req)); -+ eval_client(&req)); - - /* - C++ sucks (the gibberish in front just translates the supplied diff --git a/databases/mysql51-server/pkg-install b/databases/mysql51-server/pkg-install index 88a0b1c66915..586f846c5031 100644 --- a/databases/mysql51-server/pkg-install +++ b/databases/mysql51-server/pkg-install @@ -8,7 +8,6 @@ POST-INSTALL) GROUP=${USER} UID=88 GID=${UID} - DB_DIR=%%DB_DIR%% if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -23,16 +22,9 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${DB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." - exit 1 - fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" + -d /nonexistent -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -40,7 +32,5 @@ POST-INSTALL) exit 1 fi fi - - chown -R ${USER}:${GROUP} ${DB_DIR} ;; esac diff --git a/databases/mysql51-server/pkg-plist b/databases/mysql51-server/pkg-plist index 8d36cf62ba99..6373ea4c127f 100644 --- a/databases/mysql51-server/pkg-plist +++ b/databases/mysql51-server/pkg-plist @@ -1,6 +1,4 @@ bin/comp_err -bin/isamchk -bin/isamlog bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -22,23 +20,24 @@ bin/mysqld_safe %%NDB%%bin/ndb_show_tables %%NDB%%bin/ndb_test_platform %%NDB%%bin/ndb_waiter -bin/pack_isam bin/perror bin/replace bin/resolve_stack_dump bin/resolveip -etc/rc.d/mysql-server.sh +include/mysql/mysqld_ername.h +include/mysql/mysqld_error.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters_debug.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_debug.h +%%NDB%%include/mysql/ndb/mgmapi/ndb_logevent.h +%%NDB%%include/mysql/ndb/ndb_constants.h +%%NDB%%include/mysql/ndb/ndb_init.h %%NDB%%include/mysql/ndb/ndb_types.h %%NDB%%include/mysql/ndb/ndb_version.h %%NDB%%include/mysql/ndb/ndbapi/Ndb.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbApi.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbBlob.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbConnection.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbCursorOperation.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbDictionary.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbError.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbEventOperation.hpp @@ -48,15 +47,16 @@ etc/rc.d/mysql-server.sh %%NDB%%include/mysql/ndb/ndbapi/NdbPool.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbRecAttr.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbReceiver.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbResultSet.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanFilter.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanOperation.hpp +%%NDB%%include/mysql/ndb/ndbapi/NdbTransaction.hpp %%NDB%%include/mysql/ndb/ndbapi/ndbapi_limits.h %%NDB%%include/mysql/ndb/ndbapi/ndb_cluster_connection.hpp +%%NDB%%include/mysql/ndb/ndbapi/ndb_opt_defaults.h %%NDB%%include/mysql/ndb/ndbapi/ndberror.h +include/mysql/sql_state.h lib/mysql/libdbug.a lib/mysql/libheap.a -lib/mysql/libmerge.a lib/mysql/libmyisam.a lib/mysql/libmyisammrg.a lib/mysql/libmystrings.a @@ -64,7 +64,6 @@ lib/mysql/libmysys.a %%NDB%%lib/mysql/libndbclient.a %%NDB%%lib/mysql/libndbclient.so %%NDB%%lib/mysql/libndbclient.so.0 -lib/mysql/libnisam.a lib/mysql/libvio.a libexec/mysqld %%NDB%%libexec/ndb_cpcd @@ -103,30 +102,19 @@ libexec/mysqld %%DATADIR%%/charsets/macroman.xml %%DATADIR%%/charsets/swe7.xml %%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%%/errmsg.txt %%DATADIR%%/estonian/errmsg.sys -%%DATADIR%%/estonian/errmsg.txt %%DATADIR%%/fill_help_tables.sql %%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 @@ -137,32 +125,22 @@ libexec/mysqld %%DATADIR%%/mysql-log-rotate %%DATADIR%%/mysql-%%VER%%.spec %%DATADIR%%/mysql.server +%%DATADIR%%/ndb-config-2-node.ini %%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%%/serbian/errmsg.sys -%%DATADIR%%/serbian/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 %%NDB%%@dirrm include/mysql/ndb/mgmapi %%NDB%%@dirrm include/mysql/ndb/ndbapi %%NDB%%@dirrm include/mysql/ndb -%%NDB%%@unexec rmdir %D/include/mysql 2> /dev/null || true +@unexec rmdir %D/include/mysql 2> /dev/null || true @unexec rmdir %D/lib/mysql 2> /dev/null || true @dirrm %%DATADIR%%/charsets @dirrm %%DATADIR%%/czech @@ -189,5 +167,4 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @unexec rmdir %D/%%DATADIR%% 2> /dev/null || true -@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%% @unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true diff --git a/databases/mysql51-server/pkg-plist.client b/databases/mysql51-server/pkg-plist.client index ab0454713675..4792277db7f7 100644 --- a/databases/mysql51-server/pkg-plist.client +++ b/databases/mysql51-server/pkg-plist.client @@ -34,10 +34,8 @@ include/mysql/mysql_com.h include/mysql/mysql_embed.h include/mysql/mysql_time.h include/mysql/mysql_version.h -include/mysql/mysqld_error.h include/mysql/raid.h include/mysql/sql_common.h -include/mysql/sql_state.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h diff --git a/databases/mysql54-server/Makefile b/databases/mysql54-server/Makefile index a3d67959066a..a40f9be8d2a7 100644 --- a/databases/mysql54-server/Makefile +++ b/databases/mysql54-server/Makefile @@ -6,27 +6,28 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.2 +PORTVERSION= 5.0.3 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-5.0 PKGNAMESUFFIX?= -server -DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha +DISTNAME= ${PORTNAME}-${PORTVERSION}-beta MAINTAINER= ale@FreeBSD.org COMMENT?= Multithreaded SQL database (server) -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-beta SLAVEDIRS= databases/mysql50-client -PKGINSTALL?= ${WRKDIR}/pkg-install -DB_DIR?= /var/db/mysql USE_LIBTOOL_VER=15 USE_REINPLACE= yes -USE_RC_SUBR= yes + +.if ${PKGNAMESUFFIX} == "-server" +USE_RC_SUBR= mysql-server.sh +.endif CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ +CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ --without-readline \ --without-libedit \ @@ -34,7 +35,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-extra-tools \ --with-libwrap \ --with-mysqlfs \ - --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client @@ -111,15 +111,14 @@ LATEST_LINK= mysql50-server CONFLICTS= mysql-server-3.* mysql-server-4.* -PLIST_SUB= DB_DIR=${DB_DIR} \ - VER=${PORTVERSION}-alpha +PLIST_SUB= VER=${PORTVERSION}-beta .if defined(WITH_NDB) PLIST_SUB+= NDB="" .else PLIST_SUB+= NDB="@comment " .endif -MAN1= isamchk.1 isamlog.1 mysqld.1 \ +MAN1= mysqld.1 \ mysqld_safe.1 perror.1 replace.1 .if !defined(NOPORTDOCS) @@ -136,12 +135,9 @@ pre-fetch: @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')." @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)." @${ECHO} " WITH_OPENSSL=yes Enable secure connections." - @${ECHO} " DB_DIR=directory Set alternate directory for database files" - @${ECHO} " (default is /var/db/mysql)." @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library." @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads" @${ECHO} " (try it if you use libpthread)." - @${ECHO} " OVERWRITE_DB=yes Re-initialize default databases." @${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations" @${ECHO} " (use it if you need speed)." @${ECHO} " BUILD_STATIC=yes Build a static version of mysqld." @@ -161,22 +157,10 @@ post-patch: @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc .endif -post-build: - @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install - post-install: .if !defined(PACKAGE_BUILDING) -.if exists(${DB_DIR}) && defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no" - @${RM} -r ${DB_DIR}/mysql ${DB_DIR}/test 2>/dev/null || true + @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif -.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no") - ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR} -.endif - @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - @${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} .for doc in ${PORTDOCS} @@ -224,7 +208,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp .endif - LATEST_LINK= mysql50-scripts CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* diff --git a/databases/mysql54-server/distinfo b/databases/mysql54-server/distinfo index 4221c4f3e0f5..16c251721a32 100644 --- a/databases/mysql54-server/distinfo +++ b/databases/mysql54-server/distinfo @@ -1,2 +1,2 @@ -MD5 (mysql-5.0.2-alpha.tar.gz) = 26fe5a7ca84e5c2540abf6d0a782ec36 -SIZE (mysql-5.0.2-alpha.tar.gz) = 22940908 +MD5 (mysql-5.0.3-beta.tar.gz) = 15913b736389992bd031fd1dbe6f4dfe +SIZE (mysql-5.0.3-beta.tar.gz) = 24068082 diff --git a/databases/mysql54-server/files/mysql-server.sh b/databases/mysql54-server/files/mysql-server.sh deleted file mode 100644 index 708ad57df4b3..000000000000 --- a/databases/mysql54-server/files/mysql-server.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# 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/mysql54-server/files/mysql-server.sh.in b/databases/mysql54-server/files/mysql-server.sh.in new file mode 100644 index 000000000000..e5870bdc1c9a --- /dev/null +++ b/databases/mysql54-server/files/mysql-server.sh.in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. %%RC_SUBR%% + +name="mysql" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_args=""} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +pidfile="${mysql_dbdir}/`/bin/hostname`.pid" +command="%%PREFIX%%/bin/mysqld_safe" +command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--ldata=${mysql_dbdir}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/mysql54-server/files/patch-Docs::Makefile.in b/databases/mysql54-server/files/patch-Docs::Makefile.in index e76340001630..7424656ab673 100644 --- a/databases/mysql54-server/files/patch-Docs::Makefile.in +++ b/databases/mysql54-server/files/patch-Docs::Makefile.in @@ -1,25 +1,25 @@ ---- Docs/Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Docs/Makefile.in Mon Jan 10 11:44:27 2005 -@@ -331,7 +331,7 @@ - check-recursive installcheck-recursive - DIST_COMMON = Makefile.am Makefile.in - DIST_SUBDIRS = $(SUBDIRS) +--- Docs/Makefile.in.orig Tue Mar 22 20:27:11 2005 ++++ Docs/Makefile.in Wed Apr 6 13:00:28 2005 +@@ -359,7 +359,7 @@ + + SUBDIRS = Images + GT = $(srcdir)/Support/generate-text-files.pl -all: $(BUILT_SOURCES) +all: $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -@@ -599,7 +599,7 @@ - installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) - +@@ -669,7 +669,7 @@ + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done -install: $(BUILT_SOURCES) +install: $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -@@ -718,7 +718,7 @@ - uninstall-info-am uninstall-info-recursive uninstall-recursive +@@ -793,7 +793,7 @@ + tags tags-recursive uninstall uninstall-am uninstall-info-am -all: $(targets) txt_files diff --git a/databases/mysql54-server/files/patch-Makefile.in b/databases/mysql54-server/files/patch-Makefile.in index df6774784d9b..56adfc29a52f 100644 --- a/databases/mysql54-server/files/patch-Makefile.in +++ b/databases/mysql54-server/files/patch-Makefile.in @@ -1,16 +1,16 @@ ---- Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Makefile.in Mon Jan 10 11:46:31 2005 -@@ -302,12 +302,7 @@ +--- Makefile.in.orig Tue Mar 22 20:27:12 2005 ++++ Makefile.in Wed Apr 6 13:07:04 2005 +@@ -358,12 +358,7 @@ # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT -SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ - @readline_topdir@ sql-common \ - @thread_dirs@ pstack \ -- @sql_server_dirs@ @sql_client_dirs@ scripts man tests \ +- @sql_union_dirs@ scripts man tests \ - netware @libmysqld_dirs@ \ - @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ +SUBDIRS = - DIST_SUBDIRS = . include @docs_dirs@ zlib \ + @readline_topdir@ sql-common \ diff --git a/databases/mysql54-server/files/patch-man::Makefile.in b/databases/mysql54-server/files/patch-man::Makefile.in index 86d18cec61b2..0f83c2ae8cad 100644 --- a/databases/mysql54-server/files/patch-man::Makefile.in +++ b/databases/mysql54-server/files/patch-man::Makefile.in @@ -1,13 +1,13 @@ ---- man/Makefile.in.orig Mon Feb 23 14:54:10 2004 -+++ man/Makefile.in Mon Feb 23 14:54:34 2004 -@@ -272,9 +272,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - --man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ +--- man/Makefile.in.orig Tue Mar 22 20:27:16 2005 ++++ man/Makefile.in Wed Apr 6 13:10:42 2005 +@@ -333,9 +333,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ +-man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 +man_MANS = - - EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ + EXTRA_DIST = mysql.1.in mysql_zap.1.in \ + mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ diff --git a/databases/mysql54-server/files/patch-scripts::Makefile.in b/databases/mysql54-server/files/patch-scripts::Makefile.in index ffef310f740c..405818e00304 100644 --- a/databases/mysql54-server/files/patch-scripts::Makefile.in +++ b/databases/mysql54-server/files/patch-scripts::Makefile.in @@ -1,9 +1,9 @@ ---- scripts/Makefile.in.orig Tue Jul 27 08:14:44 2004 -+++ scripts/Makefile.in Sat Oct 23 10:44:33 2004 -@@ -287,26 +287,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - +--- scripts/Makefile.in.orig Tue Mar 22 20:27:34 2005 ++++ scripts/Makefile.in Wed Apr 6 13:16:58 2005 +@@ -336,26 +336,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ @@ -26,18 +26,18 @@ - mysql_create_system_tables +bin_SCRIPTS = - EXTRA_SCRIPTS = make_binary_distribution.sh \ -@@ -340,7 +321,7 @@ + make_sharedlib_distribution.sh \ +@@ -386,7 +367,7 @@ + mysqlaccess.conf \ mysqlbug - -dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql +dist_pkgdata_DATA = # mysqlbug should be distributed built so that people can report build # failures with it. -@@ -616,8 +597,6 @@ +@@ -677,8 +658,6 @@ all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution diff --git a/databases/mysql54-server/files/patch-scripts::mysqlaccess.sh b/databases/mysql54-server/files/patch-scripts::mysqlaccess.sh deleted file mode 100644 index f1382fbad153..000000000000 --- a/databases/mysql54-server/files/patch-scripts::mysqlaccess.sh +++ /dev/null @@ -1,90 +0,0 @@ ---- scripts/mysqlaccess.sh.orig 2005-01-16 14:28:38 -08:00 -+++ scripts/mysqlaccess.sh 2005-01-16 14:28:38 -08:00 -@@ -2,7 +2,7 @@ - # **************************** - package MySQLaccess; - #use strict; --use POSIX qw(tmpnam); -+use File::Temp qw(tempfile tmpnam); - use Fcntl; - - BEGIN { -@@ -32,7 +32,6 @@ - $ACCESS_U_BCK = 'user_backup'; - $ACCESS_D_BCK = 'db_backup'; - $DIFF = '/usr/bin/diff'; -- $TMP_PATH = '/tmp'; #path to writable tmp-directory - $MYSQLDUMP = '@bindir@/mysqldump'; - #path to mysqldump executable - -@@ -432,7 +431,7 @@ - # no caching on STDOUT - $|=1; - -- $MYSQL_CNF = POSIX::tmpnam(); -+ $MYSQL_CNF = tmpnam(); - %MYSQL_CNF = (client => { }, - mysql => { }, - mysqldump => { }, -@@ -577,8 +576,6 @@ - push(@MySQLaccess::Grant::Error,'not_found_mysql') if !(-x $MYSQL); - push(@MySQLaccess::Grant::Error,'not_found_diff') if !(-x $DIFF); - push(@MySQLaccess::Grant::Error,'not_found_mysqldump') if !(-x $MYSQLDUMP); --push(@MySQLaccess::Grant::Error,'not_found_tmp') if !(-d $TMP_PATH); --push(@MySQLaccess::Grant::Error,'write_err_tmp') if !(-w $TMP_PATH); - if (@MySQLaccess::Grant::Error) { - MySQLaccess::Report::Print_Error_Messages() ; - exit 0; -@@ -1777,17 +1774,15 @@ - @before = sort(@before); - @after = sort(@after); - -- $before = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.before.$$"; -- $after = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.after.$$"; -- #$after = "/tmp/t0"; -- open(BEFORE,"> $before") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $before for writing"); -- open(AFTER,"> $after") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $after for writing"); -- print BEFORE join("\n",@before); -- print AFTER join("\n",@after); -- close(BEFORE); -- close(AFTER); -+ ($hb, $before) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ ($ha, $after) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ -+ print $hb join("\n",@before); -+ print $ha join("\n",@after); -+ close $hb; -+ close $ha; - - # ---------------------------------- - # compute difference -@@ -1800,8 +1795,8 @@ - - # ---------------------------------- - # cleanup temp. files -- unlink(BEFORE); -- unlink(AFTER); -+ unlink($before); -+ unlink($after); - - return \@diffs; - } -@@ -2316,14 +2311,6 @@ - => "The diff program <$MySQLaccess::DIFF> could not be found.\n" - ."+ Check your path, or\n" - ."+ edit the source of this script to point \$DIFF to the diff program.\n" -- ,'not_found_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> could not be found.\n" -- ."+ create this directory (writeable!), or\n" -- ."+ edit the source of this script to point \$TMP_PATH to the right directory.\n" -- ,'write_err_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> is not writable.\n" -- ."+ make this directory writeable!, or\n" -- ."+ edit the source of this script to point \$TMP_PATH to another directory.\n" - ,'Unrecognized_option' - => "Sorry,\n" - ."You are using an old version of the mysql-program,\n" diff --git a/databases/mysql54-server/files/patch-sql::mysqld.cc b/databases/mysql54-server/files/patch-sql::mysqld.cc index c98d38bcbd10..e79f985fcb69 100644 --- a/databases/mysql54-server/files/patch-sql::mysqld.cc +++ b/databases/mysql54-server/files/patch-sql::mysqld.cc @@ -9,39 +9,3 @@ #include #ifdef NEED_SYS_SYSLOG_H #include -@@ -136,15 +136,6 @@ - int allow_severity = LOG_INFO; - int deny_severity = LOG_WARNING; - --#ifdef __STDC__ --#define my_fromhost(A) fromhost(A) --#define my_hosts_access(A) hosts_access(A) --#define my_eval_client(A) eval_client(A) --#else --#define my_fromhost(A) fromhost() --#define my_hosts_access(A) hosts_access() --#define my_eval_client(A) eval_client() --#endif /* __STDC__ */ - #endif /* HAVE_LIBWRAP */ - - #ifdef HAVE_SYS_MMAN_H -@@ -3565,8 +3556,8 @@ - struct request_info req; - signal(SIGCHLD, SIG_DFL); - request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -- my_fromhost(&req); -- if (!my_hosts_access(&req)) -+ fromhost(&req); -+ if (!hosts_access(&req)) - { - /* - This may be stupid but refuse() includes an exit(0) -@@ -3574,7 +3565,7 @@ - clean_exit() - same stupid thing ... - */ - syslog(deny_severity, "refused connect from %s", -- my_eval_client(&req)); -+ eval_client(&req)); - - /* - C++ sucks (the gibberish in front just translates the supplied diff --git a/databases/mysql54-server/pkg-install b/databases/mysql54-server/pkg-install index 88a0b1c66915..586f846c5031 100644 --- a/databases/mysql54-server/pkg-install +++ b/databases/mysql54-server/pkg-install @@ -8,7 +8,6 @@ POST-INSTALL) GROUP=${USER} UID=88 GID=${UID} - DB_DIR=%%DB_DIR%% if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -23,16 +22,9 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${DB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." - exit 1 - fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" + -d /nonexistent -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -40,7 +32,5 @@ POST-INSTALL) exit 1 fi fi - - chown -R ${USER}:${GROUP} ${DB_DIR} ;; esac diff --git a/databases/mysql54-server/pkg-plist b/databases/mysql54-server/pkg-plist index 8d36cf62ba99..6373ea4c127f 100644 --- a/databases/mysql54-server/pkg-plist +++ b/databases/mysql54-server/pkg-plist @@ -1,6 +1,4 @@ bin/comp_err -bin/isamchk -bin/isamlog bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -22,23 +20,24 @@ bin/mysqld_safe %%NDB%%bin/ndb_show_tables %%NDB%%bin/ndb_test_platform %%NDB%%bin/ndb_waiter -bin/pack_isam bin/perror bin/replace bin/resolve_stack_dump bin/resolveip -etc/rc.d/mysql-server.sh +include/mysql/mysqld_ername.h +include/mysql/mysqld_error.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters_debug.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_debug.h +%%NDB%%include/mysql/ndb/mgmapi/ndb_logevent.h +%%NDB%%include/mysql/ndb/ndb_constants.h +%%NDB%%include/mysql/ndb/ndb_init.h %%NDB%%include/mysql/ndb/ndb_types.h %%NDB%%include/mysql/ndb/ndb_version.h %%NDB%%include/mysql/ndb/ndbapi/Ndb.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbApi.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbBlob.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbConnection.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbCursorOperation.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbDictionary.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbError.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbEventOperation.hpp @@ -48,15 +47,16 @@ etc/rc.d/mysql-server.sh %%NDB%%include/mysql/ndb/ndbapi/NdbPool.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbRecAttr.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbReceiver.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbResultSet.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanFilter.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanOperation.hpp +%%NDB%%include/mysql/ndb/ndbapi/NdbTransaction.hpp %%NDB%%include/mysql/ndb/ndbapi/ndbapi_limits.h %%NDB%%include/mysql/ndb/ndbapi/ndb_cluster_connection.hpp +%%NDB%%include/mysql/ndb/ndbapi/ndb_opt_defaults.h %%NDB%%include/mysql/ndb/ndbapi/ndberror.h +include/mysql/sql_state.h lib/mysql/libdbug.a lib/mysql/libheap.a -lib/mysql/libmerge.a lib/mysql/libmyisam.a lib/mysql/libmyisammrg.a lib/mysql/libmystrings.a @@ -64,7 +64,6 @@ lib/mysql/libmysys.a %%NDB%%lib/mysql/libndbclient.a %%NDB%%lib/mysql/libndbclient.so %%NDB%%lib/mysql/libndbclient.so.0 -lib/mysql/libnisam.a lib/mysql/libvio.a libexec/mysqld %%NDB%%libexec/ndb_cpcd @@ -103,30 +102,19 @@ libexec/mysqld %%DATADIR%%/charsets/macroman.xml %%DATADIR%%/charsets/swe7.xml %%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%%/errmsg.txt %%DATADIR%%/estonian/errmsg.sys -%%DATADIR%%/estonian/errmsg.txt %%DATADIR%%/fill_help_tables.sql %%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 @@ -137,32 +125,22 @@ libexec/mysqld %%DATADIR%%/mysql-log-rotate %%DATADIR%%/mysql-%%VER%%.spec %%DATADIR%%/mysql.server +%%DATADIR%%/ndb-config-2-node.ini %%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%%/serbian/errmsg.sys -%%DATADIR%%/serbian/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 %%NDB%%@dirrm include/mysql/ndb/mgmapi %%NDB%%@dirrm include/mysql/ndb/ndbapi %%NDB%%@dirrm include/mysql/ndb -%%NDB%%@unexec rmdir %D/include/mysql 2> /dev/null || true +@unexec rmdir %D/include/mysql 2> /dev/null || true @unexec rmdir %D/lib/mysql 2> /dev/null || true @dirrm %%DATADIR%%/charsets @dirrm %%DATADIR%%/czech @@ -189,5 +167,4 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @unexec rmdir %D/%%DATADIR%% 2> /dev/null || true -@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%% @unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true diff --git a/databases/mysql54-server/pkg-plist.client b/databases/mysql54-server/pkg-plist.client index ab0454713675..4792277db7f7 100644 --- a/databases/mysql54-server/pkg-plist.client +++ b/databases/mysql54-server/pkg-plist.client @@ -34,10 +34,8 @@ include/mysql/mysql_com.h include/mysql/mysql_embed.h include/mysql/mysql_time.h include/mysql/mysql_version.h -include/mysql/mysqld_error.h include/mysql/raid.h include/mysql/sql_common.h -include/mysql/sql_state.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h diff --git a/databases/mysql55-server/Makefile b/databases/mysql55-server/Makefile index a3d67959066a..a40f9be8d2a7 100644 --- a/databases/mysql55-server/Makefile +++ b/databases/mysql55-server/Makefile @@ -6,27 +6,28 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.2 +PORTVERSION= 5.0.3 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-5.0 PKGNAMESUFFIX?= -server -DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha +DISTNAME= ${PORTNAME}-${PORTVERSION}-beta MAINTAINER= ale@FreeBSD.org COMMENT?= Multithreaded SQL database (server) -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-beta SLAVEDIRS= databases/mysql50-client -PKGINSTALL?= ${WRKDIR}/pkg-install -DB_DIR?= /var/db/mysql USE_LIBTOOL_VER=15 USE_REINPLACE= yes -USE_RC_SUBR= yes + +.if ${PKGNAMESUFFIX} == "-server" +USE_RC_SUBR= mysql-server.sh +.endif CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ +CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ --without-readline \ --without-libedit \ @@ -34,7 +35,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-extra-tools \ --with-libwrap \ --with-mysqlfs \ - --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client @@ -111,15 +111,14 @@ LATEST_LINK= mysql50-server CONFLICTS= mysql-server-3.* mysql-server-4.* -PLIST_SUB= DB_DIR=${DB_DIR} \ - VER=${PORTVERSION}-alpha +PLIST_SUB= VER=${PORTVERSION}-beta .if defined(WITH_NDB) PLIST_SUB+= NDB="" .else PLIST_SUB+= NDB="@comment " .endif -MAN1= isamchk.1 isamlog.1 mysqld.1 \ +MAN1= mysqld.1 \ mysqld_safe.1 perror.1 replace.1 .if !defined(NOPORTDOCS) @@ -136,12 +135,9 @@ pre-fetch: @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')." @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)." @${ECHO} " WITH_OPENSSL=yes Enable secure connections." - @${ECHO} " DB_DIR=directory Set alternate directory for database files" - @${ECHO} " (default is /var/db/mysql)." @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library." @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads" @${ECHO} " (try it if you use libpthread)." - @${ECHO} " OVERWRITE_DB=yes Re-initialize default databases." @${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations" @${ECHO} " (use it if you need speed)." @${ECHO} " BUILD_STATIC=yes Build a static version of mysqld." @@ -161,22 +157,10 @@ post-patch: @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc .endif -post-build: - @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install - post-install: .if !defined(PACKAGE_BUILDING) -.if exists(${DB_DIR}) && defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no" - @${RM} -r ${DB_DIR}/mysql ${DB_DIR}/test 2>/dev/null || true + @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif -.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no") - ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR} -.endif - @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - @${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} .for doc in ${PORTDOCS} @@ -224,7 +208,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp .endif - LATEST_LINK= mysql50-scripts CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* diff --git a/databases/mysql55-server/distinfo b/databases/mysql55-server/distinfo index 4221c4f3e0f5..16c251721a32 100644 --- a/databases/mysql55-server/distinfo +++ b/databases/mysql55-server/distinfo @@ -1,2 +1,2 @@ -MD5 (mysql-5.0.2-alpha.tar.gz) = 26fe5a7ca84e5c2540abf6d0a782ec36 -SIZE (mysql-5.0.2-alpha.tar.gz) = 22940908 +MD5 (mysql-5.0.3-beta.tar.gz) = 15913b736389992bd031fd1dbe6f4dfe +SIZE (mysql-5.0.3-beta.tar.gz) = 24068082 diff --git a/databases/mysql55-server/files/mysql-server.sh b/databases/mysql55-server/files/mysql-server.sh deleted file mode 100644 index 708ad57df4b3..000000000000 --- a/databases/mysql55-server/files/mysql-server.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# 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/mysql55-server/files/mysql-server.sh.in b/databases/mysql55-server/files/mysql-server.sh.in new file mode 100644 index 000000000000..e5870bdc1c9a --- /dev/null +++ b/databases/mysql55-server/files/mysql-server.sh.in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. %%RC_SUBR%% + +name="mysql" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_args=""} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +pidfile="${mysql_dbdir}/`/bin/hostname`.pid" +command="%%PREFIX%%/bin/mysqld_safe" +command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--ldata=${mysql_dbdir}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/mysql55-server/files/patch-Docs::Makefile.in b/databases/mysql55-server/files/patch-Docs::Makefile.in index e76340001630..7424656ab673 100644 --- a/databases/mysql55-server/files/patch-Docs::Makefile.in +++ b/databases/mysql55-server/files/patch-Docs::Makefile.in @@ -1,25 +1,25 @@ ---- Docs/Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Docs/Makefile.in Mon Jan 10 11:44:27 2005 -@@ -331,7 +331,7 @@ - check-recursive installcheck-recursive - DIST_COMMON = Makefile.am Makefile.in - DIST_SUBDIRS = $(SUBDIRS) +--- Docs/Makefile.in.orig Tue Mar 22 20:27:11 2005 ++++ Docs/Makefile.in Wed Apr 6 13:00:28 2005 +@@ -359,7 +359,7 @@ + + SUBDIRS = Images + GT = $(srcdir)/Support/generate-text-files.pl -all: $(BUILT_SOURCES) +all: $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -@@ -599,7 +599,7 @@ - installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) - +@@ -669,7 +669,7 @@ + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done -install: $(BUILT_SOURCES) +install: $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -@@ -718,7 +718,7 @@ - uninstall-info-am uninstall-info-recursive uninstall-recursive +@@ -793,7 +793,7 @@ + tags tags-recursive uninstall uninstall-am uninstall-info-am -all: $(targets) txt_files diff --git a/databases/mysql55-server/files/patch-Makefile.in b/databases/mysql55-server/files/patch-Makefile.in index df6774784d9b..56adfc29a52f 100644 --- a/databases/mysql55-server/files/patch-Makefile.in +++ b/databases/mysql55-server/files/patch-Makefile.in @@ -1,16 +1,16 @@ ---- Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Makefile.in Mon Jan 10 11:46:31 2005 -@@ -302,12 +302,7 @@ +--- Makefile.in.orig Tue Mar 22 20:27:12 2005 ++++ Makefile.in Wed Apr 6 13:07:04 2005 +@@ -358,12 +358,7 @@ # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT -SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ - @readline_topdir@ sql-common \ - @thread_dirs@ pstack \ -- @sql_server_dirs@ @sql_client_dirs@ scripts man tests \ +- @sql_union_dirs@ scripts man tests \ - netware @libmysqld_dirs@ \ - @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ +SUBDIRS = - DIST_SUBDIRS = . include @docs_dirs@ zlib \ + @readline_topdir@ sql-common \ diff --git a/databases/mysql55-server/files/patch-man::Makefile.in b/databases/mysql55-server/files/patch-man::Makefile.in index 86d18cec61b2..0f83c2ae8cad 100644 --- a/databases/mysql55-server/files/patch-man::Makefile.in +++ b/databases/mysql55-server/files/patch-man::Makefile.in @@ -1,13 +1,13 @@ ---- man/Makefile.in.orig Mon Feb 23 14:54:10 2004 -+++ man/Makefile.in Mon Feb 23 14:54:34 2004 -@@ -272,9 +272,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - --man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ +--- man/Makefile.in.orig Tue Mar 22 20:27:16 2005 ++++ man/Makefile.in Wed Apr 6 13:10:42 2005 +@@ -333,9 +333,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ +-man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 +man_MANS = - - EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ + EXTRA_DIST = mysql.1.in mysql_zap.1.in \ + mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ diff --git a/databases/mysql55-server/files/patch-scripts::Makefile.in b/databases/mysql55-server/files/patch-scripts::Makefile.in index ffef310f740c..405818e00304 100644 --- a/databases/mysql55-server/files/patch-scripts::Makefile.in +++ b/databases/mysql55-server/files/patch-scripts::Makefile.in @@ -1,9 +1,9 @@ ---- scripts/Makefile.in.orig Tue Jul 27 08:14:44 2004 -+++ scripts/Makefile.in Sat Oct 23 10:44:33 2004 -@@ -287,26 +287,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - +--- scripts/Makefile.in.orig Tue Mar 22 20:27:34 2005 ++++ scripts/Makefile.in Wed Apr 6 13:16:58 2005 +@@ -336,26 +336,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ @@ -26,18 +26,18 @@ - mysql_create_system_tables +bin_SCRIPTS = - EXTRA_SCRIPTS = make_binary_distribution.sh \ -@@ -340,7 +321,7 @@ + make_sharedlib_distribution.sh \ +@@ -386,7 +367,7 @@ + mysqlaccess.conf \ mysqlbug - -dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql +dist_pkgdata_DATA = # mysqlbug should be distributed built so that people can report build # failures with it. -@@ -616,8 +597,6 @@ +@@ -677,8 +658,6 @@ all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution diff --git a/databases/mysql55-server/files/patch-scripts::mysqlaccess.sh b/databases/mysql55-server/files/patch-scripts::mysqlaccess.sh deleted file mode 100644 index f1382fbad153..000000000000 --- a/databases/mysql55-server/files/patch-scripts::mysqlaccess.sh +++ /dev/null @@ -1,90 +0,0 @@ ---- scripts/mysqlaccess.sh.orig 2005-01-16 14:28:38 -08:00 -+++ scripts/mysqlaccess.sh 2005-01-16 14:28:38 -08:00 -@@ -2,7 +2,7 @@ - # **************************** - package MySQLaccess; - #use strict; --use POSIX qw(tmpnam); -+use File::Temp qw(tempfile tmpnam); - use Fcntl; - - BEGIN { -@@ -32,7 +32,6 @@ - $ACCESS_U_BCK = 'user_backup'; - $ACCESS_D_BCK = 'db_backup'; - $DIFF = '/usr/bin/diff'; -- $TMP_PATH = '/tmp'; #path to writable tmp-directory - $MYSQLDUMP = '@bindir@/mysqldump'; - #path to mysqldump executable - -@@ -432,7 +431,7 @@ - # no caching on STDOUT - $|=1; - -- $MYSQL_CNF = POSIX::tmpnam(); -+ $MYSQL_CNF = tmpnam(); - %MYSQL_CNF = (client => { }, - mysql => { }, - mysqldump => { }, -@@ -577,8 +576,6 @@ - push(@MySQLaccess::Grant::Error,'not_found_mysql') if !(-x $MYSQL); - push(@MySQLaccess::Grant::Error,'not_found_diff') if !(-x $DIFF); - push(@MySQLaccess::Grant::Error,'not_found_mysqldump') if !(-x $MYSQLDUMP); --push(@MySQLaccess::Grant::Error,'not_found_tmp') if !(-d $TMP_PATH); --push(@MySQLaccess::Grant::Error,'write_err_tmp') if !(-w $TMP_PATH); - if (@MySQLaccess::Grant::Error) { - MySQLaccess::Report::Print_Error_Messages() ; - exit 0; -@@ -1777,17 +1774,15 @@ - @before = sort(@before); - @after = sort(@after); - -- $before = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.before.$$"; -- $after = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.after.$$"; -- #$after = "/tmp/t0"; -- open(BEFORE,"> $before") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $before for writing"); -- open(AFTER,"> $after") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $after for writing"); -- print BEFORE join("\n",@before); -- print AFTER join("\n",@after); -- close(BEFORE); -- close(AFTER); -+ ($hb, $before) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ ($ha, $after) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ -+ print $hb join("\n",@before); -+ print $ha join("\n",@after); -+ close $hb; -+ close $ha; - - # ---------------------------------- - # compute difference -@@ -1800,8 +1795,8 @@ - - # ---------------------------------- - # cleanup temp. files -- unlink(BEFORE); -- unlink(AFTER); -+ unlink($before); -+ unlink($after); - - return \@diffs; - } -@@ -2316,14 +2311,6 @@ - => "The diff program <$MySQLaccess::DIFF> could not be found.\n" - ."+ Check your path, or\n" - ."+ edit the source of this script to point \$DIFF to the diff program.\n" -- ,'not_found_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> could not be found.\n" -- ."+ create this directory (writeable!), or\n" -- ."+ edit the source of this script to point \$TMP_PATH to the right directory.\n" -- ,'write_err_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> is not writable.\n" -- ."+ make this directory writeable!, or\n" -- ."+ edit the source of this script to point \$TMP_PATH to another directory.\n" - ,'Unrecognized_option' - => "Sorry,\n" - ."You are using an old version of the mysql-program,\n" diff --git a/databases/mysql55-server/files/patch-sql::mysqld.cc b/databases/mysql55-server/files/patch-sql::mysqld.cc index c98d38bcbd10..e79f985fcb69 100644 --- a/databases/mysql55-server/files/patch-sql::mysqld.cc +++ b/databases/mysql55-server/files/patch-sql::mysqld.cc @@ -9,39 +9,3 @@ #include #ifdef NEED_SYS_SYSLOG_H #include -@@ -136,15 +136,6 @@ - int allow_severity = LOG_INFO; - int deny_severity = LOG_WARNING; - --#ifdef __STDC__ --#define my_fromhost(A) fromhost(A) --#define my_hosts_access(A) hosts_access(A) --#define my_eval_client(A) eval_client(A) --#else --#define my_fromhost(A) fromhost() --#define my_hosts_access(A) hosts_access() --#define my_eval_client(A) eval_client() --#endif /* __STDC__ */ - #endif /* HAVE_LIBWRAP */ - - #ifdef HAVE_SYS_MMAN_H -@@ -3565,8 +3556,8 @@ - struct request_info req; - signal(SIGCHLD, SIG_DFL); - request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -- my_fromhost(&req); -- if (!my_hosts_access(&req)) -+ fromhost(&req); -+ if (!hosts_access(&req)) - { - /* - This may be stupid but refuse() includes an exit(0) -@@ -3574,7 +3565,7 @@ - clean_exit() - same stupid thing ... - */ - syslog(deny_severity, "refused connect from %s", -- my_eval_client(&req)); -+ eval_client(&req)); - - /* - C++ sucks (the gibberish in front just translates the supplied diff --git a/databases/mysql55-server/pkg-install b/databases/mysql55-server/pkg-install index 88a0b1c66915..586f846c5031 100644 --- a/databases/mysql55-server/pkg-install +++ b/databases/mysql55-server/pkg-install @@ -8,7 +8,6 @@ POST-INSTALL) GROUP=${USER} UID=88 GID=${UID} - DB_DIR=%%DB_DIR%% if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -23,16 +22,9 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${DB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." - exit 1 - fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" + -d /nonexistent -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -40,7 +32,5 @@ POST-INSTALL) exit 1 fi fi - - chown -R ${USER}:${GROUP} ${DB_DIR} ;; esac diff --git a/databases/mysql55-server/pkg-plist b/databases/mysql55-server/pkg-plist index 8d36cf62ba99..6373ea4c127f 100644 --- a/databases/mysql55-server/pkg-plist +++ b/databases/mysql55-server/pkg-plist @@ -1,6 +1,4 @@ bin/comp_err -bin/isamchk -bin/isamlog bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -22,23 +20,24 @@ bin/mysqld_safe %%NDB%%bin/ndb_show_tables %%NDB%%bin/ndb_test_platform %%NDB%%bin/ndb_waiter -bin/pack_isam bin/perror bin/replace bin/resolve_stack_dump bin/resolveip -etc/rc.d/mysql-server.sh +include/mysql/mysqld_ername.h +include/mysql/mysqld_error.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters_debug.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_debug.h +%%NDB%%include/mysql/ndb/mgmapi/ndb_logevent.h +%%NDB%%include/mysql/ndb/ndb_constants.h +%%NDB%%include/mysql/ndb/ndb_init.h %%NDB%%include/mysql/ndb/ndb_types.h %%NDB%%include/mysql/ndb/ndb_version.h %%NDB%%include/mysql/ndb/ndbapi/Ndb.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbApi.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbBlob.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbConnection.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbCursorOperation.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbDictionary.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbError.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbEventOperation.hpp @@ -48,15 +47,16 @@ etc/rc.d/mysql-server.sh %%NDB%%include/mysql/ndb/ndbapi/NdbPool.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbRecAttr.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbReceiver.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbResultSet.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanFilter.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanOperation.hpp +%%NDB%%include/mysql/ndb/ndbapi/NdbTransaction.hpp %%NDB%%include/mysql/ndb/ndbapi/ndbapi_limits.h %%NDB%%include/mysql/ndb/ndbapi/ndb_cluster_connection.hpp +%%NDB%%include/mysql/ndb/ndbapi/ndb_opt_defaults.h %%NDB%%include/mysql/ndb/ndbapi/ndberror.h +include/mysql/sql_state.h lib/mysql/libdbug.a lib/mysql/libheap.a -lib/mysql/libmerge.a lib/mysql/libmyisam.a lib/mysql/libmyisammrg.a lib/mysql/libmystrings.a @@ -64,7 +64,6 @@ lib/mysql/libmysys.a %%NDB%%lib/mysql/libndbclient.a %%NDB%%lib/mysql/libndbclient.so %%NDB%%lib/mysql/libndbclient.so.0 -lib/mysql/libnisam.a lib/mysql/libvio.a libexec/mysqld %%NDB%%libexec/ndb_cpcd @@ -103,30 +102,19 @@ libexec/mysqld %%DATADIR%%/charsets/macroman.xml %%DATADIR%%/charsets/swe7.xml %%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%%/errmsg.txt %%DATADIR%%/estonian/errmsg.sys -%%DATADIR%%/estonian/errmsg.txt %%DATADIR%%/fill_help_tables.sql %%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 @@ -137,32 +125,22 @@ libexec/mysqld %%DATADIR%%/mysql-log-rotate %%DATADIR%%/mysql-%%VER%%.spec %%DATADIR%%/mysql.server +%%DATADIR%%/ndb-config-2-node.ini %%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%%/serbian/errmsg.sys -%%DATADIR%%/serbian/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 %%NDB%%@dirrm include/mysql/ndb/mgmapi %%NDB%%@dirrm include/mysql/ndb/ndbapi %%NDB%%@dirrm include/mysql/ndb -%%NDB%%@unexec rmdir %D/include/mysql 2> /dev/null || true +@unexec rmdir %D/include/mysql 2> /dev/null || true @unexec rmdir %D/lib/mysql 2> /dev/null || true @dirrm %%DATADIR%%/charsets @dirrm %%DATADIR%%/czech @@ -189,5 +167,4 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @unexec rmdir %D/%%DATADIR%% 2> /dev/null || true -@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%% @unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true diff --git a/databases/mysql55-server/pkg-plist.client b/databases/mysql55-server/pkg-plist.client index ab0454713675..4792277db7f7 100644 --- a/databases/mysql55-server/pkg-plist.client +++ b/databases/mysql55-server/pkg-plist.client @@ -34,10 +34,8 @@ include/mysql/mysql_com.h include/mysql/mysql_embed.h include/mysql/mysql_time.h include/mysql/mysql_version.h -include/mysql/mysqld_error.h include/mysql/raid.h include/mysql/sql_common.h -include/mysql/sql_state.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h diff --git a/databases/mysql60-server/Makefile b/databases/mysql60-server/Makefile index a3d67959066a..a40f9be8d2a7 100644 --- a/databases/mysql60-server/Makefile +++ b/databases/mysql60-server/Makefile @@ -6,27 +6,28 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.2 +PORTVERSION= 5.0.3 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-5.0 PKGNAMESUFFIX?= -server -DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha +DISTNAME= ${PORTNAME}-${PORTVERSION}-beta MAINTAINER= ale@FreeBSD.org COMMENT?= Multithreaded SQL database (server) -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-beta SLAVEDIRS= databases/mysql50-client -PKGINSTALL?= ${WRKDIR}/pkg-install -DB_DIR?= /var/db/mysql USE_LIBTOOL_VER=15 USE_REINPLACE= yes -USE_RC_SUBR= yes + +.if ${PKGNAMESUFFIX} == "-server" +USE_RC_SUBR= mysql-server.sh +.endif CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ +CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ --without-readline \ --without-libedit \ @@ -34,7 +35,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-extra-tools \ --with-libwrap \ --with-mysqlfs \ - --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client @@ -111,15 +111,14 @@ LATEST_LINK= mysql50-server CONFLICTS= mysql-server-3.* mysql-server-4.* -PLIST_SUB= DB_DIR=${DB_DIR} \ - VER=${PORTVERSION}-alpha +PLIST_SUB= VER=${PORTVERSION}-beta .if defined(WITH_NDB) PLIST_SUB+= NDB="" .else PLIST_SUB+= NDB="@comment " .endif -MAN1= isamchk.1 isamlog.1 mysqld.1 \ +MAN1= mysqld.1 \ mysqld_safe.1 perror.1 replace.1 .if !defined(NOPORTDOCS) @@ -136,12 +135,9 @@ pre-fetch: @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')." @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)." @${ECHO} " WITH_OPENSSL=yes Enable secure connections." - @${ECHO} " DB_DIR=directory Set alternate directory for database files" - @${ECHO} " (default is /var/db/mysql)." @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library." @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads" @${ECHO} " (try it if you use libpthread)." - @${ECHO} " OVERWRITE_DB=yes Re-initialize default databases." @${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations" @${ECHO} " (use it if you need speed)." @${ECHO} " BUILD_STATIC=yes Build a static version of mysqld." @@ -161,22 +157,10 @@ post-patch: @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc .endif -post-build: - @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install - post-install: .if !defined(PACKAGE_BUILDING) -.if exists(${DB_DIR}) && defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no" - @${RM} -r ${DB_DIR}/mysql ${DB_DIR}/test 2>/dev/null || true + @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif -.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no") - ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR} -.endif - @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - @${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} .for doc in ${PORTDOCS} @@ -224,7 +208,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp .endif - LATEST_LINK= mysql50-scripts CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* diff --git a/databases/mysql60-server/distinfo b/databases/mysql60-server/distinfo index 4221c4f3e0f5..16c251721a32 100644 --- a/databases/mysql60-server/distinfo +++ b/databases/mysql60-server/distinfo @@ -1,2 +1,2 @@ -MD5 (mysql-5.0.2-alpha.tar.gz) = 26fe5a7ca84e5c2540abf6d0a782ec36 -SIZE (mysql-5.0.2-alpha.tar.gz) = 22940908 +MD5 (mysql-5.0.3-beta.tar.gz) = 15913b736389992bd031fd1dbe6f4dfe +SIZE (mysql-5.0.3-beta.tar.gz) = 24068082 diff --git a/databases/mysql60-server/files/mysql-server.sh b/databases/mysql60-server/files/mysql-server.sh deleted file mode 100644 index 708ad57df4b3..000000000000 --- a/databases/mysql60-server/files/mysql-server.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# 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/mysql60-server/files/mysql-server.sh.in b/databases/mysql60-server/files/mysql-server.sh.in new file mode 100644 index 000000000000..e5870bdc1c9a --- /dev/null +++ b/databases/mysql60-server/files/mysql-server.sh.in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. %%RC_SUBR%% + +name="mysql" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_args=""} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +pidfile="${mysql_dbdir}/`/bin/hostname`.pid" +command="%%PREFIX%%/bin/mysqld_safe" +command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--ldata=${mysql_dbdir}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/mysql60-server/files/patch-Docs::Makefile.in b/databases/mysql60-server/files/patch-Docs::Makefile.in index e76340001630..7424656ab673 100644 --- a/databases/mysql60-server/files/patch-Docs::Makefile.in +++ b/databases/mysql60-server/files/patch-Docs::Makefile.in @@ -1,25 +1,25 @@ ---- Docs/Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Docs/Makefile.in Mon Jan 10 11:44:27 2005 -@@ -331,7 +331,7 @@ - check-recursive installcheck-recursive - DIST_COMMON = Makefile.am Makefile.in - DIST_SUBDIRS = $(SUBDIRS) +--- Docs/Makefile.in.orig Tue Mar 22 20:27:11 2005 ++++ Docs/Makefile.in Wed Apr 6 13:00:28 2005 +@@ -359,7 +359,7 @@ + + SUBDIRS = Images + GT = $(srcdir)/Support/generate-text-files.pl -all: $(BUILT_SOURCES) +all: $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -@@ -599,7 +599,7 @@ - installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) - +@@ -669,7 +669,7 @@ + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done -install: $(BUILT_SOURCES) +install: $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -@@ -718,7 +718,7 @@ - uninstall-info-am uninstall-info-recursive uninstall-recursive +@@ -793,7 +793,7 @@ + tags tags-recursive uninstall uninstall-am uninstall-info-am -all: $(targets) txt_files diff --git a/databases/mysql60-server/files/patch-Makefile.in b/databases/mysql60-server/files/patch-Makefile.in index df6774784d9b..56adfc29a52f 100644 --- a/databases/mysql60-server/files/patch-Makefile.in +++ b/databases/mysql60-server/files/patch-Makefile.in @@ -1,16 +1,16 @@ ---- Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Makefile.in Mon Jan 10 11:46:31 2005 -@@ -302,12 +302,7 @@ +--- Makefile.in.orig Tue Mar 22 20:27:12 2005 ++++ Makefile.in Wed Apr 6 13:07:04 2005 +@@ -358,12 +358,7 @@ # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT -SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ - @readline_topdir@ sql-common \ - @thread_dirs@ pstack \ -- @sql_server_dirs@ @sql_client_dirs@ scripts man tests \ +- @sql_union_dirs@ scripts man tests \ - netware @libmysqld_dirs@ \ - @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ +SUBDIRS = - DIST_SUBDIRS = . include @docs_dirs@ zlib \ + @readline_topdir@ sql-common \ diff --git a/databases/mysql60-server/files/patch-man::Makefile.in b/databases/mysql60-server/files/patch-man::Makefile.in index 86d18cec61b2..0f83c2ae8cad 100644 --- a/databases/mysql60-server/files/patch-man::Makefile.in +++ b/databases/mysql60-server/files/patch-man::Makefile.in @@ -1,13 +1,13 @@ ---- man/Makefile.in.orig Mon Feb 23 14:54:10 2004 -+++ man/Makefile.in Mon Feb 23 14:54:34 2004 -@@ -272,9 +272,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - --man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ +--- man/Makefile.in.orig Tue Mar 22 20:27:16 2005 ++++ man/Makefile.in Wed Apr 6 13:10:42 2005 +@@ -333,9 +333,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ +-man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 +man_MANS = - - EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ + EXTRA_DIST = mysql.1.in mysql_zap.1.in \ + mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ diff --git a/databases/mysql60-server/files/patch-scripts::Makefile.in b/databases/mysql60-server/files/patch-scripts::Makefile.in index ffef310f740c..405818e00304 100644 --- a/databases/mysql60-server/files/patch-scripts::Makefile.in +++ b/databases/mysql60-server/files/patch-scripts::Makefile.in @@ -1,9 +1,9 @@ ---- scripts/Makefile.in.orig Tue Jul 27 08:14:44 2004 -+++ scripts/Makefile.in Sat Oct 23 10:44:33 2004 -@@ -287,26 +287,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - +--- scripts/Makefile.in.orig Tue Mar 22 20:27:34 2005 ++++ scripts/Makefile.in Wed Apr 6 13:16:58 2005 +@@ -336,26 +336,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ @@ -26,18 +26,18 @@ - mysql_create_system_tables +bin_SCRIPTS = - EXTRA_SCRIPTS = make_binary_distribution.sh \ -@@ -340,7 +321,7 @@ + make_sharedlib_distribution.sh \ +@@ -386,7 +367,7 @@ + mysqlaccess.conf \ mysqlbug - -dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql +dist_pkgdata_DATA = # mysqlbug should be distributed built so that people can report build # failures with it. -@@ -616,8 +597,6 @@ +@@ -677,8 +658,6 @@ all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution diff --git a/databases/mysql60-server/files/patch-scripts::mysqlaccess.sh b/databases/mysql60-server/files/patch-scripts::mysqlaccess.sh deleted file mode 100644 index f1382fbad153..000000000000 --- a/databases/mysql60-server/files/patch-scripts::mysqlaccess.sh +++ /dev/null @@ -1,90 +0,0 @@ ---- scripts/mysqlaccess.sh.orig 2005-01-16 14:28:38 -08:00 -+++ scripts/mysqlaccess.sh 2005-01-16 14:28:38 -08:00 -@@ -2,7 +2,7 @@ - # **************************** - package MySQLaccess; - #use strict; --use POSIX qw(tmpnam); -+use File::Temp qw(tempfile tmpnam); - use Fcntl; - - BEGIN { -@@ -32,7 +32,6 @@ - $ACCESS_U_BCK = 'user_backup'; - $ACCESS_D_BCK = 'db_backup'; - $DIFF = '/usr/bin/diff'; -- $TMP_PATH = '/tmp'; #path to writable tmp-directory - $MYSQLDUMP = '@bindir@/mysqldump'; - #path to mysqldump executable - -@@ -432,7 +431,7 @@ - # no caching on STDOUT - $|=1; - -- $MYSQL_CNF = POSIX::tmpnam(); -+ $MYSQL_CNF = tmpnam(); - %MYSQL_CNF = (client => { }, - mysql => { }, - mysqldump => { }, -@@ -577,8 +576,6 @@ - push(@MySQLaccess::Grant::Error,'not_found_mysql') if !(-x $MYSQL); - push(@MySQLaccess::Grant::Error,'not_found_diff') if !(-x $DIFF); - push(@MySQLaccess::Grant::Error,'not_found_mysqldump') if !(-x $MYSQLDUMP); --push(@MySQLaccess::Grant::Error,'not_found_tmp') if !(-d $TMP_PATH); --push(@MySQLaccess::Grant::Error,'write_err_tmp') if !(-w $TMP_PATH); - if (@MySQLaccess::Grant::Error) { - MySQLaccess::Report::Print_Error_Messages() ; - exit 0; -@@ -1777,17 +1774,15 @@ - @before = sort(@before); - @after = sort(@after); - -- $before = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.before.$$"; -- $after = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.after.$$"; -- #$after = "/tmp/t0"; -- open(BEFORE,"> $before") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $before for writing"); -- open(AFTER,"> $after") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $after for writing"); -- print BEFORE join("\n",@before); -- print AFTER join("\n",@after); -- close(BEFORE); -- close(AFTER); -+ ($hb, $before) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ ($ha, $after) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ -+ print $hb join("\n",@before); -+ print $ha join("\n",@after); -+ close $hb; -+ close $ha; - - # ---------------------------------- - # compute difference -@@ -1800,8 +1795,8 @@ - - # ---------------------------------- - # cleanup temp. files -- unlink(BEFORE); -- unlink(AFTER); -+ unlink($before); -+ unlink($after); - - return \@diffs; - } -@@ -2316,14 +2311,6 @@ - => "The diff program <$MySQLaccess::DIFF> could not be found.\n" - ."+ Check your path, or\n" - ."+ edit the source of this script to point \$DIFF to the diff program.\n" -- ,'not_found_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> could not be found.\n" -- ."+ create this directory (writeable!), or\n" -- ."+ edit the source of this script to point \$TMP_PATH to the right directory.\n" -- ,'write_err_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> is not writable.\n" -- ."+ make this directory writeable!, or\n" -- ."+ edit the source of this script to point \$TMP_PATH to another directory.\n" - ,'Unrecognized_option' - => "Sorry,\n" - ."You are using an old version of the mysql-program,\n" diff --git a/databases/mysql60-server/files/patch-sql::mysqld.cc b/databases/mysql60-server/files/patch-sql::mysqld.cc index c98d38bcbd10..e79f985fcb69 100644 --- a/databases/mysql60-server/files/patch-sql::mysqld.cc +++ b/databases/mysql60-server/files/patch-sql::mysqld.cc @@ -9,39 +9,3 @@ #include #ifdef NEED_SYS_SYSLOG_H #include -@@ -136,15 +136,6 @@ - int allow_severity = LOG_INFO; - int deny_severity = LOG_WARNING; - --#ifdef __STDC__ --#define my_fromhost(A) fromhost(A) --#define my_hosts_access(A) hosts_access(A) --#define my_eval_client(A) eval_client(A) --#else --#define my_fromhost(A) fromhost() --#define my_hosts_access(A) hosts_access() --#define my_eval_client(A) eval_client() --#endif /* __STDC__ */ - #endif /* HAVE_LIBWRAP */ - - #ifdef HAVE_SYS_MMAN_H -@@ -3565,8 +3556,8 @@ - struct request_info req; - signal(SIGCHLD, SIG_DFL); - request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -- my_fromhost(&req); -- if (!my_hosts_access(&req)) -+ fromhost(&req); -+ if (!hosts_access(&req)) - { - /* - This may be stupid but refuse() includes an exit(0) -@@ -3574,7 +3565,7 @@ - clean_exit() - same stupid thing ... - */ - syslog(deny_severity, "refused connect from %s", -- my_eval_client(&req)); -+ eval_client(&req)); - - /* - C++ sucks (the gibberish in front just translates the supplied diff --git a/databases/mysql60-server/pkg-install b/databases/mysql60-server/pkg-install index 88a0b1c66915..586f846c5031 100644 --- a/databases/mysql60-server/pkg-install +++ b/databases/mysql60-server/pkg-install @@ -8,7 +8,6 @@ POST-INSTALL) GROUP=${USER} UID=88 GID=${UID} - DB_DIR=%%DB_DIR%% if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -23,16 +22,9 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${DB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." - exit 1 - fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" + -d /nonexistent -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -40,7 +32,5 @@ POST-INSTALL) exit 1 fi fi - - chown -R ${USER}:${GROUP} ${DB_DIR} ;; esac diff --git a/databases/mysql60-server/pkg-plist b/databases/mysql60-server/pkg-plist index 8d36cf62ba99..6373ea4c127f 100644 --- a/databases/mysql60-server/pkg-plist +++ b/databases/mysql60-server/pkg-plist @@ -1,6 +1,4 @@ bin/comp_err -bin/isamchk -bin/isamlog bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -22,23 +20,24 @@ bin/mysqld_safe %%NDB%%bin/ndb_show_tables %%NDB%%bin/ndb_test_platform %%NDB%%bin/ndb_waiter -bin/pack_isam bin/perror bin/replace bin/resolve_stack_dump bin/resolveip -etc/rc.d/mysql-server.sh +include/mysql/mysqld_ername.h +include/mysql/mysqld_error.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters_debug.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_debug.h +%%NDB%%include/mysql/ndb/mgmapi/ndb_logevent.h +%%NDB%%include/mysql/ndb/ndb_constants.h +%%NDB%%include/mysql/ndb/ndb_init.h %%NDB%%include/mysql/ndb/ndb_types.h %%NDB%%include/mysql/ndb/ndb_version.h %%NDB%%include/mysql/ndb/ndbapi/Ndb.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbApi.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbBlob.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbConnection.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbCursorOperation.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbDictionary.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbError.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbEventOperation.hpp @@ -48,15 +47,16 @@ etc/rc.d/mysql-server.sh %%NDB%%include/mysql/ndb/ndbapi/NdbPool.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbRecAttr.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbReceiver.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbResultSet.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanFilter.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanOperation.hpp +%%NDB%%include/mysql/ndb/ndbapi/NdbTransaction.hpp %%NDB%%include/mysql/ndb/ndbapi/ndbapi_limits.h %%NDB%%include/mysql/ndb/ndbapi/ndb_cluster_connection.hpp +%%NDB%%include/mysql/ndb/ndbapi/ndb_opt_defaults.h %%NDB%%include/mysql/ndb/ndbapi/ndberror.h +include/mysql/sql_state.h lib/mysql/libdbug.a lib/mysql/libheap.a -lib/mysql/libmerge.a lib/mysql/libmyisam.a lib/mysql/libmyisammrg.a lib/mysql/libmystrings.a @@ -64,7 +64,6 @@ lib/mysql/libmysys.a %%NDB%%lib/mysql/libndbclient.a %%NDB%%lib/mysql/libndbclient.so %%NDB%%lib/mysql/libndbclient.so.0 -lib/mysql/libnisam.a lib/mysql/libvio.a libexec/mysqld %%NDB%%libexec/ndb_cpcd @@ -103,30 +102,19 @@ libexec/mysqld %%DATADIR%%/charsets/macroman.xml %%DATADIR%%/charsets/swe7.xml %%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%%/errmsg.txt %%DATADIR%%/estonian/errmsg.sys -%%DATADIR%%/estonian/errmsg.txt %%DATADIR%%/fill_help_tables.sql %%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 @@ -137,32 +125,22 @@ libexec/mysqld %%DATADIR%%/mysql-log-rotate %%DATADIR%%/mysql-%%VER%%.spec %%DATADIR%%/mysql.server +%%DATADIR%%/ndb-config-2-node.ini %%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%%/serbian/errmsg.sys -%%DATADIR%%/serbian/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 %%NDB%%@dirrm include/mysql/ndb/mgmapi %%NDB%%@dirrm include/mysql/ndb/ndbapi %%NDB%%@dirrm include/mysql/ndb -%%NDB%%@unexec rmdir %D/include/mysql 2> /dev/null || true +@unexec rmdir %D/include/mysql 2> /dev/null || true @unexec rmdir %D/lib/mysql 2> /dev/null || true @dirrm %%DATADIR%%/charsets @dirrm %%DATADIR%%/czech @@ -189,5 +167,4 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @unexec rmdir %D/%%DATADIR%% 2> /dev/null || true -@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%% @unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true diff --git a/databases/mysql60-server/pkg-plist.client b/databases/mysql60-server/pkg-plist.client index ab0454713675..4792277db7f7 100644 --- a/databases/mysql60-server/pkg-plist.client +++ b/databases/mysql60-server/pkg-plist.client @@ -34,10 +34,8 @@ include/mysql/mysql_com.h include/mysql/mysql_embed.h include/mysql/mysql_time.h include/mysql/mysql_version.h -include/mysql/mysqld_error.h include/mysql/raid.h include/mysql/sql_common.h -include/mysql/sql_state.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h diff --git a/databases/percona55-server/Makefile b/databases/percona55-server/Makefile index a3d67959066a..a40f9be8d2a7 100644 --- a/databases/percona55-server/Makefile +++ b/databases/percona55-server/Makefile @@ -6,27 +6,28 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.2 +PORTVERSION= 5.0.3 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-5.0 PKGNAMESUFFIX?= -server -DISTNAME= ${PORTNAME}-${PORTVERSION}-alpha +DISTNAME= ${PORTNAME}-${PORTVERSION}-beta MAINTAINER= ale@FreeBSD.org COMMENT?= Multithreaded SQL database (server) -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-beta SLAVEDIRS= databases/mysql50-client -PKGINSTALL?= ${WRKDIR}/pkg-install -DB_DIR?= /var/db/mysql USE_LIBTOOL_VER=15 USE_REINPLACE= yes -USE_RC_SUBR= yes + +.if ${PKGNAMESUFFIX} == "-server" +USE_RC_SUBR= mysql-server.sh +.endif CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ +CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ --without-debug \ --without-readline \ --without-libedit \ @@ -34,7 +35,6 @@ CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-extra-tools \ --with-libwrap \ --with-mysqlfs \ - --with-vio \ --with-low-memory \ --with-comment='FreeBSD port: ${PKGNAME}' \ --enable-thread-safe-client @@ -111,15 +111,14 @@ LATEST_LINK= mysql50-server CONFLICTS= mysql-server-3.* mysql-server-4.* -PLIST_SUB= DB_DIR=${DB_DIR} \ - VER=${PORTVERSION}-alpha +PLIST_SUB= VER=${PORTVERSION}-beta .if defined(WITH_NDB) PLIST_SUB+= NDB="" .else PLIST_SUB+= NDB="@comment " .endif -MAN1= isamchk.1 isamlog.1 mysqld.1 \ +MAN1= mysqld.1 \ mysqld_safe.1 perror.1 replace.1 .if !defined(NOPORTDOCS) @@ -136,12 +135,9 @@ pre-fetch: @${ECHO} " WITH_XCHARSET=list Define other built-in charsets (may be 'all')." @${ECHO} " WITH_COLLATION=collate Define default collation (latin1_swedish_ci)." @${ECHO} " WITH_OPENSSL=yes Enable secure connections." - @${ECHO} " DB_DIR=directory Set alternate directory for database files" - @${ECHO} " (default is /var/db/mysql)." @${ECHO} " WITH_LINUXTHREADS=yes Use the linuxthreads pthread library." @${ECHO} " WITH_PROC_SCOPE_PTH=yes Use process scope threads" @${ECHO} " (try it if you use libpthread)." - @${ECHO} " OVERWRITE_DB=yes Re-initialize default databases." @${ECHO} " BUILD_OPTIMIZED=yes Enable compiler optimizations" @${ECHO} " (use it if you need speed)." @${ECHO} " BUILD_STATIC=yes Build a static version of mysqld." @@ -161,22 +157,10 @@ post-patch: @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/sql/mysqld.cc .endif -post-build: - @${SED} "s|%%DB_DIR%%|${DB_DIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install - post-install: .if !defined(PACKAGE_BUILDING) -.if exists(${DB_DIR}) && defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no" - @${RM} -r ${DB_DIR}/mysql ${DB_DIR}/test 2>/dev/null || true + @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif -.if !exists(${DB_DIR}) || (defined(OVERWRITE_DB) && ${OVERWRITE_DB:L} != "no") - ${PREFIX}/bin/mysql_install_db --ldata=${DB_DIR} -.endif - @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - @${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} .for doc in ${PORTDOCS} @@ -224,7 +208,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mys RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp .endif - LATEST_LINK= mysql50-scripts CONFLICTS= mysql-scripts-3.* mysql-scripts-4.* diff --git a/databases/percona55-server/distinfo b/databases/percona55-server/distinfo index 4221c4f3e0f5..16c251721a32 100644 --- a/databases/percona55-server/distinfo +++ b/databases/percona55-server/distinfo @@ -1,2 +1,2 @@ -MD5 (mysql-5.0.2-alpha.tar.gz) = 26fe5a7ca84e5c2540abf6d0a782ec36 -SIZE (mysql-5.0.2-alpha.tar.gz) = 22940908 +MD5 (mysql-5.0.3-beta.tar.gz) = 15913b736389992bd031fd1dbe6f4dfe +SIZE (mysql-5.0.3-beta.tar.gz) = 24068082 diff --git a/databases/percona55-server/files/mysql-server.sh b/databases/percona55-server/files/mysql-server.sh deleted file mode 100644 index 708ad57df4b3..000000000000 --- a/databases/percona55-server/files/mysql-server.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# 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/percona55-server/files/mysql-server.sh.in b/databases/percona55-server/files/mysql-server.sh.in new file mode 100644 index 000000000000..e5870bdc1c9a --- /dev/null +++ b/databases/percona55-server/files/mysql-server.sh.in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. %%RC_SUBR%% + +name="mysql" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_args=""} + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +pidfile="${mysql_dbdir}/`/bin/hostname`.pid" +command="%%PREFIX%%/bin/mysqld_safe" +command_args="--user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--ldata=${mysql_dbdir}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null + [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir} +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" diff --git a/databases/percona55-server/files/patch-Docs::Makefile.in b/databases/percona55-server/files/patch-Docs::Makefile.in index e76340001630..7424656ab673 100644 --- a/databases/percona55-server/files/patch-Docs::Makefile.in +++ b/databases/percona55-server/files/patch-Docs::Makefile.in @@ -1,25 +1,25 @@ ---- Docs/Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Docs/Makefile.in Mon Jan 10 11:44:27 2005 -@@ -331,7 +331,7 @@ - check-recursive installcheck-recursive - DIST_COMMON = Makefile.am Makefile.in - DIST_SUBDIRS = $(SUBDIRS) +--- Docs/Makefile.in.orig Tue Mar 22 20:27:11 2005 ++++ Docs/Makefile.in Wed Apr 6 13:00:28 2005 +@@ -359,7 +359,7 @@ + + SUBDIRS = Images + GT = $(srcdir)/Support/generate-text-files.pl -all: $(BUILT_SOURCES) +all: $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -@@ -599,7 +599,7 @@ - installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) - +@@ -669,7 +669,7 @@ + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done -install: $(BUILT_SOURCES) +install: $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive -@@ -718,7 +718,7 @@ - uninstall-info-am uninstall-info-recursive uninstall-recursive +@@ -793,7 +793,7 @@ + tags tags-recursive uninstall uninstall-am uninstall-info-am -all: $(targets) txt_files diff --git a/databases/percona55-server/files/patch-Makefile.in b/databases/percona55-server/files/patch-Makefile.in index df6774784d9b..56adfc29a52f 100644 --- a/databases/percona55-server/files/patch-Makefile.in +++ b/databases/percona55-server/files/patch-Makefile.in @@ -1,16 +1,16 @@ ---- Makefile.in.orig Wed Dec 1 01:08:19 2004 -+++ Makefile.in Mon Jan 10 11:46:31 2005 -@@ -302,12 +302,7 @@ +--- Makefile.in.orig Tue Mar 22 20:27:12 2005 ++++ Makefile.in Wed Apr 6 13:07:04 2005 +@@ -358,12 +358,7 @@ # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT -SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ - @readline_topdir@ sql-common \ - @thread_dirs@ pstack \ -- @sql_server_dirs@ @sql_client_dirs@ scripts man tests \ +- @sql_union_dirs@ scripts man tests \ - netware @libmysqld_dirs@ \ - @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ +SUBDIRS = - DIST_SUBDIRS = . include @docs_dirs@ zlib \ + @readline_topdir@ sql-common \ diff --git a/databases/percona55-server/files/patch-man::Makefile.in b/databases/percona55-server/files/patch-man::Makefile.in index 86d18cec61b2..0f83c2ae8cad 100644 --- a/databases/percona55-server/files/patch-man::Makefile.in +++ b/databases/percona55-server/files/patch-man::Makefile.in @@ -1,13 +1,13 @@ ---- man/Makefile.in.orig Mon Feb 23 14:54:10 2004 -+++ man/Makefile.in Mon Feb 23 14:54:34 2004 -@@ -272,9 +272,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - --man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ +--- man/Makefile.in.orig Tue Mar 22 20:27:16 2005 ++++ man/Makefile.in Wed Apr 6 13:10:42 2005 +@@ -333,9 +333,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ +-man_MANS = mysql.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 +man_MANS = - - EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ + EXTRA_DIST = mysql.1.in mysql_zap.1.in \ + mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ diff --git a/databases/percona55-server/files/patch-scripts::Makefile.in b/databases/percona55-server/files/patch-scripts::Makefile.in index ffef310f740c..405818e00304 100644 --- a/databases/percona55-server/files/patch-scripts::Makefile.in +++ b/databases/percona55-server/files/patch-scripts::Makefile.in @@ -1,9 +1,9 @@ ---- scripts/Makefile.in.orig Tue Jul 27 08:14:44 2004 -+++ scripts/Makefile.in Sat Oct 23 10:44:33 2004 -@@ -287,26 +287,7 @@ - vio_dir = @vio_dir@ - vio_libs = @vio_libs@ - +--- scripts/Makefile.in.orig Tue Mar 22 20:27:34 2005 ++++ scripts/Makefile.in Wed Apr 6 13:16:58 2005 +@@ -336,26 +336,7 @@ + tools_dirs = @tools_dirs@ + uname_prog = @uname_prog@ + zlib_dir = @zlib_dir@ -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ @@ -26,18 +26,18 @@ - mysql_create_system_tables +bin_SCRIPTS = - EXTRA_SCRIPTS = make_binary_distribution.sh \ -@@ -340,7 +321,7 @@ + make_sharedlib_distribution.sh \ +@@ -386,7 +367,7 @@ + mysqlaccess.conf \ mysqlbug - -dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql +dist_pkgdata_DATA = # mysqlbug should be distributed built so that people can report build # failures with it. -@@ -616,8 +597,6 @@ +@@ -677,8 +658,6 @@ all: fill_help_tables.sql make_win_src_distribution make_binary_distribution make_sharedlib_distribution diff --git a/databases/percona55-server/files/patch-scripts::mysqlaccess.sh b/databases/percona55-server/files/patch-scripts::mysqlaccess.sh deleted file mode 100644 index f1382fbad153..000000000000 --- a/databases/percona55-server/files/patch-scripts::mysqlaccess.sh +++ /dev/null @@ -1,90 +0,0 @@ ---- scripts/mysqlaccess.sh.orig 2005-01-16 14:28:38 -08:00 -+++ scripts/mysqlaccess.sh 2005-01-16 14:28:38 -08:00 -@@ -2,7 +2,7 @@ - # **************************** - package MySQLaccess; - #use strict; --use POSIX qw(tmpnam); -+use File::Temp qw(tempfile tmpnam); - use Fcntl; - - BEGIN { -@@ -32,7 +32,6 @@ - $ACCESS_U_BCK = 'user_backup'; - $ACCESS_D_BCK = 'db_backup'; - $DIFF = '/usr/bin/diff'; -- $TMP_PATH = '/tmp'; #path to writable tmp-directory - $MYSQLDUMP = '@bindir@/mysqldump'; - #path to mysqldump executable - -@@ -432,7 +431,7 @@ - # no caching on STDOUT - $|=1; - -- $MYSQL_CNF = POSIX::tmpnam(); -+ $MYSQL_CNF = tmpnam(); - %MYSQL_CNF = (client => { }, - mysql => { }, - mysqldump => { }, -@@ -577,8 +576,6 @@ - push(@MySQLaccess::Grant::Error,'not_found_mysql') if !(-x $MYSQL); - push(@MySQLaccess::Grant::Error,'not_found_diff') if !(-x $DIFF); - push(@MySQLaccess::Grant::Error,'not_found_mysqldump') if !(-x $MYSQLDUMP); --push(@MySQLaccess::Grant::Error,'not_found_tmp') if !(-d $TMP_PATH); --push(@MySQLaccess::Grant::Error,'write_err_tmp') if !(-w $TMP_PATH); - if (@MySQLaccess::Grant::Error) { - MySQLaccess::Report::Print_Error_Messages() ; - exit 0; -@@ -1777,17 +1774,15 @@ - @before = sort(@before); - @after = sort(@after); - -- $before = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.before.$$"; -- $after = "$MySQLaccess::TMP_PATH/$MySQLaccess::script.after.$$"; -- #$after = "/tmp/t0"; -- open(BEFORE,"> $before") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $before for writing"); -- open(AFTER,"> $after") || -- push(@MySQLaccess::Report::Errors,"Can't open temporary file $after for writing"); -- print BEFORE join("\n",@before); -- print AFTER join("\n",@after); -- close(BEFORE); -- close(AFTER); -+ ($hb, $before) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ ($ha, $after) = tempfile("$MySQLaccess::script.XXXXXX") or -+ push(@MySQLaccess::Report::Errors,"Can't create temporary file: $!"); -+ -+ print $hb join("\n",@before); -+ print $ha join("\n",@after); -+ close $hb; -+ close $ha; - - # ---------------------------------- - # compute difference -@@ -1800,8 +1795,8 @@ - - # ---------------------------------- - # cleanup temp. files -- unlink(BEFORE); -- unlink(AFTER); -+ unlink($before); -+ unlink($after); - - return \@diffs; - } -@@ -2316,14 +2311,6 @@ - => "The diff program <$MySQLaccess::DIFF> could not be found.\n" - ."+ Check your path, or\n" - ."+ edit the source of this script to point \$DIFF to the diff program.\n" -- ,'not_found_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> could not be found.\n" -- ."+ create this directory (writeable!), or\n" -- ."+ edit the source of this script to point \$TMP_PATH to the right directory.\n" -- ,'write_err_tmp' -- => "The temporary directory <$MySQLaccess::TMP_PATH> is not writable.\n" -- ."+ make this directory writeable!, or\n" -- ."+ edit the source of this script to point \$TMP_PATH to another directory.\n" - ,'Unrecognized_option' - => "Sorry,\n" - ."You are using an old version of the mysql-program,\n" diff --git a/databases/percona55-server/files/patch-sql::mysqld.cc b/databases/percona55-server/files/patch-sql::mysqld.cc index c98d38bcbd10..e79f985fcb69 100644 --- a/databases/percona55-server/files/patch-sql::mysqld.cc +++ b/databases/percona55-server/files/patch-sql::mysqld.cc @@ -9,39 +9,3 @@ #include #ifdef NEED_SYS_SYSLOG_H #include -@@ -136,15 +136,6 @@ - int allow_severity = LOG_INFO; - int deny_severity = LOG_WARNING; - --#ifdef __STDC__ --#define my_fromhost(A) fromhost(A) --#define my_hosts_access(A) hosts_access(A) --#define my_eval_client(A) eval_client(A) --#else --#define my_fromhost(A) fromhost() --#define my_hosts_access(A) hosts_access() --#define my_eval_client(A) eval_client() --#endif /* __STDC__ */ - #endif /* HAVE_LIBWRAP */ - - #ifdef HAVE_SYS_MMAN_H -@@ -3565,8 +3556,8 @@ - struct request_info req; - signal(SIGCHLD, SIG_DFL); - request_init(&req, RQ_DAEMON, libwrapName, RQ_FILE, new_sock, NULL); -- my_fromhost(&req); -- if (!my_hosts_access(&req)) -+ fromhost(&req); -+ if (!hosts_access(&req)) - { - /* - This may be stupid but refuse() includes an exit(0) -@@ -3574,7 +3565,7 @@ - clean_exit() - same stupid thing ... - */ - syslog(deny_severity, "refused connect from %s", -- my_eval_client(&req)); -+ eval_client(&req)); - - /* - C++ sucks (the gibberish in front just translates the supplied diff --git a/databases/percona55-server/pkg-install b/databases/percona55-server/pkg-install index 88a0b1c66915..586f846c5031 100644 --- a/databases/percona55-server/pkg-install +++ b/databases/percona55-server/pkg-install @@ -8,7 +8,6 @@ POST-INSTALL) GROUP=${USER} UID=88 GID=${UID} - DB_DIR=%%DB_DIR%% if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -23,16 +22,9 @@ POST-INSTALL) if pw user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${DB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${DB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${DB_DIR}\" failed..." - exit 1 - fi else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" + -d /nonexistent -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -40,7 +32,5 @@ POST-INSTALL) exit 1 fi fi - - chown -R ${USER}:${GROUP} ${DB_DIR} ;; esac diff --git a/databases/percona55-server/pkg-plist b/databases/percona55-server/pkg-plist index 8d36cf62ba99..6373ea4c127f 100644 --- a/databases/percona55-server/pkg-plist +++ b/databases/percona55-server/pkg-plist @@ -1,6 +1,4 @@ bin/comp_err -bin/isamchk -bin/isamlog bin/my_print_defaults bin/myisam_ftdump bin/myisamchk @@ -22,23 +20,24 @@ bin/mysqld_safe %%NDB%%bin/ndb_show_tables %%NDB%%bin/ndb_test_platform %%NDB%%bin/ndb_waiter -bin/pack_isam bin/perror bin/replace bin/resolve_stack_dump bin/resolveip -etc/rc.d/mysql-server.sh +include/mysql/mysqld_ername.h +include/mysql/mysqld_error.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_config_parameters_debug.h %%NDB%%include/mysql/ndb/mgmapi/mgmapi_debug.h +%%NDB%%include/mysql/ndb/mgmapi/ndb_logevent.h +%%NDB%%include/mysql/ndb/ndb_constants.h +%%NDB%%include/mysql/ndb/ndb_init.h %%NDB%%include/mysql/ndb/ndb_types.h %%NDB%%include/mysql/ndb/ndb_version.h %%NDB%%include/mysql/ndb/ndbapi/Ndb.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbApi.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbBlob.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbConnection.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbCursorOperation.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbDictionary.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbError.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbEventOperation.hpp @@ -48,15 +47,16 @@ etc/rc.d/mysql-server.sh %%NDB%%include/mysql/ndb/ndbapi/NdbPool.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbRecAttr.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbReceiver.hpp -%%NDB%%include/mysql/ndb/ndbapi/NdbResultSet.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanFilter.hpp %%NDB%%include/mysql/ndb/ndbapi/NdbScanOperation.hpp +%%NDB%%include/mysql/ndb/ndbapi/NdbTransaction.hpp %%NDB%%include/mysql/ndb/ndbapi/ndbapi_limits.h %%NDB%%include/mysql/ndb/ndbapi/ndb_cluster_connection.hpp +%%NDB%%include/mysql/ndb/ndbapi/ndb_opt_defaults.h %%NDB%%include/mysql/ndb/ndbapi/ndberror.h +include/mysql/sql_state.h lib/mysql/libdbug.a lib/mysql/libheap.a -lib/mysql/libmerge.a lib/mysql/libmyisam.a lib/mysql/libmyisammrg.a lib/mysql/libmystrings.a @@ -64,7 +64,6 @@ lib/mysql/libmysys.a %%NDB%%lib/mysql/libndbclient.a %%NDB%%lib/mysql/libndbclient.so %%NDB%%lib/mysql/libndbclient.so.0 -lib/mysql/libnisam.a lib/mysql/libvio.a libexec/mysqld %%NDB%%libexec/ndb_cpcd @@ -103,30 +102,19 @@ libexec/mysqld %%DATADIR%%/charsets/macroman.xml %%DATADIR%%/charsets/swe7.xml %%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%%/errmsg.txt %%DATADIR%%/estonian/errmsg.sys -%%DATADIR%%/estonian/errmsg.txt %%DATADIR%%/fill_help_tables.sql %%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 @@ -137,32 +125,22 @@ libexec/mysqld %%DATADIR%%/mysql-log-rotate %%DATADIR%%/mysql-%%VER%%.spec %%DATADIR%%/mysql.server +%%DATADIR%%/ndb-config-2-node.ini %%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%%/serbian/errmsg.sys -%%DATADIR%%/serbian/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 %%NDB%%@dirrm include/mysql/ndb/mgmapi %%NDB%%@dirrm include/mysql/ndb/ndbapi %%NDB%%@dirrm include/mysql/ndb -%%NDB%%@unexec rmdir %D/include/mysql 2> /dev/null || true +@unexec rmdir %D/include/mysql 2> /dev/null || true @unexec rmdir %D/lib/mysql 2> /dev/null || true @dirrm %%DATADIR%%/charsets @dirrm %%DATADIR%%/czech @@ -189,5 +167,4 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @unexec rmdir %D/%%DATADIR%% 2> /dev/null || true -@exec [ -d %%DB_DIR%% ] || %D/bin/mysql_install_db --ldata=%%DB_DIR%% @unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true diff --git a/databases/percona55-server/pkg-plist.client b/databases/percona55-server/pkg-plist.client index ab0454713675..4792277db7f7 100644 --- a/databases/percona55-server/pkg-plist.client +++ b/databases/percona55-server/pkg-plist.client @@ -34,10 +34,8 @@ include/mysql/mysql_com.h include/mysql/mysql_embed.h include/mysql/mysql_time.h include/mysql/mysql_version.h -include/mysql/mysqld_error.h include/mysql/raid.h include/mysql/sql_common.h -include/mysql/sql_state.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h