1 |
jmbsvicetto 12/01/06 21:32:48 |
2 |
|
3 |
Modified: ChangeLog mysql-autotools.eclass mysql-cmake.eclass |
4 |
mysql-v2.eclass mysql.eclass mysql_fx.eclass |
5 |
Log: |
6 |
[mysql eclasses] Added prefix support for eclasses - fixes bug 348788 and bug 388125. |
7 |
Bumped required EAPI to 3 due to the prefix support. |
8 |
Fix -userpriv detection - fixes bug 312809. |
9 |
|
10 |
Revision Changes Path |
11 |
1.73 eclass/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.73&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.73&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.72&r2=1.73 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
20 |
retrieving revision 1.72 |
21 |
retrieving revision 1.73 |
22 |
diff -u -r1.72 -r1.73 |
23 |
--- ChangeLog 5 Jan 2012 23:20:02 -0000 1.72 |
24 |
+++ ChangeLog 6 Jan 2012 21:32:48 -0000 1.73 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for eclass directory |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.72 2012/01/05 23:20:02 mgorny Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.73 2012/01/06 21:32:48 jmbsvicetto Exp $ |
30 |
+ |
31 |
+ 06 Jan 2012; Jorge Manuel B. S. Vicetto <jmbsvicetto@g.o> |
32 |
+ mysql.eclass, mysql-autotools.eclass, mysql-cmake.eclass, mysql-v2.eclass, |
33 |
+ mysql_fx.eclass: |
34 |
+ [mysql eclasses] Added prefix support for eclasses - fixes bug 348788 and bug |
35 |
+ 388125. |
36 |
+ Bumped required EAPI to 3 due to the prefix support. |
37 |
+ Fix -userpriv detection - fixes bug 312809. |
38 |
|
39 |
05 Jan 2012; Michał Górny <mgorny@g.o> systemd.eclass: |
40 |
Fix use of dosym with directory destination. |
41 |
|
42 |
|
43 |
|
44 |
1.3 eclass/mysql-autotools.eclass |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-autotools.eclass?rev=1.3&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-autotools.eclass?rev=1.3&content-type=text/plain |
48 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-autotools.eclass?r1=1.2&r2=1.3 |
49 |
|
50 |
Index: mysql-autotools.eclass |
51 |
=================================================================== |
52 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v |
53 |
retrieving revision 1.2 |
54 |
retrieving revision 1.3 |
55 |
diff -u -r1.2 -r1.3 |
56 |
--- mysql-autotools.eclass 22 Aug 2011 04:46:32 -0000 1.2 |
57 |
+++ mysql-autotools.eclass 6 Jan 2012 21:32:48 -0000 1.3 |
58 |
@@ -1,6 +1,6 @@ |
59 |
-# Copyright 1999-2011 Gentoo Foundation |
60 |
+# Copyright 1999-2012 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.2 2011/08/22 04:46:32 vapier Exp $ |
63 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.3 2012/01/06 21:32:48 jmbsvicetto Exp $ |
64 |
|
65 |
# @ECLASS: mysql-autotools.eclass |
66 |
# @MAINTAINER: |
67 |
@@ -108,7 +108,7 @@ |
68 |
myconf="${myconf} --with-extra-charsets=all" |
69 |
myconf="${myconf} --with-mysqld-user=mysql" |
70 |
myconf="${myconf} --with-server" |
71 |
- myconf="${myconf} --with-unix-socket-path=/var/run/mysqld/mysqld.sock" |
72 |
+ myconf="${myconf} --with-unix-socket-path=${EPREFIX}/var/run/mysqld/mysqld.sock" |
73 |
myconf="${myconf} --without-libwrap" |
74 |
|
75 |
if use static ; then |
76 |
@@ -160,13 +160,13 @@ |
77 |
# TODO: !!!! readd --without-readline |
78 |
# the failure depend upon config/ac-macros/readline.m4 checking into |
79 |
# readline.h instead of history.h |
80 |
- myconf="${myconf} $(use_with ssl ssl /usr)" |
81 |
+ myconf="${myconf} $(use_with ssl ssl "${EPREFIX}"/usr)" |
82 |
myconf="${myconf} --enable-assembler" |
83 |
myconf="${myconf} --with-geometry" |
84 |
myconf="${myconf} --with-readline" |
85 |
- myconf="${myconf} --with-zlib-dir=/usr/" |
86 |
+ myconf="${myconf} --with-zlib-dir=${EPREFIX}/usr/" |
87 |
myconf="${myconf} --without-pstack" |
88 |
- myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/mysql/plugin" |
89 |
+ myconf="${myconf} --with-plugindir=${EPREFIX}/usr/$(get_libdir)/mysql/plugin" |
90 |
|
91 |
# This is an explict die here, because if we just forcibly disable it, then the |
92 |
# user's data is not accessible. |
93 |
@@ -320,7 +320,7 @@ |
94 |
eautoreconf |
95 |
|
96 |
local myconf="" |
97 |
- myconf="${myconf} --with-mysql=${S} --libdir=/usr/$(get_libdir)" |
98 |
+ myconf="${myconf} --with-mysql=${S} --libdir=${EPREFIX}/usr/$(get_libdir)" |
99 |
use debug && myconf="${myconf} --with-debug=full" |
100 |
econf ${myconf} || die "Problem configuring PBXT storage engine" |
101 |
} |
102 |
@@ -477,7 +477,7 @@ |
103 |
filter-flags -fomit-frame-pointer |
104 |
|
105 |
econf \ |
106 |
- --libexecdir="/usr/sbin" \ |
107 |
+ --libexecdir="${EPREFIX}/usr/sbin" \ |
108 |
--sysconfdir="${MY_SYSCONFDIR}" \ |
109 |
--localstatedir="${MY_LOCALSTATEDIR}" \ |
110 |
--sharedstatedir="${MY_SHAREDSTATEDIR}" \ |
111 |
@@ -539,7 +539,7 @@ |
112 |
|
113 |
# Various junk (my-*.cnf moved elsewhere) |
114 |
einfo "Removing duplicate /usr/share/mysql files" |
115 |
- rm -Rf "${D}/usr/share/info" |
116 |
+ rm -Rf "${ED}/usr/share/info" |
117 |
for removeme in "mysql-log-rotate" mysql.server* \ |
118 |
binary-configure* my-*.cnf mi_test_all* |
119 |
do |
120 |
@@ -550,8 +550,8 @@ |
121 |
if use minimal ; then |
122 |
einfo "Remove all extra content for minimal build" |
123 |
rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} |
124 |
- rm -f "${D}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} |
125 |
- rm -f "${D}/usr/sbin/mysqld" |
126 |
+ rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} |
127 |
+ rm -f "${ED}/usr/sbin/mysqld" |
128 |
rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a |
129 |
fi |
130 |
|
131 |
@@ -567,10 +567,13 @@ |
132 |
5.[1-9]|6*|7*) mysql_mycnf_version="5.1" ;; |
133 |
esac |
134 |
einfo "Building default my.cnf (${mysql_mycnf_version})" |
135 |
- insinto "${MY_SYSCONFDIR}" |
136 |
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}" |
137 |
doins scripts/mysqlaccess.conf |
138 |
mycnf_src="my.cnf-${mysql_mycnf_version}" |
139 |
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ |
140 |
+ -e "s!/tmp!${EPREFIX}/tmp!" \ |
141 |
+ -e "s!/usr!${EPREFIX}/usr!" \ |
142 |
+ -e "s!= /var!= ${EPREFIX}/var!" \ |
143 |
"${FILESDIR}/${mycnf_src}" \ |
144 |
> "${TMPDIR}/my.cnf.ok" |
145 |
if use latin1 ; then |
146 |
@@ -586,16 +589,16 @@ |
147 |
# Empty directories ... |
148 |
diropts "-m0750" |
149 |
if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then |
150 |
- dodir "${MY_DATADIR}" |
151 |
- keepdir "${MY_DATADIR}" |
152 |
+ dodir "${MY_DATADIR#${EPREFIX}}" |
153 |
+ keepdir "${MY_DATADIR#${EPREFIX}}" |
154 |
chown -R mysql:mysql "${D}/${MY_DATADIR}" |
155 |
fi |
156 |
|
157 |
diropts "-m0755" |
158 |
- for folder in "${MY_LOGDIR}" "/var/run/mysqld" ; do |
159 |
+ for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do |
160 |
dodir "${folder}" |
161 |
keepdir "${folder}" |
162 |
- chown -R mysql:mysql "${D}/${folder}" |
163 |
+ chown -R mysql:mysql "${ED}/${folder}" |
164 |
done |
165 |
fi |
166 |
|
167 |
@@ -625,5 +628,5 @@ |
168 |
|
169 |
fi |
170 |
|
171 |
- mysql_lib_symlinks "${D}" |
172 |
+ mysql_lib_symlinks "${ED}" |
173 |
} |
174 |
|
175 |
|
176 |
|
177 |
1.5 eclass/mysql-cmake.eclass |
178 |
|
179 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-cmake.eclass?rev=1.5&view=markup |
180 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-cmake.eclass?rev=1.5&content-type=text/plain |
181 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-cmake.eclass?r1=1.4&r2=1.5 |
182 |
|
183 |
Index: mysql-cmake.eclass |
184 |
=================================================================== |
185 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v |
186 |
retrieving revision 1.4 |
187 |
retrieving revision 1.5 |
188 |
diff -u -r1.4 -r1.5 |
189 |
--- mysql-cmake.eclass 27 Dec 2011 07:37:20 -0000 1.4 |
190 |
+++ mysql-cmake.eclass 6 Jan 2012 21:32:48 -0000 1.5 |
191 |
@@ -1,6 +1,6 @@ |
192 |
-# Copyright 1999-2011 Gentoo Foundation |
193 |
+# Copyright 1999-2012 Gentoo Foundation |
194 |
# Distributed under the terms of the GNU General Public License v2 |
195 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.4 2011/12/27 07:37:20 robbat2 Exp $ |
196 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-cmake.eclass,v 1.5 2012/01/06 21:32:48 jmbsvicetto Exp $ |
197 |
|
198 |
# @ECLASS: mysql-cmake.eclass |
199 |
# @MAINTAINER: |
200 |
@@ -117,7 +117,7 @@ |
201 |
-DENABLED_LOCAL_INFILE=1 |
202 |
-DEXTRA_CHARSETS=all |
203 |
-DMYSQL_USER=mysql |
204 |
- -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock |
205 |
+ -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock |
206 |
-DWITHOUT_READLINE=1 |
207 |
-DWITH_ZLIB=system |
208 |
-DWITHOUT_LIBWRAP=1 |
209 |
@@ -191,9 +191,9 @@ |
210 |
CMAKE_BUILD_TYPE="RelWithDebInfo" |
211 |
|
212 |
mycmakeargs=( |
213 |
- -DCMAKE_INSTALL_PREFIX=/usr |
214 |
- -DMYSQL_DATADIR=/var/lib/mysql |
215 |
- -DSYSCONFDIR=/etc/mysql |
216 |
+ -DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr |
217 |
+ -DMYSQL_DATADIR=${EPREFIX}/var/lib/mysql |
218 |
+ -DSYSCONFDIR=${EPREFIX}/etc/mysql |
219 |
-DINSTALL_BINDIR=bin |
220 |
-DINSTALL_DOCDIR=share/doc/${P} |
221 |
-DINSTALL_DOCREADMEDIR=share/doc/${P} |
222 |
@@ -201,14 +201,14 @@ |
223 |
-DINSTALL_INFODIR=share/info |
224 |
-DINSTALL_LIBDIR=$(get_libdir)/mysql |
225 |
-DINSTALL_MANDIR=share/man |
226 |
- -DINSTALL_MYSQLDATADIR=/var/lib/mysql |
227 |
+ -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql |
228 |
-DINSTALL_MYSQLSHAREDIR=share/mysql |
229 |
-DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test |
230 |
-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin |
231 |
-DINSTALL_SBINDIR=sbin |
232 |
-DINSTALL_SCRIPTDIR=share/mysql/scripts |
233 |
-DINSTALL_SQLBENCHDIR=share/mysql |
234 |
- -DINSTALL_SUPPORTFILESDIR=/usr/share/mysql |
235 |
+ -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql |
236 |
-DWITH_COMMENT="Gentoo Linux ${PF}" |
237 |
-DWITHOUT_UNIT_TESTS=1 |
238 |
) |
239 |
@@ -264,7 +264,7 @@ |
240 |
dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" |
241 |
|
242 |
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir |
243 |
- rm -Rf "${D}/usr/data" |
244 |
+ rm -Rf "${ED}/usr/data" |
245 |
|
246 |
# Various junk (my-*.cnf moved elsewhere) |
247 |
einfo "Removing duplicate /usr/share/mysql files" |
248 |
@@ -273,8 +273,8 @@ |
249 |
# if use minimal ; then |
250 |
# einfo "Remove all extra content for minimal build" |
251 |
# rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} |
252 |
-# rm -f "${D}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} |
253 |
-# rm -f "${D}/usr/sbin/mysqld" |
254 |
+# rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} |
255 |
+# rm -f "${ED}/usr/sbin/mysqld" |
256 |
# rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a |
257 |
# fi |
258 |
|
259 |
@@ -309,16 +309,16 @@ |
260 |
# Empty directories ... |
261 |
diropts "-m0750" |
262 |
if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then |
263 |
- dodir "${MY_DATADIR}" |
264 |
- keepdir "${MY_DATADIR}" |
265 |
+ dodir "${MY_DATADIR#${EPREFIX}}" |
266 |
+ keepdir "${MY_DATADIR#${EPREFIX}}" |
267 |
chown -R mysql:mysql "${D}/${MY_DATADIR}" |
268 |
fi |
269 |
|
270 |
diropts "-m0755" |
271 |
- for folder in "${MY_LOGDIR}" "/var/run/mysqld" ; do |
272 |
+ for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do |
273 |
dodir "${folder}" |
274 |
keepdir "${folder}" |
275 |
- chown -R mysql:mysql "${D}/${folder}" |
276 |
+ chown -R mysql:mysql "${ED}/${folder}" |
277 |
done |
278 |
fi |
279 |
|
280 |
@@ -341,5 +341,5 @@ |
281 |
|
282 |
fi |
283 |
|
284 |
- mysql_lib_symlinks "${D}" |
285 |
+ mysql_lib_symlinks "${ED}" |
286 |
} |
287 |
|
288 |
|
289 |
|
290 |
1.12 eclass/mysql-v2.eclass |
291 |
|
292 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-v2.eclass?rev=1.12&view=markup |
293 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-v2.eclass?rev=1.12&content-type=text/plain |
294 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql-v2.eclass?r1=1.11&r2=1.12 |
295 |
|
296 |
Index: mysql-v2.eclass |
297 |
=================================================================== |
298 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v |
299 |
retrieving revision 1.11 |
300 |
retrieving revision 1.12 |
301 |
diff -u -r1.11 -r1.12 |
302 |
--- mysql-v2.eclass 27 Dec 2011 07:37:20 -0000 1.11 |
303 |
+++ mysql-v2.eclass 6 Jan 2012 21:32:48 -0000 1.12 |
304 |
@@ -1,6 +1,6 @@ |
305 |
-# Copyright 1999-2011 Gentoo Foundation |
306 |
+# Copyright 1999-2012 Gentoo Foundation |
307 |
# Distributed under the terms of the GNU General Public License v2 |
308 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.11 2011/12/27 07:37:20 robbat2 Exp $ |
309 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.12 2012/01/06 21:32:48 jmbsvicetto Exp $ |
310 |
|
311 |
# @ECLASS: mysql-v2.eclass |
312 |
# @MAINTAINER: |
313 |
@@ -53,7 +53,7 @@ |
314 |
# |
315 |
|
316 |
case "${EAPI:-0}" in |
317 |
- 2|3|4) ;; |
318 |
+ 3|4) ;; |
319 |
*) die "Unsupported EAPI: ${EAPI}" ;; |
320 |
esac |
321 |
|
322 |
@@ -230,7 +230,6 @@ |
323 |
mysql_version_is_at_least "5.5.7" \ |
324 |
&& IUSE="${IUSE} systemtap" |
325 |
|
326 |
- |
327 |
# |
328 |
# DEPENDENCIES: |
329 |
# |
330 |
@@ -388,7 +387,7 @@ |
331 |
|
332 |
if has test ${FEATURES} ; then |
333 |
if ! use minimal ; then |
334 |
- if [[ $UID -eq 0 ]]; then |
335 |
+ if ! has userpriv ${FEATURES} ; then |
336 |
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." |
337 |
fi |
338 |
fi |
339 |
@@ -502,7 +501,7 @@ |
340 |
mysql_init_vars |
341 |
|
342 |
# Check FEATURES="collision-protect" before removing this |
343 |
- [[ -d "${ROOT}/var/log/mysql" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" |
344 |
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" |
345 |
|
346 |
# Secure the logfiles |
347 |
touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err} |
348 |
@@ -604,8 +603,8 @@ |
349 |
local pwd2="b" |
350 |
local maxtry=15 |
351 |
|
352 |
- if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${ROOT}/root/.my.cnf" ]; then |
353 |
- MYSQL_ROOT_PASSWORD="$(sed -n -e '/^password=/s,^password=,,gp' "${ROOT}/root/.my.cnf")" |
354 |
+ if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${EROOT}/root/.my.cnf" ]; then |
355 |
+ MYSQL_ROOT_PASSWORD="$(sed -n -e '/^password=/s,^password=,,gp' "${EROOT}/root/.my.cnf")" |
356 |
fi |
357 |
|
358 |
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then |
359 |
@@ -646,10 +645,10 @@ |
360 |
help_tables="${TMPDIR}/fill_help_tables.sql" |
361 |
|
362 |
pushd "${TMPDIR}" &>/dev/null |
363 |
- "${ROOT}/usr/bin/mysql_install_db" --basedir=/usr >"${TMPDIR}"/mysql_install_db.log 2>&1 |
364 |
+ "${EROOT}/usr/bin/mysql_install_db" "--basedir=${EPREFIX}/usr" >"${TMPDIR}"/mysql_install_db.log 2>&1 |
365 |
if [ $? -ne 0 ]; then |
366 |
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 |
367 |
- die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" |
368 |
+ die "Failed to run mysql_install_db. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" |
369 |
fi |
370 |
popd &>/dev/null |
371 |
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ |
372 |
@@ -659,7 +658,7 @@ |
373 |
|
374 |
# Figure out which options we need to disable to do the setup |
375 |
helpfile="${TMPDIR}/mysqld-help" |
376 |
- ${ROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null |
377 |
+ ${EROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null |
378 |
for opt in grant-tables host-cache name-resolve networking slave-start bdb \ |
379 |
federated innodb ssl log-bin relay-log slow-query-log external-locking \ |
380 |
ndbcluster \ |
381 |
@@ -673,7 +672,7 @@ |
382 |
|
383 |
# Filling timezones, see |
384 |
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html |
385 |
- "${ROOT}/usr/bin/mysql_tzinfo_to_sql" "${ROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null |
386 |
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null |
387 |
|
388 |
if [[ -r "${help_tables}" ]] ; then |
389 |
cat "${help_tables}" >> "${sqltmp}" |
390 |
@@ -682,12 +681,12 @@ |
391 |
einfo "Creating the mysql database and setting proper" |
392 |
einfo "permissions on it ..." |
393 |
|
394 |
- local socket="${ROOT}/var/run/mysqld/mysqld${RANDOM}.sock" |
395 |
- local pidfile="${ROOT}/var/run/mysqld/mysqld${RANDOM}.pid" |
396 |
- local mysqld="${ROOT}/usr/sbin/mysqld \ |
397 |
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" |
398 |
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" |
399 |
+ local mysqld="${EROOT}/usr/sbin/mysqld \ |
400 |
${options} \ |
401 |
--user=mysql \ |
402 |
- --basedir=${ROOT}/usr \ |
403 |
+ --basedir=${EROOT}/usr \ |
404 |
--datadir=${ROOT}/${MY_DATADIR} \ |
405 |
--max_allowed_packet=8M \ |
406 |
--net_buffer_length=16K \ |
407 |
@@ -712,14 +711,14 @@ |
408 |
ebegin "Setting root password" |
409 |
# Do this from memory, as we don't want clear text passwords in temp files |
410 |
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'" |
411 |
- "${ROOT}/usr/bin/mysql" \ |
412 |
+ "${EROOT}/usr/bin/mysql" \ |
413 |
--socket=${socket} \ |
414 |
-hlocalhost \ |
415 |
-e "${sql}" |
416 |
eend $? |
417 |
|
418 |
ebegin "Loading \"zoneinfo\", this step may require a few seconds ..." |
419 |
- "${ROOT}/usr/bin/mysql" \ |
420 |
+ "${EROOT}/usr/bin/mysql" \ |
421 |
--socket=${socket} \ |
422 |
-hlocalhost \ |
423 |
-uroot \ |
424 |
@@ -742,5 +741,5 @@ |
425 |
# Remove mysql symlinks. |
426 |
mysql-v2_pkg_postrm() { |
427 |
|
428 |
- : # mysql_lib_symlinks "${D}" |
429 |
+ : # mysql_lib_symlinks "${ED}" |
430 |
} |
431 |
|
432 |
|
433 |
|
434 |
1.167 eclass/mysql.eclass |
435 |
|
436 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.167&view=markup |
437 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.167&content-type=text/plain |
438 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?r1=1.166&r2=1.167 |
439 |
|
440 |
Index: mysql.eclass |
441 |
=================================================================== |
442 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v |
443 |
retrieving revision 1.166 |
444 |
retrieving revision 1.167 |
445 |
diff -u -r1.166 -r1.167 |
446 |
--- mysql.eclass 25 Sep 2011 12:43:28 -0000 1.166 |
447 |
+++ mysql.eclass 6 Jan 2012 21:32:48 -0000 1.167 |
448 |
@@ -1,6 +1,6 @@ |
449 |
-# Copyright 1999-2011 Gentoo Foundation |
450 |
+# Copyright 1999-2012 Gentoo Foundation |
451 |
# Distributed under the terms of the GNU General Public License v2 |
452 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.166 2011/09/25 12:43:28 grobian Exp $ |
453 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.167 2012/01/06 21:32:48 jmbsvicetto Exp $ |
454 |
|
455 |
# @ECLASS: mysql.eclass |
456 |
# @MAINTAINER: |
457 |
@@ -127,7 +127,7 @@ |
458 |
# Be warned, *DEPEND are version-dependant |
459 |
# These are used for both runtime and compiletime |
460 |
DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d ) |
461 |
- userland_GNU? ( sys-process/procps ) |
462 |
+ kernel_linux? ( sys-process/procps ) |
463 |
>=sys-apps/sed-4 |
464 |
>=sys-apps/texinfo-4.7-r1 |
465 |
>=sys-libs/readline-4.1 |
466 |
@@ -364,21 +364,21 @@ |
467 |
# Initialize global variables |
468 |
# 2005-11-19 <vivo@g.o> |
469 |
mysql_init_vars() { |
470 |
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="/usr/share/mysql"} |
471 |
- MY_SYSCONFDIR=${MY_SYSCONFDIR="/etc/mysql"} |
472 |
- MY_LIBDIR=${MY_LIBDIR="/usr/$(get_libdir)/mysql"} |
473 |
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="/var/lib/mysql"} |
474 |
- MY_LOGDIR=${MY_LOGDIR="/var/log/mysql"} |
475 |
- MY_INCLUDEDIR=${MY_INCLUDEDIR="/usr/include/mysql"} |
476 |
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"} |
477 |
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} |
478 |
+ MY_LIBDIR=${MY_LIBDIR="${EPREFIX}/usr/$(get_libdir)/mysql"} |
479 |
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} |
480 |
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} |
481 |
+ MY_INCLUDEDIR=${MY_INCLUDEDIR="${EPREFIX}/usr/include/mysql"} |
482 |
|
483 |
if [[ -z "${MY_DATADIR}" ]] ; then |
484 |
MY_DATADIR="" |
485 |
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then |
486 |
+ if [[ -f ${MY_SYSCONFDIR}/my.cnf ]] ; then |
487 |
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ |
488 |
| sed -ne '/datadir/s|^--datadir=||p' \ |
489 |
| tail -n1` |
490 |
if [[ -z "${MY_DATADIR}" ]] ; then |
491 |
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ |
492 |
+ MY_DATADIR=`grep ^datadir ${MY_SYSCONFDIR}/my.cnf \ |
493 |
| sed -e 's/.*=\s*//' \ |
494 |
| tail -n1` |
495 |
fi |
496 |
@@ -460,7 +460,7 @@ |
497 |
myconf="${myconf} --with-extra-charsets=all" |
498 |
myconf="${myconf} --with-mysqld-user=mysql" |
499 |
myconf="${myconf} --with-server" |
500 |
- myconf="${myconf} --with-unix-socket-path=/var/run/mysqld/mysqld.sock" |
501 |
+ myconf="${myconf} --with-unix-socket-path=${EPREFIX}/var/run/mysqld/mysqld.sock" |
502 |
myconf="${myconf} --without-libwrap" |
503 |
|
504 |
if use static ; then |
505 |
@@ -505,12 +505,13 @@ |
506 |
} |
507 |
|
508 |
configure_40_41_50() { |
509 |
+ myconf="${myconf} --with-zlib-dir=${EPREFIX}/usr" |
510 |
myconf="${myconf} $(use_with perl bench)" |
511 |
myconf="${myconf} --enable-assembler" |
512 |
myconf="${myconf} --with-extra-tools" |
513 |
myconf="${myconf} --with-innodb" |
514 |
myconf="${myconf} --without-readline" |
515 |
- myconf="${myconf} $(use_with ssl openssl)" |
516 |
+ myconf="${myconf} $(use_with ssl openssl "${EPREFIX}/usr")" |
517 |
mysql_version_is_at_least "5.0" || myconf="${myconf} $(use_with raid)" |
518 |
|
519 |
# --with-vio is not needed anymore, it's on by default and |
520 |
@@ -586,13 +587,13 @@ |
521 |
# TODO: !!!! readd --without-readline |
522 |
# the failure depend upon config/ac-macros/readline.m4 checking into |
523 |
# readline.h instead of history.h |
524 |
- myconf="${myconf} $(use_with ssl ssl /usr)" |
525 |
+ myconf="${myconf} $(use_with ssl ssl "${EPREFIX}"/usr)" |
526 |
myconf="${myconf} --enable-assembler" |
527 |
myconf="${myconf} --with-geometry" |
528 |
myconf="${myconf} --with-readline" |
529 |
- myconf="${myconf} --with-zlib-dir=/usr/" |
530 |
+ myconf="${myconf} --with-zlib-dir=${EPREFIX}/usr/" |
531 |
myconf="${myconf} --without-pstack" |
532 |
- myconf="${myconf} --with-plugindir=/usr/$(get_libdir)/mysql/plugin" |
533 |
+ myconf="${myconf} --with-plugindir=${EPREFIX}/usr/$(get_libdir)/mysql/plugin" |
534 |
|
535 |
# This is an explict die here, because if we just forcibly disable it, then the |
536 |
# user's data is not accessible. |
537 |
@@ -743,7 +744,7 @@ |
538 |
eautoreconf |
539 |
|
540 |
local myconf="" |
541 |
- myconf="${myconf} --with-mysql=${S} --libdir=/usr/$(get_libdir)" |
542 |
+ myconf="${myconf} --with-mysql=${S} --libdir=${EPREFIX}/usr/$(get_libdir)" |
543 |
use debug && myconf="${myconf} --with-debug=full" |
544 |
econf ${myconf} || die "Problem configuring PBXT storage engine" |
545 |
} |
546 |
@@ -839,8 +840,9 @@ |
547 |
# But only for 5.0.8[3-6]! |
548 |
if mysql_version_is_at_least "5.0.83" && ! mysql_version_is_at_least 5.0.87 ; then |
549 |
GCC_VER=$(gcc-version) |
550 |
- case ${GCC_VER} in |
551 |
- 2*|3*|4.0|4.1|4.2) |
552 |
+ case ${CHOST}:${GCC_VER} in |
553 |
+ *-darwin*:4.*) : ;; # bug #310615 |
554 |
+ *:2*|*:3*|*:4.0|*:4.1|*:4.2) |
555 |
eerror "Some releases of MySQL required a very new GCC, and then" |
556 |
eerror "later release relaxed that requirement again. Either pick a" |
557 |
eerror "MySQL >=5.0.87, or use a newer GCC." |
558 |
@@ -978,14 +980,14 @@ |
559 |
&& use berkdb ; then |
560 |
einfo "Fixing up berkdb buildsystem" |
561 |
[[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh" |
562 |
- cp -f "/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \ |
563 |
+ cp -f "${EPREFIX}/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \ |
564 |
|| die "Could not copy libtool.m4 to bdb/dist/" |
565 |
#These files exist only with libtool-2*, and need to be included. |
566 |
- if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then |
567 |
- cat "/usr/share/aclocal/ltsugar.m4" >> "bdb/dist/aclocal/libtool.ac" |
568 |
- cat "/usr/share/aclocal/ltversion.m4" >> "bdb/dist/aclocal/libtool.ac" |
569 |
- cat "/usr/share/aclocal/lt~obsolete.m4" >> "bdb/dist/aclocal/libtool.ac" |
570 |
- cat "/usr/share/aclocal/ltoptions.m4" >> "bdb/dist/aclocal/libtool.ac" |
571 |
+ if [ -f ${EPREFIX}'/usr/share/aclocal/ltsugar.m4' ]; then |
572 |
+ cat "${EPREFIX}/usr/share/aclocal/ltsugar.m4" >> "bdb/dist/aclocal/libtool.ac" |
573 |
+ cat "${EPREFIX}/usr/share/aclocal/ltversion.m4" >> "bdb/dist/aclocal/libtool.ac" |
574 |
+ cat "${EPREFIX}/usr/share/aclocal/lt~obsolete.m4" >> "bdb/dist/aclocal/libtool.ac" |
575 |
+ cat "${EPREFIX}/usr/share/aclocal/ltoptions.m4" >> "bdb/dist/aclocal/libtool.ac" |
576 |
fi |
577 |
pushd "bdb/dist" &>/dev/null |
578 |
sh s_all \ |
579 |
@@ -1046,12 +1048,12 @@ |
580 |
filter-flags -fomit-frame-pointer |
581 |
|
582 |
econf \ |
583 |
- --libexecdir="/usr/sbin" \ |
584 |
- --sysconfdir="${MY_SYSCONFDIR}" \ |
585 |
- --localstatedir="${MY_LOCALSTATEDIR}" \ |
586 |
- --sharedstatedir="${MY_SHAREDSTATEDIR}" \ |
587 |
- --libdir="${MY_LIBDIR}" \ |
588 |
- --includedir="${MY_INCLUDEDIR}" \ |
589 |
+ --libexecdir="${EPREFIX}"/usr/sbin \ |
590 |
+ --sysconfdir=${MY_SYSCONFDIR} \ |
591 |
+ --localstatedir=${MY_LOCALSTATEDIR} \ |
592 |
+ --sharedstatedir=${MY_SHAREDSTATEDIR} \ |
593 |
+ --libdir=${MY_LIBDIR} \ |
594 |
+ --includedir=${MY_INCLUDEDIR} \ |
595 |
--with-low-memory \ |
596 |
--with-client-ldflags=-lstdc++ \ |
597 |
--enable-thread-safe-client \ |
598 |
@@ -1096,7 +1098,7 @@ |
599 |
|
600 |
emake install \ |
601 |
DESTDIR="${D}" \ |
602 |
- benchdir_root="${MY_SHAREDSTATEDIR}" \ |
603 |
+ benchdir_root=${MY_SHAREDSTATEDIR} \ |
604 |
testroot="${MY_SHAREDSTATEDIR}" \ |
605 |
|| die "emake install failed" |
606 |
|
607 |
@@ -1112,7 +1114,7 @@ |
608 |
|
609 |
# Various junk (my-*.cnf moved elsewhere) |
610 |
einfo "Removing duplicate /usr/share/mysql files" |
611 |
- rm -Rf "${D}/usr/share/info" |
612 |
+ rm -Rf "${ED}/usr/share/info" |
613 |
for removeme in "mysql-log-rotate" mysql.server* \ |
614 |
binary-configure* my-*.cnf mi_test_all* |
615 |
do |
616 |
@@ -1123,8 +1125,8 @@ |
617 |
if use minimal ; then |
618 |
einfo "Remove all extra content for minimal build" |
619 |
rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} |
620 |
- rm -f "${D}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} |
621 |
- rm -f "${D}/usr/sbin/mysqld" |
622 |
+ rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} |
623 |
+ rm -f "${ED}/usr/sbin/mysqld" |
624 |
rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a |
625 |
fi |
626 |
|
627 |
@@ -1142,12 +1144,16 @@ |
628 |
5.[1-9]|6*|7*) mysql_mycnf_version="5.1" ;; |
629 |
esac |
630 |
einfo "Building default my.cnf (${mysql_mycnf_version})" |
631 |
- insinto "${MY_SYSCONFDIR}" |
632 |
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}" |
633 |
doins scripts/mysqlaccess.conf |
634 |
mycnf_src="my.cnf-${mysql_mycnf_version}" |
635 |
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ |
636 |
+ -e "s!/tmp!${EPREFIX}/tmp!" \ |
637 |
+ -e "s!/usr!${EPREFIX}/usr!" \ |
638 |
+ -e "s!= /var!= ${EPREFIX}/var!" \ |
639 |
"${FILESDIR}/${mycnf_src}" \ |
640 |
> "${TMPDIR}/my.cnf.ok" |
641 |
+ use prefix && sed -i -e '/^user[ ]*= mysql$/d' "${TMPDIR}/my.cnf.ok" |
642 |
if use latin1 ; then |
643 |
sed -i \ |
644 |
-e "/character-set/s|utf8|latin1|g" \ |
645 |
@@ -1161,16 +1167,16 @@ |
646 |
# Empty directories ... |
647 |
diropts "-m0750" |
648 |
if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then |
649 |
- dodir "${MY_DATADIR}" |
650 |
- keepdir "${MY_DATADIR}" |
651 |
+ dodir "${MY_DATADIR#${EPREFIX}}" |
652 |
+ keepdir "${MY_DATADIR#${EPREFIX}}" |
653 |
chown -R mysql:mysql "${D}/${MY_DATADIR}" |
654 |
fi |
655 |
|
656 |
diropts "-m0755" |
657 |
- for folder in "${MY_LOGDIR}" "/var/run/mysqld" ; do |
658 |
+ for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do |
659 |
dodir "${folder}" |
660 |
keepdir "${folder}" |
661 |
- chown -R mysql:mysql "${D}/${folder}" |
662 |
+ chown -R mysql:mysql "${ED}/${folder}" |
663 |
done |
664 |
fi |
665 |
|
666 |
@@ -1200,7 +1206,7 @@ |
667 |
|
668 |
fi |
669 |
|
670 |
- mysql_lib_symlinks "${D}" |
671 |
+ mysql_lib_symlinks "${ED}" |
672 |
} |
673 |
|
674 |
# @FUNCTION: mysql_pkg_preinst |
675 |
@@ -1224,7 +1230,7 @@ |
676 |
mysql_init_vars |
677 |
|
678 |
# Check FEATURES="collision-protect" before removing this |
679 |
- [[ -d "${ROOT}/var/log/mysql" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" |
680 |
+ [[ -d "${EROOT}/var/log/mysql" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" |
681 |
|
682 |
# Secure the logfiles |
683 |
touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err} |
684 |
@@ -1325,8 +1331,8 @@ |
685 |
local pwd2="b" |
686 |
local maxtry=15 |
687 |
|
688 |
- if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${ROOT}/root/.my.cnf" ]; then |
689 |
- MYSQL_ROOT_PASSWORD="$(sed -n -e '/^password=/s,^password=,,gp' "${ROOT}/root/.my.cnf")" |
690 |
+ if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${EROOT}/root/.my.cnf" ]; then |
691 |
+ MYSQL_ROOT_PASSWORD="$(sed -n -e '/^password=/s,^password=,,gp' "${EROOT}/root/.my.cnf")" |
692 |
fi |
693 |
|
694 |
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then |
695 |
@@ -1367,7 +1373,7 @@ |
696 |
help_tables="${TMPDIR}/fill_help_tables.sql" |
697 |
|
698 |
pushd "${TMPDIR}" &>/dev/null |
699 |
- "${ROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1 |
700 |
+ "${EROOT}/usr/bin/mysql_install_db" >"${TMPDIR}"/mysql_install_db.log 2>&1 |
701 |
if [ $? -ne 0 ]; then |
702 |
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 |
703 |
die "Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" |
704 |
@@ -1380,7 +1386,7 @@ |
705 |
|
706 |
# Figure out which options we need to disable to do the setup |
707 |
helpfile="${TMPDIR}/mysqld-help" |
708 |
- ${ROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null |
709 |
+ ${EROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null |
710 |
for opt in grant-tables host-cache name-resolve networking slave-start bdb \ |
711 |
federated innodb ssl log-bin relay-log slow-query-log external-locking \ |
712 |
ndbcluster \ |
713 |
@@ -1395,7 +1401,7 @@ |
714 |
if mysql_version_is_at_least "4.1.3" ; then |
715 |
# Filling timezones, see |
716 |
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html |
717 |
- "${ROOT}/usr/bin/mysql_tzinfo_to_sql" "${ROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null |
718 |
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null |
719 |
|
720 |
if [[ -r "${help_tables}" ]] ; then |
721 |
cat "${help_tables}" >> "${sqltmp}" |
722 |
@@ -1405,12 +1411,14 @@ |
723 |
einfo "Creating the mysql database and setting proper" |
724 |
einfo "permissions on it ..." |
725 |
|
726 |
- local socket="${ROOT}/var/run/mysqld/mysqld${RANDOM}.sock" |
727 |
- local pidfile="${ROOT}/var/run/mysqld/mysqld${RANDOM}.pid" |
728 |
- local mysqld="${ROOT}/usr/sbin/mysqld \ |
729 |
+ use prefix || options="${options} --user=mysql" |
730 |
+ |
731 |
+ local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" |
732 |
+ local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" |
733 |
+ local mysqld="${EROOT}/usr/sbin/mysqld \ |
734 |
${options} \ |
735 |
--user=mysql \ |
736 |
- --basedir=${ROOT}/usr \ |
737 |
+ --basedir=${EROOT}/usr \ |
738 |
--datadir=${ROOT}/${MY_DATADIR} \ |
739 |
--max_allowed_packet=8M \ |
740 |
--net_buffer_length=16K \ |
741 |
@@ -1435,14 +1443,14 @@ |
742 |
ebegin "Setting root password" |
743 |
# Do this from memory, as we don't want clear text passwords in temp files |
744 |
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'" |
745 |
- "${ROOT}/usr/bin/mysql" \ |
746 |
+ "${EROOT}/usr/bin/mysql" \ |
747 |
--socket=${socket} \ |
748 |
-hlocalhost \ |
749 |
-e "${sql}" |
750 |
eend $? |
751 |
|
752 |
ebegin "Loading \"zoneinfo\", this step may require a few seconds ..." |
753 |
- "${ROOT}/usr/bin/mysql" \ |
754 |
+ "${EROOT}/usr/bin/mysql" \ |
755 |
--socket=${socket} \ |
756 |
-hlocalhost \ |
757 |
-uroot \ |
758 |
@@ -1464,5 +1472,5 @@ |
759 |
# @DESCRIPTION: |
760 |
# Remove mysql symlinks. |
761 |
mysql_pkg_postrm() { |
762 |
- : # mysql_lib_symlinks "${D}" |
763 |
+ : # mysql_lib_symlinks "${ED}" |
764 |
} |
765 |
|
766 |
|
767 |
|
768 |
1.28 eclass/mysql_fx.eclass |
769 |
|
770 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql_fx.eclass?rev=1.28&view=markup |
771 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql_fx.eclass?rev=1.28&content-type=text/plain |
772 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql_fx.eclass?r1=1.27&r2=1.28 |
773 |
|
774 |
Index: mysql_fx.eclass |
775 |
=================================================================== |
776 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v |
777 |
retrieving revision 1.27 |
778 |
retrieving revision 1.28 |
779 |
diff -u -r1.27 -r1.28 |
780 |
--- mysql_fx.eclass 27 Dec 2011 17:55:12 -0000 1.27 |
781 |
+++ mysql_fx.eclass 6 Jan 2012 21:32:48 -0000 1.28 |
782 |
@@ -1,6 +1,6 @@ |
783 |
-# Copyright 1999-2011 Gentoo Foundation |
784 |
+# Copyright 1999-2012 Gentoo Foundation |
785 |
# Distributed under the terms of the GNU General Public License v2 |
786 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.27 2011/12/27 17:55:12 fauli Exp $ |
787 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql_fx.eclass,v 1.28 2012/01/06 21:32:48 jmbsvicetto Exp $ |
788 |
|
789 |
# Author: Francesco Riosa (Retired) <vivo@g.o> |
790 |
# Maintainer: |
791 |
@@ -205,14 +205,32 @@ |
792 |
libnameln=${libname##*/} |
793 |
# loop in version of the library to link it, similar to how |
794 |
# libtool works |
795 |
- while [[ ${libnameln:0-3} != '${libsuffix}' ]] && [[ ${maxdots} -lt 6 ]] ; do |
796 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
797 |
+ # macho: libname.x.y.z.dylib |
798 |
+ local libbasename=${libnameln%%.*} # libname |
799 |
+ local libver=${libnameln#${libbasename}} # .x.y.z.dylib |
800 |
+ libver=${libver%${libsuffix}} # .x.y.z |
801 |
+ while [[ -n ${libver} ]] && [[ ${maxdots} -lt 6 ]] ; do |
802 |
+ libnameln="${libbasename}${libver}${libsuffix}" |
803 |
+ rm -f "${libnameln}" |
804 |
+ ln -s "${libname}" "${libnameln}" |
805 |
+ (( ++maxdots )) |
806 |
+ libver=${libver%.*} |
807 |
+ done |
808 |
+ libnameln="${libbasename}${libsuffix}" |
809 |
rm -f "${libnameln}" |
810 |
ln -s "${libname}" "${libnameln}" |
811 |
- (( ++maxdots )) |
812 |
- libnameln="${libnameln%.*}" |
813 |
- done |
814 |
- rm -f "${libnameln}" |
815 |
- ln -s "${libname}" "${libnameln}" |
816 |
+ else |
817 |
+ # elf: libname.so.x.y.z |
818 |
+ while [[ ${libnameln:0-3} != '${libsuffix}' ]] && [[ ${maxdots} -lt 6 ]] ; do |
819 |
+ rm -f "${libnameln}" |
820 |
+ ln -s "${libname}" "${libnameln}" |
821 |
+ (( ++maxdots )) |
822 |
+ libnameln="${libnameln%.*}" |
823 |
+ done |
824 |
+ rm -f "${libnameln}" |
825 |
+ ln -s "${libname}" "${libnameln}" |
826 |
+ fi |
827 |
done |
828 |
done |
829 |
|
830 |
@@ -225,12 +243,12 @@ |
831 |
# Initialize global variables |
832 |
# 2005-11-19 <vivo@g.o> |
833 |
mysql_init_vars() { |
834 |
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="/usr/share/mysql"} |
835 |
- MY_SYSCONFDIR=${MY_SYSCONFDIR="/etc/mysql"} |
836 |
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="/var/lib/mysql"} |
837 |
- MY_LOGDIR=${MY_LOGDIR="/var/log/mysql"} |
838 |
- MY_INCLUDEDIR=${MY_INCLUDEDIR="/usr/include/mysql"} |
839 |
- MY_LIBDIR=${MY_LIBDIR="/usr/$(get_libdir)/mysql"} |
840 |
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"} |
841 |
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} |
842 |
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} |
843 |
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} |
844 |
+ MY_INCLUDEDIR=${MY_INCLUDEDIR="${EPREFIX}/usr/include/mysql"} |
845 |
+ MY_LIBDIR=${MY_LIBDIR="${EPREFIX}/usr/$(get_libdir)/mysql"} |
846 |
|
847 |
if [[ -z "${MY_DATADIR}" ]] ; then |
848 |
MY_DATADIR="" |
849 |
@@ -272,7 +290,6 @@ |
850 |
ewarn "MySQL MY_DATADIR has changed" |
851 |
ewarn "from ${MY_DATADIR}" |
852 |
ewarn "to ${new_MY_DATADIR}" |
853 |
- MY_DATADIR="${new_MY_DATADIR}" |
854 |
fi |
855 |
fi |
856 |
fi |