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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Jul 29 00:55:21 CEST 2010


Revision: 10649
          http://gar.svn.sourceforge.net/gar/?rev=10649&view=rev
Author:   wahwah
Date:     2010-07-28 22:55:20 +0000 (Wed, 28 Jul 2010)

Log Message:
-----------
mysql-5.1: Committing working changes, package needs more work.

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/checksums
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/0001-Use-libc-not-libcrypt.patch

Added Paths:
-----------
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.postinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.preinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql51

Removed Paths:
-------------
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.postinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.preinstall
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql5

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile	2010-07-28 22:38:35 UTC (rev 10648)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile	2010-07-28 22:55:20 UTC (rev 10649)
@@ -2,14 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-GARNAME = mysql5
+PROJ_NAME = mysql
+GARNAME = $(PROJ_NAME)51
 BASE_VERSION = 5.1
-PATCHLEVEL = 40
+PATCHLEVEL = 49
 GARVERSION = $(BASE_VERSION).$(PATCHLEVEL)
 CATEGORIES = server
 
 # Useful when making a series of builds on the same day
-GARFLAVOR ?= DBG
+# GARFLAVOR ?= DBG
 
 DISTNAME = mysql-$(GARVERSION)
 SPKG_SOURCEURL = http://www.mysql.com/
@@ -20,73 +21,73 @@
   (Structured Query Language) database server.
 endef
 
-# Change prefix to /opt/csw/mysql5
-prefix = /opt/csw/mysql5
-localstatedir = /var/opt/csw/mysql5
-sysconfdir = /etc/opt/csw/mysql5
+prefix = /opt/csw/$(GARNAME)
+localstatedir = /var$(prefix)
+sysconfdir = /etc$(prefix)
 
 # Where to put the init script
-global_sysconfdir = /etc/opt/csw
+global_sysconfdir = $(sysconfdir)
 # Where to link the binaries
 global_bindir = /opt/csw/bin
 
-INITSMF = $(global_sysconfdir)/init\.d/cswmysql-$(BASE_VERSION)
+INITSMF = $(global_sysconfdir)/init\.d/csw$(GARNAME)
 
-PACKAGES  = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
-PACKAGES += CSWmysql5rt CSWmysql5test
+PACKAGES  = CSW$(GARNAME)
+PACKAGES += CSW$(GARNAME)bench
+PACKAGES += CSW$(GARNAME)client
+PACKAGES += CSW$(GARNAME)devel
+PACKAGES += CSW$(GARNAME)rt
+PACKAGES += CSW$(GARNAME)test
 
 PATCHFILES  = 0001-Use-libc-not-libcrypt.patch
 PATCHFILES += 0002-cast-user_info-pw_gid-to-gid_t.patch
 PATCHFILES += 0003-OpenCSW-perl-for-tests.patch
 PATCHFILES += 0004-basedir-and-datadir-in-the-cnf-files.patch
 
-SPKG_DESC_CSWmysql5       = Multithreaded SQL database
-SPKG_DESC_CSWmysql5bench  = MySQL 5 benchmarking
-SPKG_DESC_CSWmysql5client = MySQL 5 client binaries
-SPKG_DESC_CSWmysql5devel  = MySQL 5 header files
-SPKG_DESC_CSWmysql5rt     = MySQL 5 runtime files
-SPKG_DESC_CSWmysql5test   = MySQL 5 testing files
+SPKG_DESC_CSW$(GARNAME)       = Multithreaded SQL database
+SPKG_DESC_CSW$(GARNAME)bench  = MySQL $(BASE_VERSION) benchmarking
+SPKG_DESC_CSW$(GARNAME)client = MySQL $(BASE_VERSION) client binaries
+SPKG_DESC_CSW$(GARNAME)devel  = MySQL $(BASE_VERSION) header files
+SPKG_DESC_CSW$(GARNAME)rt     = MySQL $(BASE_VERSION) runtime files
+SPKG_DESC_CSW$(GARNAME)test   = MySQL $(BASE_VERSION) testing files
 
