|
|
53b0e5 |
# Use main python interpretter version
|
|
|
53b0e5 |
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
53b0e5 |
%define __python /usr/bin/python3
|
|
|
53b0e5 |
%else
|
|
|
53b0e5 |
%define __python /usr/bin/python2
|
|
|
53b0e5 |
%endif
|
|
|
53b0e5 |
|
|
|
9852d1 |
%global scl rh-mariadb105
|
|
|
9852d1 |
%{?scl:%scl_package galera}
|
|
|
9852d1 |
%{!?scl:%global pkg_name %{name}}
|
|
|
9852d1 |
|
|
|
9852d1 |
%if 0%{?scl:1}
|
|
|
9852d1 |
%global scl_upper %{lua:print(string.upper(string.gsub(rpm.expand("%{scl}"), "-", "_")))}
|
|
|
9852d1 |
%endif
|
|
|
9852d1 |
|
|
|
53b0e5 |
|
|
|
9852d1 |
%global daemon_name %{?scl_prefix}garbd
|
|
|
9852d1 |
|
|
|
9852d1 |
Name: %{?scl_prefix}galera
|
|
|
1d9ac0 |
Version: 26.4.14
|
|
|
c97be2 |
Release: 1%{?dist}
|
|
|
9852d1 |
Summary: Synchronous multi-master wsrep provider (replication engine)
|
|
|
9852d1 |
|
|
|
9852d1 |
License: GPLv2
|
|
|
9852d1 |
URL: http://galeracluster.com/
|
|
|
9852d1 |
Source0: http://releases.galeracluster.com/source/%{pkg_name}-%{version}.tar.gz
|
|
|
9852d1 |
# Actually, the truth is, we do use patched galera source tarball provided by MariaDB on
|
|
|
9852d1 |
# following URL (without macros):
|
|
|
9852d1 |
# https://mirror.vpsfree.cz/mariadb/mariadb-10.4.11/galera-26.4.3/src/galera-26.4.3.tar.gz
|
|
|
9852d1 |
|
|
|
9852d1 |
Patch1: galera-paths.patch
|
|
|
9852d1 |
Patch2: galera-init-start.patch
|
|
|
53b0e5 |
Patch3: cmake_paths.patch
|
|
|
9852d1 |
|
|
|
9852d1 |
BuildRequires: boost-devel
|
|
|
53b0e5 |
BuildRequires: check-devel openssl-devel cmake systemd
|
|
|
9852d1 |
|
|
|
9852d1 |
Requires: nmap-ncat
|
|
|
53b0e5 |
Requires: procps-ng
|
|
|
53b0e5 |
|
|
|
9852d1 |
%{?systemd_requires}
|
|
|
9852d1 |
|
|
|
9852d1 |
%description
|
|
|
c97be2 |
Galera is a fast synchronous multimaster wsrep provider (replication engine)
|
|
|
9852d1 |
for transactional databases and similar applications. For more information
|
|
|
c97be2 |
about wsrep API see https://github.com/codership/wsrep-API repository. For a
|
|
|
c97be2 |
description of Galera replication engine see https://www.galeracluster.com web.
|
|
|
9852d1 |
|
|
|
9852d1 |
%prep
|
|
|
9852d1 |
%setup -q -n %{pkg_name}-%{version}
|
|
|
9852d1 |
%patch1 -p1 -b .p2
|
|
|
9852d1 |
%patch2 -p1
|
|
|
9852d1 |
%patch3 -p1
|
|
|
9852d1 |
|
|
|
9852d1 |
%build
|
|
|
9852d1 |
for f in garb/files/garb.sh garb/files/garb.service garb/files/garb-systemd ; do
|
|
|
9852d1 |
sed -i -e "s|@bindir@|%{_bindir}|g" \
|
|
|
9852d1 |
-e "s|@sbindir@|%{_sbindir}|g" \
|
|
|
9852d1 |
-e "s|@sysconfdir@|%{_sysconfdir}|g" \
|
|
|
9852d1 |
$f
|
|
|
9852d1 |
%if 0%{?scl:1}
|
|
|
9852d1 |
sed -i -e "s|@scl@|%{scl}|g" \
|
|
|
9852d1 |
-e "s|@scl_prefix@|%{scl_prefix}|g" \
|
|
|
9852d1 |
-e "s|@scl_scripts@|%{?_scl_scripts}|g" \
|
|
|
9852d1 |
-e "s|@scl_upper@|%{scl_upper}|g" \
|
|
|
9852d1 |
$f
|
|
|
9852d1 |
%endif
|
|
|
9852d1 |
done
|
|
|
9852d1 |
|
|
|
9852d1 |
%{?scl:scl enable %{scl} - << "EOF"}
|
|
|
9852d1 |
set -xe
|
|
|
9852d1 |
export CPPFLAGS="%{optflags}"
|
|
|
53b0e5 |
%cmake . \
|
|
|
53b0e5 |
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
|
|
|
53b0e5 |
-DINSTALL_LAYOUT=RPM \
|
|
|
53b0e5 |
-DCMAKE_RULE_MESSAGES:BOOL=OFF \
|
|
|
53b0e5 |
\
|
|
|
53b0e5 |
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
|
|
53b0e5 |
\
|
|
|
53b0e5 |
-DINSTALL_DOCDIR="%{_docdir}/galera/" \
|
|
|
53b0e5 |
-DINSTALL_GARBD="%{_bindir}" \
|
|
|
53b0e5 |
-DINSTALL_GARBD-SYSTEMD="%{_bindir}" \
|
|
|
53b0e5 |
-DINSTALL_CONFIGURATION="%{_sysconfdir}/sysconfig/" \
|
|
|
53b0e5 |
-DINSTALL_SYSTEMD_SERVICE="lib/systemd/system" \
|
|
|
53b0e5 |
-DINSTALL_LIBDIR="%{_lib}/galera" \
|
|
|
53b0e5 |
-DINSTALL_MANPAGE="share/man/man8"
|
|
|
53b0e5 |
|
|
|
53b0e5 |
cmake . -LAH
|
|
|
53b0e5 |
|
|
|
53b0e5 |
make VERBOSE=1 %{?_smp_mflags}
|
|
|
53b0e5 |
|
|
|
9852d1 |
%if 0%{?rhel} < 7
|
|
|
9852d1 |
bpostatic=%{_libdir}/libboost_program_options.so
|
|
|
9852d1 |
%endif
|
|
|
9852d1 |
|
|
|
9852d1 |
%{?scl:EOF}
|
|
|
9852d1 |
|
|
|
9852d1 |
%install
|
|
|
9852d1 |
%{?scl:scl enable %{scl} - << "EOF"}
|
|
|
9852d1 |
set -xe
|
|
|
53b0e5 |
make install DESTDIR=%{buildroot}
|
|
|
9852d1 |
%{?scl:EOF}
|
|
|
9852d1 |
|
|
|
53b0e5 |
mkdir -p %{buildroot}/usr/lib/systemd/system/
|
|
|
53b0e5 |
|
|
|
53b0e5 |
# Rename the systemd unit file
|
|
|
53b0e5 |
%{?scl:mv %{buildroot}%{_prefix}/lib/systemd/system/garb.service %{buildroot}/usr/lib/systemd/system/%{?scl_prefix}garbd.service}
|
|
|
53b0e5 |
|
|
|
9852d1 |
%if 0%{?scl:1}
|
|
|
9852d1 |
# generate a configuration file for daemon
|
|
|
9852d1 |
cat << EOF | tee -a %{buildroot}%{?_scl_scripts}/garbd-service-environment
|
|
|
9852d1 |
# Services are started in a fresh environment without any influence of user's
|
|
|
9852d1 |
# environment (like environment variable values). As a consequence,
|
|
|
9852d1 |
# information of all enabled collections will be lost during service start up.
|
|
|
9852d1 |
# If user needs to run a service under any software collection enabled, this
|
|
|
9852d1 |
# collection has to be written into %{scl_upper}_SCLS_ENABLED variable
|
|
|
9852d1 |
# in %{?_scl_scripts}/garbd-service-environment.
|
|
|
9852d1 |
%{scl_upper}_SCLS_ENABLED="%{scl}"
|
|
|
9852d1 |
EOF
|
|
|
9852d1 |
%endif #scl
|
|
|
9852d1 |
|
|
|
53b0e5 |
%pre
|
|
|
53b0e5 |
/usr/sbin/useradd -M -r -d /dev/null -s /sbin/nologin -c "Galera Arbitrator Daemon" garb >/dev/null 2>&1 || :
|
|
|
9852d1 |
|
|
|
9852d1 |
%post
|
|
|
9852d1 |
/sbin/ldconfig
|
|
|
9852d1 |
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
|
|
9852d1 |
%systemd_post %{daemon_name}.service
|
|
|
9852d1 |
%else
|
|
|
9852d1 |
/sbin/chkconfig --add %{daemon_name}
|
|
|
9852d1 |
%endif
|
|
|
9852d1 |
|
|
|
9852d1 |
|
|
|
9852d1 |
%preun
|
|
|
9852d1 |
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
|
|
9852d1 |
%systemd_preun %{daemon_name}.service
|
|
|
9852d1 |
%else
|
|
|
9852d1 |
if [ "$1" -eq 0 ]; then
|
|
|
9852d1 |
/sbin/service %{daemon_name} stop >/dev/null 2>&1
|
|
|
9852d1 |
/sbin/chkconfig --del %{daemon_name}
|
|
|
9852d1 |
fi
|
|
|
9852d1 |
%endif
|
|
|
9852d1 |
|
|
|
9852d1 |
|
|
|
9852d1 |
%postun
|
|
|
9852d1 |
/sbin/ldconfig
|
|
|
9852d1 |
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
|
|
9852d1 |
%systemd_postun_with_restart %{daemon_name}.service
|
|
|
9852d1 |
%else
|
|
|
9852d1 |
if [ "$1" -ge 1 ]; then
|
|
|
9852d1 |
/sbin/service %{daemon_name} condrestart >/dev/null 2>&1 || :
|
|
|
9852d1 |
fi
|
|
|
9852d1 |
%endif
|
|
|
9852d1 |
|
|
|
9852d1 |
%files
|
|
|
9852d1 |
%config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb
|
|
|
53b0e5 |
|
|
|
9852d1 |
%dir %{_docdir}/galera
|
|
|
9852d1 |
%dir %{_libdir}/galera
|
|
|
53b0e5 |
|
|
|
9852d1 |
%{_bindir}/garbd
|
|
|
9852d1 |
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
|
|
53b0e5 |
|
|
|
53b0e5 |
# PATCH 3:
|
|
|
53b0e5 |
# Make sure the wrapper script is executable
|
|
|
53b0e5 |
%attr(755, -, -) %{_bindir}/garb-systemd
|
|
|
53b0e5 |
|
|
|
53b0e5 |
%{_mandir}/man8/garbd.8*
|
|
|
53b0e5 |
|
|
|
9852d1 |
%{_unitdir}/%{daemon_name}.service
|
|
|
53b0e5 |
|
|
|
9852d1 |
%else
|
|
|
9852d1 |
%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rc.d/init.d/%{daemon_name}
|
|
|
9852d1 |
%endif
|
|
|
53b0e5 |
|
|
|
9852d1 |
%if 0%{?scl:1}
|
|
|
9852d1 |
%{?_scl_scripts}/garbd-service-environment
|
|
|
9852d1 |
%endif
|
|
|
53b0e5 |
|
|
|
9852d1 |
%{_libdir}/galera/libgalera_smm.so
|
|
|
53b0e5 |
|
|
|
53b0e5 |
%doc %{_docdir}/galera/AUTHORS
|
|
|
9852d1 |
%doc %{_docdir}/galera/COPYING
|
|
|
9852d1 |
%doc %{_docdir}/galera/LICENSE.asio
|
|
|
9852d1 |
%doc %{_docdir}/galera/README
|
|
|
53b0e5 |
#%doc %{_docdir}/galera/README-MySQL
|
|
|
9852d1 |
|
|
|
9852d1 |
%changelog
|
|
|
1d9ac0 |
* Sat Apr 29 2023 Michal Schorm <mschorm@redhat.com> - 26.4.14-1
|
|
|
1d9ac0 |
- Rebase to 26.4.14
|
|
|
1d9ac0 |
|
|
|
c97be2 |
* Sun Feb 20 2022 Michal Schorm <mschorm@redhat.com> - 26.4.11-1
|
|
|
c97be2 |
- Rebase to 26.4.11
|
|
|
c97be2 |
|
|
|
53b0e5 |
* Wed Jan 19 2022 Lukas Javorsky <ljavorsk@redhat.com> - 26.4.9-3
|
|
|
53b0e5 |
- Explicitly require the 'procps-ng' package
|
|
|
53b0e5 |
- Otherwise it will not require it in the lightweight systems (e.g. containers)
|
|
|
53b0e5 |
- and Galera won't work properly
|
|
|
53b0e5 |
|
|
|
53b0e5 |
* Wed Jan 19 2022 Michal Schorm <mschorm@redhat.com> - 26.4.9-2
|
|
|
53b0e5 |
- Switch from SCONS build tooling to CMAKE build tooling
|
|
|
53b0e5 |
|
|
|
53b0e5 |
* Wed Jan 19 2022 Lukas Javorsky <ljavorsk@redhat.com> - 26.4.9-1
|
|
|
53b0e5 |
- Rebase to 26.4.9
|
|
|
53b0e5 |
|
|
|
9852d1 |
* Fri Mar 26 2021 Michal Schorm <mschorm@redhat.com> - 26.4.7-1
|
|
|
9852d1 |
- Rebase to 26.4.7
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Jan 04 2021 Honza Horak <hhorak@redhat.com> - 26.4.6-1
|
|
|
9852d1 |
- Update to 26.4.6
|
|
|
9852d1 |
Related: #1903659
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Nov 04 2020 Michal Schorm <mschorm@redhat.com> - 25.3.31-1
|
|
|
9852d1 |
- Rebase to 25.3.31
|
|
|
9852d1 |
|
|
|
9852d1 |
* Tue Nov 03 2020 Michal Schorm <mschorm@redhat.com> - 25.3.30-1
|
|
|
9852d1 |
- Rebase to 25.3.30
|
|
|
9852d1 |
|
|
|
9852d1 |
* Fri May 15 2020 Michal Schorm <mschorm@redhat.com> - 25.3.29-1
|
|
|
9852d1 |
- Rebase to 25.3.29
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Apr 25 2019 Michal Schorm <mschorm@redhat.com> - 25.3.25-1
|
|
|
9852d1 |
- Rebase to 25.3.25
|
|
|
9852d1 |
|
|
|
9852d1 |
* Tue Jan 08 2019 Honza Horak <hhorak@redhat.com> - 25.3.23-2
|
|
|
9852d1 |
- Rebuild for buildroot change
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Dec 17 2018 Honza Horak <hhorak@redhat.com> - 25.3.23-1
|
|
|
9852d1 |
- Update to 25.3.23
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Aug 09 2017 Honza Horak <hhorak@redhat.com> - 25.3.20-3
|
|
|
9852d1 |
- Fix wrong failure reporting during init script start
|
|
|
9852d1 |
Related: #1415720
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Jun 26 2017 Honza Horak <hhorak@redhat.com> - 25.3.20-2
|
|
|
9852d1 |
- Fix paths in garpd init script and turn on SCL there
|
|
|
9852d1 |
Related: #1415720
|
|
|
9852d1 |
- Include garbd-service-environment because the one from mariadb-server
|
|
|
9852d1 |
does not need to be installed
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Jun 19 2017 Honza Horak <hhorak@redhat.com> - 25.3.20-1
|
|
|
9852d1 |
- Rebase to 25.3.20
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Apr 21 2016 Honza Horak <hhorak@redhat.com>
|
|
|
9852d1 |
- Build with system boost in RHEL-7
|
|
|
9852d1 |
Resolves: #1329175
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Feb 11 2016 Honza Horak <hhorak@redhat.com> - 25.3.12-8
|
|
|
9852d1 |
- Rebuild with newer scl-utils
|
|
|
9852d1 |
|
|
|
9852d1 |
* Tue Feb 09 2016 Honza Horak <hhorak@redhat.com> - 25.3.12-7
|
|
|
9852d1 |
- Change sysconfdir for scls
|
|
|
9852d1 |
|
|
|
9852d1 |
* Tue Feb 09 2016 Honza Horak <hhorak@redhat.com> - 25.3.12-6
|
|
|
9852d1 |
- Fix typo in _syconfig macro
|
|
|
9852d1 |
|
|
|
9852d1 |
* Tue Feb 09 2016 Honza Horak <hhorak@redhat.com> - 25.3.12-5
|
|
|
9852d1 |
- Prefix service name with SCL
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.12-4
|
|
|
9852d1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
9852d1 |
|
|
|
9852d1 |
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 25.3.12-3
|
|
|
9852d1 |
- Rebuilt for Boost 1.60
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Sep 30 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 25.3.12-2
|
|
|
9852d1 |
- Remove use of -mtune=native which breaks build on secondary architectures
|
|
|
9852d1 |
|
|
|
9852d1 |
* Fri Sep 25 2015 Richard W.M. Jones <rjones@redhat.com> - 25.3.12-1
|
|
|
9852d1 |
- Update to 25.3.12.
|
|
|
9852d1 |
- Should fix the build on 32 bit ARM (RHBZ#1241164).
|
|
|
9852d1 |
- Remove ExcludeArch (should have read the BZ more closely).
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 25.3.10-5
|
|
|
9852d1 |
- Rebuilt for Boost 1.59
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.10-4
|
|
|
9852d1 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 25.3.10-3
|
|
|
9852d1 |
- rebuild for Boost 1.58
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Jul 08 2015 Ryan O'Hara <rohara@redhat.com> - 25.3.10-2
|
|
|
9852d1 |
- Disable ARM builds (#1241164, #1239516)
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Jul 06 2015 Ryan O'Hara <rohara@redhat.com> - 25.3.10-1
|
|
|
9852d1 |
- Update to version 25.3.10
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.5-11
|
|
|
9852d1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 25.3.5-10
|
|
|
9852d1 |
- Rebuild for boost 1.57.0
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Nov 27 2014 Richard W.M. Jones <rjones@redhat.com> - 25.3.5-9
|
|
|
9852d1 |
- Add aarch64 support.
|
|
|
9852d1 |
|
|
|
9852d1 |
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.5-8
|
|
|
9852d1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
9852d1 |
|
|
|
9852d1 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.5-7
|
|
|
9852d1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
9852d1 |
|
|
|
9852d1 |
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 25.3.5-6
|
|
|
9852d1 |
- Rebuild for boost 1.55.0
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Apr 30 2014 Dan HorĂ¡k <dan[at]danny.cz> - 25.3.5-5
|
|
|
9852d1 |
- set ExclusiveArch
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Apr 24 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-4
|
|
|
9852d1 |
- Use strict_build_flags=0 to avoid -Werror
|
|
|
9852d1 |
- Remove unnecessary clean section
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Apr 24 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-3
|
|
|
9852d1 |
- Include galera directories in file list
|
|
|
9852d1 |
- Set CPPFLAGS to optflags
|
|
|
9852d1 |
|
|
|
9852d1 |
* Wed Apr 23 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-2
|
|
|
9852d1 |
- Fix client certificate verification (#1090604)
|
|
|
9852d1 |
|
|
|
9852d1 |
* Thu Mar 27 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-1
|
|
|
9852d1 |
- Update to version 25.3.5
|
|
|
9852d1 |
|
|
|
9852d1 |
* Mon Mar 24 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.3-2
|
|
|
9852d1 |
- Add systemd service
|
|
|
9852d1 |
|
|
|
9852d1 |
* Sun Mar 09 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.3-1
|
|
|
9852d1 |
- Initial build
|