add mysql overlay

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mysql@1366 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2009-07-13 18:29:13 +00:00
commit 53348f1af6
34 changed files with 5089 additions and 0 deletions

4
dev-db/header.txt Normal file
View File

@ -0,0 +1,4 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

View File

@ -0,0 +1,169 @@
# ChangeLog for dev-db/mysql-community
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/ChangeLog,v 1.27 2009/07/07 16:10:48 robbat2 Exp $
07 Jul 2009; Robin H. Johnson <robbat2@gentoo.org> metadata.xml:
USE=community/profiling descriptions for metadata. Additionally, this
package is now obsolete, as upstream have re-merged community and
enterprise lines.
*mysql-community-5.0.77-r1 (12 Apr 2009)
12 Apr 2009; Robin H. Johnson <robbat2@gentoo.org>
+mysql-community-5.0.77-r1.ebuild:
Bug #238487, lots of patching fun to enable building of a shared embedded
libmysqld for Amarok. Ported from the mysql-5.0.76 patch.
*mysql-community-5.0.77 (28 Feb 2009)
28 Feb 2009; Robin H. Johnson <robbat2@gentoo.org>
+mysql-community-5.0.77.ebuild:
Version bump.
*mysql-community-5.0.75-r1 (12 Feb 2009)
*mysql-community-5.0.75 (12 Feb 2009)
12 Feb 2009; Robin H. Johnson <robbat2@gentoo.org>
+mysql-community-5.0.75.ebuild, +mysql-community-5.0.75-r1.ebuild:
Version bump using the latest Gentoo patchset. Also include the Percona
patchset in the -r1 ebuild per bug #237721.
18 Nov 2008; Robin H. Johnson <robbat2@gentoo.org>
mysql-community-5.0.67.ebuild:
Update archive_gis test disables.
14 Nov 2008; Robin H. Johnson <robbat2@gentoo.org>
mysql-community-5.0.27-r1.ebuild, mysql-community-5.0.45.ebuild,
mysql-community-5.0.51a.ebuild, mysql-community-5.0.67.ebuild,
mysql-community-5.1.14_beta-r1.ebuild, mysql-community-5.1.15_beta.ebuild,
mysql-community-5.1.21_beta.ebuild:
Repoman cleanups.
14 Nov 2008; Robin H. Johnson <robbat2@gentoo.org>
mysql-community-5.0.67.ebuild:
archive_gis is still broken on big_endian.
14 Nov 2008; Robin H. Johnson <robbat2@gentoo.org> Manifest:
Repoman bug maybe.
*mysql-community-5.0.67 (14 Nov 2008)
14 Nov 2008; Robin H. Johnson <robbat2@gentoo.org> files/my.cnf-4.1,
+mysql-community-5.0.67.ebuild:
Version bump for mysql-community, also handle file-per-table for innodb
bug #237058.
05 Aug 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
Add USE flag description to metadata wrt GLEP 56.
*mysql-community-5.0.51a (10 Mar 2008)
10 Mar 2008; Robin H. Johnson <robbat2@gentoo.org>
+mysql-community-5.0.51a.ebuild:
Plain version bump, based on the main 5.0.56 ebuild. More patches in a later
revision.
*mysql-community-5.1.21_beta (02 Oct 2007)
02 Oct 2007; Robin H. Johnson <robbat2@gentoo.org>
+mysql-community-5.1.21_beta.ebuild:
Bug #181686, version bump.
*mysql-community-5.0.45 (15 Jul 2007)
15 Jul 2007; Robin H. Johnson <robbat2@gentoo.org>
+mysql-community-5.0.45.ebuild:
Version bump of mysql-community, per security bug #185333, bump request
#178265. Also cleans up the src_test per bug #161885. If you want to use
src_test now, you MUST have FEATURES=userpriv. See the main
dev-db/mysql/ChangeLog for more details.
14 Jul 2007; Robin H. Johnson <robbat2@gentoo.org>
mysql-community-5.0.27-r1.ebuild:
Clean up 5.0.27-r1 to match enterprise 5.0.26-r2 build process.
06 Mar 2007; Luca Longinotti <chtekk@gentoo.org>
-mysql-community-5.1.15_alpha-r90.ebuild,
-mysql-community-5.1.15_alpha20061231-r61.ebuild,
mysql-community-5.1.15_beta.ebuild:
Cleanup old alpha versions. Fix bug #169618.
*mysql-community-5.1.15_beta (04 Mar 2007)
04 Mar 2007; Francesco Riosa <vivo@gentoo.org>
+mysql-community-5.1.15_beta.ebuild:
version bump
12 Jan 2007; Luca Longinotti <chtekk@gentoo.org> -files/logrotate.mysql,
mysql-community-5.0.27-r1.ebuild, mysql-community-5.1.14_beta-r1.ebuild,
mysql-community-5.1.15_alpha-r90.ebuild,
mysql-community-5.1.15_alpha20061231-r61.ebuild:
Start cleanup.
*mysql-community-5.1.15_alpha20061231-r61 (05 Jan 2007)
*mysql-community-5.1.14_beta-r1 (05 Jan 2007)
*mysql-community-5.0.27-r1 (05 Jan 2007)
05 Jan 2007; Francesco Riosa <vivo@gentoo.org> -files/mysql.conf.d,
-files/mysql.rc6, -files/mysqlmanager.conf.d, -files/mysqlmanager.rc6,
-mysql-community-5.0.27.ebuild, +mysql-community-5.0.27-r1.ebuild,
-mysql-community-5.1.14_beta.ebuild,
+mysql-community-5.1.14_beta-r1.ebuild,
-mysql-community-5.1.15_alpha20061231-r60.ebuild,
+mysql-community-5.1.15_alpha20061231-r61.ebuild:
force revision bump, needed to fix/discover bugs introuduced during last
working days.
05 Jan 2007; Francesco Riosa <vivo@gentoo.org>
mysql-community-5.0.27.ebuild, mysql-community-5.1.14_beta.ebuild,
mysql-community-5.1.15_alpha-r90.ebuild,
mysql-community-5.1.15_alpha20061231-r60.ebuild:
bug #156301 => mysql_config has now stripped cflags (version 4.0.x and 4.1.21
still unpatched)
bug #160059 => WANT_AUTOCONF and WANT_AUTOMAKE are set to "latest"
*mysql-community-5.1.15_alpha20061231-r60 (03 Jan 2007)
*mysql-community-5.1.15_alpha-r90 (03 Jan 2007)
03 Jan 2007; Francesco Riosa <vivo@gentoo.org>
-mysql-community-4.1.22.ebuild, mysql-community-5.0.27.ebuild,
-mysql-community-5.1.13_alpha20061018.ebuild,
mysql-community-5.1.14_beta.ebuild,
+mysql-community-5.1.15_alpha-r90.ebuild,
+mysql-community-5.1.15_alpha20061231-r60.ebuild:
Added "pbxt" USE flag, better using testsuite
*mysql-community-4.1.22 (10 Dec 2006)
10 Dec 2006; Francesco Riosa <vivo@gentoo.org>
+mysql-community-4.1.22.ebuild:
version bump for 4.1
*mysql-community-5.1.14_beta (10 Dec 2006)
10 Dec 2006; Francesco Riosa <vivo@gentoo.org>
+mysql-community-5.1.14_beta.ebuild:
version bump
09 Dec 2006; Francesco Riosa <vivo@gentoo.org>
mysql-community-5.0.27.ebuild,
mysql-community-5.1.13_alpha20061018.ebuild:
split SRC_URIs outside the eclass
24 Nov 2006; Luca Longinotti <chtekk@gentoo.org>
mysql-community-5.1.13_alpha20061018.ebuild:
Readd sparc-fbsd keyword.
23 Nov 2006; Luca Longinotti <chtekk@gentoo.org> +files/logrotate.mysql,
+files/mysql.rc6, mysql-community-5.1.13_alpha20061018.ebuild:
Add missing files, add tests warn msg for 5.1.
*mysql-community-5.1.13_alpha20061018 (23 Nov 2006)
*mysql-community-5.0.27 (23 Nov 2006)
23 Nov 2006; Francesco Riosa <vivo@gentoo.org> +files/my.cnf-4.1,
+files/mysql.conf.d, +files/mysqlmanager.conf.d, +files/mysqlmanager.rc6,
+metadata.xml, +mysql-community-5.0.27.ebuild,
+mysql-community-5.1.13_alpha20061018.ebuild:
Starting with mysql-5.0.27 MySQL is splitted in enterprise and community

View File

@ -0,0 +1,35 @@
AUX my.cnf-4.1 4245 RMD160 5783022319074444a50d11b4a023e3226c1937f0 SHA1 8ceac9259f63cb56c376f8ef563183b8f0812f52 SHA256 9ad20532a6b8cae01af353207c6132e2f9055d500f26080a3f620337654963d0
DIST mysql-5.0.27.tar.gz 25867740 RMD160 3de75b959d04e002b2e4cfe322abdb48bf2f80fd SHA1 656de9c03f07c2371f40277076ec2fc6eac51ec8 SHA256 08dc9a7b4adb766b2fb8390804147822f1772aa4bd2e06ca7764bc85010c73a7
DIST mysql-5.0.45.tar.gz 24433261 RMD160 ee6717c65dc7bb6b5b596b90ef6c47c7fdebf5fb SHA1 a5fba8e004acc43ac1a576d728f10215f54ebe20 SHA256 e4443d8dc859ed53bd9f3bef143ce30c7f5dee66a02748e9a003136be25e0060
DIST mysql-5.0.51a.tar.gz 27588558 RMD160 869754150ea42f2fbad36f77eb9a0e7bb6e3892b SHA1 adc83bcae6d04fccd6360dc3aa37c64aaa479a3d SHA256 59b06f6a948430c7254760e0bf16f1447ee14d0142073f58fd2e68c327330b68
DIST mysql-5.0.67.tar.gz 28370810 RMD160 05d38a5f8d91cb4dac1ee446af96b28163bd3722 SHA1 168090a4698a3a5efa2f2c9380a4352d4433d377 SHA256 7b64e609849ff64f2fcb82a2b72883f79adc893e9f6fc0d35465ef7d97542058
DIST mysql-5.0.75.tar.gz 32514150 RMD160 b3044b7f18f27a2b55933f7fc082de9ed94d0bb9 SHA1 9deae85a6abf7913f05d89db4b745acb2512bf78 SHA256 c0985da988217e88456c39d2ab2f24d802f5ea5f2a3190dc0011447550bdc2b9
DIST mysql-5.0.77.tar.gz 34453169 RMD160 664c91bf8f7e2c292066a83a83cc60f56f890516 SHA1 dbab8f617d73001922086c1d20fa8c65f16f0aea SHA256 a9311915858279c3832100c42e4e2b12790ab884dc3124bc45355aaf424a15e8
DIST mysql-5.1.14-beta.tar.gz 23640648 RMD160 2acaa1393967a6fd57f9c37f3eef8dac62eb7138 SHA1 52533fcd07fbce2269a3c14f7314deada6dcf0c1 SHA256 6b4990a784169560fd487d24c69efba1f73662500d0d3132375d8b5cd026bb67
DIST mysql-5.1.15-beta.tar.gz 22150362 RMD160 a171efd3984db8033c5f7208193bcc93675f21e7 SHA1 a6a16e223d4d8a0e01b5da86c7ac09193c50d37e SHA256 8ff4f1054060329adb0584cef5c145fbb8ba62b573cb952381e4dc9a9b60ad66
DIST mysql-5.1.21-beta.tar.gz 28306579 RMD160 111328f8795124940b1feaf2d840684d3e46710b SHA1 50ceb0df1d37a1eb94d46f60314edde2d7608bda SHA256 7a63307446736692a2908fdb67d9f1b6fe1bfa3206f5686f1b12fc8d698fda58
DIST mysql-extras-20070105.tar.bz2 50005 RMD160 abf1f8ebab8ecdfdb5ebe9ca55076f39ab492acb SHA1 7f4dbc3d6c20fe953bf6e936a58343a229398ca0 SHA256 17697bf70acffd0eeefd976b5ef06dd36080273bf7e805b51a31d72f5f2c5172
DIST mysql-extras-20070217.tar.bz2 50155 RMD160 fd8cb330772fcc77bc3ac501a899f8c704d0d798 SHA1 2ce58115db0f703d98c4f7b0c0b1835123c07386 SHA256 401a8fed36f87d81d53c5c392a017d85a3a27c1694e38350ba30d68732197ea0
DIST mysql-extras-20070710.tar.bz2 52626 RMD160 e0f39f1fd35012fb3e2a431379d7b15389e05187 SHA1 15b04104a61c61c216e85508b711e61855ba3ee4 SHA256 980a5fa500f4136e13bf434f167995248b9c8f96a2c42c96e4d7ad60246ad7fc
DIST mysql-extras-20070916.tar.bz2 52095 RMD160 70f91453700052c3c3e132840055274f02963a83 SHA1 70b96849d79efc119c90a78a8bca1a2d8daa1711 SHA256 b1a1b2e962f0b2d5d39f4e29a9af78898d4adcfc4a00c428934f11ebba5ca4ff
DIST mysql-extras-20080310.tar.bz2 106499 RMD160 ddc48002d0b5d0d03d1b88dbf037757a3aa38994 SHA1 c5584a0ff7121722c9e9359e1fdcc8744a2d215c SHA256 4b963976b26607827e61187a72589eefefe84bc811da37f7bfa07779bdb61b59
DIST mysql-extras-20080601.tar.bz2 106566 RMD160 6e6470c8908e0e944ff8a71886db6e80af9465b0 SHA1 a462cf953452283bafd785ac9c109104b673bbd1 SHA256 de7bb63eb6de3b7b14d8d65b5248258b18e00524eac08dddf373f98361402ed9
DIST mysql-extras-20090211-1206Z.tar.bz2 111217 RMD160 243e1ace611f07f30c148c272d064fc916a47821 SHA1 2ba4041b6749575380fda0e6ae551284aaefcbfc SHA256 9a9a40aac283059492b10ff3dc059a90990dc3b7963405054ead1c750d63d081
DIST mysql-extras-20090212-0556Z.tar.bz2 211564 RMD160 7641929dd98bc0b5b6fbe76a9b6c731334a3e6c6 SHA1 8f09c516d93390b5cad85387acf1d8d52f0c59b0 SHA256 f20a1483f04fbf8a44d1bce921813da644fc3a1dd0fe45929ef463d5600d2eba
DIST mysql-extras-20090228-0714Z.tar.bz2 254114 RMD160 06ffc92f35e7d40910dcb66a80d1f8078caf7f0f SHA1 773e2bc42f8930a45d78f47435307644f554aa06 SHA256 9c7fd45ac4207556c55d5ba7f921831de50cb4cfe1284852b12bd0f548f11fba
DIST mysql-extras-20090412-0644Z.tar.bz2 251842 RMD160 ec59bac7e056a04821d561133b79de332670f671 SHA1 3e87dc02ddfde094df1cd91271d0cb64ec3dcafc SHA256 264c4d2f39edc844f9ec284c6025a477a6512496d906dfbce882835e4bf0a2a2
DIST pbxt-0.9.73-beta.tar.gz 2706652 RMD160 a4d974a8519b62868e948966910a84dbded05abe SHA1 f6ed2ba49ec82646581edcb06e054c46a5ba1ded SHA256 a2176d137138d33028c57499b74a79c5f12dcd958c3e7f1aad67bb4b7b24674d
DIST pbxt-0.9.8-beta.tar.gz 2828272 RMD160 c0d5f0a67cc7cddecce9e198afe0ef3521a52cb4 SHA1 ada001c5e71dd1c6c201ebe5fafb67b359f10495 SHA256 976cf0539f2756e6a3b81014161f5ae8b77261aee6455c46a7e5de1054708b37
EBUILD mysql-community-5.0.27-r1.ebuild 2065 RMD160 ecb37de175bfa063f3da81ff5ec553517f2a6154 SHA1 c6de0af065df49dd968a45013d9cd138e7556e29 SHA256 07992f25f92ef317fc817ed963331bd7fc879d87ee7cc642be97b0a68b519dc5
EBUILD mysql-community-5.0.45.ebuild 2048 RMD160 bc87d106684e5d3c4b2b732b1c1e49dbc2e9b726 SHA1 9a2bab500fe17bd76d738973acdfe734b8bb2b36 SHA256 20fe8cca1309411ca15a578c3d59c8a647b63a194b4f58cb0dc84b70753e1252
EBUILD mysql-community-5.0.51a.ebuild 3281 RMD160 3f70696b23e56aaf9f4585e34f3bd85575b352b6 SHA1 b80d19ce2d693c1b4077c4626b667928e8fba99b SHA256 26e76dbdca8f8c2d9b970ca62c1a50c2e9c9d24175c615deac1d882ad9cb80e1
EBUILD mysql-community-5.0.67.ebuild 3709 RMD160 3c1c497b93d70d6ab4d51fe9e6634dbddd201712 SHA1 b91122039c12a3559ce41c65dc9ee8e8d1d6950a SHA256 9a567202c203c72bc2b3d71766c5c1a4591a217beff22a81863f6e1f85038390
EBUILD mysql-community-5.0.75-r1.ebuild 4946 RMD160 7baa27f295ad8200272621e68ceeb79dfa515863 SHA1 249308292e49fa88a53daa72c0f88fd2b23df178 SHA256 0a66065718e3a3771e0cbe71ca5a42a4a3ec1e00752c094fcbb70001c21f3e38
EBUILD mysql-community-5.0.75.ebuild 4943 RMD160 7a5ba93dd5f6460fee0fb4dc50f975faa84d6fc7 SHA1 88a08bc254c42de09f8811216d088ee293f7ce45 SHA256 4698dfdc4e90e02b62384b189d29fe0d9941dcd8379f42c84acfab07eb0f3b0d
EBUILD mysql-community-5.0.77-r1.ebuild 4946 RMD160 80ac1257d2769c436d10946d9fcca9b113ce0eeb SHA1 9bdc2582dc71aeac28f62f31306616a91ef25e56 SHA256 a8110c6739d1dbb519dd79a3fd6a9c6a9b8824c62ed8db3196642f2b93d0a45f
EBUILD mysql-community-5.0.77.ebuild 4943 RMD160 8776ca0670740647929a04ccfb010c03b7a16930 SHA1 b5c201b8b771e4673b43d6f0e324e521c2ad82f8 SHA256 4702407a6c34cc310dfc313c0749d4d5634bb9669504f5c3df2a58b63cd0d14e
EBUILD mysql-community-5.1.14_beta-r1.ebuild 2243 RMD160 fce130cbbf40a21ad00caac4507e4ec5d9d5e2ae SHA1 a6efcc19ba925789127da2498a0b5f3656ceb346 SHA256 6e6921b7e0e9f8df5fac72130c887e523aa0e89bddc9df30aa8649011d5ed166
EBUILD mysql-community-5.1.15_beta.ebuild 2238 RMD160 ac8814006e3cef0a9c38b46043b6a39cf5d95e5b SHA1 5d39e06de717de60ab2e27a2f62e2ec08cda3633 SHA256 de9d28c7b0f8b8ebebaf67b63025a1b83815cc2107d03d8817b18598cf11b168
EBUILD mysql-community-5.1.21_beta.ebuild 2417 RMD160 3e8a6348c0f0d1ce4e88e88c60eb70abe15f9cc7 SHA1 1fc209435fe778389bf65c7baced30d244315395 SHA256 de6226108483cb459e12a013e0cb5d3b58f2269fe00946f1c83e821da2729411
MISC ChangeLog 6406 RMD160 b7d01b8283ad2b13dba5e2d4b8ba507583196111 SHA1 e11a1d988f38b0cf3827f96a0c22763c5c570040 SHA256 9a34957e5f57d192a490351905fa69708e4af64a5a0f16469a56d705bea475cd
MISC metadata.xml 922 RMD160 b90fe8d96ddd7c5af7d986ef190f0317b504ae09 SHA1 0c6b72314c7694e66486215c689819a6b4dd6a52 SHA256 1447bd98b6379c56bed585e7a29333c40f7c26dd338b4bcc2e2538beabf1a368

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>mysql</herd>
<use>
<flag name='big-tables'>Make tables contain up to 1.844E+19 rows</flag>
<flag name='cluster'>Add support for NDB clustering</flag>
<flag name='embedded'>Build embedded server (libmysqld)</flag>
<flag name='extraengine'>Add support for alternative storage engines</flag>
<flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
<flag name='max-idx-128'>Raise the max index per table limit from 64 to 128
</flag>
<flag name='minimal'>Install client programs only, no server</flag>
<flag name='pbxt'>Add experimental support for pbxt storage engine</flag>
<flag name='community'>Enables the community features from upstream.</flag>
<flag name='profiling'>Add support for statement profiling (requires USE=community).</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,66 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/mysql-community-5.1.21_beta.ebuild,v 1.3 2008/11/14 09:43:04 robbat2 Exp $
MY_EXTRAS_VER="20081211"
#SERVER_URI="mirror://gentoo/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz"
PBXT_VERSION="0.9.8-beta"
inherit mysql
# only to make repoman happy. it is really set in the eclass
IUSE="$IUSE"
# REMEMBER: also update eclass/mysql*.eclass before committing!
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
src_test() {
make check || die "make check failed"
if ! use "minimal" ; then
cd "${S}/mysql-test"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
local retstatus
local t
local testopts="--force"
addpredict /this-dir-does-not-exist/t9.MYI
# mysqladmin start before dir creation
mkdir "${S}"/mysql-test/var{,/log}
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# sandbox make ndbd zombie
#X#hasq "sandbox" ${FEATURES} && testopts="${testopts} --skip-ndb"
#X#if [[ ${UID} -eq 0 ]] ; then
#X# einfo "Disabling IM tests due to failure as root"
#X# mysql_disable_test "im_cmd_line" "fail as root"
#X# mysql_disable_test "im_daemon_life_cycle" "fail as root"
#X# mysql_disable_test "im_instance_conf" "fail as root"
#X# mysql_disable_test "im_life_cycle" "fail as root"
#X# mysql_disable_test "im_options" "fail as root"
#X# mysql_disable_test "im_utils" "fail as root"
#X# mysql_disable_test "trigger" "fail as root"
#X#fi
#use "extraengine" && mysql_disable_test "federated" "fail with extraengine"
#mysql_disable_test "view" "Already fixed: fail because now we are in year 2007"
# from Makefile.am:
retstatus=1
./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=mixed \
&& ./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=row \
&& ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=row \
&& ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=mixed \
&& retstatus=0
# Just to be sure ;)
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
[[ $retstatus -eq 0 ]] || die "make test failed"
else
einfo "Skipping server tests due to minimal build."
fi
}

View File