-CATALOGNAME_CSWmysql5       = $(GARNAME)
-CATALOGNAME_CSWmysql5bench  = $(GARNAME)bench
-CATALOGNAME_CSWmysql5client = $(GARNAME)client
-CATALOGNAME_CSWmysql5devel  = $(GARNAME)devel
-CATALOGNAME_CSWmysql5rt     = $(GARNAME)rt
-CATALOGNAME_CSWmysql5test   = $(GARNAME)test
+CATALOGNAME_CSW$(GARNAME)       = $(GARNAME)
+CATALOGNAME_CSW$(GARNAME)bench  = $(GARNAME)bench
+CATALOGNAME_CSW$(GARNAME)client = $(GARNAME)client
+CATALOGNAME_CSW$(GARNAME)devel  = $(GARNAME)devel
+CATALOGNAME_CSW$(GARNAME)rt     = $(GARNAME)rt
+CATALOGNAME_CSW$(GARNAME)test   = $(GARNAME)test
 
-INCOMPATIBLE_PKGS_CSWmysql5bench  = CSWmysql4bench
-INCOMPATIBLE_PKGS_CSWmysql5client = CSWmysql4client
-INCOMPATIBLE_PKGS_CSWmysql5       = CSWmysql4
-INCOMPATIBLE_PKGS_CSWmysql5devel  = CSWmysql4devel
-INCOMPATIBLE_PKGS_CSWmysql5test   = CSWmysql4test
 
+ARCHALL_CSW$(GARNAME)bench = 1
+
 # Defining the client programs, which are going to pick up the 32- and 64-bit
 # binaries, symbolic links, isaexec stuff and man pages.
-CSWmysql5client_programs  = myisamlog
-CSWmysql5client_programs += myisampack
-CSWmysql5client_programs += mysql
-CSWmysql5client_programs += mysqlaccess
-CSWmysql5client_programs += mysqladmin
-CSWmysql5client_programs += mysqlbin
-CSWmysql5client_programs += mysqlbinlog
-CSWmysql5client_programs += mysqlcheck
-CSWmysql5client_programs += mysql_client_test
-CSWmysql5client_programs += mysqldump
-CSWmysql5client_programs += mysqlhotcopy
-CSWmysql5client_programs += mysqlimport
-CSWmysql5client_programs += mysqlshow
-CSWmysql5client_programs += mysql_zap
-CSWmysql5client_programs += perror
-CSWmysql5client_programs += replace
+CSW$(GARNAME)client_programs  = myisamlog
+CSW$(GARNAME)client_programs += myisampack
+CSW$(GARNAME)client_programs += mysql
+CSW$(GARNAME)client_programs += mysqlaccess
+CSW$(GARNAME)client_programs += mysqladmin
+CSW$(GARNAME)client_programs += mysqlbin
+CSW$(GARNAME)client_programs += mysqlbinlog
+CSW$(GARNAME)client_programs += mysqlcheck
+CSW$(GARNAME)client_programs += mysql_client_test
+CSW$(GARNAME)client_programs += mysqldump
+CSW$(GARNAME)client_programs += mysqlhotcopy
+CSW$(GARNAME)client_programs += mysqlimport
+CSW$(GARNAME)client_programs += mysqlshow
+CSW$(GARNAME)client_programs += mysql_zap
+CSW$(GARNAME)client_programs += perror
+CSW$(GARNAME)client_programs += replace
 
 # Without this EXTRA_LD_OPTIONS setting, /opt/csw/bin/mysql fails with a shared
 # library not found.  EXTRA_LIB was tried too, but did not work, as the -R path
 # ended up with having two $ISALIST tokens.
 #
 # Without this setting it looks for:
-# /opt/csw/mysql5/lib/amd64/libmysqlclient.so.15
+# /opt/csw/$(GARNAME)/lib/amd64/libmysqlclient.so.15
 # The library is at:
-# /opt/csw/mysql5/lib/amd64/mysql/libmysqlclient.so.15
+# /opt/csw/$(GARNAME)/lib/amd64/mysql/libmysqlclient.so.15
 EXTRA_LD_OPTIONS  = -R$(libdir)/\$$ISALIST/mysql
 
 COMMON_CFLAGS = -mt -fsimple=1 -ftrap=%none -xbuiltin=%all -xlibmil -xlibmopt
