grobian 14/07/19 10:18:41 Modified: ChangeLog mysql-autotools.eclass mysql-cmake.eclass mysql-v2.eclass mysql.eclass Log: Fix misc issues for Prefix allowing install and config of mysql
Revision Changes Path 1.1323 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1323&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1323&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1322&r2=1.1323 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1322 retrieving revision 1.1323 diff -u -r1.1322 -r1.1323 --- ChangeLog 17 Jul 2014 13:02:11 -0000 1.1322 +++ ChangeLog 19 Jul 2014 10:18:41 -0000 1.1323 @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1322 2014/07/17 13:02:11 kensington Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1323 2014/07/19 10:18:41 grobian Exp $ + + 19 Jul 2014; Fabian Groffen <grob...@gentoo.org> mysql.eclass, + mysql-autotools.eclass, mysql-cmake.eclass, mysql-v2.eclass: + Fix misc issues for Prefix allowing install and config of mysql 17 Jul 2014; Michael Palimaka <kensing...@gentoo.org> kde4-functions.eclass: Fix missing handbooks when the default handbook language is en_US instead of 1.19 eclass/mysql-autotools.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-autotools.eclass?rev=1.19&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-autotools.eclass?rev=1.19&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-autotools.eclass?r1=1.18&r2=1.19 Index: mysql-autotools.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mysql-autotools.eclass 26 Jun 2013 19:31:49 -0000 1.18 +++ mysql-autotools.eclass 19 Jul 2014 10:18:41 -0000 1.19 @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.18 2013/06/26 19:31:49 jmbsvicetto Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.19 2014/07/19 10:18:41 grobian Exp $ # @ECLASS: mysql-autotools.eclass # @MAINTAINER: @@ -112,7 +112,7 @@ myconf="${myconf} $(use_with big-tables)" myconf="${myconf} --enable-local-infile" myconf="${myconf} --with-extra-charsets=all" - myconf="${myconf} --with-mysqld-user=mysql" + use prefix || myconf="${myconf} --with-mysqld-user=mysql" myconf="${myconf} --with-server" myconf="${myconf} --with-unix-socket-path=${EPREFIX}/var/run/mysqld/mysqld.sock" myconf="${myconf} --without-libwrap" @@ -606,6 +606,7 @@ -e "s!= /var!= ${EPREFIX}/var!" \ "${FILESDIR}/${mycnf_src}" \ > "${TMPDIR}/my.cnf.ok" + use prefix && sed -i -e '/^user[ ]*= mysql$/d' "${TMPDIR}/my.cnf.ok" if use latin1 ; then sed -i \ -e "/character-set/s|utf8|latin1|g" \ 1.22 eclass/mysql-cmake.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-cmake.eclass?rev=1.22&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-cmake.eclass?rev=1.22&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-cmake.eclass?r1=1.21&r2=1.22 Index: mysql-cmake.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- mysql-cmake.eclass 20 Jun 2014 00:03:33 -0000 1.21 +++ mysql-cmake.eclass 19 Jul 2014 10:18:41 -0000 1.22 @@ -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-cmake.eclass,v 1.21 2014/06/20 00:03:33 grknight Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.22 2014/07/19 10:18:41 grobian Exp $ # @ECLASS: mysql-cmake.eclass # @MAINTAINER: @@ -411,6 +411,7 @@ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ "${FILESDIR}/${mycnf_src}" \ > "${TMPDIR}/my.cnf.ok" || die + use prefix && sed -i -e '/^user[ ]*= mysql$/d' "${TMPDIR}/my.cnf.ok" if use latin1 ; then sed -i \ -e "/character-set/s|utf8|latin1|g" \ 1.32 eclass/mysql-v2.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-v2.eclass?rev=1.32&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-v2.eclass?rev=1.32&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-v2.eclass?r1=1.31&r2=1.32 Index: mysql-v2.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- mysql-v2.eclass 20 Jun 2014 00:03:33 -0000 1.31 +++ mysql-v2.eclass 19 Jul 2014 10:18:41 -0000 1.32 @@ -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-v2.eclass,v 1.31 2014/06/20 00:03:33 grknight Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.32 2014/07/19 10:18:41 grobian Exp $ # @ECLASS: mysql-v2.eclass # @MAINTAINER: @@ -669,7 +669,7 @@ 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 @@ -720,13 +720,13 @@ MYSQL_LOG_BIN="$(mysql-v2_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 + install -d -m 770 -o mysql -g mysql "${ROOT}"/$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 + install -d -m 770 -o mysql -g mysql "${ROOT}"/$MYSQL_LOG_BIN fi if [[ ! -d "${EROOT}"/$MYSQL_RELAY_LOG ]]; then einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" @@ -747,7 +747,7 @@ 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 "MYSQL_ROOT_PASSWORD env var or through the ${HOME}/.my.cnf file." ewarn "Avoid [\"'\\_%] characters in the password" read -rsp " >" pwd1 ; echo @@ -761,9 +761,13 @@ 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" \ @@ -786,10 +790,6 @@ 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" @@ -810,7 +810,7 @@ #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 @@ -836,16 +836,16 @@ 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}" 1.179 eclass/mysql.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.179&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.179&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?r1=1.178&r2=1.179 Index: mysql.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v retrieving revision 1.178 retrieving revision 1.179 diff -u -r1.178 -r1.179 --- mysql.eclass 8 Jan 2014 06:20:29 -0000 1.178 +++ mysql.eclass 19 Jul 2014 10:18:41 -0000 1.179 @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.178 2014/01/08 06:20:29 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.179 2014/07/19 10:18:41 grobian Exp $ # @ECLASS: mysql.eclass # @MAINTAINER: @@ -458,7 +458,7 @@ myconf="${myconf} $(use_with big-tables)" myconf="${myconf} --enable-local-infile" myconf="${myconf} --with-extra-charsets=all" - myconf="${myconf} --with-mysqld-user=mysql" + use prefix || myconf="${myconf} --with-mysqld-user=mysql" myconf="${myconf} --with-server" myconf="${myconf} --with-unix-socket-path=${EPREFIX}/var/run/mysqld/mysqld.sock" myconf="${myconf} --without-libwrap" @@ -1366,17 +1366,17 @@ MYSQL_LOG_BIN="$(mysql_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 + install -d -m 770 -o mysql -g mysql "${ROOT}"/$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 + install -d -m 770 -o mysql -g mysql "${ROOT}"/$MYSQL_LOG_BIN fi - if [[ ! -d "${EROOT}"/$MYSQL_RELAY_LOG ]]; then + if [[ ! -d "${ROOT}"/$MYSQL_RELAY_LOG ]]; then einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}"/$MYSQL_RELAY_LOG + install -d -m 770 -o mysql -g mysql "${ROOT}"/$MYSQL_RELAY_LOG fi if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then @@ -1467,7 +1467,7 @@ 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=${ROOT}/${MY_DATADIR} \