diff options
author | 2018-03-29 08:46:36 -0400 | |
---|---|---|
committer | 2018-03-29 08:46:36 -0400 | |
commit | bbb055a0129aadb278c78b3d096dadcae943c0ac (patch) | |
tree | 5f5cabd6cb752bbe9a906b94064433c1580e49ab | |
parent | dev-db/percona-server: Final touches to new revision (diff) | |
download | mysql-bbb055a0129aadb278c78b3d096dadcae943c0ac.tar.gz mysql-bbb055a0129aadb278c78b3d096dadcae943c0ac.tar.bz2 mysql-bbb055a0129aadb278c78b3d096dadcae943c0ac.zip |
dev-db/mysql: Fix pkg_config for 5.7.21
Package-Manager: Portage-2.3.26, Repoman-2.3.7
Manifest-Sign-Key: D1F781EFF9F4A3B6
-rw-r--r-- | dev-db/mysql/mysql-5.7.21.ebuild | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/dev-db/mysql/mysql-5.7.21.ebuild b/dev-db/mysql/mysql-5.7.21.ebuild index 1d1eaac..681748a 100644 --- a/dev-db/mysql/mysql-5.7.21.ebuild +++ b/dev-db/mysql/mysql-5.7.21.ebuild @@ -791,8 +791,9 @@ pkg_config() { # http://dev.mysql.com/doc/mysql/en/time-zone-support.html "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null - local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" ) + # --initialize-insecure will not set root password + # --initialize would set a random one in the log which we don't need as we set it ourselves + local cmd=( "${EROOT}usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" ) cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) einfo "Command: ${cmd[*]}" su -s /bin/sh -c "${cmd[*]}" mysql \ @@ -811,6 +812,7 @@ pkg_config() { local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" local mysqld="${EROOT}/usr/sbin/mysqld \ ${options} \ + $(use prefix || echo --user=mysql) \ --log-warnings=0 \ --basedir=${EROOT}/usr \ --datadir=${ROOT}/${MY_DATADIR} \ @@ -844,19 +846,6 @@ pkg_config() { -e "${sql}" eend $? - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - # Stop the server and cleanup einfo "Stopping the server ..." kill $(< "${pidfile}" ) |