@@ -100,49 +101,65 @@
 EXTRA_CXXFLAGS_i386 = -xO3 -nofstore -xregs=no%frameptr $(COMMON_CFLAGS)
 
 
-CSWmysql5devel_programs += mysql_config
+CSW$(GARNAME)devel_programs += mysql_config
 
 # Enable 64 bits build
 BUILD64 = 1
 
-PKGFILES_CSWmysql5bench   = $(prefix)/sql-bench.*
-PKGFILES_CSWmysql5client  = $(bindir)
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(mandir)/man1/$(bin_name)\.1)
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),/opt/csw/bin/$(bin_name))
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),/opt/csw/sbin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),$(call baseisadirs,$(bindir),$(bin_name)))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),$(mandir)/man1/$(bin_name)\.1)
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),/opt/csw/bin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),/opt/csw/sbin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(mandir)/man1/mysql_config\.1
-PKGFILES_CSWmysql5devel  += $(prefix)/include.*
-PKGFILES_CSWmysql5devel  += /opt/csw/include/mysql
+PKGFILES_CSW$(GARNAME)bench   = $(prefix)/sql-bench.*
+PKGFILES_CSW$(GARNAME)client  = $(bindir)
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),/opt/csw/sbin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),/opt/csw/sbin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(mandir)/man1/mysql_config\.1
+PKGFILES_CSW$(GARNAME)devel  += $(prefix)/include.*
+PKGFILES_CSW$(GARNAME)devel  += /opt/csw/include/mysql
 
-PKGFILES_CSWmysql5rt      = $(prefix)/lib/.*\.so.*
-PKGFILES_CSWmysql5test    = $(prefix)/mysql-test.*
+PKGFILES_CSW$(GARNAME)rt      = $(libdir)
+PKGFILES_CSW$(GARNAME)rt     += $(libdir)/.*
+PKGFILES_CSW$(GARNAME)test    = $(prefix)/mysql-test.*
 
-RUNTIME_DEP_PKGS_CSWmysql5bench       = CSWmysql5
-RUNTIME_DEP_PKGS_CSWmysql5client      = CSWmysql5rt
-RUNTIME_DEP_PKGS_CSWmysql5            = CSWmysql5client CSWmysql5rt
-RUNTIME_DEP_PKGS_CSWmysql5devel       = CSWmysql5
-RUNTIME_DEP_PKGS_CSWmysql5test        = CSWmysql5 CSWperl
+RUNTIME_DEP_PKGS_CSW$(GARNAME)           += CSW$(GARNAME)client
+RUNTIME_DEP_PKGS_CSW$(GARNAME)           += CSW$(GARNAME)rt
+RUNTIME_DEP_PKGS_CSW$(GARNAME)           += CSWosslrt
+RUNTIME_DEP_PKGS_CSW$(GARNAME)           += CSWtcpwrap
+RUNTIME_DEP_PKGS_CSW$(GARNAME)           += CSWzlib
+RUNTIME_DEP_PKGS_CSW$(GARNAME)rt         += CSWosslrt
+RUNTIME_DEP_PKGS_CSW$(GARNAME)rt         += CSWzlib
+RUNTIME_DEP_PKGS_CSW$(GARNAME)bench      += CSWperl
+RUNTIME_DEP_PKGS_CSW$(GARNAME)client     += CSW$(GARNAME)rt
+RUNTIME_DEP_PKGS_CSW$(GARNAME)client     += CSWosslrt
+RUNTIME_DEP_PKGS_CSW$(GARNAME)client     += CSWncurses
+RUNTIME_DEP_PKGS_CSW$(GARNAME)client     += CSWzlib
+RUNTIME_DEP_PKGS_CSW$(GARNAME)test       += CSWperl
 
 MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-$(BASE_VERSION)/
 DISTFILES  = mysql-$(GARVERSION).tar.gz
-DISTFILES += cswmysql5 quick_start-csw README.CSW ChangeLog
-DISTFILES += CSWmysql5.preinstall
-DISTFILES += CSWmysql5.postinstall
+DISTFILES += csw$(GARNAME) quick_start-csw README.CSW ChangeLog
+DISTFILES += CSW$(GARNAME).preinstall
+DISTFILES += CSW$(GARNAME).postinstall
 DISTFILES += cswusergroup
 
 UFILES_REGEX = mysql-(\d+(?:\.\d+)*).tar.gz
 
