1 |
commit: 0daa60575ea81e0c514806b3c37c6610a3e4defa |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 24 17:18:13 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 24 17:18:13 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0daa6057 |
7 |
|
8 |
dev-db/mysql: Restore pkg_config options confused from 5.7 |
9 |
|
10 |
5.6.40-r2 and 5.6.41 were back copied from 5.7 |
11 |
Unfortunately pkg_config was not checked and failures occured trying to run it |
12 |
|
13 |
The relevant parts are restored here |
14 |
|
15 |
Bug: https://bugs.gentoo.org/666992 |
16 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
17 |
Package-Manager: Portage-2.3.50, Repoman-2.3.10 |
18 |
|
19 |
dev-db/mysql/mysql-5.6.40-r2.ebuild | 32 ++++++++++++++++++++++++++------ |
20 |
dev-db/mysql/mysql-5.6.41.ebuild | 32 ++++++++++++++++++++++++++------ |
21 |
2 files changed, 52 insertions(+), 12 deletions(-) |
22 |
|
23 |
diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild |
24 |
index b81a2ec567e..0c029e84c7a 100644 |
25 |
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild |
26 |
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild |
27 |
@@ -131,8 +131,8 @@ pkg_preinst() { |
28 |
# Here we need to see if the implementation switched client libraries |
29 |
# We check if this is a new instance of the package and a client library already exists |
30 |
local SHOW_ABI_MESSAGE libpath |
31 |
- if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then |
32 |
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so") |
33 |
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then |
34 |
+ libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so") |
35 |
elog "Due to ABI changes when switching between different client libraries," |
36 |
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient." |
37 |
elog "Please run: revdep-rebuild --library ${libpath}" |
38 |
@@ -672,6 +672,12 @@ pkg_config() { |
39 |
# see http://bugs.mysql.com/bug.php?id=31312 |
40 |
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" |
41 |
|
42 |
+ local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" |
43 |
+ [[ -r "${help_tables}" ]] \ |
44 |
+ && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ |
45 |
+ || touch "${TMPDIR}/fill_help_tables.sql" |
46 |
+ help_tables="${TMPDIR}/fill_help_tables.sql" |
47 |
+ |
48 |
# Figure out which options we need to disable to do the setup |
49 |
local helpfile="${TMPDIR%/}/mysqld-help" |
50 |
"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null |
51 |
@@ -699,13 +705,14 @@ pkg_config() { |
52 |
|
53 |
# Filling timezones, see |
54 |
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html |
55 |
- echo "USE mysql;" >"${sqltmp}" |
56 |
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null |
57 |
chown mysql "${sqltmp}" || die |
58 |
|
59 |
- # --initialize-insecure will not set root password |
60 |
- # --initialize would set a random one in the log which we don't need as we set it ourselves |
61 |
- local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" ) |
62 |
+ local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" ) |
63 |
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" ) |
64 |
+ if [[ -r "${help_tables}" ]] ; then |
65 |
+ cat "${help_tables}" >> "${sqltmp}" |
66 |
+ fi |
67 |
cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" ) |
68 |
einfo "Command: ${cmd[*]}" |
69 |
su -s /bin/sh -c "${cmd[*]}" mysql \ |
70 |
@@ -759,6 +766,19 @@ pkg_config() { |
71 |
-e "${sql}" |
72 |
eend $? |
73 |
|
74 |
+ if [[ -n "${sqltmp}" ]] ; then |
75 |
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds" |
76 |
+ "${EROOT%/}/usr/bin/mysql" \ |
77 |
+ --socket="${socket}" \ |
78 |
+ -hlocalhost \ |
79 |
+ -uroot \ |
80 |
+ --password="${MYSQL_ROOT_PASSWORD}" \ |
81 |
+ mysql < "${sqltmp}" |
82 |
+ rc=$? |
83 |
+ eend $? |
84 |
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" |
85 |
+ fi |
86 |
+ |
87 |
# Stop the server and cleanup |
88 |
einfo "Stopping the server ..." |
89 |
kill $(< "${pidfile}" ) |
90 |
|
91 |
diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild |
92 |
index 7ec34a50aad..da6e2f0d67a 100644 |
93 |
--- a/dev-db/mysql/mysql-5.6.41.ebuild |
94 |
+++ b/dev-db/mysql/mysql-5.6.41.ebuild |
95 |
@@ -131,8 +131,8 @@ pkg_preinst() { |
96 |
# Here we need to see if the implementation switched client libraries |
97 |
# We check if this is a new instance of the package and a client library already exists |
98 |
local SHOW_ABI_MESSAGE libpath |
99 |
- if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then |
100 |
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so") |
101 |
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then |
102 |
+ libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so") |
103 |
elog "Due to ABI changes when switching between different client libraries," |
104 |
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient." |
105 |
elog "Please run: revdep-rebuild --library ${libpath}" |
106 |
@@ -672,6 +672,12 @@ pkg_config() { |
107 |
# see http://bugs.mysql.com/bug.php?id=31312 |
108 |
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" |
109 |
|
110 |
+ local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" |
111 |
+ [[ -r "${help_tables}" ]] \ |
112 |
+ && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ |
113 |
+ || touch "${TMPDIR}/fill_help_tables.sql" |
114 |
+ help_tables="${TMPDIR}/fill_help_tables.sql" |
115 |
+ |
116 |
# Figure out which options we need to disable to do the setup |
117 |
local helpfile="${TMPDIR%/}/mysqld-help" |
118 |
"${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null |
119 |
@@ -699,13 +705,14 @@ pkg_config() { |
120 |
|
121 |
# Filling timezones, see |
122 |
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html |
123 |
- echo "USE mysql;" >"${sqltmp}" |
124 |
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null |
125 |
chown mysql "${sqltmp}" || die |
126 |
|
127 |
- # --initialize-insecure will not set root password |
128 |
- # --initialize would set a random one in the log which we don't need as we set it ourselves |
129 |
- local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" ) |
130 |
+ local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" ) |
131 |
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" ) |
132 |
+ if [[ -r "${help_tables}" ]] ; then |
133 |
+ cat "${help_tables}" >> "${sqltmp}" |
134 |
+ fi |
135 |
cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" ) |
136 |
einfo "Command: ${cmd[*]}" |
137 |
su -s /bin/sh -c "${cmd[*]}" mysql \ |
138 |
@@ -759,6 +766,19 @@ pkg_config() { |
139 |
-e "${sql}" |
140 |
eend $? |
141 |
|
142 |
+ if [[ -n "${sqltmp}" ]] ; then |
143 |
+ ebegin "Loading \"zoneinfo\", this step may require a few seconds" |
144 |
+ "${EROOT%/}/usr/bin/mysql" \ |
145 |
+ --socket="${socket}" \ |
146 |
+ -hlocalhost \ |
147 |
+ -uroot \ |
148 |
+ --password="${MYSQL_ROOT_PASSWORD}" \ |
149 |
+ mysql < "${sqltmp}" |
150 |
+ rc=$? |
151 |
+ eend $? |
152 |
+ [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" |
153 |
+ fi |
154 |
+ |
155 |
# Stop the server and cleanup |
156 |
einfo "Stopping the server ..." |
157 |
kill $(< "${pidfile}" ) |