From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EB7DD1381FA for ; Wed, 30 Apr 2014 20:39:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4C16AE087D; Wed, 30 Apr 2014 20:39:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B8489E087D for ; Wed, 30 Apr 2014 20:39:22 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88905340109 for ; Wed, 30 Apr 2014 20:39:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 870541818D for ; Wed, 30 Apr 2014 20:39:18 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1398890339.a6fc813816f0115c3911dce9db9d6ed66acaedac.grknight.pub@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-multilib.eclass eclass/mysql-v2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight.pub X-VCS-Committer-Name: Brian Evans X-VCS-Revision: a6fc813816f0115c3911dce9db9d6ed66acaedac X-VCS-Branch: master Date: Wed, 30 Apr 2014 20:39:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e467e7ab-bd51-4c9f-a9d9-e70926dd7b1b X-Archives-Hash: 60d712d69e65b7caecfa1a3fbb5673a1 commit: a6fc813816f0115c3911dce9db9d6ed66acaedac Author: Brian Evans tuffmail com> AuthorDate: Wed Apr 30 20:38:59 2014 +0000 Commit: Brian Evans lavabit com> CommitDate: Wed Apr 30 20:38:59 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=a6fc8138 [eclass] Fix pkg_config for mysql 5.6+ (needs InnoDB) Signed-off-by: Brian Evans tuffmail.com> --- eclass/mysql-multilib.eclass | 29 +++++++++++++++++------------ eclass/mysql-v2.eclass | 31 ++++++++++++++++++------------- 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 \