[csw-devel] SF.net SVN: gar:[17061] csw/mgar/pkg/mysql5/branches/mysql-5.5.x

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Feb 15 14:47:30 CET 2012


Revision: 17061
          http://gar.svn.sourceforge.net/gar/?rev=17061&view=rev
Author:   wahwah
Date:     2012-02-15 13:47:30 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
mysql5/branches/mysql-5.5.x: updated to use CSWmysql5 package family. Work in progress.

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/Makefile
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/README.CSW
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswusergroup
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/quick_start-csw

Added Paths:
-----------
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.postinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.preinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql5.tpl

Removed Paths:
-------------
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.postinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.preinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql55.tpl

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/Makefile	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/Makefile	2012-02-15 13:47:30 UTC (rev 17061)
@@ -11,7 +11,7 @@
 
 
 PROJ_NAME = mysql
-NAME = $(PROJ_NAME)55
+NAME = $(PROJ_NAME)5
 BASE_VERSION = 5.5
 PATCHLEVEL = 20
 ALTS_PRIO = 55
@@ -35,6 +35,9 @@
 endef
 
 # There are problems with the build using Sun Studio.
+# GARCOMPILER = SOS12
+# EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
+# EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 GARCOMPILER = GNU
 
 INITSMF = $(sysconfdir)/init\.d/csw$(NAME)
@@ -42,35 +45,27 @@
 # Existing databases are in this location
 localstatedir = /var$(BUILD_PREFIX)/$(NAME)
 # To avoid file conflicts
-datadir = $(prefix)/share/mysql/$(BASE_VERSION)
+# datadir = $(prefix)/share/mysql/$(BASE_VERSION)
 
 MYSQL_LIB_VER = 18
 
+MERGE_DIRS_isa-extra = $(bindir) $(libdir) $(sbindir) $(libexecdir)
+
 PACKAGES += CSWmysql-dev
 SPKG_DESC_CSWmysql-dev = MySQL development files
 PKGFILES_CSWmysql-dev = $(PKGFILES_DEVEL)
 RUNTIME_DEP_PKGS_CSWmysql-dev += CSWlibmysqlclient-r$(MYSQL_LIB_VER)
 RUNTIME_DEP_PKGS_CSWmysql-dev += CSWlibmysqlclient$(MYSQL_LIB_VER)
 CSWmysql-dev_programs += mysql_config
-PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),$(call baseisadirs,$(bindir),$(bin_name)$(PROGRAM_SUFFIX)))
-PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),$(mandir)/man1/$(bin_name)\.1$(PROGRAM_SUFFIX))
-PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),/opt/csw/bin/$(bin_name)$(PROGRAM_SUFFIX))
-PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),/opt/csw/sbin/$(bin_name)$(PROGRAM_SUFFIX))
+PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSWmysql-dev  += $(foreach bin_name,$(CSWmysql-dev_programs),/opt/csw/sbin/$(bin_name))
 PKGFILES_CSWmysql-dev  += $(mandir)/man1/mysql_config.*
 PKGFILES_CSWmysql-dev  += $(prefix)/include.*
 PKGFILES_CSWmysql-dev  += /opt/csw/include/mysql
-CHECKPKG_OVERRIDES_CSWmysql-dev += file-with-bad-content|/usr/local|root$(mandir)/man1/mysql_config$(PROGRAM_SUFFIX).1
 CHECKPKG_OVERRIDES_CSWmysql-dev += file-with-bad-content|/usr/local|root$(mandir)/man1/mysql_config.1
-# Not sure why this is necessary. All README.CSW should have a version number
-# appended.
-CHECKPKG_OVERRIDES_CSWmysql55 += file-collision|/opt/csw/share/doc/mysql_dev/README.CSW|CSWmysql5|CSWmysql55
-ALTERNATIVES_CSWmysql-dev = mysql_dev
-ALTERNATIVE_mysql_dev = $(bindir)/$(firstword $(CSWmysql-dev_programs)) mysql_dev $(bindir)/$(firstword $(CSWmysql-dev_programs)) $(ALTS_PRIO)
-ALTERNATIVE_mysql_dev += $(foreach C,$(wordlist 2,$(words $(CSWmysql-dev_programs)),$(CSWmysql-dev_programs)),\
-	$(bindir)/$C $C $(bindir)/$C$(PROGRAM_SUFFIX))
-ALTERNATIVE_mysql_dev += $(foreach C,$(wordlist 2,$(words $(CSWmysql-dev_programs)),$(CSWmysql-dev_programs)),\
-	$(mandir)/man1/$(C).1 $C $(mandir)/man1/$(C)$(PROGRAM_SUFFIX).1)
-
+CHECKPKG_OVERRIDES_CSWmysql-dev += file-with-bad-content|/usr/local|root$(mandir)/man1/mysql_config.1
 PATCHFILES += 0003-I-HATE-CMAKE.patch
 PATCHFILES += 0003-WHY-IS-CMAKE-TRYING-TO-BE-SMARTER-THAN-ME.patch
 
@@ -108,10 +103,10 @@
 PACKAGES += CSW$(NAME)client
 SPKG_DESC_CSW$(NAME)client = MySQL $(BASE_VERSION) client binaries
 PKGFILES_CSW$(NAME)client  = $(bindir)
-PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),$(call baseisadirs,$(bindir),$(bin_name)$(PROGRAM_SUFFIX)))
-PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),$(mandir)/man1/$(bin_name)$(PROGRAM_SUFFIX)\.1)
-PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),/opt/csw/bin/$(bin_name)$(PROGRAM_SUFFIX))
-PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),/opt/csw/sbin/$(bin_name)$(PROGRAM_SUFFIX))
+PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(NAME)client += $(foreach bin_name,$(client_programs),/opt/csw/sbin/$(bin_name))
 RUNTIME_DEP_PKGS_CSW$(NAME)client += CSWlibgcc-s1
 # RUNTIME_DEP_PKGS_CSW$(NAME)client += CSWlibmysqlclient$(MYSQL_LIB_VER)
 # RUNTIME_DEP_PKGS_CSW$(NAME)client += CSWlibmysqlclient-r$(MYSQL_LIB_VER)
@@ -142,8 +137,8 @@
 
 EXTRA_MERGE_EXCLUDE_FILES += $(prefix)/mysql-test.*
 EXTRA_MERGE_EXCLUDE_FILES += $(prefix)/sql-bench.*
