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: Tue, 27 Apr 2010 05:45:55 +0000 (UTC) [thread overview]
Message-ID: <20100427054555.458302C04C@corvid.gentoo.org> (raw)
robbat2 10/04/27 05:45:55
Modified: mysql.eclass
Log:
Fix up MariaDB SRC_URI. Building for PBXT and XtraDB. Radically improve plugin handling.
Revision Changes Path
1.145 eclass/mysql.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mysql.eclass?rev=1.145&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mysql.eclass?rev=1.145&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/mysql.eclass?r1=1.144&r2=1.145
Index: mysql.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v
retrieving revision 1.144
retrieving revision 1.145
diff -p -w -b -B -u -u -r1.144 -r1.145
--- mysql.eclass 1 Apr 2010 20:36:39 -0000 1.144
+++ mysql.eclass 27 Apr 2010 05:45:55 -0000 1.145
@@ -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.144 2010/04/01 20:36:39 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.145 2010/04/27 05:45:55 robbat2 Exp $
# @ECLASS: mysql.eclass
# @MAINTAINER:
@@ -154,7 +154,12 @@ 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"
+ MARIA_FULL_P="${PN}-${MARIA_FULL_PV}"
+ SERVER_URI="
+ http://ftp.rediris.es/mirror/MariaDB/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://maria.llarian.net/download/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz
+ http://launchpad.net/maria/${MYSQL_PV_MAJOR}/ongoing/+download/${MARIA_FULL_P}.tar.gz
+ "
# The community build is on the mirrors
elif [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${MY_PV}.tar.gz"
@@ -239,15 +245,22 @@ pbxt_patch_available \
&& 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_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins
+# vs. built outside the dir
pbxt_available \
-&& IUSE="${IUSE} pbxt"
+&& IUSE="${IUSE} pbxt" \
+&& mysql_version_is_at_least "5.1.40" \
+&& PBXT_NEWSTYLE=1
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}" \
-&& XTRADB_SRC_URI2="http://www.percona.com/${PN}/xtradb/${XTRADB_SRC_URI_COMMON}" \
-&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} )" \
+&& XTRADB_SRC_B1="http://www.percona.com/" \
+&& XTRADB_SRC_B2="${XTRADB_SRC_B1}/percona-builds/" \
+&& XTRADB_SRC_URI1="${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${XTRADB_SRC_URI_COMMON}" \
+&& XTRADB_SRC_URI2="${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}" \
+&& XTRADB_SRC_URI3="${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COMMON}" \
+&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} ${XTRADB_SRC_URI3} )" \
&& IUSE="${IUSE} xtradb"
#
@@ -526,6 +539,8 @@ configure_51() {
myconf="${myconf} --with-readline"
myconf="${myconf} --with-zlib-dir=/usr/"
myconf="${myconf} --without-pstack"
+ myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/mysql/plugin"
+
use max-idx-128 && myconf="${myconf} --with-max-indexes=128"
if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
myconf="${myconf} $(use_enable community community-features)"
@@ -536,15 +551,45 @@ configure_51() {
fi
fi
+ # Scan for all available plugins
+ local plugins_avail="$(
+ LANG=C \
+ find "${S}" \
+ \( \
+ -name 'plug.in' \
+ -o -iname 'configure.in' \
+ -o -iname 'configure.ac' \
+ \) \
+ -print0 \
+ | xargs -0 sed -r -n \
+ -e '/^MYSQL_STORAGE_ENGINE/{
+ s~MYSQL_STORAGE_ENGINE\([[:space:]]*\[?([-_a-z0-9]+)\]?.*,~\1 ~g ;
+ s~^([^ ]+).*~\1~gp;
+ }' \
+ | tr -s '\n' ' '
+ )"
+
# 5.1 introduces a new way to manage storage engines (plugins)
# like configuration=none
# This base set are required, and will always be statically built.
- local plugins="csv,myisam,myisammrg,heap"
+ local plugins_sta="csv myisam myisammrg heap"
+ local plugins_dyn=""
+ local plugins_dis="example ibmdb2i"
+
+ # These aren't actually required by the base set, but are really useful:
+ plugins_sta="${plugins_sta} archive blackhole"
+
+ # default in 5.5.4
+ if mysql_version_is_at_least "5.5.4" ; then
+ plugins_sta="${plugins_sta} partition"
+ fi
+ # Now the extras
if use extraengine ; then
# like configuration=max-no-ndb, archive and example removed in 5.1.11
# not added yet: ibmdb2i
# Not supporting as examples: example,daemon_example,ftexample
- plugins="${plugins},archive,blackhole,federated,partition"
+ plugins_sta="${plugins_sta} partition"
+ plugins_dyn="${plugins_sta} federated"
if [[ "${PN}" != "mariadb" ]] ; then
elog "Before using the Federated storage engine, please be sure to read"
@@ -553,37 +598,59 @@ configure_51() {
elog "MariaDB includes the FederatedX engine. Be sure to read"
elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine"
fi
+ else
+ plugins_dis="${plugins_dis} partition federated"
fi
# Upstream specifically requests that InnoDB always be built:
# - innobase, innodb_plugin
# Build falcon if available for 6.x series.
- for i in innobase innodb_plugin falcon ; do
- [ -e "${S}"/storage/${i} ] && plugins="${plugins},${i}"
+ for i in innobase falcon ; do
+ [ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}"
+ done
+ for i in innodb_plugin ; do
+ [ -e "${S}"/storage/${i} ] && plugins_dyn="${plugins_dyn} ${i}"
done
# like configuration=max-no-ndb
if use cluster ; then
- plugins="${plugins},ndbcluster"
+ plugins_sta="${plugins_sta} ndbcluster"
myconf="${myconf} --with-ndb-binlog"
+ else
+ plugins_dis="${plugins_dis} ndbcluster"
fi
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
+ plugins_sta="${plugins_sta},maria,innobase"
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
- myconf="${myconf} --with-plugins=${plugins}"
+ if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then
+ use pbxt \
+ && plugins_dyn="${plugins_dyn} pbxt" \
+ || plugins_dis="${plugins_dis} pbxt"
+ fi
+
+ use static && \
+ plugins_sta="${plugins_sta} ${plugins_dyn}" && \
+ plugins_dyn=""
+
+ einfo "Available plugins: ${plugins_avail}"
+ einfo "Dynamic plugins: ${plugins_dyn}"
+ einfo "Static plugins: ${plugins_sta}"
+ einfo "Disabled plugins: ${plugins_dis}"
+
+ # These are the static plugins
+ myconf="${myconf} --with-plugins=${plugins_sta// /,}"
+ # And the disabled ones
+ for i in ${plugins_dis} ; do
+ myconf="${myconf} --without-plugin-${i}"
+ done
}
pbxt_src_configure() {
@@ -639,8 +707,9 @@ mysql_pkg_setup() {
# 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!"
+ M="MySQL does not support being built statically with SSL support enabled!"
+ eerror "${M}"
+ die "${M}"
fi
if ! mysql_version_is_at_least "5.0" \
@@ -652,10 +721,20 @@ mysql_pkg_setup() {
fi
if mysql_version_is_at_least "4.1.3" \
- && ( use cluster || use extraengine ) \
+ && ( use cluster || use extraengine || use embedded ) \
&& 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!"
+ M="USE flags 'cluster', 'extraengine', 'embedded' conflict with 'minimal' USE flag!"
+ eerror "${M}"
+ die "${M}"
+ fi
+
+ if mysql_version_is_at_least "5.1" \
+ && xtradb_patch_available \
+ && use xtradb \
+ && use embedded ; then
+ M="USE flags 'xtradb' and 'embedded' conflict and cause build failures"
+ eerror "${M}"
+ die "${M}"
fi
# Bug #290570, 284946, 307251
@@ -754,16 +833,25 @@ mysql_src_prepare() {
local rebuilddirlist d
if xtradb_patch_available && use xtradb ; then
- einfo "Replacing InnoDB with Percona XtraDB"
- pushd "${S}"/storage
+ einfo "Adding storage engine: Percona XtraDB (replacing InnoDB)"
+ pushd "${S}"/storage >/dev/null
i="innobase"
o="${WORKDIR}/storage-${i}.mysql-upstream"
# Have we been here already?
[ -d "${o}" ] && rm -f "${i}"
# Or maybe we haven't
[ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}"
- cp -ra "${WORKDIR}/${XTRADB_P}" "${i}"
- popd
+ cp -ral "${WORKDIR}/${XTRADB_P}" "${i}"
+ popd >/dev/null
+ fi
+
+ if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then
+ einfo "Adding storage engine: PBXT"
+ pushd "${S}"/storage >/dev/null
+ i='pbxt'
+ [ -d "${i}" ] && rm -rf "${i}"
+ cp -ral "${WORKDIR}/${PBXT_P}" "${i}"
+ popd >/dev/null
fi
if mysql_version_is_at_least "5.1.12" ; then
@@ -867,7 +955,7 @@ mysql_src_configure() {
| xargs -0 -n100 sed -i \
-e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
- if [[ $EAPI == 2 ]]; then
+ if [[ $EAPI == 2 ]] && [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
pbxt_patch_available && use pbxt && pbxt_src_configure
fi
}
@@ -884,7 +972,9 @@ mysql_src_compile() {
emake || die "emake failed"
+ if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
pbxt_patch_available && use pbxt && pbxt_src_compile
+ fi
}
# @FUNCTION: mysql_src_install
@@ -900,7 +990,9 @@ mysql_src_install() {
testroot="${MY_SHAREDSTATEDIR}" \
|| die "emake install failed"
+ if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then
pbxt_patch_available && use pbxt && pbxt_src_install
+ fi
# Convenience links
einfo "Making Convenience links for mysqlcheck multi-call binary"
next reply other threads:[~2010-04-27 5:45 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 5:45 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-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-15 18:50 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=20100427054555.458302C04C@corvid.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