-RUNTIME_DEP_PKGS = CSWncurses CSWzlib
+# TODO: Do the proper prerequsite pkgs.
 BUILD_DEP_PKGS = $(RUNTIME_DEP_PKGS)
 
 # MySQL-5.1.40 doesn't compile without setting EXTRA_INC.
 EXTRA_INC = /opt/csw/include
 EXTRA_LIB = /opt/csw/lib
+
+# We're building on Solaris 9 now.
+# # The following EXTRA_CFLAGS are necessary to compile on Solaris 8. Otherwise
+# # the following problem occurs:
+# #
+# # "handler/i_s.cc", line 159: Error: The function "localtime_r" must have a
+# # prototype.
 # EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 # EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 
@@ -152,15 +169,18 @@
 # Why not have a docs package?
 # CONFIGURE_ARGS += --without-docs
 CONFIGURE_ARGS += --enable-local-infile
-#CONFIGURE_ARGS += --with-extra-charsets=all
-CONFIGURE_ARGS += --with-extra-charsets=complex
+CONFIGURE_ARGS += --with-charset=utf8
+CONFIGURE_ARGS += --with-extra-charsets=all
 CONFIGURE_ARGS += --with-low-memory
 CONFIGURE_ARGS += --with-pthread
 CONFIGURE_ARGS += --with-readline
 CONFIGURE_ARGS += --with-zlib-dir=/opt/csw
 CONFIGURE_ARGS += --with-ssl=/opt/csw
 CONFIGURE_ARGS += --with-plugins=max-no-ndb
-CONFIGURE_ARGS += --with-comment
+CONFIGURE_ARGS += --with-comment="(OpenCSW)"
+CONFIGURE_ARGS += --with-mysqld-user=mysql
+CONFIGURE_ARGS += --with-fast-mutexes
+CONFIGURE_ARGS += --with-libwrap
 CONFIGURE_ARGS += --with-mysqld-libs=-lmtmalloc
 CONFIGURE_ARGS += --with-big-tables
 CONFIGURE_ARGS += --enable-thread-safe-client
@@ -173,7 +193,7 @@
 TEST_TARGETS = check
 
 
-USERGROUP = /etc/opt/csw/pkg/CSWmysql5/cswusergroup
+USERGROUP = /etc/opt/csw/pkg/CSW$(GARNAME)/cswusergroup
 
 PROTOTYPE_MODIFIERS = dbdir
 PROTOTYPE_FILES_dbdir = $(localstatedir)
@@ -182,18 +202,31 @@
 PROTOTYPE_PERMS_dbdir = 0700
 PROTOTYPE_CLASS_dbdir = ugfiles
 
-SPKG_CLASSES = none ugfiles
+CHECKPKG_OVERRIDES_CSWmysql51 += surplus-dependency|CSWmysql51client
+CHECKPKG_OVERRIDES_CSWmysql51rt += bad-rpath-entry
 
+# CHECKPKG_OVERRIDES_CSWmysql51 += init-file-missing-cswinitsmf-class|/etc/opt/csw/init.d/cswmysql51|class=none
+# CHECKPKG_OVERRIDES_CSWmysql51 += surplus-dependency|CSWmysql51client
+
+
 include gar/category.mk
 
 CFLAGS := $(filter-out -I%,$(CFLAGS))
 
 test-custom:
-	alias sh=/usr/bin/bash; cd $(WORKSRC)/mysql-test; perl mysql-test-run.pl --mem --big-test --force --skip-test=archive-big --skip-test=/gis/
+	alias sh=/usr/bin/bash;                                 \
+		cd $(WORKSRC)/mysql-test;                       \
+		perl mysql-test-run.pl --mem --big-test --force \
+		--skip-test=archive-big --skip-test=/gis/
 
 pre-configure-modulated:
