summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@tuffmail.com>2014-04-30 16:38:59 -0400
committerBrian Evans <grknight@tuffmail.com>2014-04-30 16:38:59 -0400
commita6fc813816f0115c3911dce9db9d6ed66acaedac (patch)
treee907664048c30f94db38aff138b445ca3f2e7294
parent[mariadb-java-client] Version bump, remove old. (diff)
downloadmysql-a6fc813816f0115c3911dce9db9d6ed66acaedac.tar.gz
mysql-a6fc813816f0115c3911dce9db9d6ed66acaedac.tar.bz2
mysql-a6fc813816f0115c3911dce9db9d6ed66acaedac.zip
[eclass] Fix pkg_config for mysql 5.6+ (needs InnoDB)
Signed-off-by: Brian Evans <grknight@tuffmail.com>
-rw-r--r--eclass/mysql-multilib.eclass29
-rw-r--r--eclass/mysql-v2.eclass31
2 files changed, 35 insertions, 25 deletions
diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass
index 28df036..d89e15a 100644
--- a/eclass/mysql-multilib.eclass
+++ b/eclass/mysql-multilib.eclass
@@ -747,7 +747,7 @@ mysql-multilib_pkg_config() {
helpfile="${TMPDIR}/mysqld-help"
${EROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
- federated innodb ssl log-bin relay-log slow-query-log external-locking \
+ federated ssl log-bin relay-log slow-query-log external-locking \
ndbcluster log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
@@ -763,6 +763,22 @@ mysql-multilib_pkg_config() {
use prefix && [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] \
&& options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+ # MySQL 5.6+ needs InnoDB
+ if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] ; then
+ mysql_version_is_at_least "5.6" || options="${options} --loose-skip-innodb"
+ fi
+
+ einfo "Creating the mysql database and setting proper"
+ einfo "permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ mkdir -p "${PID_DIR}"
+ chown mysql:mysql "${PID_DIR}"
+ chmod 755 "${PID_DIR}"
+ fi
+
pushd "${TMPDIR}" &>/dev/null
#cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}"
cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db
@@ -789,17 +805,6 @@ mysql-multilib_pkg_config() {
cat "${help_tables}" >> "${sqltmp}"
fi
- einfo "Creating the mysql database and setting proper"
- einfo "permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- mkdir "${PID_DIR}"
- chown mysql:mysql "${PID_DIR}"
- chmod 755 "${PID_DIR}"
- fi
-
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \
diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass
index 15faf6c..5a7a6f7 100644
--- a/eclass/mysql-v2.eclass
+++ b/eclass/mysql-v2.eclass
@@ -764,7 +764,7 @@ mysql-v2_pkg_config() {
helpfile="${TMPDIR}/mysqld-help"
${EROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null
for opt in grant-tables host-cache name-resolve networking slave-start \
- federated innodb ssl log-bin relay-log slow-query-log external-locking \
+ federated ssl log-bin relay-log slow-query-log external-locking \
ndbcluster log-slave-updates \
; do
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
@@ -780,11 +780,27 @@ mysql-v2_pkg_config() {
use prefix && [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] \
&& options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+ # MySQL 5.6+ needs InnoDB
+ if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] ; then
+ mysql_version_is_at_least "5.6" || options="${options} --loose-skip-innodb"
+ fi
+
+ einfo "Creating the mysql database and setting proper"
+ einfo "permissions on it ..."
+
+ # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
+ PID_DIR="${EROOT}/var/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]]; then
+ mkdir -p "${PID_DIR}"
+ chown mysql:mysql "${PID_DIR}"
+ chmod 755 "${PID_DIR}"
+ fi
+
pushd "${TMPDIR}" &>/dev/null
#cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}"
cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db
[[ -f ${cmd} ]] || cmd=${EROOT}usr/bin/mysql_install_db
- cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options}"
+ cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${EROOT}/${MY_DATADIR}'"
einfo "Command: $cmd"
eval $cmd \
>"${TMPDIR}"/mysql_install_db.log 2>&1
@@ -806,17 +822,6 @@ mysql-v2_pkg_config() {
cat "${help_tables}" >> "${sqltmp}"
fi
- einfo "Creating the mysql database and setting proper"
- einfo "permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- mkdir "${PID_DIR}"
- chown mysql:mysql "${PID_DIR}"
- chmod 755 "${PID_DIR}"
- fi
-
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
local mysqld="${EROOT}/usr/sbin/mysqld \