pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/mysql5-server Upgrade from version 5.0.67 to...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d853afcff23f
branches:  trunk
changeset: 553954:d853afcff23f
user:      he <he%pkgsrc.org@localhost>
date:      Wed Feb 04 21:17:45 2009 +0000

description:
Upgrade from version 5.0.67 to 5.0.67nb1.

Two changes to the rc.d script:
 1) Move the setting of pidfile to a place so that setting mysqld_datadir
    in rc.conf will actually work; otherwise, if you use a non-default
    mysqld_datadir, mysqld will not start.
 2) ad@ pointed me to http://bugs.mysql.com/bug.php?id=18526, and said
    that --skip-thread-priority should not be used on NetBSD, and the
    PR spoke about Darwin / OS/X.  I'm guessing that this might work
    if the host platform is Linux or SunOS (the latter is unconfirmed).
    So add that option to the startup in all other cases.

diffstat:

 databases/mysql5-server/Makefile        |   4 ++--
 databases/mysql5-server/files/mysqld.sh |  15 ++++++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r 6d0469e04589 -r d853afcff23f databases/mysql5-server/Makefile
--- a/databases/mysql5-server/Makefile  Wed Feb 04 18:37:13 2009 +0000
+++ b/databases/mysql5-server/Makefile  Wed Feb 04 21:17:45 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2008/09/18 11:51:37 taca Exp $
+# $NetBSD: Makefile,v 1.26 2009/02/04 21:17:45 he Exp $
 
 PKGNAME=               ${DISTNAME:S/-/-server-/}
-#PKGREVISION=          1
+PKGREVISION=           1
 SVR4_PKGNAME=          mysqs
 COMMENT=               MySQL 5, a free SQL database (server)
 
diff -r 6d0469e04589 -r d853afcff23f databases/mysql5-server/files/mysqld.sh
--- a/databases/mysql5-server/files/mysqld.sh   Wed Feb 04 18:37:13 2009 +0000
+++ b/databases/mysql5-server/files/mysqld.sh   Wed Feb 04 21:17:45 2009 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: mysqld.sh,v 1.2 2007/06/13 13:24:07 xtraeme Exp $
+# $NetBSD: mysqld.sh,v 1.3 2009/02/04 21:17:45 he Exp $
 #
 # PROVIDE: mysqld
 # REQUIRE: DAEMON LOGIN mountall
@@ -27,13 +27,19 @@
 : ${mysqld_user:=@MYSQL_USER@}
 : ${mysqld_group:=@MYSQL_GROUP@}
 : ${mysqld_datadir:=@MYSQL_DATADIR@}
-pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid"
 
 extra_commands="initdb"
 initdb_cmd="mysqld_initdb"
 start_precmd="mysqld_precmd"
 start_cmd="mysqld_start"
 
+# Don't drop thread priority unless on Linux or SunOS
+# ref. http://bugs.mysql.com/bug.php?id=18526
+case $(uname -s) in
+       Linux|SunOS)    thread_flags="";;
+       *)              thread_flags="--skip-thread-priority"
+esac
+
 mysqld_precmd()
 {
        if [ ! -d ${mysqld_datadir}/mysql ]; then
@@ -75,16 +81,19 @@
        ulimit -n 4096
        cd @PREFIX@
        ${command} --user=${mysqld_user} --datadir=${mysqld_datadir} \
-                  --pid-file=${pidfile} ${mysqld_flags} &
+                  --pid-file=${pidfile} ${mysqld_flags} \
+                  ${thread_flags} &
 }
 
 if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
        load_rc_config $name
+       pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid"
        run_rc_command "$1"
 else
        if [ -f /etc/rc.conf ]; then
                . /etc/rc.conf
        fi
+       pidfile="${mysqld_datadir}/`@HOSTNAME_CMD@`.pid"
        case "$1" in
        initdb)
                eval ${initdb_cmd}



Home | Main Index | Thread Index | Old Index