From: "Robin H. Johnson (robbat2)" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: mysql.eclass
Date: Mon, 15 Mar 2010 18:50:44 +0000 [thread overview]
Message-ID: <E1NrFNE-0006Yn-Ht@stork.gentoo.org> (raw)
robbat2 10/03/15 18:50:44
Modified: mysql.eclass
Log:
Merge Overlay changes for MariaDB.
Revision Changes Path
1.137 eclass/mysql.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mysql.eclass?rev=1.137&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mysql.eclass?rev=1.137&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mysql.eclass?r1=1.136&r2=1.137
Index: mysql.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v
retrieving revision 1.136
retrieving revision 1.137
diff -p -w -b -B -u -u -r1.136 -r1.137
--- mysql.eclass 9 Mar 2010 20:37:34 -0000 1.136
+++ mysql.eclass 15 Mar 2010 18:50:43 -0000 1.137
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.136 2010/03/09 20:37:34 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.137 2010/03/15 18:50:43 robbat2 Exp $
# @ECLASS: mysql.eclass
# @MAINTAINER:
@@ -53,6 +53,14 @@ case "${EAPI:-0}" in
die "Unsupported EAPI: ${EAPI}" ;;
esac
+
+# @ECLASS-VARIABLE: MYSQL_PV_MAJOR
+# @DESCRIPTION:
+# Upstream MySQL considers the first two parts of the version number to be the
+# major version. Upgrades that change major version should always run
+# mysql_upgrade.
+MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})"
+
# @ECLASS-VARIABLE: MYSQL_VERSION_ID
# @DESCRIPTION:
# MYSQL_VERSION_ID will be:
@@ -79,7 +87,7 @@ MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"
# and 0 (no).
# Community features are available in mysql-community
# AND in the re-merged mysql-5.0.82 and newer
-if [ "${PN}" == "mysql-community" ]; then
+if [ "${PN}" == "mysql-community" -o "${PN}" == "mariadb" ]; then
MYSQL_COMMUNITY_FEATURES=1
elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then
MYSQL_COMMUNITY_FEATURES=1
@@ -114,10 +122,13 @@ DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d
>=sys-libs/readline-4.1
>=sys-libs/zlib-1.2.3"
+[[ "${PN}" == "mariadb" ]] \
+&& DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )"
+
# Having different flavours at the same time is not a good idea
-for i in "" "-community" ; do
- [[ "${i}" == ${PN#mysql} ]] ||
- DEPEND="${DEPEND} !dev-db/mysql${i}"
+for i in "mysql" "mysql-community" "mariadb" ; do
+ [[ "${i}" == ${PN} ]] ||
+ DEPEND="${DEPEND} !dev-db/${i}"
done
RDEPEND="${DEPEND}
@@ -136,13 +147,16 @@ mysql_version_is_at_least "5.1.12" \
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})"
+PDEPEND="${PDEPEND} =virtual/mysql-${MYSQL_PV_MAJOR}"
# Work out the default SERVER_URI correctly
if [ -z "${SERVER_URI}" ]; then
[ -z "${MY_PV}" ] && MY_PV="${PV//_/-}"
+ if [ "${PN}" == "mariadb" ]; then
+ MARIA_FULL_PV="$(replace_version_separator 3 '-' ${PV})"
+ SERVER_URI="http://launchpad.net/maria/${MYSQL_PV_MAJOR}/ongoing/+download/mariadb-${MARIA_FULL_PV}.tar.gz"
# The community build is on the mirrors
- if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
+ elif [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${MY_PV}.tar.gz"
# The (old) enterprise source is on the primary site only
elif [ "${PN}" == "mysql" ]; then
@@ -162,6 +176,10 @@ SRC_URI="${SERVER_URI}"
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
HOMEPAGE="http://www.mysql.com/"
+if [[ "${PN}" == "mariadb" ]]; then
+ HOMEPAGE="http://askmonty.org/"
+ DESCRIPTION="MariaDB is a MySQL fork with 3rd-party patches and additional storage engines merged."
+fi
LICENSE="GPL-2"
SLOT="0"
IUSE="big-tables debug embedded minimal ${IUSE_DEFAULT_ON}perl selinux ssl static test"
@@ -184,17 +202,44 @@ mysql_version_is_at_least "5.1" \
[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling"
-# PBXT engine
-mysql_version_is_at_least "5.1.12" \
-&& [[ -n "${PBXT_VERSION}" ]] \
+[[ "${PN}" == "mariadb" ]] \
+&& IUSE="${IUSE} libevent"
+
+# MariaDB has integrated PBXT
+# PBXT_VERSION means that we have a PBXT patch for this PV
+# PBXT was only introduced after 5.1.12
+pbxt_patch_available() {
+ [[ "${PN}" != "mariadb" ]] \
+ && mysql_version_is_at_least "5.1.12" \
+ && [[ -n "${PBXT_VERSION}" ]]
+ return $?
+}
+
+pbxt_available() {
+ pbxt_patch_available || [[ "${PN}" == "mariadb" ]]
+ return $?
+}
+
+# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set
+# MariaDB has integrated XtraDB
+# XTRADB_VERS means that we have a XTRADB patch for this PV
+# XTRADB was only introduced after 5.1.26
+xtradb_patch_available() {
+ [[ "${PN}" != "mariadb" ]] \
+ && mysql_version_is_at_least "5.1.26" \
+ && [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]]
+ return $?
+}
+
+pbxt_patch_available \
&& PBXT_P="pbxt-${PBXT_VERSION}" \
&& PBXT_SRC_URI="http://www.primebase.org/download/${PBXT_P}.tar.gz mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \
&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" \
+
+pbxt_available \
&& IUSE="${IUSE} pbxt"
-# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set
-mysql_version_is_at_least "5.1.26" \
-&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
+xtradb_patch_available \
&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \
&& XTRADB_SRC_URI_COMMON="${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \
&& XTRADB_SRC_URI1="http://www.percona.com/percona-builds/xtradb/${XTRADB_SRC_URI_COMMON}" \
@@ -497,8 +542,13 @@ configure_51() {
# Not supporting as examples: example,daemon_example,ftexample
plugins="${plugins},archive,blackhole,federated,partition"
+ if [[ "${PN}" != "mariadb" ]] ; then
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"
+ else
+ elog "MariaDB includes the FederatedX engine. Be sure to read"
+ elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine"
+ fi
fi
# Upstream specifically requests that InnoDB always be built:
@@ -514,21 +564,22 @@ configure_51() {
myconf="${myconf} --with-ndb-binlog"
fi
- myconf="${myconf} --with-plugins=${plugins}"
-}
-
-xtradb_applicable() {
- mysql_version_is_at_least "5.1.26" \
- && [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] \
- && use xtradb
- return $?
-}
+ if [[ "${PN}" == "mariadb" ]] ; then
+ # In MariaDB, InnoDB is packaged in the xtradb directory, so it's not
+ # caught above.
+ plugins="${plugins},maria,innobase"
+ if use pbxt ; then
+ plugins="${plugins},pbxt"
+ else
+ myconf="${myconf} --without-plugin-pbxt"
+ fi
+ myconf="${myconf} $(use_with libevent)"
+ # This is not optional, without it several upstream testcases fail.
+ # Also strongly recommended by upstream.
+ myconf="${myconf} --with-maria-tmp-tables"
+ fi
-pbxt_applicable() {
- mysql_version_is_at_least "5.1.12" \
- && [[ -n "${PBXT_VERSION}" ]] \
- && use pbxt
- return $?
+ myconf="${myconf} --with-plugins=${plugins}"
}
pbxt_src_configure() {
@@ -693,7 +744,7 @@ mysql_src_prepare() {
local rebuilddirlist d
- if xtradb_applicable ; then
+ if xtradb_patch_available && use xtradb ; then
einfo "Replacing InnoDB with Percona XtraDB"
pushd "${S}"/storage
i="innobase"
@@ -808,7 +859,7 @@ mysql_src_configure() {
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
if [[ $EAPI == 2 ]]; then
- pbxt_applicable && pbxt_src_configure
+ pbxt_patch_available && use pbxt && pbxt_src_configure
fi
}
@@ -824,7 +875,7 @@ mysql_src_compile() {
emake || die "emake failed"
- pbxt_applicable && pbxt_src_compile
+ pbxt_patch_available && use pbxt && pbxt_src_compile
}
# @FUNCTION: mysql_src_install
@@ -840,7 +891,7 @@ mysql_src_install() {
testroot="${MY_SHAREDSTATEDIR}" \
|| die "emake install failed"
- pbxt_applicable && pbxt_src_install
+ pbxt_patch_available && use pbxt && pbxt_src_install
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
@@ -972,12 +1023,15 @@ mysql_pkg_postinst() {
support-files/magic \
support-files/ndb-config-2-node.ini
do
- dodoc "${script}"
+ [[ -f "${script}" ]] \
+ && dodoc "${script}"
done
docinto "scripts"
for script in scripts/mysql* ; do
- [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}"
+ [[ -f "${script}" ]] \
+ && [[ "${script%.sh}" == "${script}" ]] \
+ && dodoc "${script}"
done
einfo
@@ -987,7 +1041,7 @@ mysql_pkg_postinst() {
einfo
fi
- if pbxt_applicable ; then
+ if pbxt_available && use pbxt ; then
# TODO: explain it better
elog " mysql> INSTALL PLUGIN pbxt SONAME 'libpbxt.so';"
elog " mysql> CREATE TABLE t1 (c1 int, c2 text) ENGINE=pbxt;"
next reply other threads:[~2010-03-15 18:50 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 18:50 Robin H. Johnson (robbat2) [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-31 16:57 [gentoo-commits] gentoo-x86 commit in eclass: mysql.eclass Robin H. Johnson (robbat2)
2012-01-08 23:33 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2011-05-07 19:16 Robin H. Johnson (robbat2)
2011-04-21 12:15 Robin H. Johnson (robbat2)
2011-03-28 22:36 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2011-03-26 23:44 Jorge Manuel B. S. Vicetto (jmbsvicetto)
2010-11-28 21:55 Robin H. Johnson (robbat2)
2010-11-02 20:27 Robin H. Johnson (robbat2)
2010-10-28 20:46 Robin H. Johnson (robbat2)
2010-10-27 7:19 Robin H. Johnson (robbat2)
2010-09-06 8:02 Robin H. Johnson (robbat2)
2010-08-20 23:52 Robin H. Johnson (robbat2)
2010-08-09 19:29 Robin H. Johnson (robbat2)
2010-08-08 23:31 Robin H. Johnson (robbat2)
2010-05-13 19:45 Robin H. Johnson (robbat2)
2010-04-27 5:45 Robin H. Johnson (robbat2)
2010-04-01 20:36 Robin H. Johnson (robbat2)
2010-03-25 20:58 Robin H. Johnson (robbat2)
2010-03-24 20:37 Robin H. Johnson (robbat2)
2010-03-24 3:45 Robin H. Johnson (robbat2)
2010-03-24 3:09 Robin H. Johnson (robbat2)
2010-03-15 19:27 Robin H. Johnson (robbat2)
2010-03-15 19:05 Robin H. Johnson (robbat2)
2010-03-09 20:37 Robin H. Johnson (robbat2)
2010-03-03 23:57 Robin H. Johnson (robbat2)
2010-02-27 18:21 Robin H. Johnson (robbat2)
2010-02-21 0:18 Robin H. Johnson (robbat2)
2010-02-02 22:16 Robin H. Johnson (robbat2)
2010-02-02 3:01 Robin H. Johnson (robbat2)
2010-02-02 2:59 Robin H. Johnson (robbat2)
2010-02-02 2:46 Robin H. Johnson (robbat2)
2010-02-01 19:16 Hanno Boeck (hanno)
2010-02-01 1:07 Robin H. Johnson (robbat2)
2010-01-31 5:47 Robin H. Johnson (robbat2)
2010-01-31 5:00 Robin H. Johnson (robbat2)
2010-01-31 3:05 Robin H. Johnson (robbat2)
2009-12-10 1:27 Robin H. Johnson (robbat2)
2009-12-09 19:17 Robin H. Johnson (robbat2)
2009-12-09 18:54 Robin H. Johnson (robbat2)
2009-12-09 18:46 Robin H. Johnson (robbat2)
2009-12-09 18:45 Robin H. Johnson (robbat2)
2009-11-19 20:59 Hanno Boeck (hanno)
2009-11-19 18:22 Robin H. Johnson (robbat2)
2009-10-11 11:42 Markus Meier (maekke)
2009-09-08 5:28 Robin H. Johnson (robbat2)
2009-07-06 19:06 Robin H. Johnson (robbat2)
2009-07-06 19:05 Robin H. Johnson (robbat2)
2009-07-06 18:58 Robin H. Johnson (robbat2)
2009-07-06 18:21 Robin H. Johnson (robbat2)
2009-07-06 18:18 Robin H. Johnson (robbat2)
2009-02-28 10:51 Robin H. Johnson (robbat2)
2009-02-28 10:50 Robin H. Johnson (robbat2)
2009-02-28 10:49 Robin H. Johnson (robbat2)
2009-02-11 11:29 Robin H. Johnson (robbat2)
2009-02-11 11:28 Robin H. Johnson (robbat2)
2009-02-11 11:27 Robin H. Johnson (robbat2)
2009-01-12 23:08 Markus Meier (maekke)
2008-11-29 2:30 Robin H. Johnson (robbat2)
2008-11-20 20:44 Robin H. Johnson (robbat2)
2008-11-14 22:07 Robin H. Johnson (robbat2)
2008-11-14 4:48 Robin H. Johnson (robbat2)
2008-11-14 1:46 Robin H. Johnson (robbat2)
2008-10-16 18:48 Petteri Raty (betelgeuse)
2008-05-29 19:35 Robin H. Johnson (robbat2)
2008-05-29 5:38 Robin H. Johnson (robbat2)
2008-05-29 5:33 Robin H. Johnson (robbat2)
2008-05-29 5:28 Robin H. Johnson (robbat2)
2008-05-29 5:17 Robin H. Johnson (robbat2)
2008-05-29 3:15 Robin H. Johnson (robbat2)
2008-05-22 18:13 Robin H. Johnson (robbat2)
2008-04-05 0:43 Robin H. Johnson (robbat2)
2008-03-10 2:47 Robin H. Johnson (robbat2)
2008-03-09 21:19 Robin H. Johnson (robbat2)
2008-03-09 21:13 Robin H. Johnson (robbat2)
2008-03-09 21:09 Robin H. Johnson (robbat2)
2008-01-16 4:01 Robin H. Johnson (robbat2)
2007-11-08 9:42 Robin H. Johnson (robbat2)
2007-10-02 10:00 Robin H. Johnson (robbat2)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1NrFNE-0006Yn-Ht@stork.gentoo.org \
--to=robbat2@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox