|
@@ -1,18 +1,11 @@
|
|
%bcond_with systemd
|
|
%bcond_with systemd
|
|
%bcond_with python3
|
|
%bcond_with python3
|
|
-%bcond_without cmake
|
|
|
|
|
|
|
|
-%define mariadb_version 10.6.7
|
|
|
|
-
|
|
|
|
-%if %{with python3}
|
|
|
|
-%global scons scons-3
|
|
|
|
-%else
|
|
|
|
-%global scons scons
|
|
|
|
-%endif
|
|
|
|
|
|
+%define mariadb_version 10.6.9
|
|
|
|
|
|
Summary: Synchronous multi-master wsrep provider (replication engine)
|
|
Summary: Synchronous multi-master wsrep provider (replication engine)
|
|
Name: galera
|
|
Name: galera
|
|
-Version: 26.4.11
|
|
|
|
|
|
+Version: 26.4.12
|
|
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
%global galera_api_version %(echo %{version} | cut -d . -f 1,2)
|
|
%global galera_api_version %(echo %{version} | cut -d . -f 1,2)
|
|
Group: servers
|
|
Group: servers
|
|
@@ -24,21 +17,16 @@ URL: http://galeracluster.com/
|
|
# Actually, the truth is, we do use galera source tarball provided by MariaDB on
|
|
# Actually, the truth is, we do use galera source tarball provided by MariaDB on
|
|
# following URL (without macros):
|
|
# following URL (without macros):
|
|
# https://mirror.vpsfree.cz/mariadb/mariadb-10.2.13/galera-25.3.23/src/galera-25.3.23.tar.gz
|
|
# https://mirror.vpsfree.cz/mariadb/mariadb-10.2.13/galera-25.3.23/src/galera-25.3.23.tar.gz
|
|
-Source0: https://downloads.mariadb.com/MariaDB/mariadb-%{mariadb_version}/galera-%{version}/src/%{name}-%{version}.tar.gz
|
|
|
|
-
|
|
|
|
|
|
+Source0: https://archive.mariadb.org/mariadb-%{mariadb_version}/galera-%{version}/src/%{name}-%{version}.tar.gz
|
|
Source1: garbd.service
|
|
Source1: garbd.service
|
|
Source2: garbd-wrapper
|
|
Source2: garbd-wrapper
|
|
Source3: garbd.init
|
|
Source3: garbd.init
|
|
|
|
|
|
-Patch0: galera-python3.patch
|
|
|
|
|
|
+Patch0: cmake_paths.patch
|
|
|
|
|
|
BuildRequires: libboost-devel libboost-filesystem libboost-program-options
|
|
BuildRequires: libboost-devel libboost-filesystem libboost-program-options
|
|
BuildRequires: check-devel openssl-devel gcc-c++ asio-devel
|
|
BuildRequires: check-devel openssl-devel gcc-c++ asio-devel
|
|
-%if %{with cmake}
|
|
|
|
BuildRequires: cmake ninja
|
|
BuildRequires: cmake ninja
|
|
-%else
|
|
|
|
-BuildRequires: scons
|
|
|
|
-%endif
|
|
|
|
%if %{with systemd}
|
|
%if %{with systemd}
|
|
BuildRequires: systemd
|
|
BuildRequires: systemd
|
|
%endif
|
|
%endif
|
|
@@ -66,16 +54,10 @@ replication engine see http://www.codership.com.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
-%if ! %{with cmake}
|
|
|
|
-%if %{with python3}
|
|
|
|
-%patch0 -p1
|
|
|
|
-%endif
|
|
|
|
-%endif
|
|
|
|
|
|
+%autopatch -p1
|
|
|
|
+
|
|
|
|
|
|
%build
|
|
%build
|
|
-%if %{with cmake}
|
|
|
|
-%global build_ldflags %(echo %{build_ldflags} | sed -e 's/-Wl,--as-needed//')
|
|
|
|
-%endif
|
|
|
|
%{set_build_flags}
|
|
%{set_build_flags}
|
|
|
|
|
|
# Workaround for version 26.4.7
|
|
# Workaround for version 26.4.7
|
|
@@ -85,72 +67,57 @@ export CXXFLAGS="$CXXFLAGS -Wno-error=format"
|
|
export CFLAGS="$CFLAGS -Wno-error=format-extra-args -Wno-error=format"
|
|
export CFLAGS="$CFLAGS -Wno-error=format-extra-args -Wno-error=format"
|
|
# end of workaroound
|
|
# end of workaroound
|
|
|
|
|
|
-%if %{with cmake}
|
|
|
|
%cmake \
|
|
%cmake \
|
|
-GNinja \
|
|
-GNinja \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
- -DCMAKE_SKIP_RPATH:BOOL=ON
|
|
|
|
|
|
+ -DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
|
+ -DINSTALL_LAYOUT=RPM \
|
|
|
|
+ -DCMAKE_RULE_MESSAGES:BOOL=OFF \
|
|
|
|
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
|
|
|
|
+ -DINSTALL_DOCDIR="share/doc/%{name}/" \
|
|
|
|
+ -DINSTALL_GARBD="sbin" \
|
|
|
|
+ -DINSTALL_GARBD-SYSTEMD="sbin" \
|
|
|
|
+ -DINSTALL_CONFIGURATION="/etc/sysconfig/" \
|
|
|
|
+ -DINSTALL_SYSTEMD_SERVICE="lib/systemd/system" \
|
|
|
|
+ -DINSTALL_LIBDIR="%{_lib}/galera" \
|
|
|
|
+ -DINSTALL_MANPAGE="share/man/man8"
|
|
%cmake_build
|
|
%cmake_build
|
|
-%else
|
|
|
|
-%{scons} %{?_smp_mflags} strict_build_flags=0
|
|
|
|
-%endif
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
|
|
+%cmake_install
|
|
|
|
+
|
|
%if %{with systemd}
|
|
%if %{with systemd}
|
|
-install -Dpm644 %{SOURCE1} %{buildroot}%{_unitdir}/garbd.service
|
|
|
|
-install -Dpm755 %{SOURCE2} %{buildroot}%{_sbindir}/garbd-wrapper
|
|
|
|
|
|
+mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
+mv %{buildroot}/usr/lib/systemd/system/garb.service %{buildroot}%{_unitdir}/garbd.service
|
|
|
|
+sed -i 's/Alias=garbd.service/Alias=garb.service/g' %{buildroot}%{_unitdir}/garbd.service
|
|
|
|
+
|
|
|
|
+sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}%{_unitdir}/garbd.service
|
|
|
|
+# In the wrapper script:
|
|
|
|
+sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd
|
|
|
|
+
|
|
|
|
+sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
|
|
%else
|
|
%else
|
|
|
|
+
|
|
|
|
+rm -f %{buildroot}%{_sbindir}/garb-systemd
|
|
|
|
+mkdir -p %{buildroot}/var/run/garbd
|
|
install -Dpm644 %{SOURCE3} %{buildroot}%{_initdir}/garbd
|
|
install -Dpm644 %{SOURCE3} %{buildroot}%{_initdir}/garbd
|
|
%endif
|
|
%endif
|
|
-%if %{with cmake}
|
|
|
|
-%cmake_install
|
|
|
|
-pushd %{_vpath_builddir}
|
|
|
|
-
|
|
|
|
-mkdir -p %{buildroot}%{_libdir}/galera
|
|
|
|
-mv -f %{buildroot}/usr/lib/libgalera_smm.so %{buildroot}%{_libdir}/galera/
|
|
|
|
-for f in \
|
|
|
|
- galera/src/libgalera_smm_static.so galera/src/libgalera.so \
|
|
|
|
- gcs/src/libgcs4garb.so gcs/src/libgcs.so \
|
|
|
|
- gcache/src/libgcache.so \
|
|
|
|
- gcomm/src/libgcomm.so \
|
|
|
|
-%ifarch x86_64
|
|
|
|
- galerautils/src/libgalerautils_hw_crc32c.so \
|
|
|
|
-%endif
|
|
|
|
- galerautils/src/libgalerautilsxx.so galerautils/src/libgalerautils.so
|
|
|
|
-do
|
|
|
|
- install -Dpm755 $f %{buildroot}%{_libdir}/galera/
|
|
|
|
-done
|
|
|
|
-popd
|
|
|
|
-mkdir -p %{buildroot}%{_sbindir}
|
|
|
|
-mv -f %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/
|
|
|
|
-mv -f %{buildroot}%{_datadir}/* %{buildroot}/usr/doc/
|
|
|
|
-mv -f %{buildroot}/usr/man %{buildroot}%{_mandir}
|
|
|
|
-rm -rf rpmdoc
|
|
|
|
-mv -f %{buildroot}/usr/doc ./rpmdoc
|
|
|
|
-install -D -m 644 garb/files/garb.cnf %{buildroot}%{_sysconfdir}/sysconfig/garb
|
|
|
|
-mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
|
|
|
-cat <<EOF > %{buildroot}%{_sysconfdir}/ld.so.conf.d/galera.conf
|
|
|
|
-%{_libdir}/galera
|
|
|
|
-EOF
|
|
|
|
-%else
|
|
|
|
-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 asio/LICENSE_1_0.txt %{buildroot}%{_docdir}/galera/LICENSE.asio
|
|
|
|
-install -D -m 644 scripts/packages/README %{buildroot}%{_docdir}/galera/README
|
|
|
|
-install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/README-MySQL
|
|
|
|
-%endif
|
|
|
|
|
|
+# drop invalid directory
|
|
|
|
+rm -rf %{buildroot}/usr/lib/systemd
|
|
|
|
+
|
|
|
|
+cp -f %{buildroot}%{_docdir}/galera/LICENSE.asio ./
|
|
|
|
+rm -f %{buildroot}%{_docdir}/galera/LICENSE.asio
|
|
|
|
+rm -f %{buildroot}%{_docdir}/galera/COPYING
|
|
|
|
|
|
|
|
|
|
-%if %{with cmake}
|
|
|
|
%check
|
|
%check
|
|
-export LD_LIBRARY_PATH=%{buildroot}%{_libdir}/galera
|
|
|
|
%ctest
|
|
%ctest
|
|
-%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+%pre
|
|
|
|
+/usr/sbin/useradd -M -r -d /dev/null -s /sbin/nologin -c "Galera Arbitrator Daemon" garb >/dev/null 2>&1 || :
|
|
|
|
+
|
|
%post
|
|
%post
|
|
%if %{with systemd}
|
|
%if %{with systemd}
|
|
%systemd_post garbd.service
|
|
%systemd_post garbd.service
|
|
@@ -175,24 +142,28 @@ fi
|
|
|
|
|
|
|
|
|
|
%files
|
|
%files
|
|
-%license rpmdoc/COPYING
|
|
|
|
-%license rpmdoc/LICENSE.asio
|
|
|
|
-%doc rpmdoc/AUTHORS rpmdoc/README rpmdoc/garb*
|
|
|
|
|
|
+%license COPYING LICENSE.asio
|
|
|
|
+%doc %{_docdir}/galera/*
|
|
%config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb
|
|
%config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb
|
|
-%{_sysconfdir}/ld.so.conf.d/galera.conf
|
|
|
|
%dir %{_libdir}/galera
|
|
%dir %{_libdir}/galera
|
|
%{_libdir}/galera/*
|
|
%{_libdir}/galera/*
|
|
%{_sbindir}/garbd
|
|
%{_sbindir}/garbd
|
|
%{_mandir}/man8/*
|
|
%{_mandir}/man8/*
|
|
%if %{with systemd}
|
|
%if %{with systemd}
|
|
-%{_sbindir}/garbd-wrapper
|
|
|
|
|
|
+%{_sbindir}/garb-systemd
|
|
%{_unitdir}/garbd.service
|
|
%{_unitdir}/garbd.service
|
|
%else
|
|
%else
|
|
|
|
+%attr(755, garb, garb) %dir /var/run/garbd
|
|
%{_initdir}/garbd
|
|
%{_initdir}/garbd
|
|
%endif
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Tue Aug 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.12-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- dropped scons stuff and Patch0.
|
|
|
|
+- imported Patch0 from rawhide.
|
|
|
|
+
|
|
* Sun Feb 13 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.11-1
|
|
* Sun Feb 13 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.11-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
|
|
|