summaryrefslogtreecommitdiff
path: root/sys-cluster/galera/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/galera/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/galera/files')
-rw-r--r--sys-cluster/galera/files/galera-3.15-strip-extra-cflags.patch70
-rw-r--r--sys-cluster/galera/files/garb.cnf20
-rw-r--r--sys-cluster/galera/files/garb.sh49
3 files changed, 139 insertions, 0 deletions
diff --git a/sys-cluster/galera/files/galera-3.15-strip-extra-cflags.patch b/sys-cluster/galera/files/galera-3.15-strip-extra-cflags.patch
new file mode 100644
index 000000000000..b47ec39bf5a5
--- /dev/null
+++ b/sys-cluster/galera/files/galera-3.15-strip-extra-cflags.patch
@@ -0,0 +1,70 @@
+diff -aurN a/galerautils/src/SConscript b/galerautils/src/SConscript
+--- a/galerautils/src/SConscript 2015-03-16 07:18:42.000000000 -0400
++++ b/galerautils/src/SConscript 2015-04-07 15:03:21.661301200 -0400
+@@ -1,4 +1,4 @@
+-Import('env', 'x86', 'sysname')
++Import('env', 'sysname')
+
+ libgalerautils_env = env.Clone()
+
+@@ -39,21 +39,6 @@
+ crc32c_sources = [ '#/www.evanjones.ca/crc32c.c' ]
+ crc32c_objs = crc32c_env.SharedObject(crc32c_sources)
+
+-if x86:
+- crc32c_env.Append(CFLAGS = ' -msse4.2')
+- if sysname == 'sunos':
+- # Ideally we want to simply strip SSE4.2 flag from the resulting
+- # crc32.pic.o
+- # (see http://ffmpeg.org/pipermail/ffmpeg-user/2013-March/013977.html)
+- # but that requires some serious scons-fu, so we just don't
+- # compile hardware support in if host CPU does not have it.
+- from subprocess import check_call
+- try:
+- check_call("isainfo -v | grep sse4.2 >/dev/null 2>&1", shell=True);
+- except:
+- libgalerautils_env.Append(CPPFLAGS = ' -DCRC32C_NO_HARDWARE')
+- crc32c_env.Append(CPPFLAGS = ' -DCRC32C_NO_HARDWARE')
+-
+ libgalerautils_env.StaticLibrary('galerautils',
+ libgalerautils_objs + crc32c_objs)
+
+diff -aurN a/SConstruct b/SConstruct
+--- a/SConstruct 2015-09-15 09:15:07.770091000 -0400
++++ b/SConstruct 2015-09-15 09:18:41.160091000 -0400
+@@ -67,7 +67,7 @@
+ build_target = 'all'
+
+ # Optimization level
+-opt_flags = ' -g -O3 -DNDEBUG'
++opt_flags = ' -DNDEBUG'
+
+ # Architecture (defaults to build host type)
+ compile_arch = ''
+@@ -97,26 +97,6 @@
+ if dbug:
+ opt_flags = opt_flags + ' -DGU_DBUG_ON'
+
+-if sysname == 'sunos':
+- compile_arch = ' -mtune=native'
+-elif x86:
+- if bits == 32:
+- if machine == 'x86_64':
+- compile_arch = ' -mx32'
+- else:
+- compile_arch = ' -m32 -march=i686'
+- if sysname == 'linux':
+- link_arch = ' -Wl,-melf_i386'
+- else:
+- compile_arch = ' -m64'
+- if sysname == 'linux':
+- link_arch = ' -Wl,-melf_x86_64'
+- link_arch = compile_arch + link_arch
+-elif machine == 's390x':
+- compile_arch = ' -mzarch'
+- if bits == 32:
+- compile_arch += ' -m32'
+-
+ boost = int(ARGUMENTS.get('boost', 1))
+ boost_pool = int(ARGUMENTS.get('boost_pool', 0))
+ ssl = int(ARGUMENTS.get('ssl', 1))
diff --git a/sys-cluster/galera/files/garb.cnf b/sys-cluster/galera/files/garb.cnf
new file mode 100644
index 000000000000..63b79c1d2259
--- /dev/null
+++ b/sys-cluster/galera/files/garb.cnf
@@ -0,0 +1,20 @@
+# Copyright (C) 2012 Coedership Oy
+# This config file is to be sourced by garbd service script.
+
+# A space-separated list of node addresses (address[:port]) in the cluster
+# GALERA_NODES=""
+
+# Galera cluster name, should be the same as on the rest of the nodes.
+# GALERA_GROUP=""
+
+# Arbitrator node name, give a specific name to this node in cluster.
+# NODE_NAME=""
+
+# Optional Galera internal options string (e.g. SSL settings)
+# see http://www.codership.com/wiki/doku.php?id=galera_parameters
+# GALERA_OPTIONS=""
+
+# Log file for garbd. Optional, by default logs to syslog
+# LOG_FILE=""
+
+PIDFILE=/var/run/garbd
diff --git a/sys-cluster/galera/files/garb.sh b/sys-cluster/galera/files/garb.sh
new file mode 100644
index 000000000000..f03eaffc076a
--- /dev/null
+++ b/sys-cluster/galera/files/garb.sh
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ after mysql
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+
+ if [ -z "${GALERA_NODES}" ]; then
+ eerror "List of GALERA_NODES is not configured"
+ return 1
+ fi
+
+ if [ -z "${GALERA_GROUP}" ]; then
+ eerror "GALERA_GROUP name is not configured"
+ return 1
+ fi
+
+ GALERA_PORT="${GALERA_PORT:-4567}"
+
+ OPTIONS="-a gcomm://${GALERA_NODES// /,} -g ${GALERA_GROUP}"
+ [ -n "${GALERA_OPTIONS}" ] && OPTIONS="${OPTIONS} -o ${GALERA_OPTIONS}"
+ [ -n "${LOG_FILE}" ] && OPTIONS="${OPTIONS} -l ${LOG_FILE}"
+ [ -n "${NODE_NAME}" ] && OPTIONS="${OPTIONS} -n ${NODE_NAME}"
+
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/garbd \
+ --pidfile "${PIDFILE}" \
+ --make-pidfile \
+ --user garbd \
+ --group garbd \
+ --background \
+ -- ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/garbd \
+ --pidfile "${PIDFILE}"
+ eend $?
+}