diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/galera | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/galera')
-rw-r--r-- | sys-cluster/galera/Manifest | 2 | ||||
-rw-r--r-- | sys-cluster/galera/files/disable-tests.patch | 80 | ||||
-rw-r--r-- | sys-cluster/galera/files/galera-strip-machine-cflags.patch | 62 | ||||
-rw-r--r-- | sys-cluster/galera/files/garb.cnf | 17 | ||||
-rw-r--r-- | sys-cluster/galera/files/garb.sh | 63 | ||||
-rw-r--r-- | sys-cluster/galera/files/respect-flags.patch | 35 | ||||
-rw-r--r-- | sys-cluster/galera/galera-25.3.10.ebuild | 95 | ||||
-rw-r--r-- | sys-cluster/galera/galera-25.3.5.ebuild | 87 | ||||
-rw-r--r-- | sys-cluster/galera/metadata.xml | 11 |
9 files changed, 452 insertions, 0 deletions
diff --git a/sys-cluster/galera/Manifest b/sys-cluster/galera/Manifest new file mode 100644 index 000000000000..c23d3fc9a5b0 --- /dev/null +++ b/sys-cluster/galera/Manifest @@ -0,0 +1,2 @@ +DIST galera-25.3.10.tar.gz 2950372 SHA256 33a749f71e478d068982845524a44fe18d1c59c168e1fee8b92baca763982b2d SHA512 c08420b72e446c93645012ec04465c4cb65152bd3eaa840142fafdcb6945f76e77e2be00cf68930227656b78c25cd5ce36ebe823d6fcbcd320e6ae91b3b38a5c WHIRLPOOL 87a271f3e03de3da70cb302ff6559c70d65097b1b639b8ae1501afe0ef9328bc746ae828daac8cc5cbd4ef0f8cd861a72739d7154709f3122d7bb4e1f3ab57bd +DIST galera-25.3.5-src.tar.gz 3820268 SHA256 9e6d718bac9608c69cbfc0662963b29c13659c576aaa8469b6a325d75603f7a3 SHA512 34bd01c46b080219106e140a7ff011c39ce2c9afaf6b8205daca91347ac3979a3af61bcddaf9c5cc63748b19236a2e4efa88532760b347fefa38e037f90b0995 WHIRLPOOL 055a59cc3631ccb0501c2ce4c5812ae0e001104254a97540f78a3f8feaed94b85bd82ecc3e1e4a3c2e477ab6f02d638dc8e8ea1471b8a63ca603f3a9ecd6403d diff --git a/sys-cluster/galera/files/disable-tests.patch b/sys-cluster/galera/files/disable-tests.patch new file mode 100644 index 000000000000..b82294b32241 --- /dev/null +++ b/sys-cluster/galera/files/disable-tests.patch @@ -0,0 +1,80 @@ +diff -aurN a/galera/SConscript b/galera/SConscript +--- a/galera/SConscript 2013-03-11 02:44:50.000000000 -0400 ++++ b/galera/SConscript 2013-05-13 13:13:20.851827437 -0400 +@@ -1,2 +1,2 @@ + +-SConscript(['src/SConscript', 'tests/SConscript']) ++SConscript(['src/SConscript']) +diff -aurN a/galerautils/SConscript b/galerautils/SConscript +--- a/galerautils/SConscript 2013-03-11 02:44:50.000000000 -0400 ++++ b/galerautils/SConscript 2013-05-13 13:15:37.010071765 -0400 +@@ -1,3 +1,3 @@ + # SConscript for building galerautils + +-SConscript(Split('''src/SConscript tests/SConscript''')) ++SConscript(Split('''src/SConscript''')) +diff -aurN a/gcache/SConscript b/gcache/SConscript +--- a/gcache/SConscript 2013-03-11 02:44:50.000000000 -0400 ++++ b/gcache/SConscript 2013-05-13 13:15:55.179837389 -0400 +@@ -1,3 +1,3 @@ + # SConscript for building galerautils + +-SConscript(Split('''src/SConscript tests/SConscript''')) ++SConscript(Split('''src/SConscript''')) +diff -aurN a/gcomm/SConscript b/gcomm/SConscript +--- a/gcomm/SConscript 2013-03-11 02:44:50.000000000 -0400 ++++ b/gcomm/SConscript 2013-05-13 13:16:08.979659369 -0400 +@@ -1,3 +1,3 @@ + # SCons build script for building gcomm + +-SConscript(Split('''src/SConscript test/SConscript''')) ++SConscript(Split('''src/SConscript''')) +diff -aurN a/gcs/src/SConscript b/gcs/src/SConscript +--- a/gcs/src/SConscript 2013-03-11 02:44:50.000000000 -0400 ++++ b/gcs/src/SConscript 2013-05-13 13:12:53.122184848 -0400 +@@ -46,8 +46,6 @@ + source = 'gcs_test.c', + LINK = libgcs_env['CXX']) + +-SConscript('unit_tests/SConscript') +- + # + env.Append(LIBGALERA_OBJS = libgcs_env.SharedObject(libgcs_sources)) + +diff -aurN a/SConstruct b/SConstruct +--- a/SConstruct 2013-03-11 02:44:50.000000000 -0400 ++++ b/SConstruct 2013-05-13 13:11:03.493597370 -0400 +@@ -305,20 +305,6 @@ + # Clone base from default environment + check_env = env.Clone() + +-conf = Configure(check_env) +- +-# Check header and library +- +-if not conf.CheckHeader('check.h'): +- print 'Error: check header file not found or not usable' +- Exit(1) +- +-if not conf.CheckLib('check'): +- print 'Error: check library not found or not usable' +- Exit(1) +- +-conf.Finish() +- + # Note: Don't do this, glibc does not like static linking + # Link unit tests statically + # check_env.Append(LINKFLAGS = ' -static') +@@ -328,11 +314,7 @@ + # + + def builder_unit_test(target, source, env): +- app = str(source[0].abspath) +- if os.spawnl(os.P_WAIT, app, app)==0: +- open(str(target[0]),'w').write("PASSED\n") +- else: +- return 1 ++ print("Disabled\n") + # Create a builder for tests + bld = Builder(action = builder_unit_test) + check_env.Append(BUILDERS = {'Test' : bld}) diff --git a/sys-cluster/galera/files/galera-strip-machine-cflags.patch b/sys-cluster/galera/files/galera-strip-machine-cflags.patch new file mode 100644 index 000000000000..5aca0f709f44 --- /dev/null +++ b/sys-cluster/galera/files/galera-strip-machine-cflags.patch @@ -0,0 +1,62 @@ +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() + +@@ -33,21 +33,6 @@ + crc32c_sources = [ '#/www.evanjones.ca/crc32c.c' ] + crc32c_objs = crc32c_env.SharedObject(crc32c_sources) + +-if x86 != 0: +- 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-04-07 14:53:59.810301200 -0400 ++++ b/SConstruct 2015-04-07 14:54:48.700301200 -0400 +@@ -87,27 +87,6 @@ + opt_flags = opt_flags + ' -DGU_DBUG_ON' + + +-if x86 == 32: +- compile_arch = ' -m32 -march=i686' +- link_arch = compile_arch +- if sysname == 'linux': +- link_arch = link_arch + ' -Wl,-melf_i386' +-elif x86 == 64 and sysname != 'sunos': +- compile_arch = ' -m64' +- link_arch = compile_arch +- if sysname == 'linux': +- link_arch = link_arch + ' -Wl,-melf_x86_64' +-elif machine == 'ppc64': +- compile_arch = ' -mtune=native' +- link_arch = '' +-elif sysname == 'sunos': +- compile_arch = ' -mtune=native' +- link_arch = '' +-else: +- compile_arch = '' +- link_arch = '' +- +- + 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..4f0047a02c25 --- /dev/null +++ b/sys-cluster/galera/files/garb.cnf @@ -0,0 +1,17 @@ +# 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="" + +# 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..63e88dff5cdf --- /dev/null +++ b/sys-cluster/galera/files/garb.sh @@ -0,0 +1,63 @@ +#!/sbin/runscript +# Copyright 1999-2014 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}" + + for ADDRESS in ${GALERA_NODES} 0; do + HOST=$(echo $ADDRESS | cut -d \: -f 1 ) + PORT=$(echo $ADDRESS | cut -d \: -f 2 ) + if [ "x${HOST}" = "x${PORT}" ]; then + PORT=${GALERA_PORT} + fi + PORT=${PORT:-$GALERA_PORT} + nc -z ${HOST} ${PORT} > /dev/null && break + done + if [ ${ADDRESS} = "0" ]; then + eerror "None of the nodes in GALERA_NODES is accessible" + return 1 + fi + + OPTIONS="-a gcomm://${ADDRESS} -g ${GALERA_GROUP}" + [ -n "${GALERA_OPTIONS}" ] && OPTIONS="${OPTIONS} -o ${GALERA_OPTIONS}" + [ -n "${LOG_FILE}" ] && OPTIONS="${OPTIONS} -l ${LOG_FILE}" + + 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/files/respect-flags.patch b/sys-cluster/galera/files/respect-flags.patch new file mode 100644 index 000000000000..d7e5f37817ef --- /dev/null +++ b/sys-cluster/galera/files/respect-flags.patch @@ -0,0 +1,35 @@ +--- a/SConstruct 2014-03-07 14:27:26.797904671 -0500 ++++ b/SConstruct 2014-03-07 14:31:18.672478115 -0500 +@@ -49,7 +49,7 @@ + build_target = 'all' + + # Optimization level +-opt_flags = ' -g -O3 -DNDEBUG' ++opt_flags = ' -DNDEBUG' + + # Architecture (defaults to build host type) + compile_arch = '' +@@ -214,12 +214,12 @@ + ' -Wall -Wextra -Wno-unused-parameter') + + # C-specific flags +-env.Replace(CFLAGS = ' -std=c99 -fno-strict-aliasing -pipe') ++env.Replace(CFLAGS = os.getenv('CFLAGS','') + ' -std=c99 -fno-strict-aliasing -pipe') + + # CXX-specific flags + # Note: not all 3rd-party libs like '-Wold-style-cast -Weffc++' + # adding those after checks +-env.Replace(CXXFLAGS = ' -Wno-long-long -Wno-deprecated -ansi') ++env.Replace(CXXFLAGS = os.getenv('CXXFLAGS','') + ' -Wno-long-long -Wno-deprecated -ansi') + if sysname != 'sunos': + env.Append(CXXFLAGS = ' -pipe') + +@@ -228,7 +228,7 @@ + # TODO: enable '-Wl,--warn-common -Wl,--fatal-warnings' after warnings from + # static linking have beed addressed + # +-env.Append(LINKFLAGS = link_arch) ++env.Append(LINKFLAGS = link_arch + ' ' + os.getenv('LDFLAGS','')) + + # + # Check required headers and libraries (autoconf functionality) diff --git a/sys-cluster/galera/galera-25.3.10.ebuild b/sys-cluster/galera/galera-25.3.10.ebuild new file mode 100644 index 000000000000..91d7bbb18b02 --- /dev/null +++ b/sys-cluster/galera/galera-25.3.10.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit scons-utils multilib toolchain-funcs eutils user flag-o-matic + +MY_PV="release_${PV}" +DESCRIPTION="Synchronous multi-master replication engine that provides its service through wsrep API" +HOMEPAGE="http://www.galeracluster.com/" +SRC_URI="https://github.com/codership/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" +LICENSE="GPL-2 BSD" + +SLOT="0" + +KEYWORDS="~amd64 ~x86" +IUSE="cpu_flags_x86_sse4_2 garbd ssl test" + +CDEPEND=" + ssl? ( 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.4.8[ssl?] + " +#Run time only +RDEPEND="${CDEPEND} + garbd? ( || ( + net-analyzer/netcat + net-analyzer/netcat6 + net-analyzer/gnu-netcat + net-analyzer/openbsd-netcat + ) )" + +S="${WORKDIR}/${PN}-${MY_PV}" + +pkg_preinst() { + if use garbd ; then + enewgroup garbd + enewuser garbd -1 -1 -1 garbd + fi +} + +src_prepare() { + # Remove bundled dev-cpp/asio + rm -r "${S}/asio" || die + + # Respect {C,LD}FLAGS and remove machine specific CFLAGS + epatch "${FILESDIR}/respect-flags.patch" \ + "${FILESDIR}/galera-strip-machine-cflags.patch" + + #Remove optional garbd daemon + if ! use garbd ; then + rm -r "${S}/garb" || die + fi + + epatch_user +} + +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 + myesconsargs=( + $(use_scons ssl ssl 1 0) + $(use_scons test tests 1 0) + strict_build_flags=0 + ) +} + +src_compile() { + escons --warn=no-missing-sconscript +} + +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.5.ebuild b/sys-cluster/galera/galera-25.3.5.ebuild new file mode 100644 index 000000000000..5a3472d3563f --- /dev/null +++ b/sys-cluster/galera/galera-25.3.5.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_P="${PN}-${PV}-src" + +inherit scons-utils multilib toolchain-funcs base versionator eutils user flag-o-matic +DESCRIPTION="Synchronous multi-master replication engine that provides its service through wsrep API" +HOMEPAGE="http://www.codership.org/" +SRC_URI="https://launchpad.net/${PN}/$(get_version_component_range 2).x/${PV}/+download/${MY_P}.tar.gz" +LICENSE="GPL-2 BSD" + +SLOT="0" + +KEYWORDS="~amd64 ~x86" +IUSE="garbd ssl test" + +CDEPEND=" + ssl? ( dev-libs/openssl:0= ) + >=dev-libs/boost-1.41 + " +DEPEND="${DEPEND} + ${CDEPEND} + dev-libs/check + >=sys-devel/gcc-4.4 + >=dev-cpp/asio-1.4.8[ssl?] + " +#Run time only +RDEPEND="${CDEPEND} + garbd? ( || ( + net-analyzer/netcat + net-analyzer/netcat6 + net-analyzer/gnu-netcat + net-analyzer/openbsd-netcat + ) )" + +S="${WORKDIR}/${MY_P}" + +pkg_preinst() { + if use garbd ; then + enewgroup garbd + enewuser garbd -1 -1 -1 garbd + fi +} + +src_prepare() { + # Remove bundled dev-cpp/asio + rm -r "${S}/asio" || die + + # Respect {C,LD}FLAGS. + epatch "${FILESDIR}/respect-flags.patch" + + #Remove optional garbd daemon + if ! use garbd ; then + rm -r "${S}/garb" || die + fi + + epatch_user +} + +src_configure() { + tc-export CC CXX + # strict_build_flags=0 disables -Werror, -pedantic, -Weffc++, + # and -Wold-style-cast + myesconsargs=( + $(use_scons ssl ssl 1 0) + $(use_scons test tests 1 0) + strict_build_flags=0 + ) +} + +src_compile() { + escons --warn=no-missing-sconscript +} + +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 + 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..b4af621f040a --- /dev/null +++ b/sys-cluster/galera/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mysql</herd> + <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> |