-	# To work around the libtool version mismatch problem.
+	# To work around the following libtool version mismatch problem:
+	# libtool: Version mismatch error.  This is libtool 2.2.6, but the
+	# libtool: definition of this LT_INIT comes from libtool 2.2.6b.
+	# libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
+	# http://lists.opencsw.org/pipermail/maintainers/2009-December/005066.html
 	cd $(WORKSRC) && autoreconf --force --install --symlink
+	@$(MAKECOOKIE)
 
 post-merge:
 	ginstall -m 755 -d $(PKGROOT)$(localstatedir)
@@ -201,22 +234,31 @@
 	ginstall -m 644 $(FILEDIR)/ChangeLog $(PKGROOT)$(datadir)/mysql/doc
 	ginstall -m 644 $(FILEDIR)/README.CSW $(PKGROOT)$(datadir)/mysql/doc
 	ginstall -m 755 -d $(PKGROOT)/opt/csw/share/mysql/doc
-	ln -sf ../../../mysql5/share/mysql/doc/README.CSW \
+	ln -sf ../../../$(GARNAME)/share/mysql/doc/README.CSW \
 		$(PKGROOT)/opt/csw/share/mysql/doc/README.CSW
-	ginstall -m 755 -d $(PKGROOT)/etc/opt/csw/init.d
-	ginstall -m 755 $(FILEDIR)/cswmysql5 $(PKGROOT)/etc/opt/csw/init.d
+	ginstall -m 755 -d $(PKGROOT)$(global_sysconfdir)/init.d
+	ginstall -m 755 $(FILEDIR)/csw$(GARNAME) $(PKGROOT)$(global_sysconfdir)/init.d
 	ginstall -m 755 $(FILEDIR)/quick_start-csw $(PKGROOT)$(datadir)/mysql
-	ginstall -m 755 -d $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
+	ginstall -m 755 -d $(PKGROOT)$(global_sysconfdir)/pkg/CSW$(GARNAME)
 	ginstall -m 644 $(FILEDIR)/cswusergroup \
-		        $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
+						$(PKGROOT)$(global_sysconfdir)/pkg/CSW$(GARNAME)
 	# A symlink for mysql5 include files
 	ginstall -m 755 -d $(PKGROOT)/opt/csw/include
