1 |
commit: fa7cd051011a9ef3c878433d4edbb4894805a4be |
2 |
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 1 01:07:56 2013 +0000 |
4 |
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 1 01:07:56 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=fa7cd051 |
7 |
|
8 |
[dev-db/percona-server] Add percona-server to the overlay. This still needs much testing. |
9 |
Currently fails to build with USE="embedded". |
10 |
|
11 |
--- |
12 |
dev-db/percona-server/Manifest | 1 + |
13 |
dev-db/percona-server/files/my.cnf-5.5 | 153 ++++++++++++++++++++ |
14 |
dev-db/percona-server/metadata.xml | 22 +++ |
15 |
.../percona-server/percona-server-5.5.30.2.ebuild | 129 +++++++++++++++++ |
16 |
4 files changed, 305 insertions(+), 0 deletions(-) |
17 |
|
18 |
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..0bc083f |
21 |
--- /dev/null |
22 |
+++ b/dev-db/percona-server/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST Percona-Server-5.5.30-rel30.2.tar.gz 22542120 SHA256 d30876033cd5590f8e1d68aff6a2eaad677dbe59168d4610c580c4e4e2e923a7 SHA512 0ff7fe9a1ea11295b7e817ae7b492078babd5b1dd1cc302b4745f5eeb5700d01c26a0d00b0341e1591db4d40b1f111fe90f4bb7be82b55454a303ec6a5eadf98 WHIRLPOOL 21cb0b5d80256a3eb2c7bbcb33a81fe466002eac5ab36f7b07dfad480a03ef6201eac307673649a2ebde902c80e694958298cf9cf92933f6d782ba7126b62e26 |
25 |
|
26 |
diff --git a/dev-db/percona-server/files/my.cnf-5.5 b/dev-db/percona-server/files/my.cnf-5.5 |
27 |
new file mode 100644 |
28 |
index 0000000..f43d535 |
29 |
--- /dev/null |
30 |
+++ b/dev-db/percona-server/files/my.cnf-5.5 |
31 |
@@ -0,0 +1,153 @@ |
32 |
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. |
33 |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.5,v 1.2 2013/01/20 02:40:02 robbat2 Exp $ |
34 |
+ |
35 |
+# The following options will be passed to all MySQL clients |
36 |
+[client] |
37 |
+#password = your_password |
38 |
+port = 3306 |
39 |
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock |
40 |
+ |
41 |
+[mysql] |
42 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
43 |
+default-character-set=utf8 |
44 |
+ |
45 |
+[mysqladmin] |
46 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
47 |
+default-character-set=utf8 |
48 |
+ |
49 |
+[mysqlcheck] |
50 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
51 |
+default-character-set=utf8 |
52 |
+ |
53 |
+[mysqldump] |
54 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
55 |
+default-character-set=utf8 |
56 |
+ |
57 |
+[mysqlimport] |
58 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
59 |
+default-character-set=utf8 |
60 |
+ |
61 |
+[mysqlshow] |
62 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
63 |
+default-character-set=utf8 |
64 |
+ |
65 |
+[myisamchk] |
66 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
67 |
+ |
68 |
+[myisampack] |
69 |
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets |
70 |
+ |
71 |
+# use [safe_mysqld] with mysql-3 |
72 |
+[mysqld_safe] |
73 |
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err |
74 |
+ |
75 |
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations |
76 |
+[mysqld] |
77 |
+character-set-server = utf8 |
78 |
+user = mysql |
79 |
+port = 3306 |
80 |
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock |
81 |
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid |
82 |
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err |
83 |
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr |
84 |
+datadir = @DATADIR@ |
85 |
+skip-external-locking |
86 |
+key_buffer = 16M |
87 |
+max_allowed_packet = 1M |
88 |
+table_open_cache = 64 |
89 |
+sort_buffer_size = 512K |
90 |
+net_buffer_length = 8K |
91 |
+read_buffer_size = 256K |
92 |
+read_rnd_buffer_size = 512K |
93 |
+myisam_sort_buffer_size = 8M |
94 |
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql |
95 |
+#Set this to your desired error message language |
96 |
+lc_messages = en_US |
97 |
+ |
98 |
+# security: |
99 |
+# using "localhost" in connects uses sockets by default |
100 |
+# skip-networking |
101 |
+bind-address = 127.0.0.1 |
102 |
+ |
103 |
+log-bin |
104 |
+server-id = 1 |
105 |
+ |
106 |
+# point the following paths to different dedicated disks |
107 |
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ |
108 |
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname |
109 |
+ |
110 |
+# you need the debug USE flag enabled to use the following directives, |
111 |
+# if needed, uncomment them, start the server and issue |
112 |
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace |
113 |
+# this will show you *exactly* what's happening in your server ;) |
114 |
+ |
115 |
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql |
116 |
+#gdb |
117 |
+#debug = d:t:i:o,/tmp/mysqld.trace |
118 |
+#one-thread |
119 |
+ |
120 |
+# uncomment the following directives if you are using BDB tables |
121 |
+#bdb_cache_size = 4M |
122 |
+#bdb_max_lock = 10000 |
123 |
+ |
124 |
+# the following is the InnoDB configuration |
125 |
+# if you wish to disable innodb instead |
126 |
+# uncomment just the next line |
127 |
+#skip-innodb |
128 |
+# |
129 |
+# the rest of the innodb config follows: |
130 |
+# don't eat too much memory, we're trying to be safe on 64Mb boxes |
131 |
+# you might want to bump this up a bit on boxes with more RAM |
132 |
+innodb_buffer_pool_size = 16M |
133 |
+# this is the default, increase it if you have lots of tables |
134 |
+innodb_additional_mem_pool_size = 2M |
135 |
+# |
136 |
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( |
137 |
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route |
138 |
+# we have to take for the moment |
139 |
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ |
140 |
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ |
141 |
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ |
142 |
+# you may wish to change this size to be more suitable for your system |
143 |
+# the max is there to avoid run-away growth on your machine |
144 |
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M |
145 |
+# we keep this at around 25% of of innodb_buffer_pool_size |
146 |
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) |
147 |
+innodb_log_file_size = 5M |
148 |
+# this is the default, increase it if you have very large transactions going on |
149 |
+innodb_log_buffer_size = 8M |
150 |
+# this is the default and won't hurt you |
151 |
+# you shouldn't need to tweak it |
152 |
+innodb_log_files_in_group=2 |
153 |
+# see the innodb config docs, the other options are not always safe |
154 |
+innodb_flush_log_at_trx_commit = 1 |
155 |
+innodb_lock_wait_timeout = 50 |
156 |
+innodb_file_per_table |
157 |
+ |
158 |
+# Uncomment this to get FEDERATED engine support |
159 |
+#plugin-load=federated=ha_federated.so |
160 |
+loose-federated |
161 |
+ |
162 |
+[mysqldump] |
163 |
+quick |
164 |
+max_allowed_packet = 16M |
165 |
+ |
166 |
+[mysql] |
167 |
+# uncomment the next directive if you are not familiar with SQL |
168 |
+#safe-updates |
169 |
+ |
170 |
+[isamchk] |
171 |
+key_buffer = 20M |
172 |
+sort_buffer_size = 20M |
173 |
+read_buffer = 2M |
174 |
+write_buffer = 2M |
175 |
+ |
176 |
+[myisamchk] |
177 |
+key_buffer = 20M |
178 |
+sort_buffer_size = 20M |
179 |
+read_buffer = 2M |
180 |
+write_buffer = 2M |
181 |
+ |
182 |
+[mysqlhotcopy] |
183 |
+interactive-timeout |
184 |
+ |
185 |
|
186 |
diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml |
187 |
new file mode 100644 |
188 |
index 0000000..ea3fe5a |
189 |
--- /dev/null |
190 |
+++ b/dev-db/percona-server/metadata.xml |
191 |
@@ -0,0 +1,22 @@ |
192 |
+<?xml version="1.0" encoding="UTF-8"?> |
193 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
194 |
+<pkgmetadata> |
195 |
+<herd>mysql</herd> |
196 |
+<use> |
197 |
+ <flag name='big-tables'>Make tables contain up to 1.844E+19 rows</flag> |
198 |
+ <flag name='cluster'>Add support for NDB clustering (deprecated)</flag> |
199 |
+ <flag name='community'>Enables the community features from upstream.</flag> |
200 |
+ <flag name='embedded'>Build embedded server (libmysqld)</flag> |
201 |
+ <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> |
202 |
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> |
203 |
+ <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> |
204 |
+ <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag> |
205 |
+ <flag name='minimal'>Install client programs only, no server</flag> |
206 |
+ <flag name='pbxt'>Add experimental support for PBXT storage engine</flag> |
207 |
+ <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> |
208 |
+ <flag name='raid'>Deprecated option, removed in the 5.0 series</flag> |
209 |
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> |
210 |
+ <flag name='test'>Install upstream testsuites for end use.</flag> |
211 |
+ <flag name='xtradb'>Add experimental support for Percona's InnoDB replacement: XtraDB</flag> |
212 |
+</use> |
213 |
+</pkgmetadata> |
214 |
|
215 |
diff --git a/dev-db/percona-server/percona-server-5.5.30.2.ebuild b/dev-db/percona-server/percona-server-5.5.30.2.ebuild |
216 |
new file mode 100644 |
217 |
index 0000000..05ca569 |
218 |
--- /dev/null |
219 |
+++ b/dev-db/percona-server/percona-server-5.5.30.2.ebuild |
220 |
@@ -0,0 +1,129 @@ |
221 |
+# Copyright 1999-2013 Gentoo Foundation |
222 |
+# Distributed under the terms of the GNU General Public License v2 |
223 |
+# $Header: $ |
224 |
+ |
225 |
+EAPI="4" |
226 |
+ |
227 |
+MY_EXTRAS_VER="live" |
228 |
+MY_PV="${PV//_alpha_pre/-m}" |
229 |
+MY_PV="${MY_PV//_/-}" |
230 |
+ |
231 |
+# Build type |
232 |
+BUILD="cmake" |
233 |
+ |
234 |
+inherit toolchain-funcs mysql-v2 |
235 |
+# only to make repoman happy. it is really set in the eclass |
236 |
+IUSE="$IUSE" |
237 |
+ |
238 |
+# Define the mysql-extras source |
239 |
+EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/mysql-extras.git" |
240 |
+ |
241 |
+# REMEMBER: also update eclass/mysql*.eclass before committing! |
242 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux" |
243 |
+ |
244 |
+# When MY_EXTRAS is bumped, the index should be revised to exclude these. |
245 |
+EPATCH_EXCLUDE='' |
246 |
+ |
247 |
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" |
248 |
+RDEPEND="${RDEPEND}" |
249 |
+ |
250 |
+# Please do not add a naive src_unpack to this ebuild |
251 |
+# If you want to add a single patch, copy the ebuild to an overlay |
252 |
+# and create your own mysql-extras tarball, looking at 000_index.txt |
253 |
+ |
254 |
+# Official test instructions: |
255 |
+# USE='berkdb -cluster embedded extraengine perl ssl community' \ |
256 |
+# FEATURES='test userpriv -usersandbox' \ |
257 |
+# ebuild percona-server-X.X.XX.ebuild \ |
258 |
+# digest clean package |
259 |
+src_test() { |
260 |
+ |
261 |
+ local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" |
262 |
+ local retstatus_unit |
263 |
+ local retstatus_tests |
264 |
+ |
265 |
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named |
266 |
+ # localhost. Also causes weird failures. |
267 |
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" |
268 |
+ |
269 |
+ if ! use "minimal" ; then |
270 |
+ |
271 |
+ if [[ $UID -eq 0 ]]; then |
272 |
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." |
273 |
+ fi |
274 |
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
275 |
+ |
276 |
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
277 |
+ addpredict /this-dir-does-not-exist/t9.MYI |
278 |
+ |
279 |
+ # Run CTest (test-units) |
280 |
+ cmake-utils_src_test |
281 |
+ retstatus_unit=$? |
282 |
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" |
283 |
+ |
284 |
+ # Ensure that parallel runs don't die |
285 |
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))" |
286 |
+ |
287 |
+ # create directories because mysqladmin might right out of order |
288 |
+ mkdir -p "${S}"/mysql-test/var-tests{,/log} |
289 |
+ |
290 |
+ # These are failing in MySQL 5.5 for now and are believed to be |
291 |
+ # false positives: |
292 |
+ # |
293 |
+ # main.information_schema, binlog.binlog_statement_insert_delayed, |
294 |
+ # main.mysqld--help-notwin |
295 |
+ # fails due to USE=-latin1 / utf8 default |
296 |
+ # |
297 |
+ # main.mysql_client_test: |
298 |
+ # segfaults at random under Portage only, suspect resource limits. |
299 |
+ # |
300 |
+ # sys_vars.plugin_dir_basic |
301 |
+ # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin |
302 |
+ # instead of MYSQL_LIBDIR/plugin |
303 |
+ # |
304 |
+ # main.flush_read_lock_kill |
305 |
+ # fails because of unknown system variable 'DEBUG_SYNC' |
306 |
+ # |
307 |
+ # main.openssl_1 |
308 |
+ # error message changing |
309 |
+ # -mysqltest: Could not open connection 'default': 2026 SSL connection |
310 |
+ # error: ASN: bad other signature confirmation |
311 |
+ # +mysqltest: Could not open connection 'default': 2026 SSL connection |
312 |
+ # error: error:00000001:lib(0):func(0):reason(1) |
313 |
+ # |
314 |
+ |
315 |
+ for t in main.mysql_client_test \ |
316 |
+ binlog.binlog_statement_insert_delayed main.information_schema \ |
317 |
+ main.mysqld--help-notwin main.flush_read_lock_kill \ |
318 |
+ sys_vars.plugin_dir_basic main.openssl_1 ; do |
319 |
+ mysql-v2_disable_test "$t" "False positives in Gentoo" |
320 |
+ done |
321 |
+ |
322 |
+ # Run mysql tests |
323 |
+ pushd "${TESTDIR}" |
324 |
+ |
325 |
+ # run mysql-test tests |
326 |
+ perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests" |
327 |
+ retstatus_tests=$? |
328 |
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" |
329 |
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
330 |
+ |
331 |
+ popd |
332 |
+ |
333 |
+ # Cleanup is important for these testcases. |
334 |
+ pkill -9 -f "${S}/ndb" 2>/dev/null |
335 |
+ pkill -9 -f "${S}/sql" 2>/dev/null |
336 |
+ |
337 |
+ failures="" |
338 |
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" |
339 |
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" |
340 |
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" |
341 |
+ |
342 |
+ [[ -z "$failures" ]] || die "Test failures: $failures" |
343 |
+ einfo "Tests successfully completed" |
344 |
+ |
345 |
+ else |
346 |
+ |
347 |
+ einfo "Skipping server tests due to minimal build." |
348 |
+ fi |
349 |
+} |