commit: 6c3bfb7d9ec707b161bddb53bde5a24f411e0923
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 4 21:31:17 2015 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Wed Nov 4 21:31:17 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c3bfb7d
mysql-multilib.eclass: Several small fixes from the mysql overlay
Remove the deprecated cluster and community IUSE
Fix an old URL in post install instructions
Trigger galera initial install instructions by the galera IUSE
Restrict tests when libressl is in use
Fix the initial pkg_config password wrt bug 564198
Consolidate the duplicate ewarn messages about client libs into a single einfo
wrt bug 563640
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
eclass/mysql-multilib.eclass | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass
index 066b489..def53ae 100644
--- a/eclass/mysql-multilib.eclass
+++ b/eclass/mysql-multilib.eclass
@@ -192,7 +192,7 @@ fi
LICENSE="GPL-2"
SLOT="0/${SUBSLOT:-0}"
-IUSE="+community cluster debug embedded extraengine jemalloc latin1 libressl
+openssl
+IUSE="debug embedded extraengine jemalloc latin1 libressl +openssl
+perl profiling selinux systemtap static static-libs tcmalloc test
yassl"
REQUIRED_USE="^^ ( yassl openssl libressl )"
@@ -213,6 +213,9 @@ REQUIRED_USE="^^ ( yassl openssl libressl )"
# IUSE="bindist ${IUSE}"
#fi
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the
tests
+RESTRICT="libressl? ( test )"
+
if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then
IUSE="bindist ${IUSE}"
RESTRICT="${RESTRICT} !bindist? ( bindist )"
@@ -507,9 +510,6 @@ mysql-multilib_pkg_pretend() {
die
fi
fi
- if use_if_iuse cluster && [[ "${PN}" != "mysql-cluster" ]]; then
- die "NDB Cluster support has been removed from all packages
except mysql-cluster"
- fi
}
# @FUNCTION: mysql-multilib_pkg_setup
@@ -605,7 +605,7 @@ multilib_src_configure() {
if ! multilib_is_native_abi && in_iuse client-libs ; then
if ! use client-libs ; then
- ewarn "Skipping multilib build due to client-libs USE
disabled"
+ einfo "Skipping multilib build due to client-libs USE
disabled"
return 0
fi
fi
@@ -740,7 +740,6 @@ mysql-multilib_src_compile() {
multilib_src_compile() {
if ! multilib_is_native_abi && in_iuse client-libs ; then
if ! use client-libs ; then
- ewarn "Skipping multilib build due to client-libs USE
disabled"
return 0
fi
fi
@@ -770,7 +769,6 @@ multilib_src_install() {
if ! multilib_is_native_abi && in_iuse client-libs ; then
if ! use client-libs ; then
- ewarn "Skipping multilib build due to client-libs USE
disabled"
return 0
fi
fi
@@ -870,7 +868,7 @@ mysql-multilib_pkg_postinst() {
einfo
elog "This install includes the PAM
authentication plugin."
elog "To activate and configure the PAM plugin,
please read:"
- elog
"https://kb.askmonty.org/en/pam-authentication-plugin/"
+ elog
"https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
einfo
fi
fi
@@ -886,7 +884,7 @@ mysql-multilib_pkg_postinst() {
elog "mysql_upgrade tool."
einfo
- if [[ ${PN} == "mariadb-galera" ]] ; then
+ if [[ ${PN} == "mariadb-galera" ]] || use_if_iuse galera ; then
einfo
elog "Be sure to edit the my.cnf file to activate your
cluster settings."
elog "This should be done after running \"emerge
--config =${CATEGORY}/${PF}\""
@@ -913,9 +911,10 @@ mysql-multilib_getopt() {
# Use my_print_defaults to extract specific config options
mysql-multilib_getoptval() {
local mypd="${EROOT}"/usr/bin/my_print_defaults
- section="$1"
- flag="--${2}="
- "${mypd}" $section | sed -n "/^${flag}/s,${flag},,gp"
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
}
# @FUNCTION: mysql-multilib_pkg_config
@@ -976,6 +975,10 @@ mysql-multilib_pkg_config() {
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql'
password)"
+ # Sometimes --show is required to display passwords in some
implementations of my_print_defaults
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+ MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client
mysql' password --show)"
+ fi
fi
MYSQL_TMPDIR="$(mysql-multilib_getoptval mysqld tmpdir)"
# These are dir+prefix
@@ -1039,7 +1042,7 @@ mysql-multilib_pkg_config() {
help_tables="${TMPDIR}/fill_help_tables.sql"
# Figure out which options we need to disable to do the setup
- helpfile="${TMPDIR}/mysqld-help"
+ local 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 ssl log-bin relay-log slow-query-log external-locking
\