mariadbbuilder_pel7x64builder0
6 years ago
8 changed files with 220 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||||||
|
--- galera-3-25.3.12/galerautils/src/gu_alloc.hpp 2015-08-27 09:32:41.000000000 +0200 |
||||||
|
+++ galera-3-25.3.12/galerautils/src/gu_alloc.hpp 2016-02-22 20:37:20.360009549 +0100 |
||||||
|
@@ -159,7 +159,7 @@ |
||||||
|
private: |
||||||
|
|
||||||
|
/* to avoid too frequent allocation, make it 64K */ |
||||||
|
- static page_size_type const PAGE_SIZE = GU_PAGE_SIZE * 16; |
||||||
|
+ static page_size_type const PAGE_SIZE = GU_PAGE_SIZE * GU_PAGE_MULTIPLIER; |
||||||
|
|
||||||
|
heap_size_type left_; |
||||||
|
|
@ -0,0 +1,16 @@ |
|||||||
|
--- galera-3-25.3.12/galerautils/src/gu_limits.h 2015-08-27 09:32:41.000000000 +0200 |
||||||
|
+++ galera-3-25.3.12/galerautils/src/gu_limits.h 2016-02-22 20:32:50.566502280 +0100 |
||||||
|
@@ -40,7 +40,13 @@ |
||||||
|
|
||||||
|
/* We need this as a compile-time constant. Runtime check is implemented |
||||||
|
* in gu_init.c */ |
||||||
|
+#if defined(__powerpc__) |
||||||
|
+#define GU_PAGE_SIZE 65536 |
||||||
|
+#define GU_PAGE_MULTIPLIER 1 |
||||||
|
+#else |
||||||
|
#define GU_PAGE_SIZE 4096 |
||||||
|
+#define GU_PAGE_MULTIPLIER 16 |
||||||
|
+#endif |
||||||
|
|
||||||
|
static inline size_t gu_avphys_bytes() |
||||||
|
{ |
@ -0,0 +1,18 @@ |
|||||||
|
--- galera-3-25.3.12/galerautils/src/SConscript 2015-08-27 09:32:41.000000000 +0200 |
||||||
|
+++ galera-3-25.3.12/galerautils/src/SConscript 2016-02-22 20:42:30.814045399 +0100 |
||||||
|
@@ -1,4 +1,4 @@ |
||||||
|
-Import('env', 'x86', 'sysname') |
||||||
|
+Import('env', 'x86', 'sysname', 'machine') |
||||||
|
|
||||||
|
libgalerautils_env = env.Clone() |
||||||
|
|
||||||
|
@@ -40,7 +40,8 @@ |
||||||
|
crc32c_objs = crc32c_env.SharedObject(crc32c_sources) |
||||||
|
|
||||||
|
if x86: |
||||||
|
- crc32c_env.Append(CFLAGS = ' -msse4.2') |
||||||
|
+ if machine != 'ppc64' and machine != 'ppc64le': |
||||||
|
+ crc32c_env.Append(CFLAGS = ' -msse4.2') |
||||||
|
if sysname == 'sunos': |
||||||
|
# Ideally we want to simply strip SSE4.2 flag from the resulting |
||||||
|
# crc32.pic.o |
@ -0,0 +1,24 @@ |
|||||||
|
--- galera-3-25.3.12/SConstruct 2016-02-22 16:57:44.346496836 +0100 |
||||||
|
+++ galera-3-25.3.12/SConstruct 2016-02-22 23:29:20.325225818 +0100 |
||||||
|
@@ -101,6 +101,12 @@ |
||||||
|
link_arch = compile_arch |
||||||
|
if sysname == 'linux': |
||||||
|
link_arch = link_arch + ' -Wl,-melf_x86_64' |
||||||
|
+elif machine == 'ppc64': |
||||||
|
+ compile_arch = ' -m64 -fsigned-char -mcpu=power8 -mtune=power8 -mpower8-fusion -mvsx -mpower8-vector -mcrypto -maltivec -mpowerpc-gpopt -mpowerpc-gfxopt' |
||||||
|
+ link_arch = link_arch + ' -Wl,-melf64ppc' |
||||||
|
+elif machine == 'ppc64le': |
||||||
|
+ compile_arch = ' -m64 -fsigned-char -mcpu=power8 -mtune=power8 -mpower8-fusion -mvsx -mpower8-vector -mcrypto -maltivec -mpowerpc-gpopt -mpowerpc-gfxopt' |
||||||
|
+ link_arch = link_arch + ' -Wl,-melf64lppc' |
||||||
|
elif machine == 's390x': |
||||||
|
compile_arch = ' -mzarch -march=z196 -mtune=zEC12' |
||||||
|
link_arch = '' |
||||||
|
@@ -405,7 +411,7 @@ |
||||||
|
|
||||||
|
env = conf.Finish() |
||||||
|
|
||||||
|
-Export('x86', 'bits', 'env', 'sysname', 'libboost_program_options') |
||||||
|
+Export('x86', 'bits', 'env', 'sysname', 'machine', 'libboost_program_options') |
||||||
|
|
||||||
|
# |
||||||
|
# Actions to build .dSYM directories, containing debugging information for Darwin |
@ -0,0 +1,38 @@ |
|||||||
|
#!/usr/bin/sh |
||||||
|
# This script is simple wrapper around garbd, that parses startup configuration. |
||||||
|
# Its main purpose is to bridge the differences between initscript and systemd unit file. |
||||||
|
|
||||||
|
CONFIG_FILE=/etc/sysconfig/garb |
||||||
|
|
||||||
|
source $CONFIG_FILE |
||||||
|
|
||||||
|
# Check that node addresses and group name are configured |
||||||
|
if [ -z "$GALERA_NODES" ]; then |
||||||
|
echo "List of GALERA_NODES is not configured" >&2 |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
if [ -z "$GALERA_GROUP" ]; then |
||||||
|
echo "GALERA_GROUP name is not configured" >&2 |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
GALERA_PORT=${GALERA_PORT:-4567} |
||||||
|
|
||||||
|
# Find a working node |
||||||
|
for ADDRESS in ${GALERA_NODES} 0; do |
||||||
|
HOST=$(echo $ADDRESS | cut -d \: -f 1) |
||||||
|
PORT=$(echo $ADDRESS | cut -s -d \: -f 2) |
||||||
|
PORT=${PORT:-$GALERA_PORT} |
||||||
|
ncat --send-only --recv-only $HOST $PORT >/dev/null && break |
||||||
|
done |
||||||
|
if [ ${ADDRESS} == "0" ]; then |
||||||
|
echo "None of the nodes in GALERA_NODES is accessible" >&2 |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
OPTIONS="-a gcomm://$ADDRESS" |
||||||
|
[ -n "$GALERA_GROUP" ] && OPTIONS="$OPTIONS -g $GALERA_GROUP" |
||||||
|
[ -n "$GALERA_OPTIONS" ] && OPTIONS="$OPTIONS -o $GALERA_OPTIONS" |
||||||
|
[ -n "$LOG_FILE" ] && OPTIONS="$OPTIONS -l $LOG_FILE" |
||||||
|
|
||||||
|
exec /usr/sbin/garbd $OPTIONS |
@ -0,0 +1,10 @@ |
|||||||
|
[Unit] |
||||||
|
Description=Galera Arbitrator Daemon |
||||||
|
Documentation=http://www.codership.com/wiki/doku.php?id=galera_arbitrator |
||||||
|
|
||||||
|
[Service] |
||||||
|
ExecStart=/usr/sbin/garbd-wrapper |
||||||
|
ExecReload=/bin/kill -HUP $MAINPID |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
@ -0,0 +1,11 @@ |
|||||||
|
|
||||||
|
module mariadbgaleracluster 1.0; |
||||||
|
|
||||||
|
require { |
||||||
|
type mysqld_t; |
||||||
|
class process setpgid; |
||||||
|
} |
||||||
|
|
||||||
|
#============= mysqld_t ============== |
||||||
|
allow mysqld_t self:process setpgid; |
||||||
|
|
@ -0,0 +1,92 @@ |
|||||||
|
Name: galera |
||||||
|
Version: 25.3.12 |
||||||
|
Release: 6%{?dist} |
||||||
|
Summary: Synchronous multi-master wsrep provider (replication engine) |
||||||
|
License: GPLv2 |
||||||
|
URL: http://galeracluster.com/ |
||||||
|
Source0: http://releases.galeracluster.com/source/%{name}-3-%{version}.tar.gz |
||||||
|
Source1: garbd.service |
||||||
|
Source2: garbd-wrapper |
||||||
|
Source3: mariadbgaleracluster.te |
||||||
|
Patch0: galera-powerel-sconstruct.patch |
||||||
|
Patch1: galera-powerel-pagesize.patch |
||||||
|
Patch2: galera-powerel-multiplexer.patch |
||||||
|
Patch3: galera-powerel-sconscript-sse42.patch |
||||||
|
BuildRequires: boost-devel check-devel openssl-devel scons systemd |
||||||
|
Requires: nmap-ncat |
||||||
|
Requires(post): systemd |
||||||
|
Requires(preun): systemd |
||||||
|
Requires(postun): systemd |
||||||
|
|
||||||
|
|
||||||
|
%description |
||||||
|
Galera is a fast synchronous multi-master wsrep provider (replication engine) |
||||||
|
for transactional databases and similar applications. For more information |
||||||
|
about wsrep API see http://launchpad.net/wsrep. For a description of Galera |
||||||
|
replication engine see http://www.codership.com. |
||||||
|
|
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -q -n %{name}-3-%{version} |
||||||
|
%patch0 -p1 |
||||||
|
%patch1 -p1 |
||||||
|
%patch2 -p1 |
||||||
|
%patch3 -p1 |
||||||
|
%{__cp} %{SOURCE3} . |
||||||
|
|
||||||
|
%build |
||||||
|
export CPPFLAGS="%{optflags} -fPIC" |
||||||
|
scons %{?_smp_mflags} strict_build_flags=0 |
||||||
|
checkmodule -M -m -o mariadbgaleracluster.mod %{SOURCE3} |
||||||
|
semodule_package -o mariadbgaleracluster.pp -m mariadbgaleracluster.mod |
||||||
|
|
||||||
|
|
||||||
|
%install |
||||||
|
install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/garbd.service |
||||||
|
install -D -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/garbd-wrapper |
||||||
|
install -D -m 755 garb/garbd %{buildroot}%{_sbindir}/garbd |
||||||
|
install -D -m 755 libgalera_smm.so %{buildroot}%{_libdir}/galera/libgalera_smm.so |
||||||
|
install -D -m 644 garb/files/garb.cnf %{buildroot}%{_sysconfdir}/sysconfig/garb |
||||||
|
install -D -m 644 COPYING %{buildroot}%{_docdir}/galera/COPYING |
||||||
|
install -D -m 644 chromium/LICENSE %{buildroot}%{_docdir}/galera/LICENSE.chromium |
||||||
|
install -D -m 644 asio/LICENSE_1_0.txt %{buildroot}%{_docdir}/galera/LICENSE.asio |
||||||
|
install -D -m 644 www.evanjones.ca/LICENSE %{buildroot}%{_docdir}/galera/LICENSE.crc32 |
||||||
|
install -D -m 644 scripts/packages/README %{buildroot}%{_docdir}/galera/README |
||||||
|
install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/README-MySQL |
||||||
|
install -D -m 644 mariadbgaleracluster.pp %{buildroot}/etc/selinux/targeted/modules/active/modules/mariadbgaleracluster.pp |
||||||
|
|
||||||
|
|
||||||
|
%post |
||||||
|
/sbin/semodule -vi /etc/selinux/targeted/modules/active/modules/mariadbgaleracluster.pp |
||||||
|
/sbin/ldconfig |
||||||
|
%systemd_post garbd.service |
||||||
|
|
||||||
|
|
||||||
|
%preun |
||||||
|
%systemd_preun garbd.service |
||||||
|
|
||||||
|
|
||||||
|
%postun |
||||||
|
/sbin/ldconfig |
||||||
|
%systemd_postun_with_restart garbd.service |
||||||
|
|
||||||
|
|
||||||
|
%files |
||||||
|
%defattr(-,root,root,-) |
||||||
|
%config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb |
||||||
|
/etc/selinux/targeted/modules/active/modules/mariadbgaleracluster.pp |
||||||
|
%dir %{_docdir}/galera |
||||||
|
%dir %{_libdir}/galera |
||||||
|
%{_sbindir}/garbd |
||||||
|
%{_sbindir}/garbd-wrapper |
||||||
|
%{_unitdir}/garbd.service |
||||||
|
%{_libdir}/galera/libgalera_smm.so |
||||||
|
%doc %{_docdir}/galera/COPYING |
||||||
|
%doc %{_docdir}/galera/LICENSE.asio |
||||||
|
%doc %{_docdir}/galera/LICENSE.crc32 |
||||||
|
%doc %{_docdir}/galera/LICENSE.chromium |
||||||
|
%doc %{_docdir}/galera/README |
||||||
|
%doc %{_docdir}/galera/README-MySQL |
||||||
|
|
||||||
|
|
||||||
|
%changelog |
Loading…
Reference in new issue