+EXTRA_MERGE_EXCLUDE_FILES += $(datadir)/mysql-test.*
 
-# PATCHFILES += 0002-cast-user_info-pw_gid-to-gid_t.patch
 
 # Enable 64 bits build
 BUILD64 = 1
@@ -163,7 +158,6 @@
 BUILD_DEP_PKGS += CSWcmake
 BUILD_DEP_PKGS += CSWbison
 
-PROGRAM_SUFFIX = -$(BASE_VERSION)
 # Set ./configure options
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --disable-assembler
@@ -187,16 +181,16 @@
 CONFIGURE_ARGS += --enable-thread-safe-client
 CONFIGURE_ARGS_DBG = --with-debug
 CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GARFLAVOR))
-CONFIGURE_ARGS += --program-suffix=$(PROGRAM_SUFFIX)
 
 # http://forge.mysql.com/wiki/Autotools_to_CMake_Transition_Guide
 CMAKE_ARGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
+CMAKE_ARGS += -DINSTALL_LAYOUT=RPM
 CMAKE_ARGS += -DMYSQL_DATADIR=$(localstatedir)
 CMAKE_ARGS += -DSYSCONFDIR=$(sysconfdir)
-CMAKE_ARGS += -DINSTALL_BINDIR=$(subst $(prefix)/,,$(bindir))
-CMAKE_ARGS += -DINSTALL_SBINDIR=$(subst $(prefix)/,,$(libexecdir))
-CMAKE_ARGS += -DINSTALL_MANDIR=$(subst $(prefix)/,,$(mandir))
-CMAKE_ARGS += -DINSTALL_LIBDIR=$(subst $(prefix)/,,$(libdir))
+# CMAKE_ARGS += -DINSTALL_BINDIR=$(subst $(prefix)/,,$(bindir))
+# CMAKE_ARGS += -DINSTALL_SBINDIR=$(subst $(prefix)/,,$(libexecdir))
+# CMAKE_ARGS += -DINSTALL_MANDIR=$(subst $(prefix)/,,$(mandir))
+# CMAKE_ARGS += -DINSTALL_LIBDIR=$(subst $(prefix)/,,$(libdir))
 CMAKE_ARGS += -DINSTALL_PLUGINDIR=$(subst $(prefix)/,,$(libdir))/$(NAME)/$(MM_LIBDIR)/plugin
 CMAKE_ARGS += -DWITH_READLINE=1
 CMAKE_ARGS += -DWITH_SSL=system
@@ -235,7 +229,7 @@
 CHECKPKG_OVERRIDES_CSW$(NAME)test += file-with-bad-content
 CHECKPKG_OVERRIDES_CSW$(NAME)test += surplus-dependency|CSW$(NAME)
 
-CHECKPKG_OVERRIDES_CSW$(NAME)client += file-with-bad-content|/usr/local|root$(prefix)/share/man/man1/mysqlaccess$(PROGRAM_SUFFIX).1
+CHECKPKG_OVERRIDES_CSW$(NAME)client += file-with-bad-content|/usr/local|root$(prefix)/share/man/man1/mysqlaccess.1
 # This could be reviewed.
 CHECKPKG_OVERRIDES_CSW$(NAME) += file-with-bad-content
 
@@ -280,22 +274,6 @@
 EXECUTABLES += resolve_stack_dump
 EXECUTABLES += resolveip
 
-ALTERNATIVES_CSW$(NAME) = mysql$(BASE_VERSION)_main
-ALTERNATIVE_mysql$(BASE_VERSION)_main = $(bindir)/$(firstword $(EXECUTABLES)) mysql_main $(bindir)/$(firstword $(EXECUTABLES))$(PROGRAM_SUFFIX) $(ALTS_PRIO)
-ALTERNATIVE_mysql$(BASE_VERSION)_main += $(foreach C,$(wordlist 2,$(words $(EXECUTABLES)),$(EXECUTABLES)),\
-	$(bindir)/$C $C $(bindir)/$C$(PROGRAM_SUFFIX))
-
-ALTERNATIVES_CSW$(NAME)client = mysql$(BASE_VERSION)_client
-ALTERNATIVE_mysql$(BASE_VERSION)_client = $(bindir)/$(firstword $(client_programs)) mysql_client $(bindir)/$(firstword $(client_programs)) $(ALTS_PRIO)
-ALTERNATIVE_mysql$(BASE_VERSION)_client += $(foreach C,$(wordlist 2,$(words $(client_programs)),$(client_programs)),\
-	$(bindir)/$C $C $(bindir)/$C$(PROGRAM_SUFFIX))
-ALTERNATIVE_mysql$(BASE_VERSION)_client += $(foreach C,$(wordlist 2,$(words $(client_programs)),$(client_programs)),\
-	$(mandir)/man1/$(C).1 $C $(mandir)/man1/$(C)$(PROGRAM_SUFFIX).1)
-
-# These are harmless, although it would be nice to clean them up eventually.
-# Help appreciated?
-CHECKPKG_OVERRIDES_CSWmysql51 += file-collision|/opt/csw/share/info/mysql.info|CSWmysql5|CSWmysql51
-
 CONFIGURE_SCRIPTS = custom
 
 include gar/category.mk
@@ -329,15 +307,13 @@
 	@$(MAKECOOKIE)
 
 post-install-modulated:
-	# (cd $(DESTDIR)$(libdir); gmv -v mysql/* .)
-	# (cd $(DESTDIR)$(libdir); grmdir -v mysql)
 	ginstall -m 755 -d $(DESTDIR)$(sysconfdir)/init.d
 	ginstall -m 755 $(WORKDIR)/csw$(NAME) $(DESTDIR)$(sysconfdir)/init.d
