1 Star 0 Fork 3

rockerzhu/galera

forked from OpenCloudOS Stream/galera 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
galera.spec 3.17 KB
一键复制 编辑 原始数据 按行查看 历史
rockerzhu 提交于 2023-07-31 13:06 . Rebuilt for boost 1.82.0
Summary: Synchronous multi-master wsrep provider (replication engine)
Name: galera
Version: 26.4.13
Release: 5%{?dist}
License: GPLv2
URL: http://galeracluster.com/
Source0: http://releases.galeracluster.com/%{name}-4.13/source/%{name}-4-%{version}.tar.gz
Source1: garbd.service
Source2: garbd-wrapper
Patch3000: cmake_paths.patch
BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel
Requires(pre): /usr/sbin/useradd
Requires: nmap-ncat procps-ng
%{?systemd_requires}
%description
Galera implements a fast synchronous multimaster wsrep provider (replication engine) for
transactional databases and similar applications.
%prep
%autosetup -p1 -n %{name}-4-%{version}
%build
%cmake \
-DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
-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 -B %_vpath_builddir -LAH
%cmake_build
%install
%cmake_install
# rename the Systemd service from "garb" to "garbd"
mv %{buildroot}/usr/lib/systemd/system/garb.service %{buildroot}/usr/lib/systemd/system/garbd.service
sed -i 's/Alias=garbd.service/Alias=garb.service/g' %{buildroot}/usr/lib/systemd/system/garbd.service
# fix hardcoded paths in the Systemd service file
sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}/usr/lib/systemd/system/garbd.service
sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd
# fix an security issue reported by Systemd
# https://lists.freedesktop.org/mailman/listinfo/systemd-devel
sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.service
%check
%ctest
%pre
/usr/sbin/useradd -M -r -d /dev/null -s /sbin/nologin -c "Galera Arbitrator Daemon" garb >/dev/null 2>&1 || :
%post
%systemd_post garbd.service
%preun
%systemd_preun garbd.service
%postun
%systemd_postun_with_restart garbd.service
%files
%license %{_docdir}/galera/COPYING
%license %{_docdir}/galera/LICENSE.asio
%doc %{_docdir}/galera/AUTHORS
%doc %{_docdir}/galera/README
%dir %{_docdir}/galera
%dir %{_libdir}/galera
%config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb
%attr(755, -, -) %{_sbindir}/garb-systemd
%{_sbindir}/garbd
%{_libdir}/galera/libgalera_smm.so
%{_unitdir}/garbd.service
%{_mandir}/man8/garbd.8*
%changelog
* Mon Jul 31 2023 rockerzhu rockerzhu@tencent.com - 26.4.13-5
- Rebuilt for boost 1.82.0
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 26.4.13-4
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 26.4.13-3
- Rebuilt for OpenCloudOS Stream 23
* Mon Feb 6 2023 Wang Guodong <gordonwwang@tencent.com> - 26.4.13-2
- Modify the source file.
* Wed Dec 14 2022 Wang Guodong <gordonwwang@tencent.com> - 26.4.13-1
- package init.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rockerzhu/galera.git
git@gitee.com:rockerzhu/galera.git
rockerzhu
galera
galera
master

搜索帮助