[csw-devel] SF.net SVN: gar:[6370] csw/mgar/pkg/mysql5/branches/mysql-5.0.x
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Sep 22 00:38:38 CEST 2009
Revision: 6370
http://gar.svn.sourceforge.net/gar/?rev=6370&view=rev
Author: wahwah
Date: 2009-09-21 22:38:38 +0000 (Mon, 21 Sep 2009)
Log Message:
-----------
mysql5: Better prototypes for mysql5 subpackages.
Modified Paths:
--------------
csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile
csw/mgar/pkg/mysql5/branches/mysql-5.0.x/checksums
Added Paths:
-----------
csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql.preinstall
csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/cswusergroup
Property Changed:
----------------
csw/mgar/pkg/mysql5/branches/mysql-5.0.x/
csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile
Property changes on: csw/mgar/pkg/mysql5/branches/mysql-5.0.x
___________________________________________________________________
Modified: svn:ignore
- cookies
download
work
+ cookies
download
work
mysql-5.0.84
old-pkgs
CSWmysql5
Modified: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile 2009-09-21 21:07:41 UTC (rev 6369)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/Makefile 2009-09-21 22:38:38 UTC (rev 6370)
@@ -1,3 +1,14 @@
+# Copyright 2009 OpenCSW
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO(maciej):
+# - include the right symlinks in the right packages
+# - declare mysql4 incompatible
+# - reduce the size of the package
+# - define file ownerships with cswusergroup
+# - verify file permissions
+
GARNAME = mysql5
GARVERSION = 5.0.84
CATEGORIES = server
@@ -4,7 +15,7 @@
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.
@@ -14,8 +25,10 @@
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 = $(sysconfdir)/init\.d/cswmysql5
+INITSMF = $(global_sysconfdir)/init\.d/cswmysql5
PATCHFILES = 0001-Use-libc-not-libcrypt.patch
PATCHFILES += 0002-cast-user_info-pw_gid-to-gid_t.patch
@@ -32,6 +45,8 @@
CATALOGNAME_CSWmysql5rt = $(GARNAME)rt
CATALOGNAME_CSWmysql5test = $(GARNAME)test
+INCOMPATIBLE_PKGS_CSWmysql5 = CSWmysql4
+
SPKG_DESC_CSWmysql5 = Multithreaded SQL database
SPKG_DESC_CSWmysql5bench = MySQL 5 benchmarking
SPKG_DESC_CSWmysql5client = MySQL 5 client binaries
@@ -40,15 +55,32 @@
SPKG_DESC_CSWmysql5test = MySQL 5 testing files
support64 = (/(amd64|i386))?
+
+# 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 += mysql_client_test
+CSWmysql5client_programs += mysql_zap
+CSWmysql5client_programs += mysqlaccess
+CSWmysql5client_programs += mysqladmin
+CSWmysql5client_programs += mysqlbin
+CSWmysql5client_programs += mysqlbinlog
+CSWmysql5client_programs += mysqlcheck
+CSWmysql5client_programs += mysqldump
+CSWmysql5client_programs += mysqlhotcopy
+CSWmysql5client_programs += mysqlimport
+CSWmysql5client_programs += mysqlshow
+CSWmysql5client_programs += perror
+CSWmysql5client_programs += replace
+
+
PKGFILES_CSWmysql5client = $(bindir)
-PKGFILES_CSWmysql5client += $(bindir)$(support64)/myisam(log|pack)
-PKGFILES_CSWmysql5client += $(bindir)$(support64)/mysql
-PKGFILES_CSWmysql5client += $(bindir)$(support64)/mysql_client_test
-PKGFILES_CSWmysql5client += $(bindir)$(support64)/mysql(_zap|access|admin|binlog|check)
-PKGFILES_CSWmysql5client += $(bindir)$(support64)/mysql(dump|hotcopy|import|show)
-PKGFILES_CSWmysql5client += $(bindir)$(support64)/(perror|replace)
-PKGFILES_CSWmysql5client += $(mandir)/man1/mysql(|\_zap|access|admin|dump|show)\.1
-PKGFILES_CSWmysql5client += $(mandir)/man1/(perror|replace)\.1
+PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(bindir)$(support64)/$(bin_name))
+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_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(mandir)/man1/$(bin_name)\.1)
PKGFILES_CSWmysql5devel = $(prefix)/include.*
PKGFILES_CSWmysql5devel += $(bindir)$(support64)/mysql_config
PKGFILES_CSWmysql5devel += $(mandir)/man1/mysql_config\.1
@@ -61,9 +93,8 @@
MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.0/
DISTFILES = mysql-$(GARVERSION).tar.gz
DISTFILES += cswmysql5 quick_start-csw README.CSW
+DISTFILES += CSWmysql.preinstall
-
-# We define upstream file regex so we can be notifed of new upstream software release
UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
REQUIRED_PKGS = CSWncurses CSWzlib
@@ -94,6 +125,14 @@
# Enable 64 bits build
BUILD64 = 1
+USERGROUP = /opt/csw/etc/pkg/CSWmysql5/cswusergroup
+PROTOTYPE_FILTER = awk ' \
+ $$$$3 ~ /\/var\/opt\/csw\/mysql5$$$$/ { $$$$2 = "ugfiles"; \
+ $$$$4 = "0700"; \
+ $$$$5 = "mysql"; \
+ $$$$6 = "mysql" } \
+ { print }'
+
include gar/category.mk
post-install-modulated:
@@ -101,9 +140,18 @@
ginstall -m 755 -d $(DESTDIR)$(datadir)/mysql5/doc
ginstall -m 644 $(FILEDIR)/README.CSW $(DESTDIR)$(datadir)/mysql5/doc
ginstall -m 755 -d $(DESTDIR)/opt/csw/share/mysql5/doc
- ln -s ../../../mysql5/share/mysql5/doc/README.CSW \
+ ln -sf ../../../mysql5/share/mysql5/doc/README.CSW \
$(DESTDIR)/opt/csw/share/mysql5/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)/mysql5
+ ginstall -m 755 -d $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+ ginstall -m 644 $(FILEDIR)/cswusergroup \
+ $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+
+ # Create symlinks
+ 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/branches/mysql-5.0.x/Makefile
___________________________________________________________________
Added: svn:keywords
+ Id
Modified: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/checksums
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/checksums 2009-09-21 21:07:41 UTC (rev 6369)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/checksums 2009-09-21 22:38:38 UTC (rev 6370)
@@ -2,7 +2,8 @@
1414d06fab1530484a508927a0de4154 download/0002-cast-user_info-pw_gid-to-gid_t.patch
5415f365f1b0f7a179d1efc25f45bbee download/0003-OpenCSW-perl-for-tests.patch
8ab232cd4d232b3cda3bbced93f80237 download/0004-basedir-and-datadir-in-the-cnf-files.patch
+cc2a219abbe7dc6049775cff070a27a5 download/CSWmysql.preinstall
70d7860bfa776dfc5510fc11d7c14203 download/README.CSW
-815a50011c356cd29758ca2195804952 download/cswmysql5
+fa8f33c812604457f2c0792e875f6967 download/cswmysql5
671348f1a5b078da9ca76f97e1fda325 download/mysql-5.0.84.tar.gz
1d79b3cfc4f91db05952bf71f0181fe7 download/quick_start-csw
Added: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql.preinstall
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql.preinstall (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/CSWmysql.preinstall 2009-09-21 22:38:38 UTC (rev 6370)
@@ -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
Added: csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/cswusergroup
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/cswusergroup (rev 0)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.0.x/files/cswusergroup 2009-09-21 22:38:38 UTC (rev 6370)
@@ -0,0 +1 @@
+mysql:mysql:MySQL database user:/opt/csw/mysql:/bin/false::
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