-	# Add versions to binary names
-	for f in $(EXECUTABLES); do \
-		gmv -v "$(DESTDIR)$(bindir)/$${f}" \
-		       "$(DESTDIR)$(bindir)/$${f}$(PROGRAM_SUFFIX)"; \
-	done
+	# # Add versions to binary names
+	# for f in $(EXECUTABLES); do \
+	# 	gmv -v "$(DESTDIR)$(bindir)/$${f}" \
+	# 	       "$(DESTDIR)$(bindir)/$${f}"; \
+	# done
 	(cd $(DESTDIR)$(libdir); rm libmysqlclient_r.so.18; \
 		ln -s libmysqlclient.so.18 libmysqlclient_r.so.18)
 	(cd $(DESTDIR)$(libdir); rm libmysqlclient_r.so.18.0.0; \
@@ -353,14 +329,12 @@
 	ginstall -m 755 -d $(PKGROOT)/opt/csw/share/$(NAME)/doc
 	gln -sf ../../../$(NAME)/share/$(NAME)/doc/README-$(BASE_VERSION).CSW \
 		$(PKGROOT)/opt/csw/share/$(NAME)/doc/README-$(BASE_VERSION).CSW
-	[ -d $(PKGROOT)$(datadir)/mysql55 ]
-	ginstall -m 755 $(FILEDIR)/quick_start-csw $(PKGROOT)$(datadir)/mysql55
+	# The quick_start-csw file is almost the same as postinstall.
+	# [ -d $(PKGROOT)$(datadir)/mysql ]
+	# ginstall -m 755 $(FILEDIR)/quick_start-csw $(PKGROOT)$(datadir)/mysql
 	ginstall -m 755 -d $(PKGROOT)$(sysconfdir)/pkg/CSW$(NAME)
 	ginstall -m 644 $(FILEDIR)/cswusergroup \
 		        $(PKGROOT)$(sysconfdir)/pkg/CSW$(NAME)
 	# http://www.opencsw.org/bugtrack/view.php?id=4149
 	ginstall -m 755 -d $(PKGROOT)$(sysconfdir)
 	@$(MAKECOOKIE)
-
-# We need the GNU userland (nobody knows why)
-PATH := /opt/csw/gnu:$(PATH)

Copied: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.postinstall (from rev 16958, csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.postinstall)
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.postinstall	                        (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.postinstall	2012-02-15 13:47:30 UTC (rev 17061)
@@ -0,0 +1,106 @@
+#!/bin/ksh -p
+#
+# $Id$
+#
+# initial version for blastwave.org by Alex Moore 2006.02.25
+# Revised 2006.03.25 - see bug report 0001542
+#
+# This script creates a default database with the small-memory footprint.
+# Input may be provided for DATADIR and DEFAULTS_FILE
+#
+# http://dev.mysql.com/doc/refman/5.0/en/option-files.html
+#
+prefix="/opt/csw"
+BASEDIR="${prefix}"
+MYSQL_HOME="/var${prefix}/mysql5"
+sysconfdir="/etc${prefix}"
+# https://www.opencsw.org/mantis/view.php?id=4646
+DEFAULTS_FILE="${prefix}/share/mysql/my-small.cnf"
+MYSQLD_USER="mysql"
+# Provide the default data directory
+MYSQLD_DATADIR="${MYSQL_HOME}"
+DEPRECATED_DEFAULTS_FILE="${BASEDIR}/my.cnf"
+
+# http://bugs.mysql.com/bug.php?id=31164
+# ERROR: 1004  Can't create file '/var/tmp//installRJaiQ3/#sql6fee_1_0.frm' (errno: 13)
+unset TMPDIR
+
+if [ -r "${DEPRECATED_DEFAULTS_FILE}" ]; then
+  echo "*** WARNING ***"
+  echo "File '${DEPRECATED_DEFAULTS_FILE}' found. This location is deprecated."
+  echo "This file takes no effect."
+fi
+
+if [ ! -f "$DEFAULTS_FILE" ]; then
+    IN_DEFAULTS_FILE=$BASEDIR/share/mysql/my-small.cnf
+    echo "Using $IN_DEFAULTS_FILE to create the options file."
+else
+    IN_DEFAULTS_FILE=$DEFAULTS_FILE
+    echo "Using $DEFAULTS_FILE as the options file."
+fi
+
+if [ -d "$MYSQLD_DATADIR/mysql" ]; then
+    echo "mysql database already exists."
+    echo "Leaving script without initializing a database."
+    exit 0
+fi
+
+echo  "Setting up the database"
+# Create the database directory and set the permissions if needed
+if [ ! -d "$MYSQLD_DATADIR" ] ; then
+    mkdir -p $MYSQLD_DATADIR
+    chown -R mysql:mysql $MYSQLD_DATADIR
+    chmod 0700 $MYSQLD_DATADIR
+fi
+#
+# copy the configuration file if not exists.
+CNFCOPIED=no
+if [ ! -f "$DEFAULTS_FILE" ] ; then
+    cp -p $IN_DEFAULTS_FILE $DEFAULTS_FILE
+    CNFCOPIED=yes
+fi
+#
+# Run the mysql script to create the database
+echo "Creating MySQL core database in $MYSQLD_DATADIR"
+echo
+echo "###  The following messages are from mysql_install_db."
+"$BASEDIR/bin/mysql_install_db" \
+    --defaults-extra-file="$DEFAULTS_FILE" \
+    --user="$MYSQLD_USER" \
+    --basedir="$BASEDIR" \
+    --datadir="$MYSQLD_DATADIR"
+
+# Fix permissions on the data directory, since mysql_install_db was run as
+# root.
+chown -R ${MYSQLD_USER}:mysql $MYSQLD_DATADIR
+
+# Update --datadir in the cnf file with the correct value if file was copied
+if [ x"$CNFCOPIED" = xyes ]; then
+    sed -e "s|/var/opt/csw/mysql5|$MYSQLD_DATADIR|g" $DEFAULTS_FILE >$DEFAULTS_FILE.new
+    mv $DEFAULTS_FILE.new $DEFAULTS_FILE
+fi
+
+# Ending message
+echo
+echo "###  The following messages are from $0."
+echo "See /opt/csw/mysql5/share/mysql/doc/README.CSW for packaging changes."
+echo "Please ignore references to starting mysqld_safe in the messages above."
+echo "  These messages are from mysql_install_db.  See the following"
+echo "  for starting CSWmysql5."
+smf=no
+if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] ; then smf=yes ; fi
+if [ $smf = yes ]
+then
+	echo "Running \`svcadm enable cswmysql5\` start to start the database."
+  # First, we clear the status, since it's likely to be 'maintenance'.
+  svcadm disable cswmysql5
+  svcadm clear cswmysql5
+  svcadm enable cswmysql5
+else
+  echo "Running \`/etc/opt/csw/init.d/cswmysql\` start to start the database."
+  /etc/opt/csw/init.d/cswmysql start
+fi
+
+exit 0
+
+# vim:set ts=2 sw=2 sts=2 expandtab:

Copied: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.preinstall (from rev 16958, csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.preinstall)
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.preinstall	                        (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql5.preinstall	2012-02-15 13:47:30 UTC (rev 17061)
@@ -0,0 +1,40 @@
+#!/bin/sh
+# vim:set sw=2 ts=2 sts=2 expandtab:
+#
+# $Id$
+#
+
+obsolete_directories="/opt/csw/mysql5/var:/var/opt/csw/mysql5"
+
+obsolete_dir_information="
+This directory is obsolete.  Files in this directory are going to be ignored.
+Please move your data to the new location.
+
+Feel free to remove this file afterwards.
+"
+obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
+
+for dirpair in ${obsolete_directories}; do
+  obsolete_dir=`echo ${dirpair} | cut -d: -f1`
+  new_dir=`echo ${dirpair} | cut -d: -f2`
+  if [ -d "${PKG_INSTALL_ROOT}${obsolete_dir}" ]; then
+    echo
+    echo "*******************************************************************"
+    echo "* The old configuration directory ${obsolete_dir} still exists.    "
+    echo "* Please move your configuration to ${new_dir}.                    "
+    echo "*                                                                  "
+    echo "*       Installation will continue in 10 seconds.                  "
+    echo "*         Press CTRL+C if you want to stop now.                    "
+    echo "*******************************************************************"
+    echo
+    sleep 10
+
+    # Leaving a note for the sysadmin if the they proceed with the installation.
+    fn="${PKG_INSTALL_ROOT}${obsolete_dir}/${obsolete_dir_file_name}"
+    if touch "${fn}" 2>/dev/null; then
+      echo "${obsolete_dir_information}" > "${fn}"
+    fi
+  fi
+done
+
+exit 0

Deleted: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.postinstall
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.postinstall	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.postinstall	2012-02-15 13:47:30 UTC (rev 17061)
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-
-MYSQLDATADIR=/var/opt/csw/mysql51
-if [ ! -d "${MYSQLDATADIR}/mysql" ] ; then
-  echo "No database directory found in the default location:"
-  echo "${MYSQLDATADIR}/mysql"
-  echo "If you need to build the initial database directory,"
-  echo "  see /opt/csw/mysql5/share/mysql/quick_start-csw"
-  echo "If you are using a non-default database directory location,"
-  echo "  please start mysql manually."
-  exit 0
-fi

Deleted: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.preinstall
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.preinstall	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/CSWmysql55.preinstall	2012-02-15 13:47:30 UTC (rev 17061)
@@ -1,40 +0,0 @@
-#!/bin/sh
-# vim:set sw=2 ts=2 sts=2 expandtab:
-#
-# $Id$
-#
-
-obsolete_directories="/opt/csw/mysql51/var:/var/opt/csw/mysql51"
-
-obsolete_dir_information="
-This directory is obsolete.  Files in this directory are going to be ignored.
-Please move your data to the new location.
-
-Feel free to remove this file afterwards.
-"
-obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
-
-for dirpair in ${obsolete_directories}; do
-  obsolete_dir=`echo ${dirpair} | cut -d: -f1`
-  new_dir=`echo ${dirpair} | cut -d: -f2`
-  if [ -d "${PKG_INSTALL_ROOT}${obsolete_dir}" ]; then
-    echo
-    echo "*******************************************************************"
-    echo "* The old configuration directory ${obsolete_dir} still exists.    "
-    echo "* Please move your configuration to ${new_dir}.                    "
-    echo "*                                                                  "
-    echo "*       Installation will continue in 10 seconds.                  "
-    echo "*         Press CTRL+C if you want to stop now.                    "
-    echo "*******************************************************************"
-    echo
-    sleep 10
-
-    # Leaving a note for the sysadmin if the they proceed with the installation.
-    fn="${PKG_INSTALL_ROOT}${obsolete_dir}/${obsolete_dir_file_name}"
-    if touch "${fn}" 2>/dev/null; then
-      echo "${obsolete_dir_information}" > "${fn}"
-    fi
-  fi
-done
-
-exit 0

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/README.CSW
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/README.CSW	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/README.CSW	2012-02-15 13:47:30 UTC (rev 17061)
@@ -1,60 +1,12 @@
 [[needs review]]
 
-MySQL 5.1 OpenCSW package
+MySQL 5.5 OpenCSW package
 =======================
 
-* http://www.opencsw.org/packages/mysql51
-
-The package has been reworked from the ground up, using GAR.  Up until this
-moment, the mysql5 package was in the version from before the fork.  The new
-packages are created so that they are as close to the original ones as
-possible, but some changes are inevitable, and some other changes were
-considered necessary.
-
 * Read only /opt/csw support
   - data in /var/opt/csw
   - configuration in /etc/opt/csw
-* The prefix is still /opt/csw/mysql51, but all the binaries are now linked from
+* The prefix is /opt/csw, and all the binaries are now in
   /opt/csw, so that the standard PATH setting allows to use them
 * The startup script is now in /etc/opt/csw/init.d
 * SMF support is handled by cswclassutils
-
-
-Here are the old notes from the previous maintainer, Alex Moore:
-
---------------8<----------------8<--------------------8<------------------------
-
-If you are not using the default location for --datadir, package installation
-  will NOT start CSWmysql5.  More code is needed for that.  I welcome patches.
-
-If you are not using the default location for --datadir, you will find
-  that CSWmysql5 works much better when you create /etc/my.cnf with at
-  least the entries that follow.  You may also want some entries in this
-  global options file for client programs that you use.
-  For example: --datadir is /db/mysql5/var
-  Create /etc/my.cnf with the following entries:
-    # Global MySQL options file.
-    [mysqld]
-    datadir         = /db/mysql5/var
-    basedir         = /opt/csw/mysql5
-
-I also changed the option for --defaults-file to --defaults-extra-file
-  in the startup script.
-  This allows your options file to be read after the global options file
-  /etc/my.cnf.
-
-Note that if you are using the default location for --datadir, you do not
-  really need /etc/opt/csw/mysql5rc.  In this case, you should put any options
-  in the appropriate group in my.cnf.  See the MySQL documentation for
-  details.
-
-If you are not using the default location for --datadir, you only need
-  /etc/opt/csw/mysql5rc for the startup script options for
-  --defaults-extra-file and possibly --pid-file.  All other options may be
-  put in the appropriate group in my.cnf
-
-Click 'Views and info' on the package page at
-  http://www.opencsw.org/packages.php/mysql5
-for the latest information.
-
-Alex Moore

Copied: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql5.tpl (from rev 16958, csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql55.tpl)
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql5.tpl	                        (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql5.tpl	2012-02-15 13:47:30 UTC (rev 17061)
@@ -0,0 +1,206 @@
+#!/bin/sh
+# vim:ft=sh:
+#
+# $Id$
+# Start script for MySQL database.
+#
+# NOTE: Make sure DB_DIR is owned BY the mysql user and group and chmod
+# 700.
+#
+# First time installation can use quick_start-csw in
+#   /opt/csw/mysql5/share/mysql to build the mysql database for the
+#   grant tables.  Or create the initial database yourself.
+#
+# Use my.cnf for startup options.  See MySQL documention
+#   for 'Using Option Files'.
+# Support for mysql5rc still remains in this startup script.
+#
+
+RETVAL=0
+prefix="@prefix@"
+BASEDIR="${prefix}"
+BINDIR="@bindir@"
+MYSQL_VAR="@localstatedir@"
+sysconfdir="@sysconfdir@"
+BASE_VERSION="@BASE_VERSION@"
+MYSQLD_DATADIR=$MYSQL_VAR
+MYSQLD_PID_FILE=$MYSQL_VAR/mysql.pid
+CONFFILE=${sysconfdir}/my.cnf
+
+# Source the configuration
+[ -r /opt/csw/mysql5/etc/mysql5rc ] && . /opt/csw/mysql5/etc/mysql5rc
+[ -r @prefix@/etc/mysql5rc ] && . @prefix@/etc/mysql5rc
+[ -r /etc/opt/csw/mysql5rc ] && . /etc/opt/csw/mysql5rc
+
+if [ -r "${sysconfdir}/my.cnf" ]; then
+  MYSQL_HOME="${MYSQL_VAR}"
+elif [ -r "${BASEDIR}/my.cnf" ]; then
+  MYSQL_HOME="${BASEDIR}"
+fi
+export MYSQL_HOME
+
+# To get started quickly, copy a sample configuration file from
+#   $BASEDIR/share/mysql
+# For example,
+#  cp /opt/csw/mysql5/share/mysql/my-medium.cnf /opt/csw/mysql5/var/my.cnf
+#
+# Or, manually follow the database creation steps below, and have
+# mysql just use defaults for everything.
+
+# 2006-03-11 Changed to only look for the grant tables database
+# 2006-04-16 Changed again.  Look for either the grant tables database
+#            or the options file.
+# 2006-12-28 Fix problem.  Look for either the grant tables database in
+#            the default location or the default options file.
+if [ ! -d "$MYSQLD_DATADIR/mysql" -a ! -f "$CONFFILE" ] ; then
+    exit 0
+fi
+
+# If CONFFILE is the server default file, unset CONFFILE
+if [ "${CONFFILE}" = "${MYSQL_HOME}/my.cnf" \
+      -o \
+     "${CONFFILE}" = "${sysconfdir}/my.cnf" ]; then
+    CONFFILE=
+fi
+
+# If MYSQLD_DATADIR does not contain a mysql directory, unset MYSQLD_DATADIR
+# Also, check that MYSQLD_DATADIR contains a mysql directory
+if [ ! -d "$MYSQL_HOME/mysql" -a ! -d "$MYSQLD_DATADIR/mysql" ] ; then
+    MYSQLD_DATADIR=
+fi
+
+# Make sure required vars are set
+MYSQLD_PID_FILE=${MYSQLD_PID_FILE:=$MYSQL_HOME/mysql.pid}
+
+# If a database already exists, start whether or not there is a conf file.
+# If no conf file, the database will just use internal defaults for everything.
+
+start_it() {
+    if test -r $MYSQLD_PID_FILE ; then
+        if kill -0 `cat $MYSQLD_PID_FILE` > /dev/null 2>&1 ; then
+            echo "${MYSQLD_PROG} (`cat $MYSQLD_PID_FILE`) seems to be running."
+            return 1
+        fi
+    fi
+
+    printf "%-60s" "Starting ${MYSQLD_PROG}: "
+
+    # 2006-03-11
+    # This script no longer creates the default database. You may create the
+    # default database manually or use
+    # /opt/csw/mysql5/share/mysql/quick_start-csw
+    #    if [ ! -d "$BASEDIR/var/mysql" ] ; then
+    #        echo MySQL core database has not been created.
+    #         echo Creating it now...
+    #       $BASEDIR/bin/mysql_install_db
+    #       chown -R mysql:mysql $BASEDIR/var
+    #    fi
+
+    # 2006-04-16  --defaults-file is changed to --defaults-extra-file
+    ${BINDIR}/mysqld_safe \
+        `[ -n "$CONFFILE" ] && echo "--defaults-extra-file=$CONFFILE"` \
+        --pid-file=$MYSQLD_PID_FILE \
+        `[ -n "$MYSQLD_PROG" ] && echo "--mysqld=$MYSQLD_PROG"` \
+        `[ -n "$MYSQLD_ANSI" ] && echo "--ansi"` \
+        `[ -n "$MYSQLD_BASEDIR" ] && echo "--basedir=$MYSQLD_BASEDIR"` \
+        `[ -n "$MYSQLD_BIG_TABLES" ] && echo "--big-tables"` \
+        `[ -n "$MYSQLD_BIND_ADDRESS" ] && echo "--bind-address=$MYSQLD_BIND_ADDRESS"` \
+        `[ -n "$MYSQLD_CHARACTER_SETS" ] && echo "--character-sets-dir=$MYSQLD_CHARACTER_SETS"` \
+        `[ -n "$MYSQLD_CHROOT" ] && echo "--chroot=$MYSQLD_CHROOT"` \
+        `[ -n "$MYSQLD_DATADIR" ] && echo "--datadir=$MYSQLD_DATADIR"` \
+        `[ -n "$MYSQLD_DEFAULT_CHARSET" ] && echo "--default-character-set=$MYSQLD_DEFAULT_CHARSET"` \
+        `[ -n "$MYSQLD_DEFAULT_TABLE_TYPE" ] && echo "--default-table-type=$MYSQLD_DEFAULT_TABLE_TYPE"` \
+        `[ -n "$MYSQLD_DELAY_KEY_WRITE_TABLES" ] && echo "--delay-key-write-for-all-tables"` \
+        `[ -n "$MYSQLD_ENABLE_LOCKING" ] && echo "--enable-locking"` \
+        `[ -n "$MYSQLD_EXIT_INFO" ] && echo "--exit-info"` \
+        `[ -n "$MYSQLD_FLUSH" ] && echo "--flush"` \
+        `[ -n "$MYSQLD_INIT_FILE" ] && echo "--init-file=$MYSQLD_INIT_FILE"` \
+        `[ -n "$MYSQLD_LANGUAGE" ] && echo "--language=$MYSQLD_LANGUAGE"` \
+        `[ -n "$MYSQLD_LOG" ] && echo "--log=$MYSQLD_LOG"` \
+        `[ -n "$MYSQLD_LOG_ISAM" ] && echo "--log-isam=$MYSQLD_LOG_ISAM"` \
+        `[ -n "$MYSQLD_LOG_SLOW_QUERIES" ] && echo "--log-slow-queries=$MYSQLD_LOG_SLOW_QUERIES"` \
+        `[ -n "$MYSQLD_LOG_UPDATE" ] && echo "--log-update=$MYSQLD_LOG_UPDATE"` \
+        `[ -n "$MYSQLD_LOG_LONG_FORMAT" ] && echo "--log-long-format"` \
+        `[ -n "$MYSQLD_LOW_PRIORITY_UPDATES" ] && echo "--low-priority-updates"` \
+        `[ -n "$MYSQLD_MEMLOCK" ] && echo "--memlock"` \
+        `[ -n "$MYSQLD_MYISAM_RECOVER" ] && echo "--myisam-recover=$MYSQLD_MYISAM_RECOVER"` \
+        `[ -n "$MYSQLD_PORT" ] && echo "--port=$MYSQLD_PORT"` \
+        `[ -n "$MYSQLD_OLD_PROTOCOL" ] && echo "--old-protocol"` \
+        `[ -n "$MYSQLD_ONE_THREAD" ] && echo "--one-thread"` \
+        `[ -n "$MYSQLD_SET_VARIABLE" ] && echo "--set-variablevar=$MYSQLD_SET_VARIABLE"` \
+        `[ -n "$MYSQLD_SKIP_GRANT_TABLES" ] && echo "--skip-grant-tables"` \
+        `[ -n "$MYSQLD_SAFE_MODE" ] && echo "--safe-mode"` \
+        `[ -n "$MYSQLD_SECURE" ] && echo "--secure"` \
+        `[ -n "$MYSQLD_SKIP_CONCURRENT_INSERT" ] && echo "--skip-concurrent-insert"` \
+        `[ -n "$MYSQLD_SKIP_DELAY_KEY_WRITE" ] && echo "--skip-delay-key-write"` \
+        `[ -n "$MYSQLD_SKIP_LOCKING" ] && echo "--skip-locking"` \
+        `[ -n "$MYSQLD_SKIP_NAME_RESOLVE" ] && echo "--skip-name-resolve"` \
+        `[ -n "$MYSQLD_SKIP_NETWORKING" ] && echo "--skip-networking"` \
+        `[ -n "$MYSQLD_SKIP_NEW" ] && echo "--skip-new"` \
+        `[ -n "$MYSQLD_SKIP_HOST_CACHE" ] && echo "--skip-host-cache"` \
+        `[ -n "$MYSQLD_SKIP_SHOW_DATABASE" ] && echo "--skip-show-database"` \
+        `[ -n "$MYSQLD_SKIP_THREAD_PRIORITY" ] && echo "--skip-thread-priority"` \
+        `[ -n "$MYSQLD_SOCKET" ] && echo "--socket=$MYSQLD_SOCKET"` \
+        `[ -n "$MYSQLD_TMPDIR" ] && echo "--tmpdir=$MYSQLD_TMPDIR"` \
+        `[ -n "$MYSQLD_USER" ] && echo "--user=$MYSQLD_USER"` \
+        & >/dev/null 2>&1
+    RETVAL=$?
+    if [ $RETVAL = 0 ] ; then
+        echo "[  OK  ]"
+    else
+        echo "[FAILED]"
+        return 1
+    fi
+    return 0
+}
+
+stop_it() {
+
+    printf "%-60s" "Shutting down mysqld: "
+    if test -f "$MYSQLD_PID_FILE" ; then
+        pkill `pgrep_opts` mysqld_safe >/dev/null 2>&1
+        kill `cat $MYSQLD_PID_FILE` >/dev/null 2>&1
+        RETVAL=$?
+    else
+        RETVAL=1
+    fi
+    if [ $RETVAL = 0 ] ; then
+        echo "[  OK  ]"
+    else
+        echo "[FAILED]"
+    fi
+    echo ""
+    return 0
+}
+
+pgrep_opts() {
+  if [ -x /bin/zonename ]
+  then
+    echo "-z `/bin/zonename`"
+  fi
+}
+
+case $1 in
+    start)
+    start_it
+    ;;
+
+    stop)
+    stop_it
+    ;;
+
+    restart)
+    stop_it
+    while pgrep `pgrep_opts` ${MYSQLD_PROG} > /dev/null
+      do
+      sleep 1
+    done
+    start_it
+    ;;
+
+    *)
+    echo "Usage: $0  { start | stop | restart } "
+    ;;
+esac
+
+exit $RETVAL

