diff options
author | Alex Dupre <ale@FreeBSD.org> | 2005-04-11 09:33:11 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2005-04-11 09:33:11 +0000 |
commit | 34d3ab84b07002b527c3d06f0c7f0c0feb0cc920 (patch) | |
tree | 227d60196fff7615c5ab550cc9dbff39d0955d46 /databases/mysql40-server | |
parent | - ARCH is defined in bsd.port.pre.mk. (diff) |
- Use the rcNG script to kill MySQL on deinstallation [1]
- Set the new sequence for finding my.cnf files [2]:
/etc, ${PREFIX}/etc, ${mysql_dbdir}
(default to: /etc/my.cnf, /usr/local/etc/my.cnf, /var/db/mysql/my.cnf)
- Add the possibility to specify additional command-line arguments
to be passed to mysqld_safe on startup
PR: ports/79166 [1], ports/79597 [2]
Submitted by: Sergey Prikhodko <sergey@network-asp.biz> [1],
Vasil Dimov <vd@datamax.bg> [2]
Notes
Notes:
svn path=/head/; revision=133016
Diffstat (limited to 'databases/mysql40-server')
-rw-r--r-- | databases/mysql40-server/Makefile | 4 | ||||
-rw-r--r-- | databases/mysql40-server/files/mysql-server.sh.in | 5 | ||||
-rw-r--r-- | databases/mysql40-server/files/patch-mysys_default.c | 13 | ||||
-rw-r--r-- | databases/mysql40-server/pkg-plist | 2 |
4 files changed, 21 insertions, 3 deletions
diff --git a/databases/mysql40-server/Makefile b/databases/mysql40-server/Makefile index 6d57034b63e4..fb869a14bacb 100644 --- a/databases/mysql40-server/Makefile +++ b/databases/mysql40-server/Makefile @@ -7,7 +7,7 @@ PORTNAME?= mysql PORTVERSION= 4.0.24 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-4.0 @@ -138,6 +138,7 @@ post-patch: @${REINPLACE_CMD} -e "s|bin_SCRIPTS =|bin_SCRIPTS = @server_scripts@|g" ${WRKSRC}/scripts/Makefile.in @${REINPLACE_CMD} -e "s|man_MANS =|man_MANS = ${MAN1}|g" ${WRKSRC}/man/Makefile.in @${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/include/Makefile.in + @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/mysys/default.c .if defined(WITH_PROC_SCOPE_PTH) @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/libmysqld/lib_sql.cc ${WRKSRC}/sql/mysqld.cc .endif @@ -172,6 +173,7 @@ post-patch: @${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include @sql_client_dirs@ tests scripts man|g" ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e "s|bin_SCRIPTS =|bin_SCRIPTS = mysql_config mysql_fix_privilege_tables mysqlbug|g" ${WRKSRC}/scripts/Makefile.in @${REINPLACE_CMD} -e "s|man_MANS =|man_MANS = ${MAN1}|g" ${WRKSRC}/man/Makefile.in + @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/mysys/default.c .if defined(WITH_PROC_SCOPE_PTH) @${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/tools/mysqlmanager.c .endif diff --git a/databases/mysql40-server/files/mysql-server.sh.in b/databases/mysql40-server/files/mysql-server.sh.in index ec21adb60c2d..f15e9b7669ea 100644 --- a/databases/mysql40-server/files/mysql-server.sh.in +++ b/databases/mysql40-server/files/mysql-server.sh.in @@ -17,6 +17,8 @@ # 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%% @@ -29,12 +31,13 @@ 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} > /dev/null &" +command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --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" diff --git a/databases/mysql40-server/files/patch-mysys_default.c b/databases/mysql40-server/files/patch-mysys_default.c new file mode 100644 index 000000000000..cb2bf3776069 --- /dev/null +++ b/databases/mysql40-server/files/patch-mysys_default.c @@ -0,0 +1,13 @@ +--- mysys/default.c.orig Mon Apr 11 11:15:09 2005 ++++ mysys/default.c Mon Apr 11 11:15:23 2005 +@@ -49,9 +49,7 @@ + "sys:/etc/", + #else + "/etc/", +-#endif +-#ifdef DATADIR +-DATADIR, ++"%%PREFIX%%/etc/", + #endif + "", /* Place for defaults_extra_dir */ + #if !defined(__WIN__) && !defined(__NETWARE__) diff --git a/databases/mysql40-server/pkg-plist b/databases/mysql40-server/pkg-plist index 9d9179e804ed..fffbf4552e43 100644 --- a/databases/mysql40-server/pkg-plist +++ b/databases/mysql40-server/pkg-plist @@ -1,3 +1,4 @@ +@unexec %D/etc/rc.d/mysql-server.sh stop > /dev/null 2>&1 || true bin/comp_err bin/isamchk bin/isamlog @@ -135,4 +136,3 @@ libexec/mysqld @dirrm %%DATADIR%%/swedish @dirrm %%DATADIR%%/ukrainian @dirrm %%DATADIR%% -@unexec /usr/bin/killall mysqld > /dev/null 2>&1 || true |