1 |
commit: bbb055a0129aadb278c78b3d096dadcae943c0ac |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 29 12:46:36 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 29 12:46:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mysql.git/commit/?id=bbb055a0 |
7 |
|
8 |
dev-db/mysql: Fix pkg_config for 5.7.21 |
9 |
|
10 |
Package-Manager: Portage-2.3.26, Repoman-2.3.7 |
11 |
Manifest-Sign-Key: D1F781EFF9F4A3B6 |
12 |
|
13 |
dev-db/mysql/mysql-5.7.21.ebuild | 19 ++++--------------- |
14 |
1 file changed, 4 insertions(+), 15 deletions(-) |
15 |
|
16 |
diff --git a/dev-db/mysql/mysql-5.7.21.ebuild b/dev-db/mysql/mysql-5.7.21.ebuild |
17 |
index 1d1eaac..681748a 100644 |
18 |
--- a/dev-db/mysql/mysql-5.7.21.ebuild |
19 |
+++ b/dev-db/mysql/mysql-5.7.21.ebuild |
20 |
@@ -791,8 +791,9 @@ pkg_config() { |
21 |
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html |
22 |
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null |
23 |
|
24 |
- local cmd=( "${EROOT}usr/share/mysql/scripts/mysql_install_db" ) |
25 |
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" ) |
26 |
+ # --initialize-insecure will not set root password |
27 |
+ # --initialize would set a random one in the log which we don't need as we set it ourselves |
28 |
+ local cmd=( "${EROOT}usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" ) |
29 |
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) |
30 |
einfo "Command: ${cmd[*]}" |
31 |
su -s /bin/sh -c "${cmd[*]}" mysql \ |
32 |
@@ -811,6 +812,7 @@ pkg_config() { |
33 |
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" |
34 |
local mysqld="${EROOT}/usr/sbin/mysqld \ |
35 |
${options} \ |
36 |
+ $(use prefix || echo --user=mysql) \ |
37 |
--log-warnings=0 \ |
38 |
--basedir=${EROOT}/usr \ |
39 |
--datadir=${ROOT}/${MY_DATADIR} \ |
40 |
@@ -844,19 +846,6 @@ pkg_config() { |
41 |
-e "${sql}" |
42 |
eend $? |
43 |
|
44 |
- if [[ -n "${sqltmp}" ]] ; then |
45 |
- ebegin "Loading \"zoneinfo\", this step may require a few seconds" |
46 |
- "${EROOT}/usr/bin/mysql" \ |
47 |
- "--socket=${socket}" \ |
48 |
- -hlocalhost \ |
49 |
- -uroot \ |
50 |
- --password="${MYSQL_ROOT_PASSWORD}" \ |
51 |
- mysql < "${sqltmp}" |
52 |
- rc=$? |
53 |
- eend $? |
54 |
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" |
55 |
- fi |
56 |
- |
57 |
# Stop the server and cleanup |
58 |
einfo "Stopping the server ..." |
59 |
kill $(< "${pidfile}" ) |