1 |
robbat2 14/07/30 06:26:05 |
2 |
|
3 |
Added: garb.sh disable-tests.patch garb.cnf |
4 |
respect-flags.patch |
5 |
Log: |
6 |
Bring MariaDB-Galera from the overlay into the tree. Thanks to the great work of Brian Evans <grknight@g.o>. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-cluster/galera/files/garb.sh |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.sh?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.sh?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: garb.sh |
17 |
=================================================================== |
18 |
#!/sbin/runscript |
19 |
# Copyright 1999-2014 Gentoo Foundation |
20 |
# Distributed under the terms of the GNU General Public License v2 |
21 |
|
22 |
depend() { |
23 |
use net |
24 |
after mysql |
25 |
} |
26 |
|
27 |
start() { |
28 |
ebegin "Starting ${SVCNAME}" |
29 |
|
30 |
if [ -z "${GALERA_NODES}" ]; then |
31 |
eerror "List of GALERA_NODES is not configured" |
32 |
return 1 |
33 |
fi |
34 |
|
35 |
if [ -z "${GALERA_GROUP}" ]; then |
36 |
eerror "GALERA_GROUP name is not configured" |
37 |
return 1 |
38 |
fi |
39 |
|
40 |
GALERA_PORT="${GALERA_PORT:-4567}" |
41 |
|
42 |
for ADDRESS in ${GALERA_NODES} 0; do |
43 |
HOST=$(echo $ADDRESS | cut -d \: -f 1 ) |
44 |
PORT=$(echo $ADDRESS | cut -d \: -f 2 ) |
45 |
if [[ "${HOST}" == "${PORT}" ]]; then |
46 |
PORT=${GALERA_PORT} |
47 |
fi |
48 |
PORT=${PORT:-$GALERA_PORT} |
49 |
nc -z ${HOST} ${PORT} > /dev/null && break |
50 |
done |
51 |
if [ ${ADDRESS} == "0" ]; then |
52 |
eerror "None of the nodes in GALERA_NODES is accessible" |
53 |
return 1 |
54 |
fi |
55 |
|
56 |
OPTIONS="-a gcomm://${ADDRESS} -g ${GALERA_GROUP}" |
57 |
[ -n "${GALERA_OPTIONS}" ] && OPTIONS="${OPTIONS} -o ${GALERA_OPTIONS}" |
58 |
[ -n "${LOG_FILE}" ] && OPTIONS="${OPTIONS} -l ${LOG_FILE}" |
59 |
|
60 |
start-stop-daemon \ |
61 |
--start \ |
62 |
--exec /usr/bin/garbd \ |
63 |
--pidfile "${PIDFILE}" \ |
64 |
--make-pidfile \ |
65 |
--user garbd \ |
66 |
--group garbd \ |
67 |
--background \ |
68 |
-- ${OPTIONS} |
69 |
eend $? |
70 |
} |
71 |
|
72 |
stop() { |
73 |
ebegin "Stopping ${SVCNAME}" |
74 |
start-stop-daemon \ |
75 |
--stop \ |
76 |
--exec /usr/bin/garbd \ |
77 |
--pidfile "${PIDFILE}" |
78 |
eend $? |
79 |
} |
80 |
|
81 |
|
82 |
|
83 |
|
84 |
1.1 sys-cluster/galera/files/disable-tests.patch |
85 |
|
86 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/disable-tests.patch?rev=1.1&view=markup |
87 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/disable-tests.patch?rev=1.1&content-type=text/plain |
88 |
|
89 |
Index: disable-tests.patch |
90 |
=================================================================== |
91 |
diff -aurN a/galera/SConscript b/galera/SConscript |
92 |
--- a/galera/SConscript 2013-03-11 02:44:50.000000000 -0400 |
93 |
+++ b/galera/SConscript 2013-05-13 13:13:20.851827437 -0400 |
94 |
@@ -1,2 +1,2 @@ |
95 |
|
96 |
-SConscript(['src/SConscript', 'tests/SConscript']) |
97 |
+SConscript(['src/SConscript']) |
98 |
diff -aurN a/galerautils/SConscript b/galerautils/SConscript |
99 |
--- a/galerautils/SConscript 2013-03-11 02:44:50.000000000 -0400 |
100 |
+++ b/galerautils/SConscript 2013-05-13 13:15:37.010071765 -0400 |
101 |
@@ -1,3 +1,3 @@ |
102 |
# SConscript for building galerautils |
103 |
|
104 |
-SConscript(Split('''src/SConscript tests/SConscript''')) |
105 |
+SConscript(Split('''src/SConscript''')) |
106 |
diff -aurN a/gcache/SConscript b/gcache/SConscript |
107 |
--- a/gcache/SConscript 2013-03-11 02:44:50.000000000 -0400 |
108 |
+++ b/gcache/SConscript 2013-05-13 13:15:55.179837389 -0400 |
109 |
@@ -1,3 +1,3 @@ |
110 |
# SConscript for building galerautils |
111 |
|
112 |
-SConscript(Split('''src/SConscript tests/SConscript''')) |
113 |
+SConscript(Split('''src/SConscript''')) |
114 |
diff -aurN a/gcomm/SConscript b/gcomm/SConscript |
115 |
--- a/gcomm/SConscript 2013-03-11 02:44:50.000000000 -0400 |
116 |
+++ b/gcomm/SConscript 2013-05-13 13:16:08.979659369 -0400 |
117 |
@@ -1,3 +1,3 @@ |
118 |
# SCons build script for building gcomm |
119 |
|
120 |
-SConscript(Split('''src/SConscript test/SConscript''')) |
121 |
+SConscript(Split('''src/SConscript''')) |
122 |
diff -aurN a/gcs/src/SConscript b/gcs/src/SConscript |
123 |
--- a/gcs/src/SConscript 2013-03-11 02:44:50.000000000 -0400 |
124 |
+++ b/gcs/src/SConscript 2013-05-13 13:12:53.122184848 -0400 |
125 |
@@ -46,8 +46,6 @@ |
126 |
source = 'gcs_test.c', |
127 |
LINK = libgcs_env['CXX']) |
128 |
|
129 |
-SConscript('unit_tests/SConscript') |
130 |
- |
131 |
# |
132 |
env.Append(LIBGALERA_OBJS = libgcs_env.SharedObject(libgcs_sources)) |
133 |
|
134 |
diff -aurN a/SConstruct b/SConstruct |
135 |
--- a/SConstruct 2013-03-11 02:44:50.000000000 -0400 |
136 |
+++ b/SConstruct 2013-05-13 13:11:03.493597370 -0400 |
137 |
@@ -305,20 +305,6 @@ |
138 |
# Clone base from default environment |
139 |
check_env = env.Clone() |
140 |
|
141 |
-conf = Configure(check_env) |
142 |
- |
143 |
-# Check header and library |
144 |
- |
145 |
-if not conf.CheckHeader('check.h'): |
146 |
- print 'Error: check header file not found or not usable' |
147 |
- Exit(1) |
148 |
- |
149 |
-if not conf.CheckLib('check'): |
150 |
- print 'Error: check library not found or not usable' |
151 |
- Exit(1) |
152 |
- |
153 |
-conf.Finish() |
154 |
- |
155 |
# Note: Don't do this, glibc does not like static linking |
156 |
# Link unit tests statically |
157 |
# check_env.Append(LINKFLAGS = ' -static') |
158 |
@@ -328,11 +314,7 @@ |
159 |
# |
160 |
|
161 |
def builder_unit_test(target, source, env): |
162 |
- app = str(source[0].abspath) |
163 |
- if os.spawnl(os.P_WAIT, app, app)==0: |
164 |
- open(str(target[0]),'w').write("PASSED\n") |
165 |
- else: |
166 |
- return 1 |
167 |
+ print("Disabled\n") |
168 |
# Create a builder for tests |
169 |
bld = Builder(action = builder_unit_test) |
170 |
check_env.Append(BUILDERS = {'Test' : bld}) |
171 |
|
172 |
|
173 |
|
174 |
1.1 sys-cluster/galera/files/garb.cnf |
175 |
|
176 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.cnf?rev=1.1&view=markup |
177 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.cnf?rev=1.1&content-type=text/plain |
178 |
|
179 |
Index: garb.cnf |
180 |
=================================================================== |
181 |
# Copyright (C) 2012 Coedership Oy |
182 |
# This config file is to be sourced by garbd service script. |
183 |
|
184 |
# A space-separated list of node addresses (address[:port]) in the cluster |
185 |
# GALERA_NODES="" |
186 |
|
187 |
# Galera cluster name, should be the same as on the rest of the nodes. |
188 |
# GALERA_GROUP="" |
189 |
|
190 |
# Optional Galera internal options string (e.g. SSL settings) |
191 |
# see http://www.codership.com/wiki/doku.php?id=galera_parameters |
192 |
# GALERA_OPTIONS="" |
193 |
|
194 |
# Log file for garbd. Optional, by default logs to syslog |
195 |
# LOG_FILE="" |
196 |
|
197 |
PIDFILE=/var/run/garbd |
198 |
|
199 |
|
200 |
|
201 |
1.1 sys-cluster/galera/files/respect-flags.patch |
202 |
|
203 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/respect-flags.patch?rev=1.1&view=markup |
204 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/respect-flags.patch?rev=1.1&content-type=text/plain |
205 |
|
206 |
Index: respect-flags.patch |
207 |
=================================================================== |
208 |
--- a/SConstruct 2014-03-07 14:27:26.797904671 -0500 |
209 |
+++ b/SConstruct 2014-03-07 14:31:18.672478115 -0500 |
210 |
@@ -49,7 +49,7 @@ |
211 |
build_target = 'all' |
212 |
|
213 |
# Optimization level |
214 |
-opt_flags = ' -g -O3 -DNDEBUG' |
215 |
+opt_flags = ' -DNDEBUG' |
216 |
|
217 |
# Architecture (defaults to build host type) |
218 |
compile_arch = '' |
219 |
@@ -214,12 +214,12 @@ |
220 |
' -Wall -Wextra -Wno-unused-parameter') |
221 |
|
222 |
# C-specific flags |
223 |
-env.Replace(CFLAGS = ' -std=c99 -fno-strict-aliasing -pipe') |
224 |
+env.Replace(CFLAGS = os.getenv('CFLAGS','') + ' -std=c99 -fno-strict-aliasing -pipe') |
225 |
|
226 |
# CXX-specific flags |
227 |
# Note: not all 3rd-party libs like '-Wold-style-cast -Weffc++' |
228 |
# adding those after checks |
229 |
-env.Replace(CXXFLAGS = ' -Wno-long-long -Wno-deprecated -ansi') |
230 |
+env.Replace(CXXFLAGS = os.getenv('CXXFLAGS','') + ' -Wno-long-long -Wno-deprecated -ansi') |
231 |
if sysname != 'sunos': |
232 |
env.Append(CXXFLAGS = ' -pipe') |
233 |
|
234 |
@@ -228,7 +228,7 @@ |
235 |
# TODO: enable '-Wl,--warn-common -Wl,--fatal-warnings' after warnings from |
236 |
# static linking have beed addressed |
237 |
# |
238 |
-env.Append(LINKFLAGS = link_arch) |
239 |
+env.Append(LINKFLAGS = link_arch + ' ' + os.getenv('LDFLAGS','')) |
240 |
|
241 |
# |
242 |
# Check required headers and libraries (autoconf functionality) |