diff options
-rw-r--r-- | dev-db/mysql/ChangeLog | 5 | ||||
-rw-r--r-- | dev-db/mysql/files/mysql-4.0.15.rc6 | 17 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.0.20-r1.ebuild | 27 |
3 files changed, 33 insertions, 16 deletions
diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog index 8f86e9a04997..718c3e3afe77 100644 --- a/dev-db/mysql/ChangeLog +++ b/dev-db/mysql/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-db/mysql # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.125 2004/09/06 18:07:12 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.126 2004/09/07 02:00:44 robbat2 Exp $ + + 06 Sep 2004; Robin H. Johnson <robbat2@gentoo.org> files/mysql-4.0.15.rc6: + Fix #62603, #62903. 06 Sep 2004; Ciaran McCreesh <ciaranm@gentoo.org> mysql-4.0.12.ebuild, mysql-4.0.13-r4.ebuild, mysql-4.0.14-r1.ebuild, mysql-4.0.14-r2.ebuild, diff --git a/dev-db/mysql/files/mysql-4.0.15.rc6 b/dev-db/mysql/files/mysql-4.0.15.rc6 index 62ed0bb45c66..35ea07645523 100644 --- a/dev-db/mysql/files/mysql-4.0.15.rc6 +++ b/dev-db/mysql/files/mysql-4.0.15.rc6 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql-4.0.15.rc6,v 1.3 2004/07/14 21:41:15 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/mysql-4.0.15.rc6,v 1.4 2004/09/07 02:00:44 robbat2 Exp $ depend() { need net @@ -9,14 +9,21 @@ depend() { } checkconfig() { - if [ ! -f /etc/mysql/my.cnf ] ; then + if [ ! -f /etc/mysql/my.cnf ]; then eerror "No /etc/mysql/my.cnf file exists!" fi - dir=`my_print_defaults mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|"` + #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` + dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` - if [ ! -d $dir/mysql ] ; then - eerror "You dont appear to have the mysql database installed yet." + if [ -z "$dir" ]; then + eerror "Your mysql doesn't have any datadir setting, default or specific" + eerror "Please check your my.cnf" + return 1 + fi + + if [ ! -d "$dir/mysql" ]; then + eerror "You don't appear to have the mysql database installed yet." eerror "Please run /usr/bin/mysql_install_db to have this done..." return 1 fi diff --git a/dev-db/mysql/mysql-4.0.20-r1.ebuild b/dev-db/mysql/mysql-4.0.20-r1.ebuild index 704cd5cce120..bf977518a27d 100644 --- a/dev-db/mysql/mysql-4.0.20-r1.ebuild +++ b/dev-db/mysql/mysql-4.0.20-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.20-r1.ebuild,v 1.9 2004/09/06 18:05:24 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.20-r1.ebuild,v 1.10 2004/09/07 02:00:44 robbat2 Exp $ inherit eutils gnuconfig #to accomodate -laadeedah releases @@ -21,7 +21,7 @@ SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="ia64 x86 sparc ppc amd64 hppa alpha mips ~s390 arm ~ppc64" -IUSE="static readline innodb berkdb tcpd ssl perl debug" +IUSE="static readline innodb berkdb tcpd ssl perl debug selinux" RESTRICT="nomirror" DEPEND="readline? ( >=sys-libs/readline-4.1 ) @@ -32,13 +32,15 @@ DEPEND="readline? ( >=sys-libs/readline-4.1 ) sys-apps/procps >=sys-apps/sed-4" PDEPEND="perl? ( dev-perl/DBI dev-perl/DBD-mysql )" +RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" warning() { ewarn - ewarn "If you're upgrading from MySQL-3.x, you must recompile the other" - ewarn "packages on your system that link with libmysqlclient after the" - ewarn "upgrade completes. To obtain such a list of packages for your" - ewarn "system, you may use 'revdep-rebuild' from app-portage/gentoolkit." + ewarn "If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you" + ewarn "must recompile the other packages on your system that link with" + ewarn "libmysqlclient after the upgrade completes. To obtain such a list" + ewarn "of packages for your system, you may use 'revdep-rebuild' from" + ewarn "app-portage/gentoolkit." ewarn epause 5 } @@ -215,12 +217,15 @@ pkg_config() { local DATADIR="" if [ -f '/etc/mysql/my.cnf' ] ; then #DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'` - DATADIR=`/usr/sbin/mysqld --help |grep '^datadir' | awk '{print $2}'` + #DATADIR=`/usr/sbin/mysqld --help |grep '^datadir' | awk '{print $2}'` + #DATADIR=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` + DATADIR=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` fi if [ -z "${DATADIR}" ]; then DATADIR="/var/lib/mysql/" fi chown -R mysql:mysql ${DATADIR} + chmod 0750 ${DATADIR} else einfo "Hmm, it appears as though you already have the mysql" einfo "database in place. If you are having problems trying" @@ -237,14 +242,16 @@ pkg_preinst() { pkg_postinst() { #empty dirs... - install -d -m0755 -o mysql -g mysql ${ROOT}/var/lib/mysql + install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql #secure the logfiles... does this bother anybody? touch ${ROOT}/var/log/mysql/mysql.{log,err} - chown mysql:mysql ${ROOT}/var/log/mysql/mysql.{log,err} - chmod 0660 ${ROOT}/var/log/mysql/mysql.{log,err} + chown mysql:mysql ${ROOT}/var/log/mysql/mysql* + chmod 0660 ${ROOT}/var/log/mysql/mysql* + # secure some directories + chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/var/lib/mysql #your friendly public service announcement... einfo |