commit 1a58438060fbb550d767567f67ae7fd30e329d07 Author: James Antill Date: Mon Aug 8 12:40:57 2022 -0400 Import rpm: 29ac8f66af9ce546a5dc32afd7bee46243077ada diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e382bef --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/galera-25.3.32.tar.gz diff --git a/cmake_paths.patch b/cmake_paths.patch new file mode 100644 index 0000000..ec4f06a --- /dev/null +++ b/cmake_paths.patch @@ -0,0 +1,119 @@ +This patch has been offered upstream with slight typo fixes: + https://github.com/codership/galera/pull/614 +on 21/02/2022 + +#---------------------- + + +1) Documentation files + +--- galera-26.4.11/CMakeLists.txt 2022-02-20 03:35:32.039968825 +0100 ++++ galera-26.4.11/CMakeLists.txt_patched 2022-02-20 03:34:57.710641631 +0100 +@@ -109,14 +109,19 @@ add_subdirectory(galera) + add_subdirectory(scripts/packages) + add_subdirectory(wsrep/tests) + ++# Make the intall destination for documentation files configurable ++if(NOT DEFINED INSTALL_DOCDIR) ++ set(INSTALL_DOCDIR "doc" CACHE STRING "path to install documentaion to") ++endif() ++ + if (NOT ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD") + install(FILES + ${PROJECT_SOURCE_DIR}/AUTHORS + ${PROJECT_SOURCE_DIR}/COPYING + ${PROJECT_SOURCE_DIR}/README +- DESTINATION doc) ++ DESTINATION ${INSTALL_DOCDIR} ) + install(FILES ${PROJECT_SOURCE_DIR}/asio/LICENSE_1_0.txt +- DESTINATION doc ++ DESTINATION ${INSTALL_DOCDIR} + RENAME LICENSE.asio) + endif() + + + +2) Configuration file +3) Executable files +4) Systemd service file + +--- galera-26.4.8/garb/CMakeLists.txt 2021-06-10 03:54:55.482520883 +0200 ++++ galera-26.4.8/garb/CMakeLists.txt_patched 2021-06-10 03:54:41.070274710 +0200 +@@ -31,14 +31,51 @@ target_compile_options(garbd + target_link_libraries(garbd gcs4garb gcomm gcache + ${Boost_PROGRAM_OPTIONS_LIBRARIES}) + +-install(TARGETS garbd DESTINATION bin) ++# Make the install destination for garbd binary configurable ++if(NOT DEFINED INSTALL_GARBD) ++ set(INSTALL_GARBD "bin" CACHE STRING "path to install garbd binary to") ++endif() ++ ++install(TARGETS garbd ++ DESTINATION ${INSTALL_GARBD}) ++ + if (NOT ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD") ++ ++ # Make the install destination for garbd-systemd wrapper script configurable ++ if(NOT DEFINED INSTALL_GARBD-SYSTEMD) ++ set(INSTALL_GARBD-SYSTEMD "share" CACHE STRING "path to install garbd-systemd wrapper script to") ++ endif() ++ ++ install(FILES ++ ${CMAKE_CURRENT_SOURCE_DIR}/files/garb-systemd ++ DESTINATION ${INSTALL_GARBD-SYSTEMD}) ++ ++ # Make the install destination for garbd configuration file configurable ++ if(NOT DEFINED INSTALL_CONFIGURATION) ++ set(INSTALL_CONFIGURATION "share" CACHE STRING "path to install garbd configuration to") ++ endif() ++ + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/files/garb.cnf ++ DESTINATION ${INSTALL_CONFIGURATION} ++ RENAME garb) ++ ++ # Make the install destination for garbd systemd service file configurable ++ if(NOT DEFINED INSTALL_SYSTEMD_SERVICE) ++ set(INSTALL_SYSTEMD_SERVICE "share" CACHE STRING "path to install garbd Systemd service to") ++ endif() ++ ++ install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/files/garb.service +- ${CMAKE_CURRENT_SOURCE_DIR}/files/garb-systemd +- DESTINATION share) ++ DESTINATION ${INSTALL_SYSTEMD_SERVICE}) ++ ++ # Make the install destination for manpage configurable ++ if(NOT DEFINED INSTALL_MANPAGE) ++ set(INSTALL_MANPAGE "man/man8" CACHE STRING "path to install manpage to") ++ endif() ++ + install(FILES + ${PROJECT_SOURCE_DIR}/man/garbd.8 +- DESTINATION man/man8) ++ DESTINATION ${INSTALL_MANPAGE}) ++ + endif() + + + +5) Shared library path + +--- galera-26.4.8/galera/src/CMakeLists.txt 2021-06-10 03:13:05.465005845 +0200 ++++ galera-26.4.8/galera/src/CMakeLists.txt_patched 2021-06-10 03:16:53.388699046 +0200 +@@ -112,7 +112,12 @@ endif() + + target_link_libraries(galera_smm galera ${GALERA_LINK_OPTIONS}) + +-install(TARGETS galera_smm DESTINATION lib) ++# Make the install destination for garbd binary configurable ++if(NOT DEFINED INSTALL_LIBDIR) ++ set(INSTALL_LIBDIR "lib" CACHE STRING "path to install shared libraries to") ++endif() ++ ++install(TARGETS galera_smm DESTINATION ${INSTALL_LIBDIR}) + + # The following checks are guaranteed to work only + # Linux platform, we skip them on others. + diff --git a/galera-python3.patch b/galera-python3.patch new file mode 100644 index 0000000..0543fc4 --- /dev/null +++ b/galera-python3.patch @@ -0,0 +1,17 @@ +Upstream PR: +https://github.com/codership/galera/pull/512 + +diff -up galera-25.3.23/SConstruct.bak galera-25.3.23/SConstruct +--- galera-25.3.26/SConstruct.bak 2018-07-13 15:14:49.059835554 +0200 ++++ galera-25.3.26/SConstruct 2018-07-13 15:19:07.717967794 +0200 +@@ -194,8 +194,8 @@ if link != 'default': + env.Replace(LINK = link) + + # Get compiler name/version, CXX may be set to "c++" which may be clang or gcc +-cc_version = str(read_first_line(env['CC'].split() + ['--version'])) +-cxx_version = str(read_first_line(env['CXX'].split() + ['--version'])) ++cc_version = str(read_first_line(env['CC'].split() + ['--version']).decode()) ++cxx_version = str(read_first_line(env['CXX'].split() + ['--version']).decode()) + + print('Using C compiler executable: ' + env['CC']) + print('C compiler version is: ' + cc_version) diff --git a/galera.spec b/galera.spec new file mode 100644 index 0000000..7f47d10 --- /dev/null +++ b/galera.spec @@ -0,0 +1,225 @@ +Name: galera +Version: 25.3.32 +Release: 1%{?dist} +Summary: Synchronous multi-master wsrep provider (replication engine) + +License: GPLv2 +URL: http://galeracluster.com/ + +# Actually, the truth is, we do use galera source tarball provided by MariaDB on +# following URL (without macros): +# https://archive.mariadb.org/mariadb-10.3.26/galera-25.3.31/src/galera-25.3.31.tar.gz + +Source0: http://releases.galeracluster.com/source/%{name}-%{version}.tar.gz + +Source1: garbd.service +Source2: garbd-wrapper + +Patch0: galera-python3.patch + +BuildRequires: boost-devel check-devel openssl-devel python3-scons systemd gcc-c++ asio-devel +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 +%patch0 -p1 + +%build +%{set_build_flags} + +# Print help: +# scons-3 --help +# scons-3 -H + +# Possibly usefull arguments: +# --debug=findlibs +# --debug=stacktrace +# --warn=all +# debug=0 + +%ifarch i686 +scons-3 %{?_smp_mflags} strict_build_flags=0 +%else +scons-3 %{?_smp_mflags} strict_build_flags=1 +%endif + + + +%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 scripts/packages/README %{buildroot}%{_docdir}/galera/README +install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/README-MySQL + + +%post +/sbin/ldconfig +%systemd_post garbd.service + +%preun +%systemd_preun garbd.service + +%postun +/sbin/ldconfig +%systemd_postun_with_restart garbd.service + + +%files +%config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb +%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.chromium +%doc %{_docdir}/galera/README +%doc %{_docdir}/galera/README-MySQL + + +%changelog +* Tue Mar 23 2021 Michal Schorm - 25.3.32-1 +- Rebase to 25.3.32 + +* Tue Nov 10 2020 Michal Schorm - 25.3.31-1 +- Rebase to 25.3.31 + Resolves: #1731289, #1856812 + +* Thu Jul 18 2019 Michal Schorm - 25.3.26-1 +- Rebase to 25.3.26 + Resolves: #1687879 + Resolves: #1657220 + +* Mon Jul 16 2018 Honza Horak - 25.3.23-5 +- Require asio also on rhel + +* Fri Jul 13 2018 Honza Horak - 25.3.23-4 +- Add explicit gcc-c++ BR +- Use python3-scons + +* Fri Jul 13 2018 Honza Horak - 25.3.23-3 +- Do not require asio on rhel + +* Fri Jul 13 2018 Fedora Release Engineering - 25.3.23-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 16 2018 Michal Schorm - 25.3.23-1 +- Update to 25.3.23 + +* Wed Feb 07 2018 Fedora Release Engineering - 25.3.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Nov 24 2017 Honza Horak - 25.3.22-1 +- Update to 25.3.22 + +* Wed Aug 02 2017 Fedora Release Engineering - 25.3.16-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 25.3.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jul 03 2017 Jonathan Wakely - 25.3.16-4 +- Rebuilt for Boost 1.64 + +* Mon May 15 2017 Fedora Release Engineering - 25.3.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + +* Sat Feb 18 2017 Jonathan Wakely - 25.3.16-2 +- Use asio-devel instead of bundled asio library + +* Fri Feb 10 2017 Fedora Release Engineering - 25.3.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jun 22 2016 Mike Bayer - 25.3.16-1 +- Update to 25.3.16 + +* Wed Feb 03 2016 Fedora Release Engineering - 25.3.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Jonathan Wakely - 25.3.12-3 +- Rebuilt for Boost 1.60 + +* Wed Sep 30 2015 Marcin Juszkiewicz - 25.3.12-2 +- Remove use of -mtune=native which breaks build on secondary architectures + +* Fri Sep 25 2015 Richard W.M. Jones - 25.3.12-1 +- Update to 25.3.12. +- Should fix the build on 32 bit ARM (RHBZ#1241164). +- Remove ExcludeArch (should have read the BZ more closely). + +* Thu Aug 27 2015 Jonathan Wakely - 25.3.10-5 +- Rebuilt for Boost 1.59 + +* Wed Jul 29 2015 Fedora Release Engineering - 25.3.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 25.3.10-3 +- rebuild for Boost 1.58 + +* Wed Jul 08 2015 Ryan O'Hara - 25.3.10-2 +- Disable ARM builds (#1241164, #1239516) + +* Mon Jul 06 2015 Ryan O'Hara - 25.3.10-1 +- Update to version 25.3.10 + +* Wed Jun 17 2015 Fedora Release Engineering - 25.3.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Jan 26 2015 Petr Machata - 25.3.5-10 +- Rebuild for boost 1.57.0 + +* Thu Nov 27 2014 Richard W.M. Jones - 25.3.5-9 +- Add aarch64 support. + +* Sat Aug 16 2014 Fedora Release Engineering - 25.3.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 25.3.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Petr Machata - 25.3.5-6 +- Rebuild for boost 1.55.0 + +* Wed Apr 30 2014 Dan HorĂ¡k - 25.3.5-5 +- set ExclusiveArch + +* Thu Apr 24 2014 Ryan O'Hara - 25.3.5-4 +- Use strict_build_flags=0 to avoid -Werror +- Remove unnecessary clean section + +* Thu Apr 24 2014 Ryan O'Hara - 25.3.5-3 +- Include galera directories in file list +- Set CPPFLAGS to optflags + +* Wed Apr 23 2014 Ryan O'Hara - 25.3.5-2 +- Fix client certificate verification (#1090604) + +* Thu Mar 27 2014 Ryan O'Hara - 25.3.5-1 +- Update to version 25.3.5 + +* Mon Mar 24 2014 Ryan O'Hara - 25.3.3-2 +- Add systemd service + +* Sun Mar 09 2014 Ryan O'Hara - 25.3.3-1 +- Initial build diff --git a/garbd-wrapper b/garbd-wrapper new file mode 100755 index 0000000..ede76f7 --- /dev/null +++ b/garbd-wrapper @@ -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 diff --git a/garbd.service b/garbd.service new file mode 100644 index 0000000..9645fe2 --- /dev/null +++ b/garbd.service @@ -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 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..c190bde --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/sources b/sources new file mode 100644 index 0000000..929db92 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA1 (galera-25.3.32.tar.gz) = 8f915b0e053999e7963f15b3f4364ca774e843d9