@ -0,0 +1,17 @@
# ChangeLog for dev-db/mysql-init-scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/ChangeLog,v 1.3 2007/04/28 16:58:36 swegener Exp $
28 Apr 2007; Sven Wegener <swegener@gentoo.org>
mysql-init-scripts-1.2.ebuild:
Fix *initd, *confd and *envd calls (#17388, #174266)
*mysql-init-scripts-1.2 (04 Mar 2007)
04 Mar 2007; Francesco Riosa <vivo@gentoo.org> files/mysql.rc6,
-mysql-init-scripts-1.1.ebuild, +mysql-init-scripts-1.2.ebuild:
workaround for bug #166606
12 Jan 2007; Luca Longinotti <chtekk@gentoo.org> ChangeLog:
Move from sys-apps/mysql.

View File

@ -0,0 +1,8 @@
AUX logrotate.mysql 453 RMD160 d1fd681cea5073b662d521c7473eb121d15f50e4 SHA1 1e52a9df3a42c8705f4c22bb6758674fdfb04135 SHA256 d873c55e0fe4ba545fc40f6724a9415db9e9a2da3e80c00b3443b7ab73bc7a8b
AUX mysql.conf.d 3273 RMD160 a2661c832c1091b2d05e599fc58cce6f686c7f31 SHA1 64e9bb80099bf6e14a07764fcb69bb02682aee0b SHA256 ee049781a3885305ce9999371198ff54f97fee4d2ad0814ba3aa3a03abc2724c
AUX mysql.rc6 10707 RMD160 ce30bc64ff0b0b46fead86290733eb83797c4c67 SHA1 9dbee6267466d7bc80a030a62fdc8166723d199b SHA256 4eaf1fa2eac567f5a506c61a74e8f630ce075168ad27d7ccd4803d9a87395672
AUX mysqlmanager.conf.d 1009 RMD160 b443dc0cd1cb7fb054fe7229a52b8d093e634652 SHA1 0d82531df24ba4f0d957176b6fa0076a1cae0356 SHA256 35353f585cc9d3f97bbcfe77224d183e0fedcf4134377b8bff4c278462577cc7
AUX mysqlmanager.rc6 6632 RMD160 17fd2bdfcad0ca6e32e6ee91e1e0db7ce3263fef SHA1 18c6fc53a65a4f92dacd229585199b94f1c888cc SHA256 0d37cb3199a2752604a105d54340a61b9ee062e6c1d977a863628b694d93e96d
EBUILD mysql-init-scripts-1.2.ebuild 765 RMD160 7e0c0b29ddf5b1b526d21cd7bc298510ac62ad8e SHA1 044bf497d9f365a7dcc36b709d1231f4765daf7f SHA256 9e1a65a7d0d3ad904da18f4e97b43f668095312bb9d79a9be3fc9c449feb0017
MISC ChangeLog 656 RMD160 cabf364e9f2be718f9e16e4b2c8a9f689bda669f SHA1 f11cc9dd5459da0969c8d7d4a94d1453f307cc32 SHA256 ee2cc766bf4909f3f4286e2e2bc1f60e3515a2edf13a35703dbde3a2832223b3
MISC metadata.xml 159 RMD160 a50a94af7706288c46f81d6c3da9b5f888050eee SHA1 5eb253a678d6faa0f1c6b3c5720a804ed8923566 SHA256 5cfd5aa0e8104c0326b5f4c9205a6449a94e0f6f6abfd2626f1e7a8fe77b98b7

View File

@ -0,0 +1,15 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/logrotate.mysql,v 1.1 2007/01/12 16:54:20 chtekk Exp $
/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err {
monthly
create 660 mysql mysql
notifempty
size 5M
sharedscripts
missingok
postrotate
/bin/kill -HUP `cat /var/run/mysqld/mysqld.pid`
endscript
}

View File

@ -0,0 +1,80 @@
# Here is where we define which server(s) to start.
# Additional parameters to be passed to mysqld at startup may be added here,
# which will override the ones in "my.cnf".
#
# Below are described some suggested parameters to use.
# The parameters not recognized will be passed through to the mysqld daemon
# directly!
# To avoid starting a server just comment it's definition.
#
# Last but not least, SPACES are NOT allowed inside the parameters!
#
# Parameter : description
# ----------------+-----------------------------------------------------------
# nice : integer [-20 .. 19 ] default 0
# : change the priority of the server -20 (high) to 19 (low)
# : see "man nice 1" for description
# ----------------+-----------------------------------------------------------
# mycnf : string [full path to my.cnf]
# : specify the path to my.cnf file to be used
# ----------------+-----------------------------------------------------------
# startup_timeout : integer [seconds] default 15
# : time to wait for mysqld up and running, after this it's
# : marked as failed
# ----------------+-----------------------------------------------------------
#
# Additional parameters
# Parameter : description
# ----------------+-----------------------------------------------------------
# server-id : integer [1 .. 255]
# : Uniquely identifies the server instance in the community
# : of replication partners.
# ----------------+-----------------------------------------------------------
# port : integer [1025 .. 65535] default 3306
# : Port number to use for connection.
# : Looses any meaning if skip-networking is set.
# ----------------+-----------------------------------------------------------
# skip-networking : NULL
# : Don't allow connection through TCP/IP.
# ----------------+-----------------------------------------------------------
# log-bin : string [name of the binlog files]
# : Log update queries in binary format. Optional (but
# : strongly recommended to avoid replication problems if
# : server's hostname changes) argument should be the chosen
# : location for the binary log files.
# ----------------+-----------------------------------------------------------
# Additionally the following variables are recognized:
#
# Be more verbose, accepts values from 1 to 4
#DEBUG=4
#
# The default location for the "master" pid file
#MYSQL_GLOB_PID_FILE="/var/run/svc-started-mysqld"
#
# The timeout for a failed attempt to stop a server
#STOPTIMEOUT=120
#
# The parameters are passed in a bash array variable,
# the variable name is mysql_slot_0_[server-num]
# "server-num" is an optional number used to start multiple servers
#
# Examples:
#
# start a default server with default options:
#mysql_slot_0=()
#
# start MySQL reniced, overriding some start parameters
#mysql_slot_0=(
# "nice=-5"
# "server-id=123"
# "log-bin="myhost"
# "port=3307"
#)
#
# start another server, different my.cnf
#mysql_slot_0_1=(
# "mycnf=/home/test/my.cnf"
# "server-id=124"
#)
#

View File

@ -0,0 +1,359 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/mysql.rc6,v 1.2 2007/03/04 15:47:03 vivo Exp $
# external binaries used: which, sed, tac
# int in_list(char * elem, char * list)
function in_list() {
local elem=${1:-"none"}
local list=${2:-","}
[[ "${list}" == "${list/,${elem},/}" ]] \
&& return 1 \
|| return 0
}
function wdebug() {
if [[ "${DEBUG}" -ge "${1}" ]] ; then
shift
echo "dbg: ${@}"
fi
}
depend() {
use dns net localmount netmount nfsmount
}
do_escape() {
# Ihatethisreallyverymuch
#echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|"
echo "$1"
}
# int get_slot_config(srv_slot=0, srv_num)
get_slot_config() {
wdebug 4 ">>> get_slot_config()"
local srv srv_slot srv_num
srv_slot="${1:-"0"}"
srv_num="${2}"
MY_SUFFIX="-${srv_slot}"
# srv=array(0 => [srv_slot], 1 => [srv_num] )
srv=( ${srv_slot} ${srv_num} )
local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
local conf_d_parameters="${!tmp_eval}"
if [[ "${srv_slot}" == "0" ]] ; then
MY_SUFFIX=''
# try some other default for the default server
[[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=${mysql_slot[@]}
fi
[[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=( )
basedir="" datadir="" pidfile="" socket=""
CHROOT="" NICE="" STARTUPTIMEOUT=5 STOPTIMEOUT=120
wdebug 3 "srv ${srv[@]}"
wdebug 3 "srv_slot ${srv_slot}"
wdebug 3 "srv_num ${srv_num}"
wdebug 3 "tmp_eval ${tmp_eval}"
wdebug 3 "conf_d_parameters ${conf_d_parameters[@]}"
wdebug 3 "MY_SUFFIX ${MY_SUFFIX}"
local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
local conf_d_parameters="${!tmp_eval}"
# collations need to be defined *after* the character sets,
# so we will duplicate them
local collations=""
[[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters=''
MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf"
# summa of unmanaged parameters
# some parameters may be present multiple times
unmanagedparams=""
# grab the parameters from conf.d/mysql definition
for my_default in ${conf_d_parameters[*]} ; do
case "${my_default}" in
nice=*)
NICE="${my_default#nice=}"
nice -n $NICE ls /tmp &>/dev/null || NICE=""
;;
mycnf=*) MY_CNF="${my_default#mycnf=}" ;;
startup_timeout=*)
STARTUPTIMEOUT="${my_default#startup_timeout=}" ;;
basedir=*) basedir="${my_default#basedir=}" ;;
datadir=*) datadir="${my_default#datadir=}" ;;
pid-file=*) pidfile="${my_default#pid-file=}" ;;
socket=*) socket="${my_default#socket=}" ;;
*collation*=)
collations="${collations} --$( do_escape "${my_default}" )"
;;
*=*)
# list of parameters we already have
# prepend "--" because my_print_defaults do it
unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )"
;;
*)
unmanagedparams="${unmanagedparams} --${my_default}"
;;
esac
done
if [[ ! -r "${MY_CNF}" ]] ; then
ewarn "Cannot access ${MY_CNF} !"
MY_CNF=""
my_defaults=""
else
local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)"
if [[ ! -x "${my_print_defaults}" ]] ; then
eerror "my_print_defaults NOT found or not executable"
my_defaults=""
else
my_defaults=$( ${my_print_defaults} \
--loose-verbose \
--config-file="${MY_CNF}" \
mysqld server )
fi
fi
# grab needed parameters from my.cnf, don't override the ones from
# conf.d/mysql
for my_default in ${my_defaults} ; do
case "${my_default}" in
--basedir=*)
[[ -z "${basedir}" ]] && basedir="${my_default#--basedir=}" ;;
--datadir=*)
[[ -z "${datadir}" ]] && datadir="${my_default#--datadir=}" ;;
--pid-file=*)
[[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;;
--socket=*)
[[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;;
--*collation*=)
# the order is inversed because we want the conf.d ones overriden
collations="$( do_escape "${my_default}" ) ${collations}"
;;
esac
done
# some parameters
basedir="${basedir:-"/usr"}"
datadir="${datadir:-"/var/lib/mysql${MY_SUFFIX}"}"
pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.pid"}"
socket="${socket:-"/var/run/mysqld/mysqld${MY_SUFFIX}.sock"}"
unmanagedparams="${unmanagedparams} ${collations}"
wdebug 3 "chroot dir => ${CHROOT}"
wdebug 3 "niceness => ${NICE}"
wdebug 3 "basedir => ${basedir}"
wdebug 3 "datadir => ${datadir}"
wdebug 3 "pidfile => ${pidfile}"
wdebug 3 "socket => ${socket}"
wdebug 3 "Unamanged => ${unmanagedparams}"
# extension for sleep tenth of seconds, not very portable so check it before
if sleep 0.01 ; then
STARTUPTIMEOUT=$(( STARTUPTIMEOUT * 10 ))
STOPTIMEOUT=$(( STOPTIMEOUT * 10 ))
TIMEUNIT=0.1
else
TIMEUNIT=1
fi
# push these out to the script
export MY_SUFFIX NICE MY_CNF pidfile datadir basedir socket CHROOT
export unmanagedparams STARTUPTIMEOUT STOPTIMEOUT TIMEUNIT
wdebug 4 "<<< get_slot_config() ok"
return 0
}
checkconfig() {
wdebug 4 ">>> checkconfig(\"${1}\")"
local datadir="${1}" pidfile="${2}" socket="${3}"
if [[ -n "${NOCHECK}" ]] ; then
rm -f "${pidfile}" "${socket}"
return 0
fi
if [[ ! -d "${datadir}" ]] ; then
eerror "MySQL datadir is empty or invalid"
eerror "Please check your my.cnf : ${MY_CNF}"
wdebug 4 "<<< checkconfig() KO"
return 1
fi
if [[ ! -d "${datadir}/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..."
wdebug 4 "<<< checkconfig() KO"
return 1
fi
if [[ -f "${pidfile}" ]] ; then
kill -15 $(< ${pidfile}) 2>/dev/null
if [[ $? -eq 0 ]] ; then
# the process exist, we have a problem
eerror "\"${pidfile}\" is still present and the process is running."
eerror "Please stop it \"kill $(< ${pidfile})\" maybe ?"
wdebug 4 "<<< checkconfig() KO"
return 1
else
rm -f "${pidfile}"
fi
fi
if [[ -S "${socket}" ]] ; then
ewarn "Strange, the socket file already exist in \"${socket}\""
ewarn "it will be removed now and re-created by the MySQL server"
ewarn "BUT please make your checks."
rm -f "${socket}"
fi
wdebug 4 "<<< checkconfig() ok"
return 0
}
start() {
wdebug 4 ">>> start()"
MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"}
# servers are defined in /etc/conf.d/mysql
local serverlist=${!mysql_slot_*}
# provide default for empty conf.d/mysql
if [[ -z "${serverlist}" ]] ; then
serverlist=0
export mysql_slot_0=( )
fi
local retstatus timeout
local globretstatus=1
local srv_slot srv_num
# server MUST NOT share same location for these
local pidfilelist=',' datadirlist=',' socketlist=','
local ssd_thing=1
local mysqld_thing tmpnice
ebegin "Starting ${myservice}"
# try to start each server
for srv in ${serverlist[*]} ; do
srv_slot="${srv#mysql_slot_}"
if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then
srv_num=''
else
srv_num="${srv_slot#*_}"
fi
srv_slot="${srv_slot%%_*}"
retstatus=0
get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1
# checks
if ! checkconfig "${datadir}" "${pidfile}" "${socket}" ; then
retstatus=2 ; continue
fi
if in_list "${pidfile}" "${pidfilelist}" ; then
eerror "Sorry, won't start with same pid-file: ${pidfile}"
retstatus=3 ; continue
fi
if in_list "${datadir}" "${datadirlist}" ; then
eerror "Sorry, won't start with same datadir: ${datadir}"
retstatus=4 ; continue
fi
if in_list "${socket}" "${socketlist}" ; then
eerror "Sorry, won't start with same socket: ${socket}"
retstatus=5 ; continue
fi
einfo "Starting ${myservice} (${MY_CNF})"
mysqld_thing="${MY_CNF:+"--defaults-file="}${MY_CNF}"
mysqld_thing="${mysqld_thing} ${unmanagedparams}"
mysqld_thing="${mysqld_thing} --basedir=${basedir}"
mysqld_thing="${mysqld_thing} --datadir=${datadir}"
mysqld_thing="${mysqld_thing} --pid-file=${pidfile}"
mysqld_thing="${mysqld_thing} --socket=${socket}"
mysqld_thing="${mysqld_thing} --user=mysql"
wdebug 2 "starting mysqld with: ${mysqld_thing}"
if [[ ${ssd_thing} -eq 1 ]] ; then
tmpnice="${NICE:+"--nicelevel "}${NICE}"
start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --start \
--background ${tmpnice} --pidfile ${pidfile} \
--exec ${basedir}/sbin/mysqld${MY_SUFFIX} -- ${mysqld_thing} \
&& sleep ${TIMEUNIT}
retstatus=$?
else
tmpnice="${NICE:+"nice -n "}${NICE}"
${tmpnice} ${basedir}/sbin/mysqld${MY_SUFFIX} ${mysqld_thing} &
retstatus=0
fi
# only the first run is done by start-stop-daemon
ssd_thing=""
# wait for socket creation
wdebug 1
while ! [[ -S "${socket}" || "${STARTUPTIMEOUT}" -lt 1 || "${retstatus}" -ne 0 ]] ; do
STARTUPTIMEOUT=$(( STARTUPTIMEOUT - 1 ))
[[ ${DEBUG} -ge 1 ]] && echo -n "${STARTUPTIMEOUT},"
sleep ${TIMEUNIT}
done
wdebug 1 ""
if [[ ! -S "${socket}" ]] ; then
eerror "MySQL${MY_SUFFIX} NOT started (${retstatus})"
retstatus=1
else
globretstatus=0
pidfilelist="${pidfilelist}${pidfile},"
datadirlist="${datadirlist}${datadir},"
socketlist="${socketlist}${socket},"
echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}"
fi
done
# successfull if at least one mysqld started
wdebug 4 "<<< start()"
eend $globretstatus
}
stop() {
get_slot_config &> /dev/null
MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"}
local runwhat pidfile shutdown_elem
local PID cnt timeout=${STOPTIMEOUT:-"120"}
local retstatus=0
local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )"
ebegin "Stopping ${myservice}"
wdebug 5 "MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}"
wdebug 5 "shutdown_list: ${shutdown_list}"
for shutdown_elem in ${shutdown_list} ; do
runwhat=${shutdown_elem%%=*}
pidfile=${shutdown_elem#*=}
timeout=${STOPTIMEOUT:-"120"}
PID=$(< "${pidfile}" )
wdebug 3 "runwhat ${runwhat}"
wdebug 3 "pidfile ${pidfile}"
wdebug 3 "timeout ${timeout}"
wdebug 3 "PID ${PID}"
einfo "Stopping mysqld (${runwhat})"
start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --stop --pidfile "${pidfile}" &
wdebug 1 ""
while [[ -n "$PID" ]] \
&& $( ps -Ao pid | grep -q "^ *$PID$" ) \
&& [[ "${timeout}" -ge 1 ]]
do
timeout=$(($timeout - 1))
[[ ${DEBUG} -ge 1 ]] && echo -n "$(( $STOPTIMEOUT - $timeout )),"
sleep ${TIMEUNIT}
done
[[ "${timeout}" -lt 1 ]] && retstatus=1
done
sleep ${TIMEUNIT}
[[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE"
eend ${retstatus}
}

View File

@ -0,0 +1,28 @@
# Here is where we define which server(s) to start.
# Additional parameters to be passed to mysqlmanager at startup may be added here,
# which will override the ones in "my.cnf".
#
# To avoid starting a server just comment it's definition
# here or it will rant (no default start).
# Last but not least, spaces are NOT allowed inside the parameters!
#
# Below are described some suggested parameters to use.
# The parameters not recognized will be passed through to the mysqlmanager directly.
#
# Parameter : description
# ----------------+-----------------------------------------------------------
# mycnf : string [full path to my.cnf]
# : specify the path to my.cnf file to be used
# : may contain a [manager] section
# ----------------+-----------------------------------------------------------
#
# Basic default
#
#mysqlmanager_slot_0=()
#
# Start MySQL 5.0.X overriding the my.cnf path
#mysqlmanager_slot_500=(
# "mycnf=/home/test/my.cnf"
#)
#

View File

@ -0,0 +1,230 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/mysqlmanager.rc6,v 1.1 2007/01/12 16:54:20 chtekk Exp $
# external binaries used: which, sed, tac
depend() {
use dns net localmount netmount nfsmount
#provide mysql
}
# int in_list(char * elem, char * list)
function in_list() {
local elem=${1:-"none"}
local list=${2:-","}
[[ "${list}" == "${list/,${elem},/}" ]] \
&& return 1 \
|| return 0
}
do_escape() {
# Ihatethisreallyverymuch
#echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|"
echo "$1"
}
# int get_slot_config(srv_slot=0, srv_num)
get_slot_config() {
[[ ${DEBUG} -ge 4 ]] && einfo ">>> get_slot_config(\"${1}\", \"${2}\")"
srv_slot="${1:-"0"}"
srv_num="${2}"
MY_SUFFIX="-${srv_slot}"
[[ "${MY_SUFFIX}" == '-0' ]] && MY_SUFFIX=''
basedir="" pidfile="" socket=""
local tmp_eval="mysqlmanager_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
local conf_d_parameters="${!tmp_eval}"
[[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters=''
MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf"
# summa of unmanaged parameters
# some parameters may be present multiple times
unmanagedparams=""
# grab the parameters from conf.d/mysql definition
for my_default in ${conf_d_parameters[*]} ; do
case "${my_default}" in
mycnf=*) MY_CNF="${my_default#mycnf=}" ;;
basedir=*) basedir="${my_default#basedir=}" ;;
pid-file=*) pidfile="${my_default#pid-file=}" ;;
socket=*) socket="${my_default#socket=}" ;;
*=*)
# list of parameters we already have
# prepend "--" because my_print_defaults do it
unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )"
;;
*)
unmanagedparams="${unmanagedparams} --${my_default}"
;;
esac
done
if [[ ! -r "${MY_CNF}" ]] ; then
ewarn "Cannot access ${MY_CNF} !"
MY_CNF=""
my_defaults=""
else
local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)"
if [[ ! -x "${my_print_defaults}" ]] ; then
eerror "my_print_defaults NOT found or not executable"
my_defaults=""
else
my_defaults=$( ${my_print_defaults} \
--loose-verbose \
--config-file="${MY_CNF}" \
manager )
fi
fi
# grab needed parameters from my.cnf, don't override the ones from
# conf.d/mysql
for my_default in ${my_defaults} ; do
case "${my_default}" in
--pid-file=*)
[[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;;
--socket=*)
[[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;;
esac
done
# still empty, I'm in doubt if assign a default or break, will see
basedir="${basedir:-"/usr"}"
pidfile="${pidfile:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.pid"}"
socket="${socket:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.sock"}"
if [[ ${DEBUG} -ge 3 ]] ; then
einfo "basedir => ${basedir}"
einfo "pidfile => ${pidfile}"
einfo "socket => ${socket}"
einfo "Unamanged => ${unmanagedparams}"
fi
# push these out to the script
export MY_SUFFIX MY_CNF pidfile basedir socket
export unmanagedparams
[[ ${DEBUG} -ge 4 ]] && einfo "<<< get_slot_config() ok"
return 0
}
start() {
[[ ${DEBUG} -ge 4 ]] && einfo ">>> start()"
MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"}
# servers are defined in /etc/conf.d/mysql
local serverlist=${!mysqlmanager_slot_*}
# provide default for empty conf.d/mysql
if [[ -z "${serverlist}" ]] ; then
serverlist=0
export mysqlmanager_slot_0=()
fi
local retstatus timeout
local globretstatus=1
local srv_slot srv_num
# server MUST NOT share same location for these
local pidfilelist=',' socketlist=','
# additional security
rm -f "${MYSQL_GLOB_PID_FILE}" ; touch "${MYSQL_GLOB_PID_FILE}"
if [[ $? -ne 0 ]] ; then
eerror "cannot create MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}"
[[ ${DEBUG} -ge 4 ]] && einfo "<<< start() KO"
return 1
fi
ebegin
# try to start each server
for srv in ${serverlist[*]} ; do
einfo "working on ${srv}"
srv_slot="${srv#mysqlmanager_slot_}"
if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then
srv_num=''
else
srv_num="${srv_slot#*_}"
fi
srv_slot="${srv_slot%%_*}"
retstatus=0
get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1
# timeout (seconds) before declaring the startup failed
# pre_run checks
if [[ "$retstatus" -eq 0 ]] ; then
if in_list "${pidfile}" "${pidfilelist}" ; then
retstatus=3
eerror "Sorry, won't start with same pid-file: ${pidfile}"
fi
if in_list "${socket}" "${socketlist}" ; then
retstatus=5
eerror "Sorry, won't start with same socket: ${socket}"
fi
fi
if [[ $retstatus -eq 0 ]] ; then
# additional security
rm -f ${pidfile} ${socket}
einfo "Starting mysqlmanager${MY_SUFFIX:+"_"}${srv_slot}${srv_num:+"_"}${srv_num} (${MY_CNF})"
[[ ${DEBUG} -ge 2 ]] && echo "starting mysqlmanager with: "${basedir}/sbin/mysqlmanager${MY_SUFFIX} ${unmanagedparams} --pid-file=${pidfile} --socket=${socket}
start-stop-daemon --quiet --start --background \
--pidfile "${pidfile}" \
--exec ${basedir}/sbin/mysqlmanager${MY_SUFFIX} \
-- \
${MY_CNF:+"--defaults-file="}${MY_CNF} \
${unmanagedparams} \
--pid-file=${pidfile} \
--socket=${socket}
retstatus=$?
if [[ "${retstatus}" -eq 0 ]] ; then
pidfilelist="${pidfilelist}${pidfile},"
socketlist="${socketlist}${socket},"
globretstatus=0
echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}"
fi
fi
done
# successfull if at least one mysqlmanager started
[[ ${DEBUG} -ge 4 ]] && einfo "<<< start()"
eend $globretstatus
}
stop () {
MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"}
local runwhat pidfile shutdown_elem
local PID cnt timeout
local retstatus=0
local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )"
# shutdown in reverse order
ebegin
for shutdown_elem in $shutdown_list; do
runwhat=${shutdown_elem%%=*}
pidfile=${shutdown_elem#*=}
timeout=${STOPTIMEOUT:-"10"}
einfo "Stopping mysqlmanager (${runwhat})"
PID=$(cat "${pidfile}" 2>/dev/null)
start-stop-daemon --stop --quiet --pidfile="${pidfile}"
[[ ${DEBUG} -ge 1 ]] && echo ""
while [[ -n "$PID" && $( kill -0 $PID 2>/dev/null ) && "${timeout}" -ge 1 ]] ; do
timeout=$(($timeout - 1))
[[ ${DEBUG} -ge 1 ]] && echo -n $(( $STOPTIMEOUT - $timeout ))
sleep 1
done
if [[ "${timeout}" -lt 1 ]] ; then
retstatus=$(( $retstatus + 1 ))
fi
done
[[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE"
eend $retstatus
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>mysql</herd>
</pkgmetadata>

View File

@ -0,0 +1,26 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild,v 1.3 2007/04/28 22:14:49 tove Exp $
DESCRIPTION="Gentoo MySQL init scripts."
HOMEPAGE="http://www.gentoo.org/"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
IUSE=""
DEPEND=""
RDEPEND=""
src_install() {
newconfd "${FILESDIR}/mysql.conf.d" "mysql"
newconfd "${FILESDIR}/mysqlmanager.conf.d" "mysqlmanager"
newinitd "${FILESDIR}/mysql.rc6" "mysql"
newinitd "${FILESDIR}/mysqlmanager.rc6" "mysqlmanager"
insinto /etc/logrotate.d
newins "${FILESDIR}/logrotate.mysql" "mysql"
}

View File

@ -0,0 +1,3 @@
DIST mysql-5.1.32-maria-beta.tar.gz 16585969 RMD160 6ef82cc7eb6382c1d056c4b417687bfb33a38cb4 SHA1 797850716e66c60ea7cfbe3070752f5fb42bbe31 SHA256 96c68b69ab5a236af1259d5ed964ef703771076534451df03422b3d41f245c1c
DIST mysql-extras-20090713-0134Z.tar.bz2 2397316 RMD160 7c54d6f83b7f30fe479d8362aadfd315979c13fd SHA1 a93ce8bb7e6acc94ad30c47ac6c95fe8fea9228e SHA256 a7e0002b156542b3822ae811fa4c586de77772872fe829ccc02800daf70ee0f7
EBUILD mysql-mariadb-5.1.32_beta.ebuild 2424 RMD160 261cd240f12ba67d724157dc8340b05f5fae99c6 SHA1 63e27d2085046559cfdacfd723b2e1176c44fdc7 SHA256 ab3af1b3466428c188c81c5e78ee25b1157b73432a60e40829820c6748699746

View File

@ -0,0 +1,66 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-community/mysql-community-5.1.21_beta.ebuild,v 1.3 2008/11/14 09:43:04 robbat2 Exp $
MY_EXTRAS_VER="20090713-1758Z"
#SERVER_URI="mirror://gentoo/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz"
#PBXT_VERSION="0.9.8-beta"
inherit mysql
# only to make repoman happy. it is really set in the eclass
IUSE="$IUSE"
# REMEMBER: also update eclass/mysql*.eclass before committing!
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
src_test() {
make check || die "make check failed"
if ! use "minimal" ; then
cd "${S}/mysql-test"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
local retstatus
local t
local testopts="--force"
addpredict /this-dir-does-not-exist/t9.MYI
# mysqladmin start before dir creation
mkdir "${S}"/mysql-test/var{,/log}
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# sandbox make ndbd zombie
#X#hasq "sandbox" ${FEATURES} && testopts="${testopts} --skip-ndb"
#X#if [[ ${UID} -eq 0 ]] ; then
#X# einfo "Disabling IM tests due to failure as root"
#X# mysql_disable_test "im_cmd_line" "fail as root"
#X# mysql_disable_test "im_daemon_life_cycle" "fail as root"
#X# mysql_disable_test "im_instance_conf" "fail as root"
#X# mysql_disable_test "im_life_cycle" "fail as root"
#X# mysql_disable_test "im_options" "fail as root"
#X# mysql_disable_test "im_utils" "fail as root"
#X# mysql_disable_test "trigger" "fail as root"
#X#fi
#use "extraengine" && mysql_disable_test "federated" "fail with extraengine"
#mysql_disable_test "view" "Already fixed: fail because now we are in year 2007"
# from Makefile.am:
retstatus=1
./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=mixed \
&& ./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=row \
&& ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=row \
&& ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=mixed \
&& retstatus=0
# Just to be sure ;)
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
[[ $retstatus -eq 0 ]] || die "make test failed"
else
einfo "Skipping server tests due to minimal build."
fi
}

2346
dev-db/mysql/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

5
dev-db/mysql/Manifest Normal file
View File

@ -0,0 +1,5 @@
DIST mysql-5.0.83.tar.gz 35937401 RMD160 b6a525c865322fb1b796c07d306193a98de37c27 SHA1 5e831a12f1dab902e4af6e3cf495bddf6fa1fd33 SHA256 f7d3ac87693de8d0f4ddf457c268107b0d538a0b577f1c2596a8a28eb0bdd1c4
DIST mysql-extras-20090706-1838Z.tar.bz2 496474 RMD160 c7a51d7adc21f3befe29641e74a66463fcef01cc SHA1 50831fc861b1c68a08a912df560d920435622630 SHA256 599bf226de7c33e7f01a78f7171f8677a5b38a5b19d371f3a45ba868cb43aec7
EBUILD mysql-5.0.83.ebuild 4686 RMD160 a1445cdfd063a53edf542900d416970b0f26a340 SHA1 8eed3668992d760d9548a52ee1b00f2bbd7928f4 SHA256 76dd7c7257762ac4a4dc7aaf2ef7cf06235e58afd99d17f0c4fec010018a1f68
MISC ChangeLog 93560 RMD160 aed909217060a3f8f4ebc5bad40c73ec68eb8d02 SHA1 094ac6939e4d285cc9a65a3bd489a467c7b0c4c2 SHA256 afe9da58bdc9438f929dcf1da932571a792442861d9a34bc52aee3ee074a2e30
MISC metadata.xml 918 RMD160 ee023d3ae746d0d29ac387c1c87f3f8dec7c9568 SHA1 10ef755d319f93d02de705b3158f4e73aca28af4 SHA256 046a9880921c49fea8861a819c1afd27fc5a873dea28b80b040da2733e029c47

18
dev-db/mysql/metadata.xml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>mysql</herd>
<use>
<flag name='big-tables'>Make tables contain up to 1.844E+19 rows</flag>
<flag name='cluster'>Add support for NDB clustering</flag>
<flag name='embedded'>Build embedded server (libmysqld)</flag>
<flag name='extraengine'>Add support for alternative storage engines</flag>
<flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
<flag name='max-idx-128'>Raise the max index per table limit from 64 to 128
</flag>
<flag name='minimal'>Install client programs only, no server</flag>
<flag name='raid'>Deprecated option, removed in the 5.0 series</flag>
<flag name='community'>Enables the community features from upstream.</flag>
<flag name='profiling'>Add support for statement profiling (requires USE=community).</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,142 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-5.0.83.ebuild,v 1.1 2009/07/06 19:08:59 robbat2 Exp $
MY_EXTRAS_VER="20090706-1838Z"
EAPI=2
inherit toolchain-funcs mysql
# only to make repoman happy. it is really set in the eclass
IUSE="$IUSE"
# REMEMBER: also update eclass/mysql*.eclass before committing!
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
# When MY_EXTRAS is bumped, the index should be revised to exclude these.
EPATCH_EXCLUDE=''
# Please do not add a naive src_unpack to this ebuild
# If you want to add a single patch, copy the ebuild to an overlay
# and create your own mysql-extras tarball, looking at 000_index.txt
# Official test instructions:
# USE='berkdb cluster embedded extraengine' \
# FEATURES='test userpriv -usersandbox' \
# ebuild mysql-X.X.XX.ebuild \
# digest clean package
src_test() {
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
emake check || die "make check failed"
if ! use "minimal" ; then
if [[ $UID -eq 0 ]]; then
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
cd "${S}"
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
local retstatus1
local retstatus2
local t
addpredict /this-dir-does-not-exist/t9.MYI
# Ensure that parallel runs don't die
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
# archive_gis really sucks a lot, but it's only relevant for the
# USE=extraengines case
case ${PV} in
5.0.42)
mysql_disable_test "archive_gis" "Totally broken in 5.0.42"
;;
5.0.4[3-9]|5.0.[56]*|5.0.70)
[ "$(tc-endian)" == "big" ] && \
mysql_disable_test \
"archive_gis" \
"Broken in 5.0.43-70 on big-endian boxes only"
;;
esac
# This was a slight testcase breakage when the read_only security issue
# was fixed.
case ${PV} in
5.0.54|5.0.51*)
mysql_disable_test \
"read_only" \
"Broken in 5.0.51-54, output in wrong order"
;;
esac
# Ditto to read_only
[ "${PV}" == "5.0.51a" ] && \
mysql_disable_test \
"view" \
"Broken in 5.0.51, output in wrong order"
# x86-specific, OOM issue with some subselects on low memory servers
[ "${PV}" == "5.0.54" ] && \
[ "${ARCH/x86}" != "${ARCH}" ] && \
mysql_disable_test \
"subselect" \
"Testcase needs tuning on x86 for oom condition"
# Broke with the YaSSL security issue that didn't affect Gentoo.
[ "${PV}" == "5.0.56" ] && \
for t in openssl_1 rpl_openssl rpl_ssl ssl \
ssl_8k_key ssl_compress ssl_connect ; do \
mysql_disable_test \
"$t" \
"OpenSSL tests broken on 5.0.56"
done
# New test was broken in first time
# Upstream bug 41066
# http://bugs.mysql.com/bug.php?id=41066
[ "${PV}" == "5.0.72" ] && \
mysql_disable_test \
"status2" \
"Broken in 5.0.72, new test is broken, upstream bug #41066"
# SSL certs expired shortly after the release of 5.0.76. Affects older
# versions as well.
case ${PV} in
5.0.?|5.0.[1-6]*|5.0.7[0-6])
for t in openssl_1 rpl_openssl rpl_ssl ssl ssl_8k_key \
ssl_compress ssl_connect ; do \
mysql_disable_test \
"$t" \
"OpenSSL tests broken in 5.0.76 due to expired certificates"
done
;;
esac
# create directories because mysqladmin might right out of order
mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log}
# We run the test protocols seperately
make -j1 test-ns force="--force --vardir=${S}/mysql-test/var-ns"
retstatus1=$?
[[ $retstatus1 -eq 0 ]] || eerror "test-ns failed"
has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
make -j1 test-ps force="--force --vardir=${S}/mysql-test/var-ps"
retstatus2=$?
[[ $retstatus2 -eq 0 ]] || eerror "test-ps failed"
has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
# Cleanup is important for these testcases.
pkill -9 -f "${S}/ndb" 2>/dev/null
pkill -9 -f "${S}/sql" 2>/dev/null
failures=""
[[ $retstatus1 -eq 0 ]] || failures="test-ns"
[[ $retstatus2 -eq 0 ]] || failures="${failures} test-ps"
has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
[[ -z "$failures" ]] || die "Test failures: $failures"
einfo "Tests successfully completed"
else
einfo "Skipping server tests due to minimal build."
fi
}

