summaryrefslogtreecommitdiff
path: root/sys-cluster/galera
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/galera')
-rw-r--r--sys-cluster/galera/Manifest10
-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
-rw-r--r--sys-cluster/galera/galera-25.3.20.ebuild87
-rw-r--r--sys-cluster/galera/galera-25.3.21.ebuild87
-rw-r--r--sys-cluster/galera/metadata.xml14
7 files changed, 337 insertions, 0 deletions
diff --git a/sys-cluster/galera/Manifest b/sys-cluster/galera/Manifest
new file mode 100644
index 000000000000..eb5258f339c6
--- /dev/null
+++ b/sys-cluster/galera/Manifest
@@ -0,0 +1,10 @@
+AUX galera-3.15-strip-extra-cflags.patch 2397 SHA256 4f7365c4b3f1c35a9f238ee3660041f1299bb958df7885d85a52fe204a00728a SHA512 4f41398faaa138543ff6fd24b2aac9aa329dabf74d6355ea5c620db64e3112e27e17c15bf7e1dae1e7ddbe92795cedd65a9d6e52bd07b66f3fe27dde2ffc7cad WHIRLPOOL 9997d91a60e530e49a38c034bdcebaa421b756baa30753594e256045727d38c7a07566204c183e9cb746337ef5c318dc3b63d78d72fc48798ffcc02e3241065b
+AUX garb.cnf 612 SHA256 c87b728ebe4e3ee1b33113303557e039b10ed22de901422020ad091fadbe101d SHA512 97b921109b242ad1a19326564b5f9da8a09eadd4771c2c86c727c1c30e35f92ffadbb38ce7d81bc88572d2c7b04466ad212432954e09d81417c4ed7f69ec4648 WHIRLPOOL 5ecef983b1ae16ff8589fde611a8aa7df572e86d0982c67fa042cf611e6d4cc1e9552ca3640816ffc9de72c366b74f96710c7a9a10249c0aaa0f3f5fb52f9a82
+AUX garb.sh 1029 SHA256 644130ca827d87698a1fd81b97c8099c565826415f79358b52b9bef4abfe1b15 SHA512 780eb8e7584d31ce24559e46724c7b981320f4706af0b9f0cd8d157247f853f51d3980178d0d234f64bcb097a4ee5493fe299d6800513403dbc7e0184c020902 WHIRLPOOL 3169e13e38160771290d96960ad68889c71e50756a94ddb778799a9db512f014cbfef312b1b6edc460182a666d90821dad2529a6546f6438c6f82e1cc3d091a2
+DIST galera-3-25.3.20.tar.gz 3319355 SHA256 aae9b44a7b06c0b0cd9e2f1b9bbaf9ca47c630076a6b7c66e8747e01fd343a64 SHA512 4531073bbd13542cf4b0ed06788ec0b857971bd2e0161b8df2d90072b134d5343216c012d2f712ff336209f6e34920e2aadf7b0f58f91d6ce365fb2b65ed7fbd WHIRLPOOL 9f311742a5d1a8b9550a971441bfb0f84b6876ff5d78740a22a06cf61ebd9a829a83706cb27b198be4e942d28c8a215ed29a3850f4ec72fa86266ccab534825f
+DIST galera-3-25.3.21.tar.gz 3317865 SHA256 1035b8a62cd3695ab2af8c8f1be785942d68a07123bb9bc051b51fc4b5735904 SHA512 04f9a879c1c161c84dc74c002467e60739186d49746255f0f60ad090cf9c3ff778610a3cfc58896c73c244355baefdd65109df8538c010d7a749e9ee1e88e033 WHIRLPOOL 5c95658be7895d00c9b9cd4fbc870e439ede7c71f6ba685c60086c071154c1f7f5c0b412fc1ac0a95d5b32d2ffecb981ddbcb3147f15a5ba500bfd2c12ccab36
+EBUILD galera-25.3.20.ebuild 1816 SHA256 523ab329f7969cd3f9de8bb7b945bb478a967505727c4336a7c851b71b50f7d4 SHA512 ac38b5e8a74494baebc889fe312eca034dc7637c3aab2ccc560f6e8ac4d81e95e36e9a08b8f2a11e8020fc4c8e01a5b2fcb2d0d453d51c6b94a644f7f853fb4b WHIRLPOOL 027dad276a995214bd2beae227937225b76e14b532bd8a09d859ab06767bbce7ef76249529d9689f29102c7ad9be8565917aa03e36983baf2dc85e33110ee2f5
+EBUILD galera-25.3.21.ebuild 1828 SHA256 a2e93e8d32b052b49626704ab4cdbb41c08506ea5883c493f8c1bafa0997bb9a SHA512 701753adad3fe6556f18d53990f0fb8eb9acc8625dff14b6ce2666e168ae19b68f78d08935ff735fbca8ac93102549ebc0bd46aea17a1effb9d64de67a0a4a84 WHIRLPOOL 3bd8851137311f19ae0d6fa39b8245109198725943076027461f88ecb3f7a5f7173a74517fbb504ff37fdc90ad4e097387547b9e9e1f686550a5a3b75eb5cc5d
+MISC ChangeLog 5716 SHA256 d76e4baa1fd77fe1f5b5fa4cb652979ed0b2754adf5170585bf7eb56fff4db86 SHA512 4eceed55cd8387be7c31dc938f5954a7ec200f0c1c0612dd4c3cb4c492076f53650a2d1ce3e9e21326b606eb1da8cf2fa80ec32933b9630a33de795a329d2092 WHIRLPOOL d033ad9a8387e162b5c9fdfcacfc25884d6be859832aabed9de299aedfc22e1f5c6d5a4a6a5fef1d5e4c5c0da6b90042d0f726777dc78357c8a7f49f496b6dc2
+MISC ChangeLog-2015 1453 SHA256 9fa3b9879d179c2b71d4e37b53c28e1fc0eb9c6ae04d0209cffb5b02ec962b0d SHA512 b9e92604a17f0db373c5fd569cef83bb2ef0f1e09536fa4c13ae24d7cccf09b78633fe11207f106247cf522a1dc8dcef40e26c733098afdab797ebe002bba3ab WHIRLPOOL b44624cbb06f4fa085bf653aaa18467ba042180559b91c35a3e7db133f7fb35d9453856d89930e538fc16ec3429f27795e86a6b45d620db47d03a79edb5f7557
+MISC metadata.xml 462 SHA256 1974a5c88a014d51ce6c1ab2af28ee9358edd30f75d8fc2591ee557875073f6b SHA512 b99987e53ae976905d3e493b09cbe35161f90b8ebfc88c4a9616b8722b0a0005c2427d509e15fdd7bbb30977266188452b3b6ec7479a943bce3a5922410246e2 WHIRLPOOL 51f62f6dcdacb7d7719ada1ebd708db44b57951501bad857dee1e62f4dd4ca3f58d184d39120146b4a4ecf150f5055381be30b43f4cdb46ab6424abff9601798
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 $?
+}
diff --git a/sys-cluster/galera/galera-25.3.20.ebuild b/sys-cluster/galera/galera-25.3.20.ebuild
new file mode 100644
index 000000000000..08d698fa170c
--- /dev/null
+++ b/sys-cluster/galera/galera-25.3.20.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="${PN}-3-${PV}"
+
+inherit scons-utils toolchain-funcs user flag-o-matic
+DESCRIPTION="Synchronous multi-master replication engine that provides the wsrep API"
+HOMEPAGE="http://www.galeracluster.com"
+SRC_URI="http://releases.galeracluster.com/source/galera-3-${PV}.tar.gz"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+
+KEYWORDS="amd64 ~arm ~arm64 ~ia64 ppc ppc64 x86"
+IUSE="cpu_flags_x86_sse4_2 garbd test"
+
+CDEPEND="
+ dev-libs/openssl:0=
+ >=dev-libs/boost-1.41:0=
+ "
+DEPEND="${DEPEND}
+ ${CDEPEND}
+ dev-libs/check
+ >=sys-devel/gcc-4.4
+ >=dev-cpp/asio-1.10.1[ssl]
+ "
+#Run time only
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+# Respect {C,LD}FLAGS.
+PATCHES=( "${FILESDIR}/galera-3.15-strip-extra-cflags.patch" )
+
+pkg_preinst() {
+ if use garbd ; then
+ enewgroup garbd
+ enewuser garbd -1 -1 -1 garbd
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Remove bundled dev-cpp/asio
+ rm -r "${S}/asio" || die
+
+ #Remove optional garbd daemon
+ if ! use garbd ; then
+ rm -r "${S}/garb" || die
+ fi
+}
+
+src_configure() {
+ tc-export CC CXX
+ # Uses hardware specific code that seems to depend on SSE4.2
+ if use cpu_flags_x86_sse4_2 ; then
+ append-cflags -msse4.2
+ else
+ append-cflags -DCRC32C_NO_HARDWARE
+ fi
+ # strict_build_flags=0 disables -Werror, -pedantic, -Weffc++,
+ # and -Wold-style-cast
+ MYSCONS=(
+ ssl=1
+ tests=$(usex test 1 0)
+ strict_build_flags=0
+ system_asio=1
+ )
+}
+
+src_compile() {
+ escons --warn=no-missing-sconscript "${MYSCONS[@]}"
+}
+
+src_install() {
+ dodoc scripts/packages/README scripts/packages/README-MySQL
+ if use garbd ; then
+ dobin garb/garbd
+ newconfd "${FILESDIR}/garb.cnf" garbd
+ newinitd "${FILESDIR}/garb.sh" garbd
+ doman man/garbd.8
+ fi
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe libgalera_smm.so
+}
diff --git a/sys-cluster/galera/galera-25.3.21.ebuild b/sys-cluster/galera/galera-25.3.21.ebuild
new file mode 100644
index 000000000000..b81600aef42d
--- /dev/null
+++ b/sys-cluster/galera/galera-25.3.21.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="${PN}-3-${PV}"
+
+inherit scons-utils toolchain-funcs user flag-o-matic
+DESCRIPTION="Synchronous multi-master replication engine that provides the wsrep API"
+HOMEPAGE="http://www.galeracluster.com"
+SRC_URI="http://releases.galeracluster.com/${PN}-3/source/galera-3-${PV}.tar.gz"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="cpu_flags_x86_sse4_2 garbd test"
+
+CDEPEND="
+ dev-libs/openssl:0=
+ >=dev-libs/boost-1.41:0=
+ "
+DEPEND="${DEPEND}
+ ${CDEPEND}
+ dev-libs/check
+ >=sys-devel/gcc-4.4
+ >=dev-cpp/asio-1.10.1[ssl]
+ "
+#Run time only
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+# Respect {C,LD}FLAGS.
+PATCHES=( "${FILESDIR}/galera-3.15-strip-extra-cflags.patch" )
+
+pkg_preinst() {
+ if use garbd ; then
+ enewgroup garbd
+ enewuser garbd -1 -1 -1 garbd
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Remove bundled dev-cpp/asio
+ rm -r "${S}/asio" || die
+
+ #Remove optional garbd daemon
+ if ! use garbd ; then
+ rm -r "${S}/garb" || die
+ fi
+}
+
+src_configure() {
+ tc-export CC CXX
+ # Uses hardware specific code that seems to depend on SSE4.2
+ if use cpu_flags_x86_sse4_2 ; then
+ append-cflags -msse4.2
+ else
+ append-cflags -DCRC32C_NO_HARDWARE
+ fi
+ # strict_build_flags=0 disables -Werror, -pedantic, -Weffc++,
+ # and -Wold-style-cast
+ MYSCONS=(
+ ssl=1
+ tests=$(usex test 1 0)
+ strict_build_flags=0
+ system_asio=1
+ )
+}
+
+src_compile() {
+ escons --warn=no-missing-sconscript "${MYSCONS[@]}"
+}
+
+src_install() {
+ dodoc scripts/packages/README scripts/packages/README-MySQL
+ if use garbd ; then
+ dobin garb/garbd
+ newconfd "${FILESDIR}/garb.cnf" garbd
+ newinitd "${FILESDIR}/garb.sh" garbd
+ doman man/garbd.8
+ fi
+ exeinto /usr/$(get_libdir)/${PN}
+ doexe libgalera_smm.so
+}
diff --git a/sys-cluster/galera/metadata.xml b/sys-cluster/galera/metadata.xml
new file mode 100644
index 000000000000..d112cf6ef2bb
--- /dev/null
+++ b/sys-cluster/galera/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+ </maintainer>
+ <use>
+ <flag name="garbd">Install Galera Arbitrator - a stateless daemon which acts as a lightweight group member</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">galera</remote-id>
+ </upstream>
+</pkgmetadata>