galera-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. %bcond_with systemd
  2. %bcond_with python3
  3. %define mariadb_version 10.6.12
  4. Summary: Synchronous multi-master wsrep provider (replication engine)
  5. Name: galera
  6. Version: 26.4.14
  7. Release: 2%{?_dist_release}%{?with_systemd:.systemd}
  8. %global galera_api_version %(echo %{version} | cut -d . -f 1,2)
  9. Group: servers
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: GPLv2
  13. URL: http://galeracluster.com/
  14. # Actually, the truth is, we do use galera source tarball provided by MariaDB on
  15. # following URL (without macros):
  16. # https://mirror.vpsfree.cz/mariadb/mariadb-10.2.13/galera-25.3.23/src/galera-25.3.23.tar.gz
  17. Source0: https://archive.mariadb.org/mariadb-%{mariadb_version}/galera-%{version}/src/%{name}-%{version}.tar.gz
  18. Source1: garbd.service
  19. Source2: garbd-wrapper
  20. Source3: garbd.init
  21. Patch0: cmake_paths.patch
  22. BuildRequires: libboost-devel libboost-filesystem libboost-program-options
  23. BuildRequires: check-devel openssl-devel gcc-c++ asio-devel
  24. BuildRequires: cmake ninja
  25. %if %{with systemd}
  26. BuildRequires: systemd
  27. %endif
  28. Requires: nmap
  29. Provides: galera(%{galera_api_version})
  30. %if %{with systemd}
  31. Requires(post): systemd
  32. Requires(preun): systemd
  33. Requires(postun): systemd
  34. %else
  35. Requires(post): chkconfig
  36. Requires(preun): chkconfig initscripts
  37. %endif
  38. %description
  39. Galera is a fast synchronous multi-master wsrep provider (replication engine)
  40. for transactional databases and similar applications. For more information
  41. about wsrep API see http://launchpad.net/wsrep. For a description of Galera
  42. replication engine see http://www.codership.com.
  43. %debug_package
  44. %prep
  45. %setup -q
  46. %autopatch -p1
  47. %build
  48. %{set_build_flags}
  49. # Workaround for version 26.4.7
  50. export CXXFLAGS="$CXXFLAGS -Wno-error=format-extra-args"
  51. # ... and for 32 bit arches
  52. export CXXFLAGS="$CXXFLAGS -Wno-error=format"
  53. export CFLAGS="$CFLAGS -Wno-error=format-extra-args -Wno-error=format"
  54. # end of workaroound
  55. %cmake \
  56. -GNinja \
  57. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  58. -DCMAKE_SKIP_RPATH:BOOL=ON \
  59. -DINSTALL_LAYOUT=RPM \
  60. -DCMAKE_RULE_MESSAGES:BOOL=OFF \
  61. -DBUILD_SHARED_LIBS:BOOL=OFF \
  62. -DINSTALL_DOCDIR="share/doc/%{name}/" \
  63. -DINSTALL_GARBD="sbin" \
  64. -DINSTALL_GARBD-SYSTEMD="sbin" \
  65. -DINSTALL_CONFIGURATION="/etc/sysconfig/" \
  66. -DINSTALL_SYSTEMD_SERVICE="lib/systemd/system" \
  67. -DINSTALL_LIBDIR="%{_lib}/galera" \
  68. -DINSTALL_MANPAGE="share/man/man8"
  69. %cmake_build
  70. %install
  71. %cmake_install
  72. %if %{with systemd}
  73. mkdir -p %{buildroot}%{_unitdir}
  74. mv %{buildroot}/usr/lib/systemd/system/garb.service %{buildroot}%{_unitdir}/garbd.service
  75. sed -i 's/Alias=garbd.service/Alias=garb.service/g' %{buildroot}%{_unitdir}/garbd.service
  76. sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}%{_unitdir}/garbd.service
  77. # In the wrapper script:
  78. sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd
  79. sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service
  80. %else
  81. # drop invalid directory
  82. rm -rf %{buildroot}/usr/lib/systemd
  83. rm -f %{buildroot}%{_sbindir}/garb-systemd
  84. mkdir -p %{buildroot}/var/run/garbd
  85. install -Dpm644 %{SOURCE3} %{buildroot}%{_initdir}/garbd
  86. %endif
  87. cp -f %{buildroot}%{_docdir}/galera/LICENSE.asio ./
  88. rm -f %{buildroot}%{_docdir}/galera/LICENSE.asio
  89. rm -f %{buildroot}%{_docdir}/galera/COPYING
  90. %check
  91. %ctest
  92. %pre
  93. /usr/sbin/useradd -M -r -d /dev/null -s /sbin/nologin -c "Galera Arbitrator Daemon" garb >/dev/null 2>&1 || :
  94. %post
  95. %if %{with systemd}
  96. %systemd_post garbd.service
  97. %else
  98. /sbin/chkconfig --add garbd
  99. %endif
  100. %preun
  101. %if %{with systemd}
  102. %systemd_preun garbd.service
  103. %else
  104. if [ $1 = 0 -o -x /bin/systemctl ]; then
  105. /sbin/service garbd stop >/dev/null 2>/dev/null ||:
  106. /sbin/chkconfig --del garbd
  107. fi
  108. %endif
  109. %postun
  110. %if %{with systemd}
  111. %systemd_postun_with_restart garbd.service
  112. %endif
  113. %files
  114. %license COPYING LICENSE.asio
  115. %doc %{_docdir}/galera/*
  116. %config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb
  117. %dir %{_libdir}/galera
  118. %{_libdir}/galera/*
  119. %{_sbindir}/garbd
  120. %{_mandir}/man8/*
  121. %if %{with systemd}
  122. %{_sbindir}/garb-systemd
  123. %{_unitdir}/garbd.service
  124. %else
  125. %attr(755, garb, garb) %dir /var/run/garbd
  126. %{_initdir}/garbd
  127. %endif
  128. %changelog
  129. * Wed Nov 01 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.14-2
  130. - rebuilt with boost-1.83.0.
  131. * Tue Feb 07 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.14-1
  132. - new upstream release.
  133. * Tue Nov 08 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.13-1
  134. - new upstream release.
  135. * Tue Aug 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.12-1
  136. - new upstream release.
  137. - dropped scons stuff and Patch0.
  138. - imported Patch0 from rawhide.
  139. * Sun Feb 13 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.11-1
  140. - new upstream release.
  141. * Sat Aug 07 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.9-1
  142. - new upstream release.
  143. * Sat May 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.8-1
  144. - new upstream release.
  145. - dropped ldconfig scriptlets.
  146. - switched buildsystem to cmake and ninja.
  147. * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.7-1
  148. - new upstream release.
  149. * Sat Feb 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.6-1
  150. - new upstream release.
  151. * Wed Aug 12 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.5-1
  152. - new upstream release.
  153. * Thu May 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.4-1
  154. - new upstream release.
  155. * Sat Apr 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.3-2
  156. - rebuilt with boost-1.72.0.
  157. * Wed Nov 06 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.3-1
  158. - new upstream release.
  159. * Fri Aug 30 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.2-1
  160. - updated to 26.4.2 for MariaDB-10.4.
  161. * Sun May 05 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 25.3.25-4
  162. - initial build for Vine Linux.
  163. * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.25-3
  164. - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
  165. * Tue Jan 29 2019 Jonathan Wakely <jwakely@redhat.com> - 25.3.25-2
  166. - Rebuilt for Boost 1.69
  167. * Tue Jan 01 2019 Michal Schorm <mschorm@redhat.com> - 25.3.25-1
  168. - Rebase to 25.3.25
  169. * Mon Jul 16 2018 Honza Horak <hhorak@redhat.com> - 25.3.23-5
  170. - Require asio also on rhel
  171. * Fri Jul 13 2018 Honza Horak <hhorak@redhat.com> - 25.3.23-4
  172. - Add explicit gcc-c++ BR
  173. - Use python3-scons
  174. * Fri Jul 13 2018 Honza Horak <hhorak@redhat.com> - 25.3.23-3
  175. - Do not require asio on rhel
  176. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.23-2
  177. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  178. * Fri Feb 16 2018 Michal Schorm <mschorm@redhat.com> - 25.3.23-1
  179. - Update to 25.3.23
  180. * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.22-2
  181. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  182. * Fri Nov 24 2017 Honza Horak <hhorak@redhat.com> - 25.3.22-1
  183. - Update to 25.3.22
  184. * Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.16-6
  185. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  186. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.16-5
  187. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  188. * Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 25.3.16-4
  189. - Rebuilt for Boost 1.64
  190. * Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.16-3
  191. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
  192. * Sat Feb 18 2017 Jonathan Wakely <jwakely@redhat.com> - 25.3.16-2
  193. - Use asio-devel instead of bundled asio library
  194. * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.16-2
  195. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  196. * Wed Jun 22 2016 Mike Bayer <mbayer@redhat.com> - 25.3.16-1
  197. - Update to 25.3.16
  198. * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 25.3.12-4
  199. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  200. * Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 25.3.12-3
  201. - Rebuilt for Boost 1.60
  202. * Wed Sep 30 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 25.3.12-2
  203. - Remove use of -mtune=native which breaks build on secondary architectures
  204. * Fri Sep 25 2015 Richard W.M. Jones <rjones@redhat.com> - 25.3.12-1
  205. - Update to 25.3.12.
  206. - Should fix the build on 32 bit ARM (RHBZ#1241164).
  207. - Remove ExcludeArch (should have read the BZ more closely).
  208. * Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 25.3.10-5
  209. - Rebuilt for Boost 1.59
  210. * Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.10-4
  211. - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
  212. * Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 25.3.10-3
  213. - rebuild for Boost 1.58
  214. * Wed Jul 08 2015 Ryan O'Hara <rohara@redhat.com> - 25.3.10-2
  215. - Disable ARM builds (#1241164, #1239516)
  216. * Mon Jul 06 2015 Ryan O'Hara <rohara@redhat.com> - 25.3.10-1
  217. - Update to version 25.3.10
  218. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.5-11
  219. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  220. * Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 25.3.5-10
  221. - Rebuild for boost 1.57.0
  222. * Thu Nov 27 2014 Richard W.M. Jones <rjones@redhat.com> - 25.3.5-9
  223. - Add aarch64 support.
  224. * Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.5-8
  225. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  226. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 25.3.5-7
  227. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  228. * Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 25.3.5-6
  229. - Rebuild for boost 1.55.0
  230. * Wed Apr 30 2014 Dan Horák <dan[at]danny.cz> - 25.3.5-5
  231. - set ExclusiveArch
  232. * Thu Apr 24 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-4
  233. - Use strict_build_flags=0 to avoid -Werror
  234. - Remove unnecessary clean section
  235. * Thu Apr 24 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-3
  236. - Include galera directories in file list
  237. - Set CPPFLAGS to optflags
  238. * Wed Apr 23 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-2
  239. - Fix client certificate verification (#1090604)
  240. * Thu Mar 27 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.5-1
  241. - Update to version 25.3.5
  242. * Mon Mar 24 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.3-2
  243. - Add systemd service
  244. * Sun Mar 09 2014 Ryan O'Hara <rohara@redhat.com> - 25.3.3-1
  245. - Initial build