View File

@ -0,0 +1,8 @@
#####################################################################
# $Header: $
# When you add an entry to this file, add your name, the date, and an
# explanation of why something is getting masked
#
# NOTE: Please add your entry at the top!
#

View File

@ -0,0 +1 @@
go-mysql

6
dev-db/profiles/use.desc Normal file
View File

@ -0,0 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Keep them sorted

View File

@ -0,0 +1,9 @@
# Copyright 1999-2007 Gentoo Foundation.
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# This file contains descriptions of local USE flags, and the ebuilds which
# contain them.
# Keep it sorted.

67
dev-db/skel.ChangeLog Normal file
View File

@ -0,0 +1,67 @@
# ChangeLog for <CATEGORY>/<PACKAGE_NAME>
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
*<PACKAGE_NAME>-<PACKAGE_VERSION>-<PACKAGE_RELEASE> (DD MMM YYYY)
DD MMM YYYY; YOUR_NAME <YOUR_EMAIL> changed_file1, changed_file2 :
Initial import. Ebuild submitted by submitter_name <submitter_email>.
Note that the "changed_file" listing is optional if you are simply bumping
the rev of the ebuild and are only making changes to the .ebuild file
itself. Also note that we now have a single unified paragraph rather than
having the first line separated from the rest by a newline. Everything
should be in one block like this. (note by drobbins, 16 Jul 2002)
DD MMM YYYY; YOUR_NAME <YOUR_EMAIL> changed_file1, changed_file2: this is
an earlier ChangeLog entry.
-- Explanation of ChangeLog format:
***************************************************************************
THIS IS IMPORTANT: The ChangeLog format is a *chronological* account of all
changes made to a set of ebuilds. That means that the most recent ChangeLog
entry *always* goes at the top of the file. More explanation below.
***************************************************************************
***************************************************************************
ANOTHER IMPORTANT NOTE: There are some ChangeLogs that don't follow this
format and organize all changes under the "correct" "*" entry. This is not
correct. However, rather than making a concerted effort to fix these
ChangeLogs, we should spend our energy defining a comprehensive and strict
XML-based ChangeLog format which we then migrate to. But for any entries to
any ChangeLog that *you* make, please make sure to always add entries to the
top of the file like a good boy/girl. Even do this if it's clear that you're
adding an entry to a b0rked ChangeLog.
***************************************************************************
This changelog is targeted to users. This means that the comments should be
well explained and written in clean English.
Every new version or revision of the package should be marked by a '*'
separator line as above to indicate where in the chronology it was first
added to our CVS tree. Any changes since the last revision, really _any
changes at all_ have to be added to the top of the file, underneath the
initial copyright and cvs header comments, in exactly the same format as this
comment. If you are modifying older ebuilds, simply note them as changed
files and add your entry to the top of the ChangeLog. Resist the temptation
to "organize" your ChangeLog entries by placing them under the "correct" "*"
entries -- this isn't the purpose of the "*" entries.
This means that you start with header line that has the following format,
indented two spaces:
DD MMM YYYY; your_name <your_email> changed_file1, changed_file2: Your
explanation should follow. It should be indented and wrapped at a line width
of 80 characters. The changed_files can be omitted if they are obvious; for
example, if you are only modifying the .ebuild file and committing a new rev
of a package. Any details about what exactly changed in the code should be
added as a message when the changes are committed to cvs, not in this file.
-- A word regarding credit:
Please add credit information ("ebuild submitted by ...", "patch submitted
by ...") to the ChangeLog. Do not add this information to the ebuilds
themselves.
And remember: Give credit where credit is due. We're all doing this for
free, so the best we can hope (and expect!) to receive is credit.

169
dev-db/skel.ebuild Normal file
View File

@ -0,0 +1,169 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# NOTE: The comments in this file are for instruction and documentation.
# They're not meant to appear with your final, production ebuild. Please
# remember to remove them before submitting or committing your ebuild. That
# doesn't mean you can't add your own comments though.
# The 'Header' on the third line should just be left alone. When your ebuild
# will be committed to cvs, the details on that line will be automatically
# generated to contain the correct data.
# The EAPI variable tells the ebuild format in use.
# Defaults to 0 if not specified. The current PMS draft contains details on
# a proposed EAPI=0 definition but is not finalized yet.
# Eclasses will test for this variable if they need to use EAPI > 0 features.
# Ebuilds should not define EAPI > 0 unless they absolutely need to use
# features added in that version.
#EAPI=0
# inherit lists eclasses to inherit functions from. Almost all ebuilds should
# inherit eutils, as a large amount of important functionality has been
# moved there. For example, the $(get_libdir) mentioned below wont work
# without the following line:
inherit eutils
# A well-used example of an eclass function that needs eutils is epatch. If
# your source needs patches applied, it's suggested to put your patch in the
# 'files' directory and use:
#
# epatch ${FILESDIR}/patch-name-here
#
# eclasses tend to list descriptions of how to use their functions properly.
# take a look at /usr/portage/eclasses/ for more examples.
# Short one-line description of this package.
DESCRIPTION="This is a sample skeleton ebuild file"
# Homepage, not used by Portage directly but handy for developer reference
HOMEPAGE="http://foo.bar.com/"
# Point to any required sources; these will be automatically downloaded by
# Portage.
SRC_URI="ftp://foo.bar.com/${P}.tar.gz"
# License of the package. This must match the name of file(s) in
# /usr/portage/licenses/. For complex license combination see the developer
# docs on gentoo.org for details.
LICENSE=""
# The SLOT variable is used to tell Portage if it's OK to keep multiple
# versions of the same package installed at the same time. For example,
# if we have a libfoo-1.2.2 and libfoo-1.3.2 (which is not compatible
# with 1.2.2), it would be optimal to instruct Portage to not remove
# libfoo-1.2.2 if we decide to upgrade to libfoo-1.3.2. To do this,
# we specify SLOT="1.2" in libfoo-1.2.2 and SLOT="1.3" in libfoo-1.3.2.
# emerge clean understands SLOTs, and will keep the most recent version
# of each SLOT and remove everything else.
# Note that normal applications should use SLOT="0" if possible, since
# there should only be exactly one version installed at a time.
# DO NOT USE SLOT=""! This tells Portage to disable SLOTs for this package.
SLOT="0"
# Using KEYWORDS, we can record masking information *inside* an ebuild
# instead of relying on an external package.mask file. Right now, you should
# set the KEYWORDS variable for every ebuild so that it contains the names of
# all the architectures with which the ebuild works. All of the official
# architectures can be found in the keywords.desc file which is in
# /usr/portage/profiles/. Usually you should just set this to "~x86". The ~
# in front of the architecture indicates that the package is new and should be
# considered unstable until testing proves its stability. So, if you've
# confirmed that your ebuild works on x86 and ppc, you'd specify:
# KEYWORDS="~x86 ~ppc"
# Once packages go stable, the ~ prefix is removed.
# For binary packages, use -* and then list the archs the bin package
# exists for. If the package was for an x86 binary package, then
# KEYWORDS would be set like this: KEYWORDS="-* x86"
# DO NOT USE KEYWORDS="*". This is deprecated and only for backward
# compatibility reasons.
KEYWORDS="~x86"
# Comprehensive list of any and all USE flags leveraged in the ebuild,
# with the exception of any ARCH specific flags, i.e. "ppc", "sparc",
# "x86" and "alpha". This is a required variable. If the ebuild doesn't
# use any USE flags, set to "".
IUSE="gnome X"
# A space delimited list of portage features to restrict. man 5 ebuild
# for details. Usually not needed.
#RESTRICT="strip"
# Build-time dependencies, such as
# ssl? ( >=dev-libs/openssl-0.9.6b )
# >=dev-lang/perl-5.6.1-r1
# It is advisable to use the >= syntax show above, to reflect what you
# had installed on your system when you tested the package. Then
# other users hopefully won't be caught without the right version of
# a dependency.
DEPEND=""
# Run-time dependencies. Must be defined to whatever this depends on to run.
# The below is valid if the same run-time depends are required to compile.
RDEPEND="${DEPEND}"
# Source directory; the dir where the sources can be found (automatically
# unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P}
# If you don't need to change it, leave the S= line out of the ebuild
# to keep it tidy.
#S="${WORKDIR}/${P}"
src_compile() {
# Most open-source packages use GNU autoconf for configuration.
# The quickest (and preferred) way of running configure is:
econf || die "econf failed"
#
# You could use something similar to the following lines to
# configure your package before compilation. The "|| die" portion
# at the end will stop the build process if the command fails.
# You should use this at the end of critical commands in the build
# process. (Hint: Most commands are critical, that is, the build
# process should abort if they aren't successful.)
#./configure \
# --host=${CHOST} \
# --prefix=/usr \
# --infodir=/usr/share/info \
# --mandir=/usr/share/man || die "./configure failed"
# Note the use of --infodir and --mandir, above. This is to make
# this package FHS 2.2-compliant. For more information, see
# http://www.pathname.com/fhs/
# emake (previously known as pmake) is a script that calls the
# standard GNU make with parallel building options for speedier
# builds (especially on SMP systems). Try emake first. It might
# not work for some packages, because some makefiles have bugs
# related to parallelism, in these cases, use emake -j1 to limit
# make to a single process. The -j1 is a visual clue to others
# that the makefiles have bugs that have been worked around.
emake || die "emake failed"
}
src_install() {
# You must *personally verify* that this trick doesn't install
# anything outside of DESTDIR; do this by reading and
# understanding the install part of the Makefiles.
# This is the preferred way to install.
emake DESTDIR="${D}" install || die "emake install failed"
# When you hit a failure with emake, do not just use make. It is
# better to fix the Makefiles to allow proper parallelization.
# If you fail with that, use "emake -j1", it's still better than make.
# For Makefiles that don't make proper use of DESTDIR, setting
# prefix is often an alternative. However if you do this, then
# you also need to specify mandir and infodir, since they were
# passed to ./configure as absolute paths (overriding the prefix
# setting).
#emake \
# prefix="${D}"/usr \
# mandir="${D}"/usr/share/man \
# infodir="${D}"/usr/share/info \
# libdir="${D}"/usr/$(get_libdir) \
# install || die "emake install failed"
# Again, verify the Makefiles! We don't want anything falling
# outside of ${D}.
# The portage shortcut to the above command is simply:
#
#einstall || die "einstall failed"
}

34
dev-db/skel.metadata.xml Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!--
$Header: /var/cvsroot/gentoo-x86/skel.metadata.xml,v 1.18 2008/07/28 19:27:05 cardoe Exp $
This is the example metadata file.
The root element of this file is <pkgmetadata>. Within this element a
number of subelements are allowed: herd, maintainer, and
longdescription. herd is a required subelement.
For a full description look at:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=4
Before committing, please remove the comments from this file. They are
not relevant for general metadata.xml files.
-->
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>@gentoo.org</email>
<!-- <description>Description of the maintainership</description> -->
</maintainer>
<!-- <longdescription>Long description of the package</longdescription> -->
<!--
<use>
<flag name='flag'>Description of how USE='flag' affects this package</flag>
<flag name='userland_GNU'>Description of how USERLAND='GNU' affects this
package</flag>
<flag name='aspell'>Uses <pkg>app-text/aspell</pkg> for spell checking.
Requires an installed dictionary from <cat>app-dicts</cat></flag>
</use>
-->
</pkgmetadata>

878
eclass/mysql.eclass Normal file
View File

@ -0,0 +1,878 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.109 2009/02/28 10:51:57 robbat2 Exp $
# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
# Maintainer: MySQL Team <mysql-bugs@gentoo.org>
# - Luca Longinotti <chtekk@gentoo.org>
# - Robin H. Johnson <robbat2@gentoo.org>
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit eutils flag-o-matic gnuconfig autotools mysql_fx versionator
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
S="${WORKDIR}/mysql"
[[ "${MY_EXTRAS_VER}" == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z"
if [[ "${MY_EXTRAS_VER}" == "live" ]]; then
EGIT_PROJECT=mysql-extras
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/mysql-extras.git"
inherit git
fi
# MYSQL_VERSION_ID will be:
# major * 10e6 + minor * 10e4 + micro * 10e2 + gentoo revision number, all [0..99]
# This is an important part, because many of the choices the MySQL ebuild will do
# depend on this variable.
# In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803"
# We also strip off upstream's trailing letter that they use to respin tarballs
MYSQL_VERSION_ID=""
tpv="${PV%[a-z]}"
tpv=( ${tpv//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}"
for vatom in 0 1 2 3 ; do
# pad to length 2
tpv[${vatom}]="00${tpv[${vatom}]}"
MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}"
done
# strip leading "0" (otherwise it's considered an octal number by BASH)
MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"}
# Be warned, *DEPEND are version-dependant
# These are used for both runtime and compiletime
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
userland_GNU? ( sys-process/procps )
>=sys-apps/sed-4
>=sys-apps/texinfo-4.7-r1
>=sys-libs/readline-4.1
>=sys-libs/zlib-1.2.3"
# Having different flavours at the same time is not a good idea
for i in "" "-community" "-mariadb" ; do
[[ "${i}" == ${PN#mysql} ]] ||
DEPEND="${DEPEND} !dev-db/mysql${i}"
done
RDEPEND="${DEPEND}
!minimal? ( dev-db/mysql-init-scripts )
selinux? ( sec-policy/selinux-mysql )"
# compile-time-only
mysql_version_is_at_least "5.1" \
|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )"
# compile-time-only
mysql_version_is_at_least "5.1.12" \
&& DEPEND="${DEPEND} >=dev-util/cmake-2.4.3"
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
# For other stuff to bring us in
PDEPEND="${PDEPEND} =virtual/mysql-$(get_version_component_range 1-2 ${PV})"
# Work out the default SERVER_URI correctly
if [ -z "${SERVER_URI}" ]; then
# The community build is on the mirrors
if [ "${PN}" == "mysql-community" ]; then
SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz"
# The enterprise source is on the primary site only
elif [ "${PN}" == "mysql" ]; then
SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${PV//_/-}.tar.gz"
# The maria source is on launchpad
elif [ "${PN}" == "mysql-mariadb" ]; then
SERVER_URI="http://launchpad.net/maria/${PV%.*}/ongoing/+download/mysql-${PV//_/-maria-}.tar.gz"
fi
fi
# Define correct SRC_URIs
SRC_URI="${SERVER_URI}"
[[ ${MY_EXTRAS_VER} != live ]] && SRC_URI="${SRC_URI}
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
http://ftp.mars.arge.at/mysql/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
mysql_version_is_at_least "5.1.12" \
&& [[ -n "${PBXT_VERSION}" ]] \
&& SRC_URI="${SRC_URI} pbxt? ( mirror://sourceforge/pbxt/pbxt-${PBXT_VERSION}.tar.gz
http://www.primebase.org/download/pbxt-${PBXT_VERSION}.tar.gz )"
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
HOMEPAGE="http://www.mysql.com/"
LICENSE="GPL-2"
SLOT="0"
IUSE="big-tables debug embedded minimal perl selinux ssl static"
mysql_version_is_at_least "4.1" \
&& IUSE="${IUSE} latin1"
mysql_version_is_at_least "4.1.3" \
&& IUSE="${IUSE} cluster extraengine"
mysql_version_is_at_least "5.0" \
|| IUSE="${IUSE} raid"
mysql_version_is_at_least "5.0.18" \
&& IUSE="${IUSE} max-idx-128"
mysql_version_is_at_least "5.1" \
|| IUSE="${IUSE} berkdb"
mysql_version_is_at_least "5.1.12" \
&& IUSE="${IUSE} pbxt"
mysql_version_is_at_least "5.1.30" \
&& IUSE="${IUSE} -static_mysqld -fast-mutexes"
mysql_version_is_at_least "5.2" \
&& IUSE="${IUSE} falcon"
[[ ${PN} = mysql-mariadb ]] \
&& IUSE="${IUSE} mariadb"
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \
pkg_postinst pkg_config pkg_postrm
#
# HELPER FUNCTIONS:
#
mysql_disable_test() {
local testname="${1}" ; shift
local reason="${@}"
local mysql_disable_file="${S}/mysql-test/t/disabled.def"
echo ${testname} : ${reason} >> "${mysql_disable_file}"
ewarn "test '${testname}' disabled: '${reason}'"
}
# void mysql_init_vars()
#
# Initialize global variables
# 2005-11-19 <vivo@gentoo.org>
mysql_init_vars() {
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="/usr/share/mysql"}
MY_SYSCONFDIR=${MY_SYSCONFDIR="/etc/mysql"}
MY_LIBDIR=${MY_LIBDIR="/usr/$(get_libdir)/mysql"}
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="/var/lib/mysql"}
MY_LOGDIR=${MY_LOGDIR="/var/log/mysql"}
MY_INCLUDEDIR=${MY_INCLUDEDIR="/usr/include/mysql"}
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=""
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
| sed -ne '/datadir/s|^--datadir=||p' \
| tail -n1`
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
| sed -e 's/.*=\s*//' \
| tail -n1`
fi
fi
if [[ -z "${MY_DATADIR}" ]] ; then
MY_DATADIR="${MY_LOCALSTATEDIR}"
einfo "Using default MY_DATADIR"
fi
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
if [[ -e "${MY_DATADIR}" ]] ; then
# If you get this and you're wondering about it, see bug #207636
elog "MySQL datadir found in ${MY_DATADIR}"
elog "A new one will not be created."
PREVIOUS_DATADIR="yes"
else
PREVIOUS_DATADIR="no"
fi
export PREVIOUS_DATADIR
fi
fi
MY_SOURCEDIR=${SERVER_URI##*/}
MY_SOURCEDIR=${MY_SOURCEDIR%.tar*}
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
export MY_LIBDIR MY_LOCALSTATEDIR MY_LOGDIR
export MY_INCLUDEDIR MY_DATADIR MY_SOURCEDIR
}
configure_minimal() {
# These are things we exclude from a minimal build, please
# note that the server actually does get built and installed,
# but we then delete it before packaging.
local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication readline"
for i in ${minimal_exclude_list} ; do
myconf="${myconf} --without-${i}"
done
myconf="${myconf} --with-extra-charsets=none"
myconf="${myconf} --enable-local-infile"
if use static ; then
myconf="${myconf} --with-client-ldflags=-all-static"
myconf="${myconf} --disable-shared --with-pic"
else
myconf="${myconf} --enable-shared --enable-static"
fi
if mysql_version_is_at_least "4.1" && ! use latin1 ; then
myconf="${myconf} --with-charset=utf8"
myconf="${myconf} --with-collation=utf8_general_ci"
else
myconf="${myconf} --with-charset=latin1"
myconf="${myconf} --with-collation=latin1_swedish_ci"
fi
}
configure_common() {
myconf="${myconf} $(use_with big-tables)"
myconf="${myconf} --enable-local-infile"
myconf="${myconf} --with-extra-charsets=all"
myconf="${myconf} --with-mysqld-user=mysql"
myconf="${myconf} --with-server"
myconf="${myconf} --with-unix-socket-path=/var/run/mysqld/mysqld.sock"
myconf="${myconf} --without-libwrap"
if use static ; then
myconf="${myconf} --with-mysqld-ldflags=-all-static"
myconf="${myconf} --with-client-ldflags=-all-static"
myconf="${myconf} --disable-shared --with-pic"
else
myconf="${myconf} --enable-shared --enable-static"
fi
if use debug ; then
myconf="${myconf} --with-debug=full"
else
myconf="${myconf} --without-debug"
mysql_version_is_at_least "4.1.3" \
&& use cluster \
&& myconf="${myconf} --without-ndb-debug"
fi
if [ -n "${MYSQL_DEFAULT_CHARSET}" -a -n "${MYSQL_DEFAULT_COLLATION}" ]; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
myconf="${myconf} --with-charset=${MYSQL_DEFAULT_CHARSET}"
myconf="${myconf} --with-collation=${MYSQL_DEFAULT_COLLATION}"
elif mysql_version_is_at_least "4.1" && ! use latin1 ; then
myconf="${myconf} --with-charset=utf8"
myconf="${myconf} --with-collation=utf8_general_ci"
else
myconf="${myconf} --with-charset=latin1"
myconf="${myconf} --with-collation=latin1_swedish_ci"
fi
if use embedded ; then
myconf="${myconf} --with-embedded-privilege-control"
myconf="${myconf} --with-embedded-server"
else
myconf="${myconf} --without-embedded-privilege-control"
myconf="${myconf} --without-embedded-server"
fi
}
configure_40_41_50() {
myconf="${myconf} $(use_with perl bench)"
myconf="${myconf} --enable-assembler"
myconf="${myconf} --with-extra-tools"
myconf="${myconf} --with-innodb"
myconf="${myconf} --without-readline"
mysql_version_is_at_least "5.0" || myconf="${myconf} $(use_with raid)"
# --with-vio is not needed anymore, it's on by default and
# has been removed from configure
if use ssl ; then
mysql_version_is_at_least "5.0.4" || myconf="${myconf} --with-vio"
fi
if mysql_version_is_at_least "5.1.11" ; then
myconf="${myconf} $(use_with ssl)"
else
myconf="${myconf} $(use_with ssl openssl)"
fi
if mysql_version_is_at_least "5.0.60" ; then
if use berkdb ; then
elog "Berkeley DB support was disabled due to build failures"
elog "on multiple arches, go to a version earlier than 5.0.60"
elog "if you want it again. Gentoo bug #224067."
fi
myconf="${myconf} --without-berkeley-db"
elif use berkdb ; then
# The following fix is due to a bug with bdb on SPARC's. See:
# http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8
# It comes down to non-64-bit safety problems.
if use alpha || use amd64 || use hppa || use mips || use sparc ; then
elog "Berkeley DB support was disabled due to compatibility issues on this arch"
myconf="${myconf} --without-berkeley-db"
else
myconf="${myconf} --with-berkeley-db=./bdb"
fi
else
myconf="${myconf} --without-berkeley-db"
fi
if mysql_version_is_at_least "4.1.3" ; then
myconf="${myconf} --with-geometry"
myconf="${myconf} $(use_with cluster ndbcluster)"
fi
if mysql_version_is_at_least "4.1.3" && use extraengine ; then
# http://dev.mysql.com/doc/mysql/en/archive-storage-engine.html
myconf="${myconf} --with-archive-storage-engine"
# http://dev.mysql.com/doc/mysql/en/csv-storage-engine.html
myconf="${myconf} --with-csv-storage-engine"
# http://dev.mysql.com/doc/mysql/en/blackhole-storage-engine.html
myconf="${myconf} --with-blackhole-storage-engine"
# http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html
# http://dev.mysql.com/doc/mysql/en/federated-description.html
# http://dev.mysql.com/doc/mysql/en/federated-limitations.html
if mysql_version_is_at_least "5.0.3" ; then
elog "Before using the Federated storage engine, please be sure to read"
elog "http://dev.mysql.com/doc/mysql/en/federated-limitations.html"
myconf="${myconf} --with-federated-storage-engine"
fi
fi
if [ "${PN}" == "mysql-community" ]; then
myconf="${myconf} --enable-community-features"
fi
mysql_version_is_at_least "5.0.18" \
&& use max-idx-128 \
&& myconf="${myconf} --with-max-indexes=128"
}
configure_51() {
# TODO: !!!! readd --without-readline
# the failure depend upon config/ac-macros/readline.m4 checking into
# readline.h instead of history.h
myconf="${myconf} $(use_with ssl)"
myconf="${myconf} $(use_with fast-mutexes)"
myconf="${myconf} --enable-assembler"
myconf="${myconf} --with-geometry"
myconf="${myconf} --with-readline"
# myconf="${myconf} --with-row-based-replication"
myconf="${myconf} --with-zlib-dir=/usr"
myconf="${myconf} --without-pstack"
# myconf="${myconf} --with-innodb"
use max-idx-128 && myconf="${myconf} --with-max-indexes=128"
if !use static && use static_mysqld ; then
# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf
# so it is disabled by default although, according to MySQL, it brings >10%
# performance gain if enabled. See #299382.
myconf="${myconf} --with-mysqld-ldflags=-all-static"
fi
# 5.1 introduces a new way to manage storage engines (plugins)
# like configuration=none
local plugins="csv,myisam,myisammrg,heap"
if use extraengine ; then
# like configuration=max-no-ndb, archive and example removed in 5.1.11
[[ -d storage/archive ]] && plugins="${plugins},archive"
[[ -d storage/blackhole ]] && plugins="${plugins},blackhole"
[[ -d storage/example ]] && plugins="${plugins},example"
[[ -d storage/federated ]] && plugins="${plugins},federated"
[[ -d storage/partition ]] && plugins="${plugins},partition"
elog "Before using the Federated storage engine, please be sure to read"
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
fi
# Upstream specifically requests that InnoDB always be built.
plugins="${plugins},innobase"
# like configuration=max-no-ndb
if use cluster ; then
if use pbxt ; then
eerror "USE pbxt and cluster can't be activated at the same time"
else
[[ -d storage/ndb ]] && plugins="${plugins},ndb"
[[ ! -d storage/ndb ]] && eerror "use cluster but no ndb plugin"
# myconf="${myconf} --with-ndb-binlog"
fi
fi
if use pbxt ; then
[[ -d storage/pbxt ]] && plugins="${plugins},pbxt"
[[ ! -d storage/pbxt ]] && eerror "use pbxt but no Primebase plugin"
fi
if use mariadb ; then
[[ -d storage/maria ]] && plugins="${plugins},maria"
[[ ! -d storage/maria ]] && eerror "use mariadb but no Maria DB plugin"
fi
if use falcon ; then
[[ -d storage/falcon ]] && plugins="${plugins},falcon"
[[ ! -d storage/falcon ]] && eerror "use falcon but no Falcon plugin"
fi
myconf="${myconf} --with-plugins=${plugins}"
}
#
# EBUILD FUNCTIONS
#
mysql_pkg_setup() {
if hasq test ${FEATURES} ; then
if ! use minimal ; then
if [[ $UID -eq 0 ]]; then
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
fi
fi
fi
# Check for USE flag problems in pkg_setup
if use static && use ssl ; then
eerror "MySQL does not support being built statically with SSL support enabled!"
die "MySQL does not support being built statically with SSL support enabled!"
fi
if ! mysql_version_is_at_least "5.0" \
&& use raid \
&& use static ; then
eerror "USE flags 'raid' and 'static' conflict, you cannot build MySQL statically"
eerror "with RAID support enabled."
die "USE flags 'raid' and 'static' conflict!"
fi
if mysql_version_is_at_least "4.1.3" \
&& ( use cluster || use extraengine ) \
&& use minimal ; then
eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!"
die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!"
fi
# This should come after all of the die statements
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
mysql_check_version_range "4.0 to 5.0.99.99" \
&& use berkdb \
&& elog "Berkeley DB support is deprecated and will be removed in future versions!"
}
mysql_src_unpack() {
# Initialize the proper variables first
mysql_init_vars
unpack ${A}
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git_src_unpack
mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}"
cd "${S}"
# Apply the patches for this MySQL version
EPATCH_SUFFIX="patch"
mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory"
# Clean out old items
rm -f "${EPATCH_SOURCE}"/*
# Now link in right patches
mysql_mv_patches
# And apply
epatch
# Additional checks, remove bundled zlib
rm -f "${S}/zlib/"*.[ch]
sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in"
rm -f "scripts/mysqlbug"
# Make charsets install in the right place
find . -name 'Makefile.am' \
-exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
if mysql_version_is_at_least "4.1" ; then
# Remove what needs to be recreated, so we're sure it's actually done
find . -name Makefile \
-o -name Makefile.in \
-o -name configure \
-exec rm -f {} \;
rm -f "ltmain.sh"
rm -f "scripts/mysqlbug"
fi
local rebuilddirlist d
if mysql_version_is_at_least "5.1.12" ; then
rebuilddirlist="."
# TODO: check this with a cmake expert
cmake \
-DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \
-DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \
"storage/innobase"
else
rebuilddirlist=". innobase"
fi
for d in ${rebuilddirlist} ; do
einfo "Reconfiguring dir '${d}'"
pushd "${d}" &>/dev/null
AT_GNUCONF_UPDATE="yes" eautoreconf
popd &>/dev/null
done
if mysql_check_version_range "4.1 to 5.0.99.99" \
&& use berkdb ; then
[[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh"
cp -f "/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \
|| die "Could not copy libtool.m4 to bdb/dist/"
#These files exist only with libtool-2*, and need to be included.
if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then
cat "/usr/share/aclocal/ltsugar.m4" >> "bdb/dist/aclocal/libtool.ac"
cat "/usr/share/aclocal/ltversion.m4" >> "bdb/dist/aclocal/libtool.ac"
cat "/usr/share/aclocal/lt~obsolete.m4" >> "bdb/dist/aclocal/libtool.ac"
cat "/usr/share/aclocal/ltoptions.m4" >> "bdb/dist/aclocal/libtool.ac"
fi
pushd "bdb/dist" &>/dev/null
sh s_all \
|| die "Failed bdb reconfigure"
popd &>/dev/null
fi
mysql_version_is_at_least "5.1.12" \
&& [[ -n "${PBXT_VERSION}" ]] \
&& mv ../pbxt-${PBXT_VERSION} storage/pbxt
}
mysql_src_compile() {
# Make sure the vars are correctly initialized
mysql_init_vars
# $myconf is modified by the configure_* functions
local myconf=""
if use minimal ; then
configure_minimal
else
configure_common
if mysql_version_is_at_least "5.1.10" ; then
configure_51
else
configure_40_41_50
fi
fi
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
# glib-2.3.2_pre fix, bug #16496
append-flags "-DHAVE_ERRNO_AS_DEFINE=1"
# As discovered by bug #246652, doing a double-level of SSP causes NDB to
# fail badly during cluster startup.
if [[ $(gcc-major-version) -lt 4 ]]; then
filter-flags "-fstack-protector-all"
fi
CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-strict-aliasing"
CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti"
mysql_version_is_at_least "5.0" \
&& CXXFLAGS="${CXXFLAGS} -fno-implicit-templates"
mysql_version_is_at_least "5.1.32" \
&& CXXFLAGS="${CXXFLAGS} -DBIG_JOINS=1"
# Force pic on amd64
if use amd64 ; then
CFLAGS="${CFLAGS} -fPIC"
CXXFLAGS="${CXXFLAGS} -fPIC"
myconf="${myconf} --with-pic --with-lib-ccflags=-fPIC"
fi
export CFLAGS CXXFLAGS
econf \
--libexecdir="/usr/sbin" \
--sysconfdir="${MY_SYSCONFDIR}" \
--localstatedir="${MY_LOCALSTATEDIR}" \
--sharedstatedir="${MY_SHAREDSTATEDIR}" \
--libdir="${MY_LIBDIR}" \
--includedir="${MY_INCLUDEDIR}" \
--with-low-memory \
--with-client-ldflags=-lstdc++ \
--enable-thread-safe-client \
--with-comment="Gentoo Linux ${PF}" \
--without-docs \
${myconf} || die "econf failed"
# TODO: Move this before autoreconf !!!
find . -type f -name Makefile -print0 \
| xargs -0 -n100 sed -i \
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
emake || die "emake failed"
}
mysql_src_install() {
# Make sure the vars are correctly initialized
mysql_init_vars
emake install DESTDIR="${D}" benchdir_root="${MY_SHAREDSTATEDIR}" || die "emake install failed"
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze"
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair"
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize"
# Various junk (my-*.cnf moved elsewhere)
einfo "Removing duplicate /usr/share/mysql files"
rm -Rf "${D}/usr/share/info"
for removeme in "mysql-log-rotate" mysql.server* \
binary-configure* my-*.cnf mi_test_all*
do
rm -f "${D}"/usr/share/mysql/${removeme}
done
# Clean up stuff for a minimal build
if use minimal ; then
einfo "Remove all extra content for minimal build"
rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench}
rm -f "${D}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam}
rm -f "${D}/usr/sbin/mysqld"
rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a
fi
# Configuration stuff
if mysql_version_is_at_least "4.1" ; then
mysql_mycnf_version="4.1"
else
mysql_mycnf_version="4.0"
fi
einfo "Building default my.cnf"
insinto "${MY_SYSCONFDIR}"
doins scripts/mysqlaccess.conf
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
"${FILESDIR}/my.cnf-${mysql_mycnf_version}" \
> "${TMPDIR}/my.cnf.ok"
if mysql_version_is_at_least "4.1" && use latin1 ; then
sed -e "s|utf8|latin1|g" -i "${TMPDIR}/my.cnf.ok"
fi
newins "${TMPDIR}/my.cnf.ok" my.cnf
# Minimal builds don't have the MySQL server
if ! use minimal ; then
einfo "Creating initial directories"
# Empty directories ...
diropts "-m0750"
if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then
dodir "${MY_DATADIR}"
keepdir "${MY_DATADIR}"
chown -R mysql:mysql "${D}/${MY_DATADIR}"
fi
diropts "-m0755"
for folder in "${MY_LOGDIR}" "/var/run/mysqld" ; do
dodir "${folder}"
keepdir "${folder}"
chown -R mysql:mysql "${D}/${folder}"
done
fi
# Docs
einfo "Installing docs"
dodoc README COPYING ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE
doinfo "${S}"/Docs/mysql.info
# Minimal builds don't have the MySQL server
if ! use minimal ; then
einfo "Including support files and sample configurations"
docinto "support-files"
for script in \
"${S}"/support-files/my-*.cnf \
"${S}"/support-files/magic \
"${S}"/support-files/ndb-config-2-node.ini
do
dodoc "${script}"
done
docinto "scripts"
for script in "${S}"/scripts/mysql* ; do
[[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
done
fi
mysql_lib_symlinks "${D}"
}
mysql_pkg_preinst() {
enewgroup mysql 60 || die "problem adding 'mysql' group"
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
mysql_pkg_postinst() {
# Make sure the vars are correctly initialized
mysql_init_vars
# Check FEATURES="collision-protect" before removing this
[[ -d "${ROOT}/var/log/mysql" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
# Secure the logfiles
touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err}
chown mysql:mysql "${ROOT}${MY_LOGDIR}"/mysql*
chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql*
# Minimal builds don't have the MySQL server
if ! use minimal ; then
docinto "support-files"
for script in \
support-files/my-*.cnf \
support-files/magic \
support-files/ndb-config-2-node.ini
do
dodoc "${script}"
done
docinto "scripts"
for script in scripts/mysql* ; do
[[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
done
einfo
elog "You might want to run:"
elog "\"emerge --config =${CATEGORY}/${PF}\""
elog "if this is a new install."
einfo
fi
mysql_check_version_range "4.0 to 5.0.99.99" \
&& use berkdb \
&& elog "Berkeley DB support is deprecated and will be removed in future versions!"
}
mysql_pkg_config() {
# Make sure the vars are correctly initialized
mysql_init_vars
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
if built_with_use ${CATEGORY}/${PN} minimal ; then
die "Minimal builds do NOT include the MySQL server"
fi
local pwd1="a"
local pwd2="b"
local maxtry=5
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
ewarn "You have already a MySQL database in place."
ewarn "(${ROOT}/${MY_DATADIR}/*)"
ewarn "Please rename or delete it if you wish to replace it."
die "MySQL database already exists!"
fi
# Bug #213475 - MySQL _will_ object strenously if your machine is named
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
einfo "Creating the mysql database and setting proper"
einfo "permissions on it ..."
einfo "Insert a password for the mysql 'root' user"
ewarn "Avoid [\"'\\_%] characters in the password"
read -rsp " >" pwd1 ; echo
einfo "Retype the password"
read -rsp " >" pwd2 ; echo
if [[ "x$pwd1" != "x$pwd2" ]] ; then
die "Passwords are not the same"
fi
local options=""
local sqltmp="$(emktemp)"
local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
[[ -r "${help_tables}" ]] \
&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
|| touch "${TMPDIR}/fill_help_tables.sql"
help_tables="${TMPDIR}/fill_help_tables.sql"
pushd "${TMPDIR}" &>/dev/null
"${ROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1
if [ $? -ne 0 ]; then
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
fi
popd &>/dev/null
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|| die "MySQL databases not installed"
chown -R mysql:mysql "${ROOT}/${MY_DATADIR}" 2>/dev/null
chmod 0750 "${ROOT}/${MY_DATADIR}" 2>/dev/null
if mysql_version_is_at_least "4.1.3" ; then
use cluster && options="${options} --skip-ndbcluster"
# Filling timezones, see
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${ROOT}/usr/bin/mysql_tzinfo_to_sql" "${ROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
if [[ -r "${help_tables}" ]] ; then
cat "${help_tables}" >> "${sqltmp}"
fi
fi
if mysql_check_version_range "4.1 to 5.0.99.99" && use berkdb ; then
options="${options} --skip-bdb"
fi
local socket="${ROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${ROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${ROOT}/usr/sbin/mysqld \
${options} \
--user=mysql \
--skip-grant-tables \
--basedir=${ROOT}/usr \
--datadir=${ROOT}/${MY_DATADIR} \
--skip-innodb \
--skip-networking \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=${socket} \
--pid-file=${pidfile}"
${mysqld} &
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
maxtry=$((${maxtry}-1))
echo -n "."
sleep 1
done
# Do this from memory, as we don't want clear text passwords in temp files
local sql="UPDATE mysql.user SET Password = PASSWORD('${pwd1}') WHERE USER='root'"
"${ROOT}/usr/bin/mysql" \
--socket=${socket} \
-hlocalhost \
-e "${sql}"
einfo "Loading \"zoneinfo\", this step may require a few seconds ..."
"${ROOT}/usr/bin/mysql" \
--socket=${socket} \
-hlocalhost \
-uroot \
-p"${pwd1}" \
mysql < "${sqltmp}"
# Stop the server and cleanup
kill $(< "${pidfile}" )
rm -f "${sqltmp}"
einfo "Stopping the server ..."
wait %1
einfo "Done"
}
mysql_pkg_postrm() {
: # mysql_lib_symlinks "${D}"
}

211
eclass/mysql_fx.eclass Normal file
View File

@ -0,0 +1,211 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.22 2009/02/12 05:05:14 robbat2 Exp $
# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
# Maintainer: Luca Longinotti <chtekk@gentoo.org>
inherit multilib
#
# Helper function, version (integer) may have sections separated by dots
# for readability.
#
stripdots() {
local dotver=${1:-"0"}
local v=""
local ret=0
if [[ "${dotver/./}" != "${dotver}" ]] ; then
# dotted version number
for i in 1000000 10000 100 1 ; do
v=${dotver%%\.*}
# remove leading zeroes
while [[ ${#v} -gt 1 ]] && [[ ${v:0:1} == "0" ]] ; do v=${v#0} ; done
# increment integer version number
ret=$(( ${v} * ${i} + ${ret} ))
if [[ "${dotver}" == "${dotver/\.}" ]] ; then
dotver=0
else
dotver=${dotver#*\.}
fi
done
echo "${ret}"
else
# already an integer
v=${dotver}
while [[ ${#v} -gt 1 ]] && [[ ${v:0:1} == "0" ]] ; do v=${v#0} ; done
echo "${v}"
fi
}
#
# Check if a version number falls inside a given range.
# The range includes the extremes and must be specified as
# "low_version to high_version" i.e. "4.1.2 to 5.1.99.99".
# Returns true if inside the range.
#
mysql_check_version_range() {
local lbound="${1%% to *}" ; lbound=$(stripdots "${lbound}")
local rbound="${1#* to }" ; rbound=$(stripdots "${rbound}")
local my_ver="${2:-"${MYSQL_VERSION_ID}"}"
[[ ${lbound} -le ${my_ver} ]] && [[ ${my_ver} -le ${rbound} ]] && return 0
return 1
}
#
# True if at least one applicable range is found for the patch.
#
_mysql_test_patch_ver_pn() {
local allelements=", version, package name"
# So that it fails the directory test if none of them exist
local filesdir="/dev/null"
for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \
"${WORKDIR}/mysql-extras" ; do
if [ -d "${d}" ]; then
filesdir="${d}"
break
fi
done
[[ -d "${filesdir}" ]] || die "Source dir must be a directory"
local flags=$1 pname=$2
if [[ $(( $flags & $(( 1 + 4 + 16 )) )) -eq 21 ]] ; then
einfo "using '${pname}'"
ln -sf "${filesdir}/${pname}" "${EPATCH_SOURCE}" || die "Couldn't move ${pname}"
return 0
fi
[[ $(( $flags & $(( 2 + 4 )) )) -gt 0 ]] \
&& allelements="${allelements//", version"}"
[[ $(( $flags & $(( 8 + 16 )) )) -gt 0 ]] \
&& allelements="${allelements//", package name"}"
[[ -n "${allelements}" ]] && [[ "${flags}" -gt 0 ]] \
&& ewarn "QA notice: ${allelements} missing in ${pname} patch"
return 1
}
#
# Parse a "index_file" looking for patches to apply to the
# current MySQL version.
# If the patch applies, print its description.
#
mysql_mv_patches() {
# So that it fails the directory test if none of them exist
local filesdir="/dev/null"
if [[ -z "${1}" ]]; then
for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \
"${WORKDIR}/mysql-extras" ; do
if [ -d "${d}" ]; then
filesdir="${d}"
break
fi
done
[[ -d "${filesdir}" ]] || die "No patches directory found!"
fi
for i in "$1" "${filesdir}/0000_index.txt" "${filesdir}/000_index.txt" ; do
if [ -n "$i" -a -f "$i" ]; then
local index_file="$i"
break
fi
done
local my_ver="${2:-"${MYSQL_VERSION_ID}"}"
local my_test_fx=${3:-"_mysql_test_patch_ver_pn"}
_mysql_mv_patches "${index_file}" "${my_ver}" "${my_test_fx}"
}
_mysql_mv_patches() {
local index_file="${1}"
local my_ver="${2}"
local my_test_fx="${3}"
local dsc ndsc=0 i
dsc=( )
# Values for flags are (2^x):
# 1 - one patch found
# 2 - at least one version range is wrong
# 4 - at least one version range is ok
# 8 - at least one ${PN} did not match
# 16 - at least one ${PN} has been matched
local flags=0 pname=""
while read row ; do
case "${row}" in
@patch\ *)
[[ -n "${pname}" ]] \
&& ${my_test_fx} ${flags} "${pname}" \
&& for (( i=0 ; $i < $ndsc ; i++ )) ; do einfo "> ${dsc[$i]}" ; done
flags=1 ; ndsc=0 ; dsc=( )
pname=${row#"@patch "}
;;
@ver\ *)
if mysql_check_version_range "${row#"@ver "}" "${my_ver}" ; then
flags=$(( ${flags} | 4 ))
else
flags=$(( ${flags} | 2 ))
fi
;;
@pn\ *)
if [[ ${row#"@pn "} == "${PN}" ]] ; then
flags=$(( ${flags} | 16 ))
else
flags=$(( ${flags} | 8 ))
fi
;;
# @use\ *) ;;
@@\ *)
dsc[$ndsc]="${row#"@@ "}"
(( ++ndsc ))
;;
esac
done < "${index_file}"
${my_test_fx} ${flags} "${pname}" \
&& for (( i=0 ; $i < $ndsc ; i++ )) ; do einfo "> ${dsc[$i]}" ; done
}
#
# Is $2 (defaults to $MYSQL_VERSION_ID) at least version $1?
# (nice) idea from versionator.eclass
#
mysql_version_is_at_least() {
local want_s=$(stripdots "$1") have_s=$(stripdots "${2:-${MYSQL_VERSION_ID}}")
[[ -z "${want_s}" ]] && die "mysql_version_is_at_least missing value to check"
[[ ${want_s} -le ${have_s} ]] && return 0 || return 1
}
#
# To be called on the live filesystem, reassigning symlinks of each MySQL
# library to the best version available.
#
mysql_lib_symlinks() {
einfo "Updating MySQL .so symlinks"
local d dirlist maxdots soname sonameln reldir
reldir="${1}"
pushd "${reldir}/usr/$(get_libdir)" &> /dev/null
# dirlist must contain the less significative directory left
dirlist="mysql"
# waste some time in removing and recreating symlinks
for d in $dirlist ; do
for soname in $( find "${d}" -name "*.so*" -and -not -type "l" 2>/dev/null ) ; do
# maxdot is a limit versus infinite loop
maxdots=0
sonameln=${soname##*/}
# loop in version of the library to link it, similar to how
# libtool works
while [[ ${sonameln:0-3} != '.so' ]] && [[ ${maxdots} -lt 6 ]] ; do
rm -f "${sonameln}"
ln -s "${soname}" "${sonameln}"
(( ++maxdots ))
sonameln="${sonameln%.*}"
done
rm -f "${sonameln}"
ln -s "${soname}" "${sonameln}"
done
done
popd &> /dev/null
}

1
profiles/package.unmask Normal file
View File

@ -0,0 +1 @@
=virtual/mysql-5.1

38
virtual/mysql/ChangeLog Normal file
View File

@ -0,0 +1,38 @@
# ChangeLog for virtual/mysql
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/virtual/mysql/ChangeLog,v 1.9 2008/12/14 20:15:11 klausman Exp $
14 Dec 2008; Tobias Klausmann <klausman@gentoo.org> mysql-4.0.ebuild,
mysql-4.1.ebuild:
Mysql 4 doesn't compile cleanly on alpha (bug 162062) and nothing depends
on it specifically, so dropping the keyword altogether
27 Jun 2007; Michael Sterrett <mr_bones_@gentoo.org> mysql-4.1.ebuild:
remove reference to dev-db/mysql-community-4 which has gone away.
17 May 2007; Bryan Østergaard <kloeri@gentoo.org> mysql-5.0.ebuild:
Mark stable on Alpha.
25 Dec 2006; Tim Yamin <plasmaroo@gentoo.org> mysql-5.0.ebuild:
Stable on IA64.
10 Dec 2006; Francesco Riosa <vivo@gentoo.org> mysql-4.1.ebuild:
update 4.1 to accomplish with mysql cs/en 4.1 version bump.
25 Nov 2006; Markus Rothe <corsair@gentoo.org> mysql-5.0.ebuild:
Stable on ppc64
23 Nov 2006; Luca Longinotti <chtekk@gentoo.org> mysql-4.0.ebuild,
mysql-4.1.ebuild, mysql-5.0.ebuild, mysql-5.1.ebuild:
Default to dev-db/mysql for now.
*mysql-5.1 (23 Nov 2006)
*mysql-5.0 (23 Nov 2006)
*mysql-4.1 (23 Nov 2006)
*mysql-4.0 (23 Nov 2006)
23 Nov 2006; Francesco Riosa <vivo@gentoo.org> +metadata.xml,
+mysql-4.0.ebuild, +mysql-4.1.ebuild, +mysql-5.0.ebuild,
+mysql-5.1.ebuild:
New entry to simplify mysql{community,enterprise} managment

3
virtual/mysql/Manifest Normal file
View File

@ -0,0 +1,3 @@
EBUILD mysql-5.1.ebuild 551 RMD160 45fb3ba9603c26d7ed7c7a7ff438244b2080adcd SHA1 fed32d49f429adf5e3d503e9d2eb4fa7dbf485b6 SHA256 c7e74e1dee128df1167a2651004cb985673cd86387ed611f3ace4830bdf5a924
MISC ChangeLog 1435 RMD160 ed67a7b97822b0de6f661196bcf126ec5e6cb9db SHA1 78b972f19be48128e8187ace0b0dc3107571ca81 SHA256 6961d91b1a9afa3fc180b218823097b7c78b2c9846d96f6235377657f1d792c1
MISC metadata.xml 159 RMD160 a50a94af7706288c46f81d6c3da9b5f888050eee SHA1 5eb253a678d6faa0f1c6b3c5720a804ed8923566 SHA256 5cfd5aa0e8104c0326b5f4c9205a6449a94e0f6f6abfd2626f1e7a8fe77b98b7

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>mysql</herd>
</pkgmetadata>

View File

@ -0,0 +1,19 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/virtual/mysql/mysql-5.1.ebuild,v 1.3 2006/11/23 15:57:58 chtekk Exp $
DESCRIPTION="Virtual for MySQL client or database"
HOMEPAGE="http://dev.mysql.com"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
IUSE=""
DEPEND=""
RDEPEND="|| (
=dev-db/mysql-${PV}*
=dev-db/mysql-community-${PV}*
=dev-db/mysql-mariadb-${PV}*
)"