-	ln -s ../mysql5/include/mysql $(PKGROOT)/opt/csw/include/mysql
+	ln -s ../$(GARNAME)/include/mysql $(PKGROOT)/opt/csw/include/mysql
 	# Create symlinks to binaries
 	ginstall -m 755 -d $(PKGROOT)$(global_bindir)
 	for f in $(PKGROOT)$(bindir)/*; do \
-		ln -s ../mysql5/bin/`basename $$f` \
+		if echo $$f | grep amd64$$; then continue; fi; \
+		if echo $$f | grep sparcv9$$; then continue; fi; \
+		ln -s ../$(GARNAME)/bin/`basename $$f` \
 		      $(PKGROOT)$(global_bindir)/`basename $$f`; \
 	done
+	# /opt/csw/$(GARNAME)/lib/sparc9/mysql -- by GAR, it's logical
+	# /opt/csw/$(GARNAME)/lib/mysql/sparcv9 -- expected by other packages
+	gln -s ../$(ISA_DEFAULT64)/mysql $(PKGROOT)$(libdir)/mysql/$(ISA_DEFAULT64)
+	# For other applications to link against
 	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64
+	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/mysql/64
+	gln -s . $(PKGROOT)$(libdir)/$(ISA_DEFAULT)
+	gln -s . $(PKGROOT)$(libdir)/mysql/$(ISA_DEFAULT)
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/checksums
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/checksums	2010-07-28 22:38:35 UTC (rev 10648)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/checksums	2010-07-28 22:55:20 UTC (rev 10649)
@@ -1,12 +1,12 @@
-a0b98a7320bce2da3e1f90da704d3c85  0001-Use-libc-not-libcrypt.patch
+8940e0673e599689932e94fec906aec9  0001-Use-libc-not-libcrypt.patch
 1414d06fab1530484a508927a0de4154  0002-cast-user_info-pw_gid-to-gid_t.patch
 5415f365f1b0f7a179d1efc25f45bbee  0003-OpenCSW-perl-for-tests.patch
 8ab232cd4d232b3cda3bbced93f80237  0004-basedir-and-datadir-in-the-cnf-files.patch
-747637bc4be42207974ae845d832ae65  CSWmysql5.postinstall
-60162ea667507a6a487027e7c389ca55  CSWmysql5.preinstall
+c8c2ef6365a9bd9b71fac6198d3eeef8  CSWmysql51.postinstall
+a652ccff001c328178f4b0ed9bfebbd6  CSWmysql51.preinstall
 e691b0cf00a3925ac55c1844045d6e30  ChangeLog
 e42afb5ec1b1ab02d2ec3b46d0922636  README.CSW
-aaca748fc044834e71ad544ab293c494  cswmysql5
+0974c28c048437612c6a0ace93460d3b  cswmysql51
 67228e1f096fe08a94f4267439a4ec36  cswusergroup
-32e7373c16271606007374396e6742ad  mysql-5.1.40.tar.gz
+a90d87a71fa3c23dff6d78afc8e3184c  mysql-5.1.49.tar.gz
 90b7cfcd11ab56e021a195a6a085fa21  quick_start-csw

Modified: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/0001-Use-libc-not-libcrypt.patch
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/0001-Use-libc-not-libcrypt.patch	2010-07-28 22:38:35 UTC (rev 10648)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/0001-Use-libc-not-libcrypt.patch	2010-07-28 22:55:20 UTC (rev 10649)
@@ -1,19 +1,19 @@
-From a527f284ef5646dbdd731af007aace3daee3e946 Mon Sep 17 00:00:00 2001
-From: =?utf-8?q?Maciej=20Blizi=C5=84ski?= <blizinski at google.com>
-Date: Wed, 16 Sep 2009 01:27:38 +0100
-Subject: [PATCH 1/4] Use libc, not libcrypt
+From 6925aace1b489a5ffb0265c7fdc7edc3def7d995 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Mon, 26 Jul 2010 08:03:17 +0200
+Subject: [PATCH] Use libc not libcrypt
 
 ---
  configure.in |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)
 
 diff --git a/configure.in b/configure.in
-index ec432e1..577cfe3 100644
+index 7374723..1c181c7 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -891,7 +891,10 @@ AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
+@@ -860,7 +860,10 @@ AC_SEARCH_LIBS(setsockopt, socket)
  # This may get things to compile even if bind-8 is installed
- AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
+ AC_SEARCH_LIBS(bind, bind)
  # Check if crypt() exists in libc or libcrypt, sets LIBS if needed
 -AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
 +## AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
@@ -24,5 +24,5 @@
  AC_SEARCH_LIBS(inet_aton, [socket nsl resolv])
  
 -- 
-1.6.3.2
+1.7.1
 

Deleted: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.postinstall
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.postinstall	2010-07-28 22:38:35 UTC (rev 10648)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.postinstall	2010-07-28 22:55:20 UTC (rev 10649)
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-
-MYSQLDATADIR=/var/opt/csw/mysql5
-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.1.x/files/CSWmysql5.preinstall
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.preinstall	2010-07-28 22:38:35 UTC (rev 10648)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.preinstall	2010-07-28 22:55:20 UTC (rev 10649)
@@ -1,40 +0,0 @@
-#!/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

Copied: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.postinstall (from rev 10496, csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.postinstall)
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.postinstall	                        (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.postinstall	2010-07-28 22:55:20 UTC (rev 10649)
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+MYSQLDATADIR=/var/opt/csw/mysql5
+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

Copied: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.preinstall (from rev 10496, csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql5.preinstall)
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.preinstall	                        (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/CSWmysql51.preinstall	2010-07-28 22:55:20 UTC (rev 10649)
@@ -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.1.x/files/cswmysql5
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql5	2010-07-28 22:38:35 UTC (rev 10648)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql5	2010-07-28 22:55:20 UTC (rev 10649)
@@ -1,183 +0,0 @@
-#!/bin/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
-MYSQLHOME=/opt/csw/mysql5
-MYSQL_VAR=/var/opt/csw/mysql5
-MYSQLD_DATADIR=$MYSQL_VAR
-MYSQLD_PID_FILE=$MYSQL_VAR/mysql.pid
-CONFFILE=$MYSQL_VAR/my.cnf
-
-#
-# Source configuration
-[ -r /opt/csw/mysql5/etc/mysql5rc ] && . /opt/csw/mysql5/etc/mysql5rc
-[ -r /etc/opt/csw/mysql5rc ] && . /etc/opt/csw/mysql5rc
-
-# To get started quickly, copy a sample configuration file from
-#   $MYSQLHOME/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 [ x"$CONFFILE" = x"$MYSQL_VAR/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_VAR/mysql" -a ! -d "$MYSQLD_DATADIR/mysql" ] ; then
-    MYSQLD_DATADIR=
-fi
-
-# Make sure required vars are set
-MYSQLD_PID_FILE=${MYSQLD_PID_FILE:=$MYSQL_VAR/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 (`cat $MYSQLD_PID_FILE`) seems to be running."
-            return 1
-        fi
-    fi
-
-    printf "%-60s" "Starting mysqld: "
-# 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 "$MYSQLHOME/var/mysql" ] ; then
-#        echo MySQL core database has not been created.
-#         echo Creating it now...
-#       $MYSQLHOME/bin/mysql_install_db
-#       chown -R mysql:mysql $MYSQLHOME/var
-#    fi
-
-# 2006-04-16  --defaults-file is changed to --defaults-extra-file
-    $MYSQLHOME/bin/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 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
-}
-
-case $1 in
-    start)
-    start_it
-    ;;
-
-    stop)
-    stop_it
-    ;;
-
-    restart)
-    stop_it
-    while pgrep mysqld > /dev/null
-      do
-      sleep 1
-    done
-    start_it
-    ;;
-
-    *)
-    echo "Usage: $0  { start | stop | restart } "
-    ;;
-esac
-
-exit $RETVAL

Copied: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql51 (from rev 10496, csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql5)
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql51	                        (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/files/cswmysql51	2010-07-28 22:55:20 UTC (rev 10649)
@@ -0,0 +1,183 @@
+#!/bin/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
+MYSQLHOME=/opt/csw/mysql5
+MYSQL_VAR=/var/opt/csw/mysql5
+MYSQLD_DATADIR=$MYSQL_VAR
+MYSQLD_PID_FILE=$MYSQL_VAR/mysql.pid
+CONFFILE=$MYSQL_VAR/my.cnf
+
+#
+# Source configuration
+[ -r /opt/csw/mysql5/etc/mysql5rc ] && . /opt/csw/mysql5/etc/mysql5rc
+[ -r /etc/opt/csw/mysql5rc ] && . /etc/opt/csw/mysql5rc
+
+# To get started quickly, copy a sample configuration file from
+#   $MYSQLHOME/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 [ x"$CONFFILE" = x"$MYSQL_VAR/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_VAR/mysql" -a ! -d "$MYSQLD_DATADIR/mysql" ] ; then
+    MYSQLD_DATADIR=
+fi
+
+# Make sure required vars are set
+MYSQLD_PID_FILE=${MYSQLD_PID_FILE:=$MYSQL_VAR/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 (`cat $MYSQLD_PID_FILE`) seems to be running."
+            return 1
+        fi
+    fi
+
+    printf "%-60s" "Starting mysqld: "
+# 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 "$MYSQLHOME/var/mysql" ] ; then
+#        echo MySQL core database has not been created.
+#         echo Creating it now...
+#       $MYSQLHOME/bin/mysql_install_db
+#       chown -R mysql:mysql $MYSQLHOME/var
+#    fi
+
+# 2006-04-16  --defaults-file is changed to --defaults-extra-file
+    $MYSQLHOME/bin/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 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
+}
+
+case $1 in
+    start)
+    start_it
+    ;;
+
+    stop)
+    stop_it
+    ;;
+
+    restart)
+    stop_it
+    while pgrep mysqld > /dev/null
+      do
+      sleep 1
+    done
+    start_it
+    ;;
+
+    *)
+    echo "Usage: $0  { start | stop | restart } "
+    ;;
+esac
+
+exit $RETVAL


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