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 DC52C1391DB for ; Thu, 31 Jul 2014 02:34:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6DFE7E089B; Thu, 31 Jul 2014 02:34:03 +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 EDFDFE089B for ; Thu, 31 Jul 2014 02:34:02 +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 743EC33FEB1 for ; Thu, 31 Jul 2014 02:34:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 5C46A18810 for ; Thu, 31 Jul 2014 02:33:59 +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: <1406774029.4214e44062954742a089b8fc470c26cc9d67e4c4.grknight.pub@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-multilib.eclass X-VCS-Directories: eclass/ X-VCS-Committer: grknight.pub X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 4214e44062954742a089b8fc470c26cc9d67e4c4 X-VCS-Branch: master Date: Thu, 31 Jul 2014 02:33:59 +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: 12de2350-72ae-48ba-b180-a04e8c3fb549 X-Archives-Hash: c3ca9e7bc832839d127d52f9a2529a90 commit: 4214e44062954742a089b8fc470c26cc9d67e4c4 Author: Brian Evans gentoo org> AuthorDate: Thu Jul 31 02:33:49 2014 +0000 Commit: Brian Evans tuffmail com> CommitDate: Thu Jul 31 02:33:49 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=4214e440 Update the multilib eclass to match the work done by grobian for mysql-v2 for prefix. --- eclass/mysql-multilib.eclass | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass index c79571c..39eed57 100644 --- a/eclass/mysql-multilib.eclass +++ b/eclass/mysql-multilib.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-multilib.eclass,v 1.2 2014/07/29 20:24:00 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-multilib.eclass,v 1.3 2014/07/31 02:31:09 grknight Exp $ # @ECLASS: mysql-multilib.eclass # @MAINTAINER: @@ -641,7 +641,7 @@ mysql-multilib_pkg_config() { local old_MY_DATADIR="${MY_DATADIR}" local old_HOME="${HOME}" # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=/root + export HOME=${EPREFIX}/root # Make sure the vars are correctly initialized mysql_init_vars @@ -692,11 +692,11 @@ mysql-multilib_pkg_config() { MYSQL_LOG_BIN="$(mysql-multilib_getoptval mysqld log-bin)" MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - if [[ ! -d "${EROOT}"/$MYSQL_TMPDIR ]]; then + if [[ ! -d "${ROOT}"/$MYSQL_TMPDIR ]]; then einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" install -d -m 770 -o mysql -g mysql "${EROOT}"/$MYSQL_TMPDIR fi - if [[ ! -d "${EROOT}"/$MYSQL_LOG_BIN ]]; then + if [[ ! -d "${ROOT}"/$MYSQL_LOG_BIN ]]; then einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" install -d -m 770 -o mysql -g mysql "${EROOT}"/$MYSQL_LOG_BIN fi @@ -718,8 +718,8 @@ mysql-multilib_pkg_config() { if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - einfo "Please provide a password for the mysql 'root' user now, in the" - einfo "MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file." + einfo "Please provide a password for the mysql 'root' user now" + einfo "or through the ${HOME}/.my.cnf file." ewarn "Avoid [\"'\\_%] characters in the password" read -rsp " >" pwd1 ; echo @@ -733,9 +733,13 @@ mysql-multilib_pkg_config() { unset pwd1 pwd2 fi - local options="--log-warnings=0" + local options local sqltmp="$(emktemp)" + # Fix bug 446200. Don't reference host my.cnf, needs to come first, + # see http://bugs.mysql.com/bug.php?id=31312 + use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" + local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" [[ -r "${help_tables}" ]] \ && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ @@ -758,10 +762,6 @@ mysql-multilib_pkg_config() { use prefix || options="${options} --user=mysql" - # Fix bug 446200. Don't reference host my.cnf - 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" @@ -782,7 +782,7 @@ mysql-multilib_pkg_config() { #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} '--datadir=${EROOT}/${MY_DATADIR}' '--tmpdir=${EROOT}/${MYSQL_TMPDIR}'" + cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${ROOT}/${MY_DATADIR}' '--tmpdir=${ROOT}/${MYSQL_TMPDIR}'" einfo "Command: $cmd" eval $cmd \ >"${TMPDIR}"/mysql_install_db.log 2>&1 @@ -808,16 +808,16 @@ mysql-multilib_pkg_config() { local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" local mysqld="${EROOT}/usr/sbin/mysqld \ ${options} \ - --user=mysql \ + $(use prefix || echo --user=mysql) \ --log-warnings=0 \ --basedir=${EROOT}/usr \ - --datadir=${EROOT}/${MY_DATADIR} \ + --datadir=${ROOT}/${MY_DATADIR} \ --max_allowed_packet=8M \ --net_buffer_length=16K \ --default-storage-engine=MyISAM \ --socket=${socket} \ --pid-file=${pidfile} - --tmpdir=${EROOT}/${MYSQL_TMPDIR}" + --tmpdir=${ROOT}/${MYSQL_TMPDIR}" #einfo "About to start mysqld: ${mysqld}" ebegin "Starting mysqld" einfo "Command ${mysqld}"