Deleted: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql55.tpl
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql55.tpl	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswmysql55.tpl	2012-02-15 13:47:30 UTC (rev 17061)
@@ -1,208 +0,0 @@
-#!/bin/sh
-# vim:ft=sh:
-#
-# $Id$
-# Start script for MySQL database.
-#
-# NOTE: Make sure DB_DIR is owned BY the mysql user and group and chmod
-# 700.
-#
-# First time installation can use quick_start-csw in
-#   /opt/csw/mysql55/share/mysql to build the mysql database for the
-#   grant tables.  Or create the initial database yourself.
-#
-# Use my.cnf for startup options.  See MySQL documention
-#   for 'Using Option Files'.
-# Support for mysql55rc still remains in this startup script.
-#
-
-RETVAL=0
-prefix="@prefix@"
-BASEDIR="${prefix}"
-BINDIR="@bindir@"
-MYSQL_VAR="@localstatedir@"
-sysconfdir="@sysconfdir@"
-BASE_VERSION="@BASE_VERSION@"
-MYSQLD_DATADIR=$MYSQL_VAR
-MYSQLD_PID_FILE=$MYSQL_VAR/mysql.pid
-CONFFILE=${sysconfdir}/my.cnf
-MYSQLD_PROG=${MYSQLD_PROG:-mysqld-${BASE_VERSION}}
-
-# Source the configuration
-[ -r /opt/csw/mysql5/etc/mysql5rc ] && . /opt/csw/mysql5/etc/mysql5rc
-[ -r @prefix@/etc/mysql5rc ] && . @prefix@/etc/mysql5rc
-[ -r /etc/opt/csw/mysql5rc ] && . /etc/opt/csw/mysql5rc
-
-if [ -r "${sysconfdir}/my.cnf" ]; then
-  MYSQL_HOME="${MYSQL_VAR}"
-elif [ -r "${BASEDIR}/my.cnf" ]; then
-  MYSQL_HOME="${BASEDIR}"
-fi
-export MYSQL_HOME
-
-# To get started quickly, copy a sample configuration file from
-#   $BASEDIR/share/mysql
-# For example,
-#  cp /opt/csw/mysql5/share/mysql/my-medium.cnf /opt/csw/mysql5/var/my.cnf
-#
-# Or, manually follow the database creation steps below, and have
-# mysql just use defaults for everything.
-
-# 2006-03-11 Changed to only look for the grant tables database
-# 2006-04-16 Changed again.  Look for either the grant tables database
-#            or the options file.
-# 2006-12-28 Fix problem.  Look for either the grant tables database in
-#            the default location or the default options file.
-if [ ! -d "$MYSQLD_DATADIR/mysql" -a ! -f "$CONFFILE" ] ; then
-    exit 0
-fi
-
-# If CONFFILE is the server default file, unset CONFFILE
-if [ "${CONFFILE}" = "${MYSQL_HOME}/my.cnf" \
-      -o \
-     "${CONFFILE}" = "${sysconfdir}/my.cnf" ]; then
-    CONFFILE=
-fi
-
-# If MYSQLD_DATADIR does not contain a mysql directory, unset MYSQLD_DATADIR
-# Also, check that MYSQLD_DATADIR contains a mysql directory
-if [ ! -d "$MYSQL_HOME/mysql" -a ! -d "$MYSQLD_DATADIR/mysql" ] ; then
-    MYSQLD_DATADIR=
-fi
-
-# Make sure required vars are set
-MYSQLD_PID_FILE=${MYSQLD_PID_FILE:=$MYSQL_HOME/mysql.pid}
-
-# If a database already exists, start whether or not there is a conf file.
-# If no conf file, the database will just use internal defaults for everything.
-
-start_it() {
-    if test -r $MYSQLD_PID_FILE ; then
-        if kill -0 `cat $MYSQLD_PID_FILE` > /dev/null 2>&1 ; then
-            echo "${MYSQLD_PROG} (`cat $MYSQLD_PID_FILE`) seems to be running."
-            return 1
-        fi
-    fi
-
-    printf "%-60s" "Starting ${MYSQLD_PROG}: "
-
-    # 2006-03-11
-    # This script no longer creates the default database. You may create the
-    # default database manually or use
-    # /opt/csw/mysql5/share/mysql/quick_start-csw
-    #    if [ ! -d "$BASEDIR/var/mysql" ] ; then
-    #        echo MySQL core database has not been created.
-    #         echo Creating it now...
-    #       $BASEDIR/bin/mysql_install_db
-    #       chown -R mysql:mysql $BASEDIR/var
-    #    fi
-
-    # 2006-04-16  --defaults-file is changed to --defaults-extra-file
-    ${BINDIR}/mysqld_safe-${BASE_VERSION} \
-        --mysqld-version=${BASE_VERSION} \
-        `[ -n "$CONFFILE" ] && echo "--defaults-extra-file=$CONFFILE"` \
-        --pid-file=$MYSQLD_PID_FILE \
-        `[ -n "$MYSQLD_PROG" ] && echo "--mysqld=$MYSQLD_PROG"` \
-        `[ -n "$MYSQLD_ANSI" ] && echo "--ansi"` \
-        `[ -n "$MYSQLD_BASEDIR" ] && echo "--basedir=$MYSQLD_BASEDIR"` \
-        `[ -n "$MYSQLD_BIG_TABLES" ] && echo "--big-tables"` \
-        `[ -n "$MYSQLD_BIND_ADDRESS" ] && echo "--bind-address=$MYSQLD_BIND_ADDRESS"` \
-        `[ -n "$MYSQLD_CHARACTER_SETS" ] && echo "--character-sets-dir=$MYSQLD_CHARACTER_SETS"` \
-        `[ -n "$MYSQLD_CHROOT" ] && echo "--chroot=$MYSQLD_CHROOT"` \
-        `[ -n "$MYSQLD_DATADIR" ] && echo "--datadir=$MYSQLD_DATADIR"` \
-        `[ -n "$MYSQLD_DEFAULT_CHARSET" ] && echo "--default-character-set=$MYSQLD_DEFAULT_CHARSET"` \
-        `[ -n "$MYSQLD_DEFAULT_TABLE_TYPE" ] && echo "--default-table-type=$MYSQLD_DEFAULT_TABLE_TYPE"` \
-        `[ -n "$MYSQLD_DELAY_KEY_WRITE_TABLES" ] && echo "--delay-key-write-for-all-tables"` \
-        `[ -n "$MYSQLD_ENABLE_LOCKING" ] && echo "--enable-locking"` \
-        `[ -n "$MYSQLD_EXIT_INFO" ] && echo "--exit-info"` \
-        `[ -n "$MYSQLD_FLUSH" ] && echo "--flush"` \
-        `[ -n "$MYSQLD_INIT_FILE" ] && echo "--init-file=$MYSQLD_INIT_FILE"` \
-        `[ -n "$MYSQLD_LANGUAGE" ] && echo "--language=$MYSQLD_LANGUAGE"` \
-        `[ -n "$MYSQLD_LOG" ] && echo "--log=$MYSQLD_LOG"` \
-        `[ -n "$MYSQLD_LOG_ISAM" ] && echo "--log-isam=$MYSQLD_LOG_ISAM"` \
-        `[ -n "$MYSQLD_LOG_SLOW_QUERIES" ] && echo "--log-slow-queries=$MYSQLD_LOG_SLOW_QUERIES"` \
-        `[ -n "$MYSQLD_LOG_UPDATE" ] && echo "--log-update=$MYSQLD_LOG_UPDATE"` \
-        `[ -n "$MYSQLD_LOG_LONG_FORMAT" ] && echo "--log-long-format"` \
-        `[ -n "$MYSQLD_LOW_PRIORITY_UPDATES" ] && echo "--low-priority-updates"` \
-        `[ -n "$MYSQLD_MEMLOCK" ] && echo "--memlock"` \
-        `[ -n "$MYSQLD_MYISAM_RECOVER" ] && echo "--myisam-recover=$MYSQLD_MYISAM_RECOVER"` \
-        `[ -n "$MYSQLD_PORT" ] && echo "--port=$MYSQLD_PORT"` \
-        `[ -n "$MYSQLD_OLD_PROTOCOL" ] && echo "--old-protocol"` \
-        `[ -n "$MYSQLD_ONE_THREAD" ] && echo "--one-thread"` \
-        `[ -n "$MYSQLD_SET_VARIABLE" ] && echo "--set-variablevar=$MYSQLD_SET_VARIABLE"` \
-        `[ -n "$MYSQLD_SKIP_GRANT_TABLES" ] && echo "--skip-grant-tables"` \
-        `[ -n "$MYSQLD_SAFE_MODE" ] && echo "--safe-mode"` \
-        `[ -n "$MYSQLD_SECURE" ] && echo "--secure"` \
-        `[ -n "$MYSQLD_SKIP_CONCURRENT_INSERT" ] && echo "--skip-concurrent-insert"` \
-        `[ -n "$MYSQLD_SKIP_DELAY_KEY_WRITE" ] && echo "--skip-delay-key-write"` \
-        `[ -n "$MYSQLD_SKIP_LOCKING" ] && echo "--skip-locking"` \
-        `[ -n "$MYSQLD_SKIP_NAME_RESOLVE" ] && echo "--skip-name-resolve"` \
-        `[ -n "$MYSQLD_SKIP_NETWORKING" ] && echo "--skip-networking"` \
-        `[ -n "$MYSQLD_SKIP_NEW" ] && echo "--skip-new"` \
-        `[ -n "$MYSQLD_SKIP_HOST_CACHE" ] && echo "--skip-host-cache"` \
-        `[ -n "$MYSQLD_SKIP_SHOW_DATABASE" ] && echo "--skip-show-database"` \
-        `[ -n "$MYSQLD_SKIP_THREAD_PRIORITY" ] && echo "--skip-thread-priority"` \
-        `[ -n "$MYSQLD_SOCKET" ] && echo "--socket=$MYSQLD_SOCKET"` \
-        `[ -n "$MYSQLD_TMPDIR" ] && echo "--tmpdir=$MYSQLD_TMPDIR"` \
-        `[ -n "$MYSQLD_USER" ] && echo "--user=$MYSQLD_USER"` \
-        & >/dev/null 2>&1
-    RETVAL=$?
-    if [ $RETVAL = 0 ] ; then
-        echo "[  OK  ]"
-    else
-        echo "[FAILED]"
-        return 1
-    fi
-    return 0
-}
-
-stop_it() {
-
-    printf "%-60s" "Shutting down mysqld: "
-    if test -f "$MYSQLD_PID_FILE" ; then
-        pkill `pgrep_opts` mysqld_safe >/dev/null 2>&1
-        kill `cat $MYSQLD_PID_FILE` >/dev/null 2>&1
-        RETVAL=$?
-    else
-        RETVAL=1
-    fi
-    if [ $RETVAL = 0 ] ; then
-        echo "[  OK  ]"
-    else
-        echo "[FAILED]"
-    fi
-    echo ""
-    return 0
-}
-
-pgrep_opts() {
-  if [ -x /bin/zonename ]
-  then
-    echo "-z `/bin/zonename`"
-  fi
-}
-
-case $1 in
-    start)
-    start_it
-    ;;
-
-    stop)
-    stop_it
-    ;;
-
-    restart)
-    stop_it
-    while pgrep `pgrep_opts` ${MYSQLD_PROG} > /dev/null
-      do
-      sleep 1
-    done
-    start_it
-    ;;
-
-    *)
-    echo "Usage: $0  { start | stop | restart } "
-    ;;
-esac
-
-exit $RETVAL

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswusergroup
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswusergroup	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/cswusergroup	2012-02-15 13:47:30 UTC (rev 17061)
@@ -1 +1 @@
-mysql:mysql:MySQL database user:/var/opt/csw/mysql51:/bin/false::
+mysql:mysql:MySQL database user:/var/opt/csw/mysql5:/bin/false::

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/quick_start-csw
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/quick_start-csw	2012-02-15 12:42:15 UTC (rev 17060)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.5.x/files/quick_start-csw	2012-02-15 13:47:30 UTC (rev 17061)
@@ -129,14 +129,14 @@
 echo "See /opt/csw/share/mysql/doc/README.CSW for packaging changes."
 echo "Please ignore references to starting mysqld_safe in the messages above."
 echo "  These messages are from mysql_install_db.  See the following"
-echo "  for starting CSWmysql55."
+echo "  for starting CSWmysql5."
 smf=no
 if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ] ; then smf=yes ; fi
 if [ $smf = yes ]
 then
-    echo "To start mysqld; run \`svcadm enable cswmysql55\` on Solaris 10 or later"
+    echo "To start mysqld; run \`svcadm enable cswmysql5\` on Solaris 10 or later"
 else
-    echo "To start mysqld; run \`/etc/opt/csw/init.d/cswmysql55 start\` on Solaris 9 or earlier"
+    echo "To start mysqld; run \`/etc/opt/csw/init.d/cswmysql start\` on Solaris 9 or earlier"
 fi
 
 exit 0

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list