1 |
grknight 14/07/31 02:31:09 |
2 |
|
3 |
Modified: ChangeLog mysql-multilib.eclass |
4 |
Log: |
5 |
Update the multilib eclass to match the work done by grobian for mysql-v2 |
6 |
|
7 |
Revision Changes Path |
8 |
1.1334 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1334&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1334&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1333&r2=1.1334 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1333 |
18 |
retrieving revision 1.1334 |
19 |
diff -u -r1.1333 -r1.1334 |
20 |
--- ChangeLog 30 Jul 2014 19:49:46 -0000 1.1333 |
21 |
+++ ChangeLog 31 Jul 2014 02:31:09 -0000 1.1334 |
22 |
@@ -1,6 +1,10 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1333 2014/07/30 19:49:46 ssuominen Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1334 2014/07/31 02:31:09 grknight Exp $ |
27 |
+ |
28 |
+ 31 Jul 2014; Brian Evans <grknight@g.o> mysql-multilib.eclass: |
29 |
+ Update the multilib eclass to match the work done by grobian for mysql-v2 |
30 |
+ for prefix. |
31 |
|
32 |
30 Jul 2014; Samuli Suominen <ssuominen@g.o> udev.eclass: |
33 |
Deprecate the longer udev_get_udevdir() function in favour of the shorter |
34 |
|
35 |
|
36 |
|
37 |
1.3 eclass/mysql-multilib.eclass |
38 |
|
39 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-multilib.eclass?rev=1.3&view=markup |
40 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-multilib.eclass?rev=1.3&content-type=text/plain |
41 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-multilib.eclass?r1=1.2&r2=1.3 |
42 |
|
43 |
Index: mysql-multilib.eclass |
44 |
=================================================================== |
45 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-multilib.eclass,v |
46 |
retrieving revision 1.2 |
47 |
retrieving revision 1.3 |
48 |
diff -u -r1.2 -r1.3 |
49 |
--- mysql-multilib.eclass 29 Jul 2014 20:24:00 -0000 1.2 |
50 |
+++ mysql-multilib.eclass 31 Jul 2014 02:31:09 -0000 1.3 |
51 |
@@ -1,6 +1,6 @@ |
52 |
# Copyright 1999-2014 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-multilib.eclass,v 1.2 2014/07/29 20:24:00 robbat2 Exp $ |
55 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-multilib.eclass,v 1.3 2014/07/31 02:31:09 grknight Exp $ |
56 |
|
57 |
# @ECLASS: mysql-multilib.eclass |
58 |
# @MAINTAINER: |
59 |
@@ -641,7 +641,7 @@ |
60 |
local old_MY_DATADIR="${MY_DATADIR}" |
61 |
local old_HOME="${HOME}" |
62 |
# my_print_defaults needs to read stuff in $HOME/.my.cnf |
63 |
- export HOME=/root |
64 |
+ export HOME=${EPREFIX}/root |
65 |
|
66 |
# Make sure the vars are correctly initialized |
67 |
mysql_init_vars |
68 |
@@ -692,11 +692,11 @@ |
69 |
MYSQL_LOG_BIN="$(mysql-multilib_getoptval mysqld log-bin)" |
70 |
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} |
71 |
|
72 |
- if [[ ! -d "${EROOT}"/$MYSQL_TMPDIR ]]; then |
73 |
+ if [[ ! -d "${ROOT}"/$MYSQL_TMPDIR ]]; then |
74 |
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" |
75 |
install -d -m 770 -o mysql -g mysql "${EROOT}"/$MYSQL_TMPDIR |
76 |
fi |
77 |
- if [[ ! -d "${EROOT}"/$MYSQL_LOG_BIN ]]; then |
78 |
+ if [[ ! -d "${ROOT}"/$MYSQL_LOG_BIN ]]; then |
79 |
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" |
80 |
install -d -m 770 -o mysql -g mysql "${EROOT}"/$MYSQL_LOG_BIN |
81 |
fi |
82 |
@@ -718,8 +718,8 @@ |
83 |
|
84 |
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then |
85 |
|
86 |
- einfo "Please provide a password for the mysql 'root' user now, in the" |
87 |
- einfo "MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file." |
88 |
+ einfo "Please provide a password for the mysql 'root' user now" |
89 |
+ einfo "or through the ${HOME}/.my.cnf file." |
90 |
ewarn "Avoid [\"'\\_%] characters in the password" |
91 |
read -rsp " >" pwd1 ; echo |
92 |
|
93 |
@@ -733,9 +733,13 @@ |
94 |
unset pwd1 pwd2 |
95 |
fi |
96 |
|
97 |
- local options="--log-warnings=0" |
98 |
+ local options |
99 |
local sqltmp="$(emktemp)" |
100 |
|
101 |
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first, |
102 |
+ # see http://bugs.mysql.com/bug.php?id=31312 |
103 |
+ use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" |
104 |
+ |
105 |
local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" |
106 |
[[ -r "${help_tables}" ]] \ |
107 |
&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ |
108 |
@@ -758,10 +762,6 @@ |
109 |
|
110 |
use prefix || options="${options} --user=mysql" |
111 |
|
112 |
- # Fix bug 446200. Don't reference host my.cnf |
113 |
- use prefix && [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] \ |
114 |
- && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" |
115 |
- |
116 |
# MySQL 5.6+ needs InnoDB |
117 |
if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] ; then |
118 |
mysql_version_is_at_least "5.6" || options="${options} --loose-skip-innodb" |
119 |
@@ -782,7 +782,7 @@ |
120 |
#cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}" |
121 |
cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db |
122 |
[[ -f ${cmd} ]] || cmd=${EROOT}usr/bin/mysql_install_db |
123 |
- cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${EROOT}/${MY_DATADIR}' '--tmpdir=${EROOT}/${MYSQL_TMPDIR}'" |
124 |
+ cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${ROOT}/${MY_DATADIR}' '--tmpdir=${ROOT}/${MYSQL_TMPDIR}'" |
125 |
einfo "Command: $cmd" |
126 |
eval $cmd \ |
127 |
>"${TMPDIR}"/mysql_install_db.log 2>&1 |
128 |
@@ -808,16 +808,16 @@ |
129 |
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" |
130 |
local mysqld="${EROOT}/usr/sbin/mysqld \ |
131 |
${options} \ |
132 |
- --user=mysql \ |
133 |
+ $(use prefix || echo --user=mysql) \ |
134 |
--log-warnings=0 \ |
135 |
--basedir=${EROOT}/usr \ |
136 |
- --datadir=${EROOT}/${MY_DATADIR} \ |
137 |
+ --datadir=${ROOT}/${MY_DATADIR} \ |
138 |
--max_allowed_packet=8M \ |
139 |
--net_buffer_length=16K \ |
140 |
--default-storage-engine=MyISAM \ |
141 |
--socket=${socket} \ |
142 |
--pid-file=${pidfile} |
143 |
- --tmpdir=${EROOT}/${MYSQL_TMPDIR}" |
144 |
+ --tmpdir=${ROOT}/${MYSQL_TMPDIR}" |
145 |
#einfo "About to start mysqld: ${mysqld}" |
146 |
ebegin "Starting mysqld" |
147 |
einfo "Command ${mysqld}" |