diff options
author | Francesco Riosa <vivo@gentoo.org> | 2005-09-12 14:58:15 +0000 |
---|---|---|
committer | Francesco Riosa <vivo@gentoo.org> | 2005-09-12 14:58:15 +0000 |
commit | 423d37227cc82cbb4bc8bd584c5d69ba7d51472e (patch) | |
tree | 54df04a7067998ecf9ee80b30df3a49039169b2f | |
parent | Fix eclean to be compatible with portage 2.0.52 Bug# 105382. Fix broken stat ... (diff) | |
download | gentoo-2-423d37227cc82cbb4bc8bd584c5d69ba7d51472e.tar.gz gentoo-2-423d37227cc82cbb4bc8bd584c5d69ba7d51472e.tar.bz2 gentoo-2-423d37227cc82cbb4bc8bd584c5d69ba7d51472e.zip |
Fix for bug #105668 shame on me ; Other ebuilds ported to the use of mysql-extras instead of $FILESDIR
(Portage version: 2.0.52-r1)
-rw-r--r-- | dev-db/mysql/ChangeLog | 8 | ||||
-rw-r--r-- | dev-db/mysql/Manifest | 20 | ||||
-rw-r--r-- | dev-db/mysql/files/digest-mysql-4.0.22-r2 | 1 | ||||
-rw-r--r-- | dev-db/mysql/files/digest-mysql-4.0.24 | 1 | ||||
-rw-r--r-- | dev-db/mysql/files/digest-mysql-4.0.25-r2 | 1 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.0.22-r2.ebuild | 27 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.0.24.ebuild | 27 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.0.25-r2.ebuild | 200 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.0.26.ebuild | 7 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.1.13-r1.ebuild | 9 | ||||
-rw-r--r-- | dev-db/mysql/mysql-4.1.14.ebuild | 9 | ||||
-rw-r--r-- | dev-db/mysql/mysql-5.0.12_beta.ebuild | 9 |
12 files changed, 172 insertions, 147 deletions
diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog index b55f86ec3199..7b7061f2d60b 100644 --- a/dev-db/mysql/ChangeLog +++ b/dev-db/mysql/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-db/mysql # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.234 2005/09/11 18:08:44 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/ChangeLog,v 1.235 2005/09/12 14:58:15 vivo Exp $ + + 12 Sep 2005; Francesco Riosa <vivo@gentoo.org> mysql-4.0.22-r2.ebuild, + mysql-4.0.24.ebuild, mysql-4.0.25-r2.ebuild, mysql-4.0.26.ebuild, + mysql-4.1.13-r1.ebuild, mysql-4.1.14.ebuild, mysql-5.0.12_beta.ebuild: + Fix for bug #105668 shame on me + Other ebuilds ported to the use of mysql-extras instead of $FILESDIR 11 Sep 2005; Francesco Riosa <vivo@gentoo.org> mysql-4.0.26.ebuild: Added discover of a previous $DATADIR like other recent ebuilds diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest index e55508c202b0..17439224d3bf 100644 --- a/dev-db/mysql/Manifest +++ b/dev-db/mysql/Manifest @@ -1,14 +1,14 @@ -MD5 4ede44755e223d1a7b927f5772aa7f97 mysql-5.0.12_beta.ebuild 16816 -MD5 5eae89d810d67eec1d676a5121a9f433 mysql-4.1.14.ebuild 16681 -MD5 98903a3bc4373b384bb85628cb3313fb mysql-4.0.26.ebuild 13605 -MD5 fd9b66e2ee927df1ee9ed642ecda1fa6 mysql-4.1.13-r1.ebuild 16273 +MD5 ee1b30117d990dabee8fe38b9dad781b mysql-5.0.12_beta.ebuild 16795 +MD5 e5c9204eeed7b49805509b8d27da0c8d mysql-4.1.14.ebuild 16665 +MD5 16cb5d11ff0a24c39ab2a8105331be3f mysql-4.0.26.ebuild 13582 +MD5 63c1e99068e30fa15df8c60ca3eaa13e mysql-4.1.13-r1.ebuild 16349 MD5 d168c71df57729ea0eeadab3c6a59f43 mysql-4.0.22.ebuild 8768 -MD5 c28056421db550a09a548ad1dff517f5 mysql-4.0.22-r2.ebuild 9613 +MD5 1d3e68e1e0061c62227c71a81b0e82fb mysql-4.0.22-r2.ebuild 9473 MD5 0cfd7831f2d57b93e252c0f3d9c25276 mysql-3.23.58-r1.ebuild 7063 -MD5 240fc6da2d2c2d7dd224b147db251f80 mysql-4.0.24.ebuild 9827 +MD5 79b3510f298ab7534719170e9400a7b8 mysql-4.0.24.ebuild 9747 MD5 34e13a475f1d5662ef871ea8be24da9c ChangeLog 40818 MD5 a2a9fdc7d010a7c04c96cb3b7c05f06b metadata.xml 158 -MD5 5ab197f8ea8f7de43f00dbc8891ee4c2 mysql-4.0.25-r2.ebuild 13766 +MD5 c97b85bafbabf4b90c96653d8b44ddb8 mysql-4.0.25-r2.ebuild 13709 MD5 a755fb5a3ed724046a4f83fafd819c77 files/mysql-test-myisam-geometry.patch 1217 MD5 76446c512e91b2f8e9e69a0379178e5c files/mysql-4.0.25-r2-asm-pic-fixes.patch 7295 MD5 e37e03b4ce894ff87fda12ce6f7b31a6 files/mysql-4.0.21-install-db-sh.diff 585 @@ -21,7 +21,7 @@ MD5 58c4d09c5c2712254b1881a6fcc7abff files/mysql-4.0.18-gentoo-nptl.diff 587 MD5 228ba118e90b78411917acdd15ebee66 files/digest-mysql-5.0.12_beta 144 MD5 087f3fbbe8e3385f5408d91cb661aace files/mysql-4.0-mysqlhotcopy-security.patch 1394 MD5 04fa914460358170e2865d20b22d2171 files/digest-mysql-4.0.22 66 -MD5 547fab43da8e59a03a5f3e4a500cca45 files/digest-mysql-4.0.24 66 +MD5 a752e07babd8812e2bd5629470fc9578 files/digest-mysql-4.0.24 139 MD5 afbd9a0788032f51caf036064836992f files/digest-mysql-4.0.26 139 MD5 726c2db19d163113d218d25d8a55e00a files/digest-mysql-4.1.14 139 MD5 ff80a5d8d87212046e89f2f8ae779af4 files/mysql-4.0-nisam.h.diff 452 @@ -47,6 +47,6 @@ MD5 977be6c68f6231cbcf1febd3305ade5d files/mysql-4.0.14-r1-tcpd-vars-fix.diff 46 MD5 c6ff193b0612040bab879d2085b6edea files/mysql-4.0.24-manual.texi.patch 603 MD5 a8f89d11a0913332c5f8c1da5a21cc3f files/my.cnf-4.0.14-r1 2816 MD5 9946a8f7163970ec4f6a713c97eadbe0 files/my.cnf-4.0.24-r1 4271 -MD5 04fa914460358170e2865d20b22d2171 files/digest-mysql-4.0.22-r2 66 -MD5 06a7c1ead0dfe570f7c67d525c45f7c3 files/digest-mysql-4.0.25-r2 66 +MD5 a0f56eeed1704232e3b56ecba599d38a files/digest-mysql-4.0.22-r2 139 +MD5 6799fc7139b1044f7c9f84f29ccc6015 files/digest-mysql-4.0.25-r2 139 MD5 a868ff3e6a328acbed6842fdd17c8cdf files/035_x86_asm-pic-fixes-r1.patch 4102 diff --git a/dev-db/mysql/files/digest-mysql-4.0.22-r2 b/dev-db/mysql/files/digest-mysql-4.0.22-r2 index e3e0885efab8..830ee52391e5 100644 --- a/dev-db/mysql/files/digest-mysql-4.0.22-r2 +++ b/dev-db/mysql/files/digest-mysql-4.0.22-r2 @@ -1 +1,2 @@ MD5 fab53259c3ba9f729a319bf271fc8587 mysql-4.0.22.tar.gz 14395535 +MD5 adaf3f0e5174f968bef0f910aff65f7d mysql-extras-20050908.tar.bz2 46663 diff --git a/dev-db/mysql/files/digest-mysql-4.0.24 b/dev-db/mysql/files/digest-mysql-4.0.24 index c6d7e25405e2..ee6e37a7e47f 100644 --- a/dev-db/mysql/files/digest-mysql-4.0.24 +++ b/dev-db/mysql/files/digest-mysql-4.0.24 @@ -1 +1,2 @@ MD5 408d3001ed715ddc90009c247e548638 mysql-4.0.24.tar.gz 16885399 +MD5 adaf3f0e5174f968bef0f910aff65f7d mysql-extras-20050908.tar.bz2 46663 diff --git a/dev-db/mysql/files/digest-mysql-4.0.25-r2 b/dev-db/mysql/files/digest-mysql-4.0.25-r2 index f75729166e27..7a2e394541fb 100644 --- a/dev-db/mysql/files/digest-mysql-4.0.25-r2 +++ b/dev-db/mysql/files/digest-mysql-4.0.25-r2 @@ -1 +1,2 @@ MD5 68a47ff8c1f0c24866a792f6b3bb59d6 mysql-4.0.25.tar.gz 11159288 +MD5 adaf3f0e5174f968bef0f910aff65f7d mysql-extras-20050908.tar.bz2 46663 diff --git a/dev-db/mysql/mysql-4.0.22-r2.ebuild b/dev-db/mysql/mysql-4.0.22-r2.ebuild index 8bf8846dfee2..a59fc485b0c8 100644 --- a/dev-db/mysql/mysql-4.0.22-r2.ebuild +++ b/dev-db/mysql/mysql-4.0.22-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.22-r2.ebuild,v 1.23 2005/08/29 12:55:19 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.22-r2.ebuild,v 1.24 2005/09/12 14:58:15 vivo Exp $ inherit eutils gnuconfig #to accomodate -laadeedah releases @@ -16,7 +16,8 @@ S=${WORKDIR}/${NEWP} DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" HOMEPAGE="http://www.mysql.com/" -SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz" +SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz + mirror://gentoo/mysql-extras-20050908.tar.bz2" LICENSE="GPL-2" SLOT="0" @@ -78,20 +79,15 @@ src_unpack() { unpack ${A} || die #zap startup script messages - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.21-install-db-sh.diff + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.23-install-db-sh.diff" || die #zap binary distribution stuff - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.18-mysqld-safe-sh.diff" || die #required for qmail-mysql - EPATCH_OPTS="-p0 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff + epatch "${MY_PATCH_SOURCE}/${PN}-4.0-nisam.h.diff" || die #for correct hardcoded sysconf directory - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff + epatch "${MY_PATCH_SOURCE}/${PN}-4.0-my-print-defaults.diff" || die # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.18-gentoo-nptl.diff" || die # bad tmpfiles in mysqlaccess, see bug 77805 EPATCH_OPTS="-p1 -d ${S}" \ epatch ${FILESDIR}/mysql-accesstmp.patch @@ -99,12 +95,11 @@ src_unpack() { # attempt to get libmysqlclient_r linked against ssl if USE="ssl" enabled # i would really prefer to fix this at the Makefile.am level, but can't # get the software to autoreconf as distributed - too many missing files - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.21-thrssl.patch + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.21-thrssl.patch" || die + if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.14-r1-tcpd-vars-fix.diff" || die fi # security fix from http://lists.mysql.com/internals/15185 diff --git a/dev-db/mysql/mysql-4.0.24.ebuild b/dev-db/mysql/mysql-4.0.24.ebuild index 63c07f11cbc2..37226020dfa4 100644 --- a/dev-db/mysql/mysql-4.0.24.ebuild +++ b/dev-db/mysql/mysql-4.0.24.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.24.ebuild,v 1.16 2005/08/29 12:55:19 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.24.ebuild,v 1.17 2005/09/12 14:58:15 vivo Exp $ inherit eutils gnuconfig #to accomodate -laadeedah releases @@ -16,7 +16,8 @@ S=${WORKDIR}/${NEWP} DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" HOMEPAGE="http://www.mysql.com/" -SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz" +SRC_URI="mirror://mysql/Downloads/${SDIR}/${NEWP}.tar.gz + mirror://gentoo/mysql-extras-20050908.tar.bz2" LICENSE="GPL-2" SLOT="0" @@ -77,20 +78,17 @@ src_unpack() { fi unpack ${A} || die + local MY_PATCH_SOURCE="${WORKDIR}/mysql-extras" #zap startup script messages - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-install-db-sh.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.23-install-db-sh.diff" || die #zap binary distribution stuff - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.18-mysqld-safe-sh.diff" || die #required for qmail-mysql - EPATCH_OPTS="-p0 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0-nisam.h.diff" || die #for correct hardcoded sysconf directory - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0-my-print-defaults.diff" || die # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.18-gentoo-nptl.diff" || die epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff || die # Merged upstream as of 4.0.24 # bad tmpfiles in mysqlaccess, see bug 77805 @@ -103,12 +101,11 @@ src_unpack() { # attempt to get libmysqlclient_r linked against ssl if USE="ssl" enabled # i would really prefer to fix this at the Makefile.am level, but can't # get the software to autoreconf as distributed - too many missing files - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.21-thrssl.patch || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.21-thrssl.patch" || die + if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.14-r1-tcpd-vars-fix.diff" || die fi for d in ${S} ${S}/innobase; do diff --git a/dev-db/mysql/mysql-4.0.25-r2.ebuild b/dev-db/mysql/mysql-4.0.25-r2.ebuild index d012b94bebac..b47b4b8551e6 100644 --- a/dev-db/mysql/mysql-4.0.25-r2.ebuild +++ b/dev-db/mysql/mysql-4.0.25-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.25-r2.ebuild,v 1.15 2005/09/11 16:30:54 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.25-r2.ebuild,v 1.16 2005/09/12 14:58:15 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -14,7 +14,8 @@ S="${WORKDIR}/${PN}" DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" HOMEPAGE="http://www.mysql.com/" -SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz" +SRC_URI="mirror://mysql/Downloads/MySQL-${SVER}/${NEWP}.tar.gz + mirror://gentoo/mysql-extras-20050908.tar.bz2" LICENSE="GPL-2" SLOT="0" @@ -36,38 +37,58 @@ RDEPEND="${DEPEND} # dev-perl/DBD-mysql is needed by some scripts installed by MySQL PDEPEND="perl? ( dev-perl/DBD-mysql )" +mysql_upgrade_warning() { + ewarn + 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 +} + mysql_get_datadir() { 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=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` + if [ -z "${DATADIR}" ]; then + DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'` + einfo "Using default DATADIR" + fi fi if [ -z "${DATADIR}" ]; then DATADIR="/var/lib/mysql/" einfo "Using default DATADIR" fi einfo "MySQL DATADIR is ${DATADIR}" - export DATADIR -} -mysql_upgrade_warning() { - ewarn - 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 + if [ -z "${PREVIOUS_DATADIR}" ] ; then + if [ -a "${DATADIR}" ] ; then + ewarn "Previous datadir found, it's YOUR job to change" + ewarn "ownership and have care of it" + PREVIOUS_DATADIR="yes" + export PREVIOUS_DATADIR + else + PREVIOUS_DATADIR="no" + export PREVIOUS_DATADIR + fi + fi + + export DATADIR } pkg_setup() { mysql_upgrade_warning mysql_get_datadir -} + enewgroup mysql 60 || die "problem adding group mysql" + enewuser mysql 60 -1 /dev/null mysql \ + || die "problem adding user mysql" + +} src_unpack() { if use static && use ssl; then local msg="MySQL does not support building statically with SSL support" @@ -80,25 +101,18 @@ src_unpack() { mv "${WORKDIR}/${NEWP}" "${S}" cd "${S}" + local MY_PATCH_SOURCE="${WORKDIR}/mysql-extras" + #zap startup script messages - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.23-install-db-sh.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.23-install-db-sh.diff" || die #zap binary distribution stuff - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-mysqld-safe-sh.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.18-mysqld-safe-sh.diff" || die #required for qmail-mysql - EPATCH_OPTS="-p0 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-nisam.h.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0-nisam.h.diff" || die #for correct hardcoded sysconf directory - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0-my-print-defaults.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0-my-print-defaults.diff" || die # NPTL support - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.18-gentoo-nptl.diff || die - # Merged upstream as of 4.0.24 - # bad tmpfiles in mysqlaccess, see bug 77805 - #EPATCH_OPTS="-p1 -d ${S}" \ - #epatch ${FILESDIR}/mysql-accesstmp.patch + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.18-gentoo-nptl.diff" || die # fixed in 4.0.25 #EPATCH_OPTS="-p1 -d ${S}" \ @@ -108,16 +122,14 @@ src_unpack() { # i would really prefer to fix this at the Makefile.am level, but can't # get the software to autoreconf as distributed - too many missing files EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.21-thrssl.patch || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.21-thrssl.patch" || die # PIC fixes # bug #42968 - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.25-r2-asm-pic-fixes.patch || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.25-r2-asm-pic-fixes.patch" || die if use tcpd; then - EPATCH_OPTS="-p1 -d ${S}" \ - epatch ${FILESDIR}/${PN}-4.0.14-r1-tcpd-vars-fix.diff || die + epatch "${MY_PATCH_SOURCE}/${PN}-4.0.14-r1-tcpd-vars-fix.diff" || die fi for d in ${S} ${S}/innobase; do @@ -235,23 +247,32 @@ src_compile() { emake || die "compile problem" } -src_install() { - make install DESTDIR="${D}" benchdir_root="/usr/share/mysql" || die - - enewgroup mysql 60 || die "problem adding group mysql" - enewuser mysql 60 -1 /dev/null mysql \ - || die "problem adding user mysql" +src_test() { + cd ${S} + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + make check || die "make check failed" + if ! useq minimal; then + local retstatus + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + make test + retstatus=$? - diropts "-m0750" - dodir "${DATADIR}" /var/log/mysql + # to be sure ;) + pkill -9 -f ${S}/ndb/src/kernel/ndbd 2>/dev/null + pkill -9 -f ${S}/ndb/src/mgmsrv/ndb_mgmd 2>/dev/null + pkill -9 -f ${S}/ndb/src/mgmclient/ndb_mgm 2>/dev/null + pkill -9 -f ${S}/sql/mysqld 2>/dev/null + [[ $retstatus == 0 ]] || die "make test failed" - diropts "-m0755" - dodir /var/run/mysqld + else + einfo "Skipping server tests due to minimal build." + fi +} - keepdir "${DATADIR}" /var/run/mysqld /var/log/mysql - chown -R mysql:mysql ${D}/${DATADIR} \ - ${D}/var/run/mysqld \ - ${D}/var/log/mysql +src_install() { + mysql_get_datadir + make install DESTDIR="${D}" benchdir_root="/usr/share/mysql" || die # move client libs, install a couple of missing headers local lib=$(get_libdir) @@ -304,6 +325,26 @@ src_install() { newexe "${FILESDIR}/mysql-4.0.24-r2.rc6" mysql insinto /etc/logrotate.d newins "${FILESDIR}/logrotate.mysql" mysql + + #empty dirs... + diropts "-m0750" + if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then + dodir "${DATADIR}" + keepdir "${DATADIR}" + chown -R mysql:mysql "${D}/${DATADIR}" + fi + + dodir "/var/log/mysql" + touch ${D}/var/log/mysql/mysql.{log,err} + chmod 0660 ${D}/var/log/mysql/mysql.{log,err} + + diropts "-m0755" + dodir "/var/run/mysqld" + + keepdir "/var/run/mysqld" "${D}/var/log/mysql" + chown -R mysql:mysql \ + "${D}/var/run/mysqld" \ + "${D}/var/log/mysql" fi # docs @@ -318,27 +359,26 @@ src_install() { } -src_test() { - cd ${S} - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - make check || die "make check failed" - if ! useq minimal; then - local retstatus - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - addpredict /this-dir-does-not-exist/t9.MYI - make test - retstatus=$? +pkg_preinst() { + enewgroup mysql 60 || die "problem adding group mysql" + enewuser mysql 60 -1 /dev/null mysql \ + || die "problem adding user mysql" +} - # to be sure ;) - pkill -9 -f ${S}/ndb/src/kernel/ndbd 2>/dev/null - pkill -9 -f ${S}/ndb/src/mgmsrv/ndb_mgmd 2>/dev/null - pkill -9 -f ${S}/ndb/src/mgmclient/ndb_mgm 2>/dev/null - pkill -9 -f ${S}/sql/mysqld 2>/dev/null - [[ $retstatus == 0 ]] || die "make test failed" +pkg_postinst() { + mysql_get_datadir - else - einfo "Skipping server tests due to minimal build." + if ! useq minimal; then + # your friendly public service announcement... + einfo + einfo "You might want to run:" + einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\"" + einfo "if this is a new install." + einfo fi + + mysql_upgrade_warning + einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." } pkg_config() { @@ -418,31 +458,3 @@ pkg_config() { einfo "done" } - -pkg_postinst() { - mysql_get_datadir - - if ! useq minimal; then - #empty dirs... - [ -d "${ROOT}/${DATADIR}" ] || install -d -m0750 -o mysql -g mysql ${ROOT}/var/lib/mysql - [ -d "${ROOT}/var/run/mysqld" ] || install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld - [ -d "${ROOT}/var/log/mysql" ] || 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* - chmod 0660 ${ROOT}/var/log/mysql/mysql* - # secure some directories - chmod 0750 ${ROOT}/var/log/mysql ${ROOT}/${DATADIR} - - # your friendly public service announcement... - einfo - einfo "You might want to run:" - einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\"" - einfo "if this is a new install." - einfo - fi - - mysql_upgrade_warning - einfo "InnoDB is not optional as of MySQL-4.0.24, at the request of upstream." -} diff --git a/dev-db/mysql/mysql-4.0.26.ebuild b/dev-db/mysql/mysql-4.0.26.ebuild index 3e7685565bdc..97445b05a9ec 100644 --- a/dev-db/mysql/mysql-4.0.26.ebuild +++ b/dev-db/mysql/mysql-4.0.26.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.26.ebuild,v 1.4 2005/09/11 18:08:44 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.0.26.ebuild,v 1.5 2005/09/12 14:58:15 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -51,10 +51,13 @@ mysql_upgrade_warning() { mysql_get_datadir() { 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=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` + if [ -z "${DATADIR}" ]; then + DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'` + einfo "Using default DATADIR" + fi fi if [ -z "${DATADIR}" ]; then DATADIR="/var/lib/mysql/" diff --git a/dev-db/mysql/mysql-4.1.13-r1.ebuild b/dev-db/mysql/mysql-4.1.13-r1.ebuild index 57044130a384..08aefc06abd4 100644 --- a/dev-db/mysql/mysql-4.1.13-r1.ebuild +++ b/dev-db/mysql/mysql-4.1.13-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.13-r1.ebuild,v 1.6 2005/09/11 16:30:54 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.13-r1.ebuild,v 1.7 2005/09/12 14:58:15 vivo Exp $ inherit eutils gnuconfig flag-o-matic versionator @@ -63,10 +63,13 @@ mysql_upgrade_warning() { mysql_get_datadir() { 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=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` + if [ -z "${DATADIR}" ]; then + DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'` + einfo "Using default DATADIR" + fi fi if [ -z "${DATADIR}" ]; then DATADIR="/var/lib/mysql/" @@ -423,7 +426,7 @@ pkg_config() { einfo "Check the password" read -rsp " >" pwd2 ; echo - if [[ pwd1 != pwd2 ]] ; then + if [[ "x$pwd1" != "x$pwd2" ]] ; then die "Passwords are not the same" fi diff --git a/dev-db/mysql/mysql-4.1.14.ebuild b/dev-db/mysql/mysql-4.1.14.ebuild index bcd6c6b4ee23..72560c17c047 100644 --- a/dev-db/mysql/mysql-4.1.14.ebuild +++ b/dev-db/mysql/mysql-4.1.14.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.14.ebuild,v 1.3 2005/09/11 16:30:54 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-4.1.14.ebuild,v 1.4 2005/09/12 14:58:15 vivo Exp $ inherit eutils flag-o-matic versionator @@ -69,10 +69,13 @@ mysql_upgrade_warning() { mysql_get_datadir() { 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=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` + if [ -z "${DATADIR}" ]; then + DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'` + einfo "Using default DATADIR" + fi fi if [ -z "${DATADIR}" ]; then DATADIR="/var/lib/mysql/" @@ -479,7 +482,7 @@ pkg_config() { einfo "Check the password" read -rsp " >" pwd2 ; echo - if [[ pwd1 != pwd2 ]] ; then + if [[ "x$pwd1" != "x$pwd2" ]] ; then die "Passwords are not the same" fi diff --git a/dev-db/mysql/mysql-5.0.12_beta.ebuild b/dev-db/mysql/mysql-5.0.12_beta.ebuild index 1eac5a0d2a0a..8fbb9264dc0b 100644 --- a/dev-db/mysql/mysql-5.0.12_beta.ebuild +++ b/dev-db/mysql/mysql-5.0.12_beta.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.12_beta.ebuild,v 1.4 2005/09/11 16:30:54 vivo Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.12_beta.ebuild,v 1.5 2005/09/12 14:58:15 vivo Exp $ inherit eutils flag-o-matic versionator @@ -68,10 +68,13 @@ mysql_upgrade_warning() { mysql_get_datadir() { 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=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'` DATADIR=`my_print_defaults mysqld 2>/dev/null | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` + if [ -z "${DATADIR}" ]; then + DATADIR=`grep ^datadir /etc/mysql/my.cnf | sed -e 's/.*= //'` + einfo "Using default DATADIR" + fi fi if [ -z "${DATADIR}" ]; then DATADIR="/var/lib/mysql/" @@ -486,7 +489,7 @@ pkg_config() { einfo "Check the password" read -rsp " >" pwd2 ; echo - if [[ pwd1 != pwd2 ]] ; then + if [[ "x$pwd1" != "x$pwd2" ]] ; then die "Passwords are not the same" fi |