[csw-devel] SF.net SVN: gar:[7557] csw/mgar/pkg/mysql5/trunk
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sat Dec 5 16:49:18 CET 2009
Revision: 7557
http://gar.svn.sourceforge.net/gar/?rev=7557&view=rev
Author: wahwah
Date: 2009-12-05 15:49:18 +0000 (Sat, 05 Dec 2009)
Log Message:
-----------
mysql5: Merged 5.1 into trunk, now triggers the libtool problem.
Modified Paths:
--------------
csw/mgar/pkg/mysql5/trunk/Makefile
csw/mgar/pkg/mysql5/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/mysql5/trunk/files/0001-Use-libc-not-libcrypt.patch
csw/mgar/pkg/mysql5/trunk/files/0002-cast-user_info-pw_gid-to-gid_t.patch
csw/mgar/pkg/mysql5/trunk/files/0003-OpenCSW-perl-for-tests.patch
csw/mgar/pkg/mysql5/trunk/files/0004-basedir-and-datadir-in-the-cnf-files.patch
csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.postinstall
csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.preinstall
csw/mgar/pkg/mysql5/trunk/files/ChangeLog
csw/mgar/pkg/mysql5/trunk/files/README.CSW
csw/mgar/pkg/mysql5/trunk/files/cswmysql5
csw/mgar/pkg/mysql5/trunk/files/cswusergroup
csw/mgar/pkg/mysql5/trunk/files/quick_start-csw
Property Changed:
----------------
csw/mgar/pkg/mysql5/trunk/
csw/mgar/pkg/mysql5/trunk/Makefile
Property changes on: csw/mgar/pkg/mysql5/trunk
___________________________________________________________________
Modified: svn:ignore
- cookies
download
work
+ cookies
download
work
mysql-5.0.84
old-pkgs
CSWmysql5
Modified: svn:externals
- gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2
+ gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2-git
Added: svn:mergeinfo
+ /csw/mgar/pkg/mysql5/branches/mysql-5.0.x:6058-7197
/csw/mgar/pkg/mysql5/branches/mysql-5.1.x:7198-7556
Modified: csw/mgar/pkg/mysql5/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/trunk/Makefile 2009-12-04 20:17:08 UTC (rev 7556)
+++ csw/mgar/pkg/mysql5/trunk/Makefile 2009-12-05 15:49:18 UTC (rev 7557)
@@ -1,53 +1,136 @@
+# Copyright 2009 OpenCSW
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
GARNAME = mysql5
-GARVERSION = 5.1.33
+GARVERSION = 5.1.40
CATEGORIES = server
DISTNAME = mysql-$(GARVERSION)
-DESCRIPTION = Multithreaded SQL database
+DESCRIPTION = Multithreaded SQL database server
define BLURB
MySQL is a very fast, multi-threaded, multi-user and robust SQL
(Structured Query Language) database server.
endef
+GARFLAVOR = DBG
+
+# Change prefix to /opt/csw/mysql5
+prefix = /opt/csw/mysql5
+sysconfdir = /etc/opt/csw/mysql5
+localstatedir = /var/opt/csw/mysql5
+global_sysconfdir = /etc/opt/csw
+global_bindir = /opt/csw/bin
+
+INITSMF = $(global_sysconfdir)/init\.d/cswmysql5
+
+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
+
PACKAGES = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
PACKAGES += CSWmysql5rt CSWmysql5test
-CATALOGNAME_CSWmysql5 = $(GARNAME)
-CATALOGNAME_CSWmysql5bench = $(GARNAME)bench
+CATALOGNAME_CSWmysql5 = $(GARNAME)
+CATALOGNAME_CSWmysql5bench = $(GARNAME)bench
CATALOGNAME_CSWmysql5client = $(GARNAME)client
-CATALOGNAME_CSWmysql5devel = $(GARNAME)devel
-CATALOGNAME_CSWmysql5rt = $(GARNAME)rt
-CATALOGNAME_CSWmysql5test = $(GARNAME)test
+CATALOGNAME_CSWmysql5devel = $(GARNAME)devel
+CATALOGNAME_CSWmysql5rt = $(GARNAME)rt
+CATALOGNAME_CSWmysql5test = $(GARNAME)test
-SPKG_DESC_CSWmysql5 = $(DESCRIPTION)
-SPKG_DESC_CSWmysql5bench = MySQL 5 benchmark tools
-SPKG_DESC_CSWmysql5client = MySQL 5 client
-SPKG_DESC_CSWmysql5devel = MySQL 5 development files
-SPKG_DESC_CSWmysql5rt = MySQL 5 runtime libraries
-SPKG_DESC_CSWmysql5test = MySQL 5 testing environment
+INCOMPATIBLE_PKGS_CSWmysql5bench = CSWmysql4bench
+INCOMPATIBLE_PKGS_CSWmysql5client = CSWmysql4client
+INCOMPATIBLE_PKGS_CSWmysql5 = CSWmysql4
+INCOMPATIBLE_PKGS_CSWmysql5devel = CSWmysql4devel
+INCOMPATIBLE_PKGS_CSWmysql5test = CSWmysql4test
+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
+
+# 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
+
+CSWmysql5devel_programs += mysql_config
+
+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_CSWmysql5rt = $(prefix)/lib/.*\.so.*
+PKGFILES_CSWmysql5test = $(prefix)/mysql-test.*
+
+REQUIRED_PKGS_CSWmysql5bench = CSWmysql5
+REQUIRED_PKGS_CSWmysql5client = CSWmysql5rt
+REQUIRED_PKGS_CSWmysql5 = CSWmysql5client CSWmysql5rt
+REQUIRED_PKGS_CSWmysql5devel = CSWmysql5
+REQUIRED_PKGS_CSWmysql5test = CSWmysql5 CSWperl
+
MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/
DISTFILES = mysql-$(GARVERSION).tar.gz
+DISTFILES += cswmysql5 quick_start-csw README.CSW ChangeLog
+DISTFILES += CSWmysql5.preinstall
+DISTFILES += CSWmysql5.postinstall
+DISTFILES += cswusergroup
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
+UFILES_REGEX = mysql-(\d+(?:\.\d+)*).tar.gz
-# Change prefix to /opt/csw/mysql5
-prefix = /opt/csw/mysql5
+REQUIRED_PKGS = CSWncurses CSWzlib
+PREREQUISITE_PKGS = $(REQUIRED_PKGS)
-# because we alter the prefix. this gets us proper linking as well as
-# LD_OPTIONS (RPATH)
-# EXTRA_LIB = /opt/csw/lib
+# MySQL-5.1.40 doesn't compile without setting EXTRA_INC.
EXTRA_INC = /opt/csw/include
-EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
+EXTRA_LIB = /opt/csw/lib
+EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
+# 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
+# The library is at:
+# /opt/csw/mysql5/lib/amd64/mysql/libmysqlclient.so.15
+EXTRA_LD_OPTIONS = -R/opt/csw/mysql5/lib/\$$ISALIST/mysql
+
# Set ./configure options
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += --disable-assembler
CONFIGURE_ARGS += --without-docs
CONFIGURE_ARGS += --enable-local-infile
+CONFIGURE_ARGS += --with-charset=utf8
CONFIGURE_ARGS += --with-extra-charsets=all
CONFIGURE_ARGS += --with-low-memory
CONFIGURE_ARGS += --with-pthread
@@ -55,10 +138,50 @@
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_DBG = --with-debug
+CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GARFLAVOR))
-#TEST_ARGS = test-force
+# TODO: Make the tests pass. They don't at the moment.
+# TEST_SCRIPTS =
+TEST_TARGETS = check
# Enable 64 bits build
BUILD64 = 1
+USERGROUP = /etc/opt/csw/pkg/CSWmysql5/cswusergroup
+
+PROTOTYPE_MODIFIERS = ownmysql
+PROTOTYPE_FILES_ownmysql = /var/opt/csw/mysql5
+PROTOTYPE_USER_ownmysql = mysql
+PROTOTYPE_GROUP_ownmysql = mysql
+PROTOTYPE_PERMS_ownmysql = 0700
+PROTOTYPE_CLASS_ownmysql = ugfiles
+
+SPKG_CLASSES = none ugfiles
+
include gar/category.mk
+
+post-install-modulated:
+ ginstall -m 755 -d $(DESTDIR)$(localstatedir)
+ ginstall -m 755 -d $(DESTDIR)$(datadir)/mysql/doc
+ ginstall -m 644 $(FILEDIR)/ChangeLog $(DESTDIR)$(datadir)/mysql/doc
+ ginstall -m 644 $(FILEDIR)/README.CSW $(DESTDIR)$(datadir)/mysql/doc
+ ginstall -m 755 -d $(DESTDIR)/opt/csw/share/mysql/doc
+ ln -sf ../../../mysql5/share/mysql/doc/README.CSW \
+ $(DESTDIR)/opt/csw/share/mysql/doc/README.CSW
+ ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/init.d
+ ginstall -m 755 $(FILEDIR)/cswmysql5 $(DESTDIR)/etc/opt/csw/init.d
+ ginstall -m 755 $(FILEDIR)/quick_start-csw $(DESTDIR)$(datadir)/mysql
+ ginstall -m 755 -d $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+ ginstall -m 644 $(FILEDIR)/cswusergroup \
+ $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+ # A symlink for mysql5 include files
+ ginstall -m 755 -d $(DESTDIR)/opt/csw/include
+ ln -s ../mysql5/include/mysql $(DESTDIR)/opt/csw/include/mysql
+ # Create symlinks to binaries
+ ginstall -m 755 -d $(DESTDIR)$(global_bindir)
+ for f in $(DESTDIR)$(bindir)/*; do \
+ ln -s ../mysql5/bin/`basename $$f` $(DESTDIR)$(global_bindir)/`basename $$f`; \
+ done
+ @$(MAKECOOKIE)
Property changes on: csw/mgar/pkg/mysql5/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
+ Id
Modified: csw/mgar/pkg/mysql5/trunk/checksums
===================================================================
--- csw/mgar/pkg/mysql5/trunk/checksums 2009-12-04 20:17:08 UTC (rev 7556)
+++ csw/mgar/pkg/mysql5/trunk/checksums 2009-12-05 15:49:18 UTC (rev 7557)
@@ -1 +1,12 @@
-9c5711e9bea4514df6f2659f283f0aa0 download/mysql-5.1.33.tar.gz
+a0b98a7320bce2da3e1f90da704d3c85 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
+e691b0cf00a3925ac55c1844045d6e30 ChangeLog
+e42afb5ec1b1ab02d2ec3b46d0922636 README.CSW
+aaca748fc044834e71ad544ab293c494 cswmysql5
+67228e1f096fe08a94f4267439a4ec36 cswusergroup
+32e7373c16271606007374396e6742ad mysql-5.1.40.tar.gz
+90b7cfcd11ab56e021a195a6a085fa21 quick_start-csw
Copied: csw/mgar/pkg/mysql5/trunk/files/0001-Use-libc-not-libcrypt.patch (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/0001-Use-libc-not-libcrypt.patch)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/0001-Use-libc-not-libcrypt.patch (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/0001-Use-libc-not-libcrypt.patch 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,28 @@
+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
+
+---
+ configure.in | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ec432e1..577cfe3 100644
+--- a/configure.in
++++ b/configure.in
+@@ -891,7 +891,10 @@ AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
+ # This may get things to compile even if bind-8 is installed
+ AC_CHECK_FUNC(bind, , AC_CHECK_LIB(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]))
++# For crypt() on Solaris use libc, not libcrypt
++AC_CHECK_LIB(c, crypt)
++AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt]))
+ # See if we need a library for address lookup.
+ AC_SEARCH_LIBS(inet_aton, [socket nsl resolv])
+
+--
+1.6.3.2
+
Copied: csw/mgar/pkg/mysql5/trunk/files/0002-cast-user_info-pw_gid-to-gid_t.patch (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/0002-cast-user_info-pw_gid-to-gid_t.patch)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/0002-cast-user_info-pw_gid-to-gid_t.patch (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/0002-cast-user_info-pw_gid-to-gid_t.patch 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,27 @@
+From 8536f5925a96634950decd8779b2c6a60d183134 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:29:57 +0100
+Subject: [PATCH 2/4] cast user_info->pw_gid to gid_t
+
+---
+ sql/mysqld.cc | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/sql/mysqld.cc b/sql/mysqld.cc
+index 592ae3e..695fbb9 100644
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -1436,7 +1436,9 @@ static void set_user(const char *user, struct passwd *user_info_arg)
+ output a specific message to help the user resolve this problem.
+ */
+ calling_initgroups= TRUE;
+- initgroups((char*) user, user_info_arg->pw_gid);
++/* Solaris patch */
++/* initgroups((char*) user, user_info->pw_gid); */
++ initgroups((char*) user,(gid_t) user_info->pw_gid);
+ calling_initgroups= FALSE;
+ #endif
+ if (setgid(user_info_arg->pw_gid) == -1)
+--
+1.6.3.2
+
Copied: csw/mgar/pkg/mysql5/trunk/files/0003-OpenCSW-perl-for-tests.patch (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/0003-OpenCSW-perl-for-tests.patch)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/0003-OpenCSW-perl-for-tests.patch (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/0003-OpenCSW-perl-for-tests.patch 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,22 @@
+From bd9a3ff419f5a614d584aa6156a512e69f470e0f 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:36:09 +0100
+Subject: [PATCH 3/4] OpenCSW perl for tests
+
+---
+ mysql-test/mysql-test-run.pl | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
+index f60701b..cd9f843 100755
+--- a/mysql-test/mysql-test-run.pl
++++ b/mysql-test/mysql-test-run.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!/opt/csw/bin/perl
+ # -*- cperl -*-
+
+ #
+--
+1.6.3.2
+
Copied: csw/mgar/pkg/mysql5/trunk/files/0004-basedir-and-datadir-in-the-cnf-files.patch (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/0004-basedir-and-datadir-in-the-cnf-files.patch)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/0004-basedir-and-datadir-in-the-cnf-files.patch (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/0004-basedir-and-datadir-in-the-cnf-files.patch 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,81 @@
+From 194dbf9ff230f747bb093970831fbdf4cb0f0674 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:38:35 +0100
+Subject: [PATCH 4/4] basedir and datadir in the cnf files
+
+---
+ support-files/my-huge.cnf.sh | 2 ++
+ support-files/my-innodb-heavy-4G.cnf.sh | 2 ++
+ support-files/my-large.cnf.sh | 2 ++
+ support-files/my-medium.cnf.sh | 2 ++
+ support-files/my-small.cnf.sh | 2 ++
+ 5 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh
+index e4747ac..907b41d 100644
+--- a/support-files/my-huge.cnf.sh
++++ b/support-files/my-huge.cnf.sh
+@@ -23,6 +23,8 @@ socket = @MYSQL_UNIX_ADDR@
+
+ # The MySQL server
+ [mysqld]
++basedir = /opt/csw/mysql5
++datadir = /var/opt/csw/mysql5
+ port = @MYSQL_TCP_PORT@
+ socket = @MYSQL_UNIX_ADDR@
+ skip-locking
+diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh
+index cda11d6..a9d5514 100644
+--- a/support-files/my-innodb-heavy-4G.cnf.sh
++++ b/support-files/my-innodb-heavy-4G.cnf.sh
+@@ -39,6 +39,8 @@ socket = @MYSQL_UNIX_ADDR@
+ # The MySQL server
+ #
+ [mysqld]
++basedir = /opt/csw/mysql5
++datadir = /var/opt/csw/mysql5
+
+ # generic configuration options
+ port = @MYSQL_TCP_PORT@
+diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh
+index 981b137..8b890fb 100644
+--- a/support-files/my-large.cnf.sh
++++ b/support-files/my-large.cnf.sh
+@@ -23,6 +23,8 @@ socket = @MYSQL_UNIX_ADDR@
+
+ # The MySQL server
+ [mysqld]
++basedir = /opt/csw/mysql5
++datadir = /var/opt/csw/mysql5
+ port = @MYSQL_TCP_PORT@
+ socket = @MYSQL_UNIX_ADDR@
+ skip-locking
+diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh
+index c3135ea..ef841db 100644
+--- a/support-files/my-medium.cnf.sh
++++ b/support-files/my-medium.cnf.sh
+@@ -24,6 +24,8 @@ socket = @MYSQL_UNIX_ADDR@
+
+ # The MySQL server
+ [mysqld]
++basedir = /opt/csw/mysql5
++datadir = /var/opt/csw/mysql5
+ port = @MYSQL_TCP_PORT@
+ socket = @MYSQL_UNIX_ADDR@
+ skip-locking
+diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh
+index 24c0840..89299dd 100644
+--- a/support-files/my-small.cnf.sh
++++ b/support-files/my-small.cnf.sh
+@@ -24,6 +24,8 @@ socket = @MYSQL_UNIX_ADDR@
+
+ # The MySQL server
+ [mysqld]
++basedir = /opt/csw/mysql5
++datadir = /var/opt/csw/mysql5
+ port = @MYSQL_TCP_PORT@
+ socket = @MYSQL_UNIX_ADDR@
+ skip-locking
+--
+1.6.3.2
+
Copied: csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.postinstall (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql5.postinstall)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.postinstall (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.postinstall 2009-12-05 15:49:18 UTC (rev 7557)
@@ -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/trunk/files/CSWmysql5.preinstall (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql5.preinstall)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.preinstall (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql5.preinstall 2009-12-05 15:49:18 UTC (rev 7557)
@@ -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
Copied: csw/mgar/pkg/mysql5/trunk/files/ChangeLog (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/ChangeLog)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/ChangeLog (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/ChangeLog 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,37 @@
+2009-11-05 Maciej Bliziński <maciej at opencsw.org>
+
+ * Makefile: Reworked the package from ground up, using GAR.
+
+2007-06-17 Alex Moore
+
+ * Version 5.1: MySQL 5.1 is still in beta. This package is released
+ for your testing only.
+
+2007-06-03 Alex Moore
+
+ * Startup script: This update fixes a startup script problem that
+ caused the script to not work when --datadir is not the default. This
+ update also adds amd64 mysqld and client libraries.
+
+2006-12-29 Alex Moore
+
+ * csw.conf: This update adds support for csw.conf. See the following
+ url for details. http://www.blastwave.org/standards/csw.conf.html The
+ daemon specific name for this package is mysql5.
+ *** IMPORTANT ***
+ If you are using mysql5rc; please move your options to my.cnf and
+ eliminate mysql5rc. A future release will remove mysql5rc. my.cnf is
+ more flexible and any new or missing options will not be added to
+ mysql5rc. quick_start-csw is changed with this release to Not write
+ mysql5rc. Options for --basedir and --datadir are included in the
+ default my.cnf files.
+ *** END OF IMPORTANT ***
+
+2006-04-16 Alex Moore
+
+ * quick_start-csw: This update fixes some problems with
+ quick_start-csw and svc-mysql5. I have also corrected some issues
+ when using a database directory that is not /opt/csw/mysql5/var 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.
Copied: csw/mgar/pkg/mysql5/trunk/files/README.CSW (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/README.CSW)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/README.CSW (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/README.CSW 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,58 @@
+MySQL 5 OpenCSW package
+=======================
+
+* http://www.opencsw.org/packages/mysql5
+
+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/mysql5, but all the binaries are now linked from
+ /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/trunk/files/cswmysql5 (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/cswmysql5)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/cswmysql5 (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/cswmysql5 2009-12-05 15:49:18 UTC (rev 7557)
@@ -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
Copied: csw/mgar/pkg/mysql5/trunk/files/cswusergroup (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/cswusergroup)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/cswusergroup (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/cswusergroup 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1 @@
+mysql:mysql:MySQL database user:/var/opt/csw/mysql5:/bin/false::
Copied: csw/mgar/pkg/mysql5/trunk/files/quick_start-csw (from rev 7197, csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/quick_start-csw)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/quick_start-csw (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/quick_start-csw 2009-12-05 15:49:18 UTC (rev 7557)
@@ -0,0 +1,139 @@
+#!/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
+#
+BASEDIR=/opt/csw/mysql5
+MYSQL_VAR=/var/opt/csw/mysql5
+DEFAULTS_FILE=$BASEDIR/my.cnf
+SAVE_DEFAULTS_FILE=$MYSQL_VAR/my.cnf
+MYSQLD_USER=mysql
+#
+# Provide a default data directory
+MYSQLD_DATADIR=$MYSQL_VAR
+#
+echo
+echo "This is the start script to setup a MySQL-5 database"
+echo " directory."
+echo
+echo " The base directory is $BASEDIR."
+echo " The default database directory is $MYSQLD_DATADIR."
+echo
+echo " If you have not setup a partition for the database and"
+echo " you want one; now is a good time to exit this script and"
+echo " create and mount the partition."
+echo
+echo " If you have not setup a my.cnf file and you do not want"
+echo " one of the sample files; now is a good time to exit and"
+echo " create the file $DEFAULTS_FILE."
+echo
+echo "Data directory: The default is $MYSQLD_DATADIR."
+unset usrin
+usrin=`/usr/bin/ckpath -ay -d [default] \
+ -p "Accept the default or enter a directory"
+ ` || exit $?
+if [ ! "$usrin" = "[default]" ]; then
+ MYSQLD_DATADIR=$usrin
+fi
+echo
+echo "my.cnf pathname: The default is either to use the supplied file in"
+echo " the base directory or to create one in the base directory from"
+echo " the small memory footprint sample. If your enter a pathname,"
+echo " it will be used to create the options file in the base directory."
+unset usrin
+usrin=`/usr/bin/ckpath -f -d [default] \
+ -p "Accept the default or enter a pathname"
+ ` || exit $?
+if [ $usrin = "[default]" ]; then
+ 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
+else
+ IN_DEFAULTS_FILE=$usrin
+ echo "Using $IN_DEFAULTS_FILE to create the options file."
+fi
+
+echo "data directory is $MYSQLD_DATADIR"
+if [ ! -d "$MYSQLD_DATADIR" ]; then
+ echo "data directory will be created."
+fi
+
+unset usrin
+usrin=`/usr/bin/ckyorn -d y \
+ -p "Continue with installation or quit"
+ ` || exit $?
+if [ "$usrin" = "n" ] ; then
+ echo "Leaving script without doing anything."
+ exit 0
+fi
+
+if [ -d "$MYSQLD_DATADIR/mysql" ]; then
+ echo "mysql database already exists. Leaving script without doing anything."
+ 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 root:bin $MYSQLD_DATADIR
+ chmod -R 0755 $MYSQLD_DATADIR
+ chown 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
+chown -R mysql: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 quick_start-csw."
+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 "To start mysqld; run \`svcadm enable cswmysql5\` on Solaris 10 or later"
+else
+ 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