mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
New port: databases/galera26
Galera v26 wsrep provider library for Galera Cluster for MySQL, an easy-to-use high-availability solution with high system up-time, no data loss, and scalability for future growth. WWW: https://galeracluster.com/ PR: 240483 Submitted by: Nicolas Embriz <nbari@tequila.io>
This commit is contained in:
parent
f75e355c71
commit
3672272692
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=511838
@ -91,6 +91,7 @@
|
||||
SUBDIR += frontbase-jdbc
|
||||
SUBDIR += gadfly
|
||||
SUBDIR += galera
|
||||
SUBDIR += galera26
|
||||
SUBDIR += gdbm
|
||||
SUBDIR += geoserver-mysql-plugin
|
||||
SUBDIR += gigabase
|
||||
|
71
databases/galera26/Makefile
Normal file
71
databases/galera26/Makefile
Normal file
@ -0,0 +1,71 @@
|
||||
# Created by: Nicolas Embriz <nbari@tequila.io>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= galera
|
||||
PORTVERSION= 26.4.2
|
||||
DISTVERSIONPREFIX= release_
|
||||
CATEGORIES= databases
|
||||
PKGNAMESUFFIX= 26
|
||||
|
||||
MAINTAINER= devel@galeracluster.com
|
||||
COMMENT= Synchronous multi-master replication engine
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
BROKEN_aarch64= fails to compile: gu_int128.h: use of undeclared identifier '__bswap64_var'
|
||||
BROKEN_armv6= fails to compile: gu_int128.h: use of undeclared identifier '__bswap64_var'
|
||||
BROKEN_armv7= fails to compile: gu_int128.h: use of undeclared identifier '__bswap64_var'
|
||||
NOT_FOR_ARCHS= i386
|
||||
# On i386 older versions of clang produce:
|
||||
# cannot compile this atomic library call yet ... __atomic_add_fetch
|
||||
# whereas newer ones generate a call to __atomic_add_fetch which ends up with
|
||||
# undefined reference at link time:
|
||||
# undefined reference to `__atomic_fetch_add_8'
|
||||
# https://bugs.llvm.org//show_bug.cgi?id=23262
|
||||
# https://bugs.llvm.org//show_bug.cgi?id=24908
|
||||
# https://tracker.crystax.net/issues/1263
|
||||
NOT_FOR_ARCHS_REASON_i386=Uses 64 bit atomics that clang cannot generate on i386
|
||||
|
||||
BUILD_DEPENDS= checkmk:devel/check \
|
||||
${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs
|
||||
LIB_DEPENDS= libboost_date_time.so:devel/boost-libs
|
||||
|
||||
USES= compiler:c++11-lang python:build scons ssl
|
||||
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_TUPLE?= codership:galera:${DISTVERSIONPREFIX}${PORTVERSION}${DISTVERSIONSUFFIX} \
|
||||
codership:wsrep-API:75a5f452f2ba07b0f4a3a9a94825fccc71b27398:dummy/wsrep/src
|
||||
|
||||
LDFLAGS+= -lboost_program_options -lboost_system
|
||||
MAKE_ARGS+= revno=${GH_TAGNAME} system_asio=0 tests=0
|
||||
|
||||
USE_RC_SUBR= garb.sh
|
||||
|
||||
# Abuse TEST_TARGET to append tests=1 (which is not a target, strictly
|
||||
# speaking) at the end of the "scons ..." command so that it overrides
|
||||
# tests=0 from ${MAKE_ARGS}. To rerun the tests a second time, remove
|
||||
# all *.passed files: find ./work -name *.passed -print -delete
|
||||
TEST_TARGET= deterministic_tests=1 tests=1
|
||||
|
||||
PLIST_FILES= bin/garbd \
|
||||
lib/libgalera.so \
|
||||
lib/libgalera_smm.so
|
||||
|
||||
OPTIONS_DEFINE= BOOSTPOOL BPOSTATIC DEBUG
|
||||
|
||||
BOOSTPOOL_DESC= Use boost pool allocator
|
||||
BPOSTATIC_DESC= Use static boost_program_options
|
||||
|
||||
BOOSTPOOL_MAKE_ARGS= boost_pool=1
|
||||
BPOSTATIC_MAKE_ARGS= bpostatic=${LOCALBASE}/lib/libboost_program_options.a
|
||||
DEBUG_MAKE_ARGS= debug=0
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/garb/garbd ${STAGEDIR}${PREFIX}/bin/
|
||||
${INSTALL_LIB} ${WRKSRC}/libgalera_smm.so ${STAGEDIR}${PREFIX}/lib/
|
||||
@(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -sf libgalera_smm.so \
|
||||
libgalera.so)
|
||||
|
||||
.include <bsd.port.mk>
|
5
databases/galera26/distinfo
Normal file
5
databases/galera26/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
TIMESTAMP = 1568151779
|
||||
SHA256 (codership-galera-release_26.4.2_GH0.tar.gz) = 367ff81e52d2b3c95e8bf2092616f7d1dcfb9723a91fa13e7e5a7b4573f7dcd1
|
||||
SIZE (codership-galera-release_26.4.2_GH0.tar.gz) = 3397996
|
||||
SHA256 (codership-wsrep-API-75a5f452f2ba07b0f4a3a9a94825fccc71b27398_GH0.tar.gz) = ac782d33d84a874d89bbe4eeb818ab56ae729aee4c491f91892694a2e134c558
|
||||
SIZE (codership-wsrep-API-75a5f452f2ba07b0f4a3a9a94825fccc71b27398_GH0.tar.gz) = 50214
|
95
databases/galera26/files/garb.sh.in
Normal file
95
databases/galera26/files/garb.sh.in
Normal file
@ -0,0 +1,95 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# garb.sh for rc.d usage (c) 2013 Codership Oy
|
||||
# $Id$
|
||||
|
||||
# PROVIDE: garb
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable Galera Arbitrator Daemon (garbd):
|
||||
# garb_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable Galera Arbitrator Daemon.
|
||||
# garb_galera_nodes (str): A space-separated list of node addresses (address[:port]) in the cluster
|
||||
# (default empty).
|
||||
# garb_galera_group (str): Galera cluster name, should be the same as on the rest of the nodes.
|
||||
# (default empty).
|
||||
# Optional:
|
||||
# garb_galera_options (str): Optional Galera internal options string (e.g. SSL settings)
|
||||
# see http://www.codership.com/wiki/doku.php?id=galera_parameters
|
||||
# (default empty).
|
||||
# garb_log_file (str): Log file for garbd (default empty). Optional, by default logs to syslog
|
||||
# garb_pid_file (str): Custum PID file path and name.
|
||||
# Default to "/var/run/garb.pid".
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="garb"
|
||||
rcvar=garb_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
# set defaults
|
||||
: ${garb_enable="NO"}
|
||||
: ${garb_galera_nodes=""}
|
||||
: ${garb_galera_group=""}
|
||||
: ${garb_galera_options=""}
|
||||
: ${garb_log_file=""}
|
||||
: ${garb_pid_file="/var/run/garbd"}
|
||||
|
||||
procname="/usr/local/bin/garbd"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-c -f -u nobody -p $garb_pid_file $procname"
|
||||
start_precmd="${name}_prestart"
|
||||
#start_cmd="${name}_start"
|
||||
start_postcmd="${name}_poststart"
|
||||
stop_precmd="${name}_prestop"
|
||||
#stop_cmd="${name}_stop"
|
||||
#stop_postcmd="${name}_poststop"
|
||||
#extra_commands="reload"
|
||||
#reload_cmd="${name}_reload"
|
||||
#export LD_LIBRARY_PATH=/usr/local/lib/gcc44
|
||||
|
||||
garb_prestart()
|
||||
{
|
||||
[ "$(id -ur)" != "0" ] && err 4 "root rights are required to start $name"
|
||||
[ -r "$garb_pid_file" ] && err 0 "$procname is already running with PID $(cat $garb_pid_file)"
|
||||
[ -x "$procname" ] || err 5 "$procname is not found"
|
||||
|
||||
# check that node addresses are configured
|
||||
[ -z "$garb_galera_nodes" ] && err 6 "List of garb_galera_nodes is not configured"
|
||||
[ -z "$garb_galera_group" ] && err 6 "garb_galera_group name is not configured"
|
||||
|
||||
GALERA_PORT=${GALERA_PORT:-4567}
|
||||
|
||||
# Concatenate all nodes in the list (for backward compatibility)
|
||||
ADDRESS=
|
||||
for NODE in ${garb_galera_nodes}; do
|
||||
[ -z "$ADDRESS" ] && ADDRESS="$NODE" || ADDRESS="$ADDRESS,$NODE"
|
||||
done
|
||||
|
||||
command_args="$command_args -a gcomm://$ADDRESS"
|
||||
[ -n "$garb_galera_group" ] && command_args="$command_args -g $garb_galera_group"
|
||||
[ -n "$garb_galera_options" ] && command_args="$command_args -o $garb_galera_options"
|
||||
[ -n "$garb_log_file" ] && command_args="$command_args -l $garb_log_file"
|
||||
return 0
|
||||
}
|
||||
|
||||
garb_poststart()
|
||||
{
|
||||
local timeout=15
|
||||
while [ ! -f "$garb_pid_file" -a $timeout -gt 0 ]; do
|
||||
timeout=$(( timeout - 1 ))
|
||||
sleep 1
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
garb_prestop() {
|
||||
[ "$(id -ur)" != "0" ] && err 4 "root rights are required to stop $name"
|
||||
[ -r $garb_pid_file ] || err 0 ""
|
||||
return 0
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
5
databases/galera26/pkg-descr
Normal file
5
databases/galera26/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Galera v26 wsrep provider library for Galera Cluster for MySQL, an
|
||||
easy-to-use high-availability solution with high system up-time,
|
||||
no data loss, and scalability for future growth.
|
||||
|
||||
WWW: https://galeracluster.com/
|
8
databases/galera26/pkg-message
Normal file
8
databases/galera26/pkg-message
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
Find the Galera Cluster documentation at
|
||||
http://galeracluster.com/documentation-webpages/
|
||||
EOM
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue
Block a user