From 4a79a982e39b5cfe1a32c293692c71889ba9952b Mon Sep 17 00:00:00 2001 From: Release Configuration Management Date: Thu, 8 Oct 2020 12:08:52 +0000 Subject: [PATCH 01/47] New branch setup --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 From fabd30ab42995d87676c02cb15c5b227cc430f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 00:41:21 +0200 Subject: [PATCH 02/47] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/galera#381701a3b6cefd65101f20e5616b30b08919e408 --- .gitignore | 12 ++ galera-python3.patch | 17 +++ galera.spec | 268 +++++++++++++++++++++++++++++++++++++++++++ garbd-wrapper | 38 ++++++ garbd.service | 10 ++ sources | 1 + 6 files changed, 346 insertions(+) create mode 100644 galera-python3.patch create mode 100644 galera.spec create mode 100755 garbd-wrapper create mode 100644 garbd.service create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..d25f64a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,12 @@ +/galera-25.3.5-src.tar.gz +/galera-3-25.3.10.tar.gz +/galera-3-25.3.12.tar.gz +/galera-3-25.3.16.tar.gz +/galera-25.3.22.tar.gz +/galera-25.3.23.tar.gz +/galera-25.3.25.tar.gz +/galera-25.3.26.tar.gz +/galera-25.3.28.tar.gz +/galera-26.4.3.tar.gz +/galera-26.4.4.tar.gz +/galera-26.4.5.tar.gz diff --git a/galera-python3.patch b/galera-python3.patch new file mode 100644 index 0000000..59bb4f1 --- /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.23/SConstruct.bak 2018-07-13 15:14:49.059835554 +0200 ++++ galera-25.3.23/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..1fd562b --- /dev/null +++ b/galera.spec @@ -0,0 +1,268 @@ +Name: galera +Version: 26.4.5 +Release: 2%{?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://mirror.vpsfree.cz/mariadb/mariadb-10.4.11/galera-26.4.3/src/galera-26.4.3.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 + +%{?systemd_requires} + + +%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 + +# Workaround for FTBFS on F33+ +# https://bugzilla.redhat.com/show_bug.cgi?id=1863592 +# Reported upstream: +# https://github.com/codership/galera/issues/577 +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 +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 asio/LICENSE_1_0.txt %{buildroot}%{_docdir}/galera/LICENSE.asio +install -D -m 644 www.evanjones.ca/LICENSE %{buildroot}%{_docdir}/galera/LICENSE.crc32 +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.crc32 +%doc %{_docdir}/galera/README +%doc %{_docdir}/galera/README-MySQL + + +%changelog +* Thu Sep 17 2020 Michal Schorm - 26.4.5-2 +- Extend the workaround also to ELN + +* Wed Sep 16 2020 Michal Schorm - 26.4.5-1 +- Rebase to 26.4.5 + +* Wed Sep 16 2020 Michal Schorm - 26.4.4-5 +- Apply workaround for FTBFS on F33+ + +* Sat Aug 01 2020 Fedora Release Engineering - 26.4.4-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 26.4.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jun 08 2020 Michal Schorm - 26.4.4-2 +- Second rebuild for Boost 1.73 + +* Fri Jun 05 2020 Michal Schorm - 26.4.4-1 +- Rebase to 26.4.4 + Resolves: rhbz#1546787 + +* Thu May 28 2020 Jonathan Wakely - 26.4.3-4 +- Rebuilt for Boost 1.73 + +* Tue Jan 28 2020 Fedora Release Engineering - 26.4.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jan 18 2020 Michal Schorm - 26.4.3-2 +- Rebase to 26.4.3 + +* Wed Nov 06 2019 Michal Schorm - 25.3.28-1 +- Rebase to 25.3.28 + +* Thu Aug 01 2019 Michal Schorm - 25.3.26-3 +- Fix for #1735233 and #1737108 + +* Thu Jul 25 2019 Fedora Release Engineering - 25.3.26-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Jul 19 2019 Michal Schorm - 25.3.26-1 +- Rebase to 25.3.26 + +* Fri Jul 19 2019 Michal Schorm - 25.3.25-4 +- Use macro for setting up the compiler flags + +* Thu Jan 31 2019 Fedora Release Engineering - 25.3.25-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 29 2019 Jonathan Wakely - 25.3.25-2 +- Rebuilt for Boost 1.69 + +* Tue Jan 01 2019 Michal Schorm - 25.3.25-1 +- Rebase to 25.3.25 + +* 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/sources b/sources new file mode 100644 index 0000000..ba5dbb2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (galera-26.4.5.tar.gz) = 5f0fb385ffc1576d9567357777a0a1f616af8562cc614ee39b1d78cb77124df5bb5640e31d296e2e018ad04edae0eb8e925282e1d7dcb4dd590089cd39039b1d From 4e3373b0b7b729876adefa04008f7b7d8d6cbee4 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 27 Oct 2020 17:37:01 +0100 Subject: [PATCH 03/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#381701a3b6cefd65101f20e5616b30b08919e408 From b894f6d991f53bb4ef8d62450198b203318cf32a Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 4 Nov 2020 16:18:10 +0000 Subject: [PATCH 04/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#0877da02461014f3811ad6aa91ea46deddf2d0ff --- .gitignore | 1 + galera.spec | 10 ++++++---- sources | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d25f64a..8b5f62d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /galera-26.4.3.tar.gz /galera-26.4.4.tar.gz /galera-26.4.5.tar.gz +/galera-26.4.6.tar.gz diff --git a/galera.spec b/galera.spec index 1fd562b..1657841 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera -Version: 26.4.5 -Release: 2%{?dist} +Version: 26.4.6 +Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -51,6 +51,7 @@ replication engine see http://www.codership.com. # https://bugzilla.redhat.com/show_bug.cgi?id=1863592 # Reported upstream: # https://github.com/codership/galera/issues/577 +# Update for 26.4.6: The strict_build_flags still FTBFS on armv7hl and i686 %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 scons-3 %{?_smp_mflags} strict_build_flags=0 %else @@ -65,7 +66,6 @@ install -D -m 755 libgalera_smm.so %{buildroot}%{_libdir}/galera/libgalera_smm.s 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 www.evanjones.ca/LICENSE %{buildroot}%{_docdir}/galera/LICENSE.crc32 install -D -m 644 scripts/packages/README %{buildroot}%{_docdir}/galera/README install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/README-MySQL @@ -92,12 +92,14 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %{_libdir}/galera/libgalera_smm.so %doc %{_docdir}/galera/COPYING %doc %{_docdir}/galera/LICENSE.asio -%doc %{_docdir}/galera/LICENSE.crc32 %doc %{_docdir}/galera/README %doc %{_docdir}/galera/README-MySQL %changelog +* Wed Nov 04 2020 Michal Schorm - 26.4.6-1 +- Rebase to 26.4.6 + * Thu Sep 17 2020 Michal Schorm - 26.4.5-2 - Extend the workaround also to ELN diff --git a/sources b/sources index ba5dbb2..3933c95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.5.tar.gz) = 5f0fb385ffc1576d9567357777a0a1f616af8562cc614ee39b1d78cb77124df5bb5640e31d296e2e018ad04edae0eb8e925282e1d7dcb4dd590089cd39039b1d +SHA512 (galera-26.4.6.tar.gz) = 512b6f226ae0a4da9b02df6edd22a41eb126b89b1ef5757c25c5815e4c9fca6ae5b7297a6c27ba1a14e88ccc70a5f513c18c750e3fa46f79b221bb77e269729e From 3ee26a80de58ba04b778906732d846a3e78a0382 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Fri, 11 Dec 2020 08:05:38 +0000 Subject: [PATCH 05/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#0877da02461014f3811ad6aa91ea46deddf2d0ff From 02416b0c88444381e4c940db60b1a602d1947e04 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Sun, 24 Jan 2021 22:40:39 +0000 Subject: [PATCH 06/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#db8076111d6c7958715b3ad4b85755f1806bd619 --- galera.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/galera.spec b/galera.spec index 1657841..a0bfd82 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -8,7 +8,7 @@ URL: http://galeracluster.com/ # Actually, the truth is, we do use galera source tarball provided by MariaDB on # following URL (without macros): -# https://mirror.vpsfree.cz/mariadb/mariadb-10.4.11/galera-26.4.3/src/galera-26.4.3.tar.gz +# https://archive.mariadb.org/mariadb-10.4.16/galera-26.4.6/src/galera-26.4.6.tar.gz Source0: http://releases.galeracluster.com/source/%{name}-%{version}.tar.gz @@ -97,6 +97,9 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %changelog +* Fri Jan 22 2021 Jonathan Wakely - 26.4.6-2 +- Rebuilt for Boost 1.75 + * Wed Nov 04 2020 Michal Schorm - 26.4.6-1 - Rebase to 26.4.6 From 027db02d91581a8b59d521b8990599beece5a81d Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 26 Jan 2021 14:38:52 -0800 Subject: [PATCH 07/47] mini-bump for boost rebuild --- galera.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index a0bfd82..a7042a7 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.6 -Release: 2%{?dist} +Release: 2.1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 From 74b5a967559ab9b32a62e434dbcd171b54dde57d Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 3 Feb 2021 14:49:37 +0100 Subject: [PATCH 08/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#ca32987e07f93dbe4b90b860f3a919e0334f3962 --- galera.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index a7042a7..d1e0c0c 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.6 -Release: 2.1%{?dist} +Release: 3%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -97,6 +97,9 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 26.4.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Jan 22 2021 Jonathan Wakely - 26.4.6-2 - Rebuilt for Boost 1.75 From 12e27b5f9b3d7671956a6f21fd36fd1020eff821 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 9 Feb 2021 18:23:44 +0100 Subject: [PATCH 09/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#ca32987e07f93dbe4b90b860f3a919e0334f3962 From 89ced006cf40afbebf418773168b293c078574ff Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 17 Feb 2021 12:06:04 +0100 Subject: [PATCH 10/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#ca32987e07f93dbe4b90b860f3a919e0334f3962 From 1c175574682b37206c664c17ea6e4c6366ab0b58 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Fri, 19 Feb 2021 12:00:32 +0000 Subject: [PATCH 11/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#ca32987e07f93dbe4b90b860f3a919e0334f3962 From a4a3c7ed61883a18168bbc93e31d356bcc354ed2 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 24 Mar 2021 23:25:47 +0000 Subject: [PATCH 12/47] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/galera.git#7dfe556025ba302979839424ae60405dfc3f0c92 --- .gitignore | 1 + galera.spec | 24 +++++++++++++----------- sources | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 8b5f62d..e90f3a9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /galera-26.4.4.tar.gz /galera-26.4.5.tar.gz /galera-26.4.6.tar.gz +/galera-26.4.7.tar.gz diff --git a/galera.spec b/galera.spec index d1e0c0c..f301f45 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera -Version: 26.4.6 -Release: 3%{?dist} +Version: 26.4.7 +Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -47,16 +47,15 @@ replication engine see http://www.codership.com. # --warn=all # debug=0 -# Workaround for FTBFS on F33+ -# https://bugzilla.redhat.com/show_bug.cgi?id=1863592 -# Reported upstream: -# https://github.com/codership/galera/issues/577 -# Update for 26.4.6: The strict_build_flags still FTBFS on armv7hl and i686 -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 -scons-3 %{?_smp_mflags} strict_build_flags=0 -%else +# Workaround for version 26.4.7 +export CXXFLAGS="$CXXFLAGS -Wno-error=format-extra-args" +# ... and for 32 bit arches +export CXXFLAGS="$CXXFLAGS -Wno-error=format" +export CFLAGS="$CFLAGS -Wno-error=format-extra-args -Wno-error=format" +# end of workaroound + scons-3 %{?_smp_mflags} strict_build_flags=1 -%endif + %install install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/garbd.service @@ -97,6 +96,9 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %changelog +* Tue Feb 23 2021 Michal Schorm - 26.4.7-1 +- Rebase to 26.4.7 + * Tue Jan 26 2021 Fedora Release Engineering - 26.4.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 3933c95..475b61a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.6.tar.gz) = 512b6f226ae0a4da9b02df6edd22a41eb126b89b1ef5757c25c5815e4c9fca6ae5b7297a6c27ba1a14e88ccc70a5f513c18c750e3fa46f79b221bb77e269729e +SHA512 (galera-26.4.7.tar.gz) = 6c5016aca151c4560db65bed309d8381080546030f003a5aa1177d68685eabbce44dfc2551db8756206831a898659b26d0904a48336b8ba22c0106260577543e From fb8dc25373caf8a571bd28727f02e40481577066 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Thu, 15 Apr 2021 23:25:47 +0000 Subject: [PATCH 13/47] - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 Signed-off-by: Mohan Boddu --- galera.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index f301f45..18ef1b2 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -96,6 +96,9 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %changelog +* Thu Apr 15 2021 Mohan Boddu - 26.4.7-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + * Tue Feb 23 2021 Michal Schorm - 26.4.7-1 - Rebase to 26.4.7 From 742b520ffd08b3c88f1d64ad06d7605800b09ec3 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Wed, 16 Jun 2021 03:25:08 +0000 Subject: [PATCH 14/47] Rebuilt for RHEL 9 BETA for openssl 3.0 Related: rhbz#1971065 Signed-off-by: Mohan Boddu --- galera.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 18ef1b2..eb7a714 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -96,6 +96,10 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %changelog +* Wed Jun 16 2021 Mohan Boddu - 26.4.7-3 +- Rebuilt for RHEL 9 BETA for openssl 3.0 + Related: rhbz#1971065 + * Thu Apr 15 2021 Mohan Boddu - 26.4.7-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 From d6d950b686771e9d0a53b4d3734ba373f3b6bf42 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Thu, 3 Jun 2021 11:32:58 +0200 Subject: [PATCH 15/47] Rebase to 26.4.8 Related: #1982642 --- .gitignore | 1 + galera.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e90f3a9..4b13033 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /galera-26.4.5.tar.gz /galera-26.4.6.tar.gz /galera-26.4.7.tar.gz +/galera-26.4.8.tar.gz diff --git a/galera.spec b/galera.spec index eb7a714..6cf8c11 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera -Version: 26.4.7 -Release: 3%{?dist} +Version: 26.4.8 +Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -96,6 +96,9 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %changelog +* Thu Jun 03 2021 Lukas Javorsky - 26.4.8-1 +- Rebase to 26.4.8 + * Wed Jun 16 2021 Mohan Boddu - 26.4.7-3 - Rebuilt for RHEL 9 BETA for openssl 3.0 Related: rhbz#1971065 diff --git a/sources b/sources index 475b61a..aa29765 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.7.tar.gz) = 6c5016aca151c4560db65bed309d8381080546030f003a5aa1177d68685eabbce44dfc2551db8756206831a898659b26d0904a48336b8ba22c0106260577543e +SHA512 (galera-26.4.8.tar.gz) = 9ae72b7fcef5efde8349179e5a0d0759959d1b90923ec2830f05c570b37b5d514dd638fff6b7e94bb36dd4058260db71b83f64e072d1d6d8dedc8584bc562723 From 3ea985dd0506608573aec971b234309de8b5f659 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Wed, 9 Jun 2021 11:53:14 +0200 Subject: [PATCH 16/47] Fix the failing wsrep test issued in the BZ_1959484 Related: #1982642 --- galera.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/galera.spec b/galera.spec index 6cf8c11..a4379f0 100644 --- a/galera.spec +++ b/galera.spec @@ -34,6 +34,14 @@ replication engine see http://www.codership.com. %setup -q %patch0 -p1 +# Fix for BZ#1959484 +# The script is checking the version without the wsrep API number (the first number separated by dot) +# This could be caused by wrongly providing the version from wsrep_load function +# Issue is already reported here: https://github.com/codership/galera/issues/596 +# So we can temporary remove API version from the test to make it work, however, we will wait for the upstream's +# solution in the issue linked above +sed -i '/^GALERA_VER/s/API + //' wsrep/tests/SConscript + %build %{set_build_flags} From 01108d2e6d34fadd45b1a920062e59d8a78d5628 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 9 Jun 2021 22:29:39 +0200 Subject: [PATCH 17/47] Use bash globbing in .gitignore Related: #1982642 --- .gitignore | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 4b13033..1fa6378 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,3 @@ -/galera-25.3.5-src.tar.gz -/galera-3-25.3.10.tar.gz -/galera-3-25.3.12.tar.gz -/galera-3-25.3.16.tar.gz -/galera-25.3.22.tar.gz -/galera-25.3.23.tar.gz -/galera-25.3.25.tar.gz -/galera-25.3.26.tar.gz -/galera-25.3.28.tar.gz -/galera-26.4.3.tar.gz -/galera-26.4.4.tar.gz -/galera-26.4.5.tar.gz -/galera-26.4.6.tar.gz -/galera-26.4.7.tar.gz -/galera-26.4.8.tar.gz +/*.tar.gz +/*.rpm +/*/* From 16825667bb338d0766afddb3177ecf9291aa3879 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 10 Jun 2021 04:59:26 +0200 Subject: [PATCH 18/47] Switch from SCONS to CMAKE building tooling Related: #1982642 --- cmake_paths.patch | 112 +++++++++++++++++++++++++++++++++++++++++++ galera-python3.patch | 17 ------- galera.spec | 61 ++++++++++++----------- 3 files changed, 144 insertions(+), 46 deletions(-) create mode 100644 cmake_paths.patch delete mode 100644 galera-python3.patch diff --git a/cmake_paths.patch b/cmake_paths.patch new file mode 100644 index 0000000..e341b09 --- /dev/null +++ b/cmake_paths.patch @@ -0,0 +1,112 @@ +1) Documentation files + +--- galera-26.4.8/CMakeLists.txt 2021-04-08 08:05:44.000000000 +0200 ++++ galera-26.4.8/CMakeLists.txt_patched 2021-06-10 01:40:26.886770832 +0200 +@@ -106,14 +106,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 + ${CMAKE_SOURCE_DIR}/AUTHORS + ${CMAKE_SOURCE_DIR}/COPYING + ${CMAKE_SOURCE_DIR}/README +- DESTINATION doc) ++ DESTINATION ${INSTALL_DOCDIR} ) + install(FILES ${CMAKE_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 + ${CMAKE_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 deleted file mode 100644 index 59bb4f1..0000000 --- a/galera-python3.patch +++ /dev/null @@ -1,17 +0,0 @@ -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.23/SConstruct.bak 2018-07-13 15:14:49.059835554 +0200 -+++ galera-25.3.23/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 index a4379f0..ecb5d6c 100644 --- a/galera.spec +++ b/galera.spec @@ -15,9 +15,9 @@ Source0: http://releases.galeracluster.com/source/%{name}-%{version}.tar. Source1: garbd.service Source2: garbd-wrapper -Patch0: galera-python3.patch +Patch0: cmake_paths.patch -BuildRequires: boost-devel check-devel openssl-devel python3-scons systemd gcc-c++ asio-devel +BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel Requires: nmap-ncat %{?systemd_requires} @@ -45,36 +45,29 @@ sed -i '/^GALERA_VER/s/API + //' wsrep/tests/SConscript %build %{set_build_flags} -# Print help: -# scons-3 --help -# scons-3 -H -# Possibly usefull arguments: -# --debug=findlibs -# --debug=stacktrace -# --warn=all -# debug=0 +%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" -# Workaround for version 26.4.7 -export CXXFLAGS="$CXXFLAGS -Wno-error=format-extra-args" -# ... and for 32 bit arches -export CXXFLAGS="$CXXFLAGS -Wno-error=format" -export CFLAGS="$CFLAGS -Wno-error=format-extra-args -Wno-error=format" -# end of workaroound +cmake -B %_vpath_builddir -LAH -scons-3 %{?_smp_mflags} strict_build_flags=1 +%cmake_build %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 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 +%cmake_install %post @@ -91,16 +84,26 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE %files %config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb + %dir %{_docdir}/galera %dir %{_libdir}/galera + %{_sbindir}/garbd -%{_sbindir}/garbd-wrapper -%{_unitdir}/garbd.service +#%{_sbindir}/garbd-wrapper +%{_sbindir}/garb-systemd + +%{_mandir}/man8/garbd.8* + +#%{_unitdir}/garbd.service +%{_unitdir}/garb.service + %{_libdir}/galera/libgalera_smm.so + +%doc %{_docdir}/galera/AUTHORS %doc %{_docdir}/galera/COPYING %doc %{_docdir}/galera/LICENSE.asio %doc %{_docdir}/galera/README -%doc %{_docdir}/galera/README-MySQL +#%doc %{_docdir}/galera/README-MySQL %changelog From 13596c1e89c36eb2700d7f83e4758fb8b233d417 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 10 Jun 2021 05:09:50 +0200 Subject: [PATCH 19/47] Revert "Fix the failing wsrep test issued in the BZ_1959484" This reverts commit 89095776bbd0cd3486563c068c4c647c05b8aefc. Related: #1982642 --- galera.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/galera.spec b/galera.spec index ecb5d6c..211c695 100644 --- a/galera.spec +++ b/galera.spec @@ -34,14 +34,6 @@ replication engine see http://www.codership.com. %setup -q %patch0 -p1 -# Fix for BZ#1959484 -# The script is checking the version without the wsrep API number (the first number separated by dot) -# This could be caused by wrongly providing the version from wsrep_load function -# Issue is already reported here: https://github.com/codership/galera/issues/596 -# So we can temporary remove API version from the test to make it work, however, we will wait for the upstream's -# solution in the issue linked above -sed -i '/^GALERA_VER/s/API + //' wsrep/tests/SConscript - %build %{set_build_flags} From f701088ddb8ec0efa0d966cae703b6f1876bee7d Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 14 Jul 2021 16:03:41 +0200 Subject: [PATCH 20/47] PATCH 1: Change the Systemd service name from "garb" to "garbd" Related: #1982642 --- galera.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/galera.spec b/galera.spec index 211c695..402357e 100644 --- a/galera.spec +++ b/galera.spec @@ -61,6 +61,16 @@ cmake -B %_vpath_builddir -LAH %install %cmake_install +# PATCH 1: +# Change the Systemd service name from "garb" to "garbd" +# +# The Galera upstream uses name "garb" for the service while providing "garbd" alias +# Fedora downstream packaging historically used "garbd" name for the service. +# +# Let's stick with the Fedora legacy naming, AND provide an alias to the Galera upstream name +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 + %post /sbin/ldconfig @@ -86,8 +96,7 @@ cmake -B %_vpath_builddir -LAH %{_mandir}/man8/garbd.8* -#%{_unitdir}/garbd.service -%{_unitdir}/garb.service +%{_unitdir}/garbd.service %{_libdir}/galera/libgalera_smm.so From 21365abe46551410cb2d8d12362790f5befcd9a1 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 14 Jul 2021 16:42:05 +0200 Subject: [PATCH 21/47] PATCH 2: Fix the hardcoded paths Related: #1982642 --- galera.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/galera.spec b/galera.spec index 402357e..01de09a 100644 --- a/galera.spec +++ b/galera.spec @@ -71,6 +71,13 @@ cmake -B %_vpath_builddir -LAH 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 +# PATCH 2: +# Fix the 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 +# In the wrapper script: +sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd + %post /sbin/ldconfig From 5cb86dd9b2eecdad19dfd5a85e8649c76b86a76c Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 14 Jul 2021 16:55:26 +0200 Subject: [PATCH 22/47] PATCH 3: Make sure the wrapper script is executable Related: #1982642 --- galera.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 01de09a..1a6cf7e 100644 --- a/galera.spec +++ b/galera.spec @@ -99,7 +99,10 @@ sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd %{_sbindir}/garbd #%{_sbindir}/garbd-wrapper -%{_sbindir}/garb-systemd + +# PATCH 3: +# Make sure the wrapper script is executable +%attr(755, -, -) %{_sbindir}/garb-systemd %{_mandir}/man8/garbd.8* From 23056886486147c96329f2d6756a2fe2a1600e23 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 14 Jul 2021 17:46:39 +0200 Subject: [PATCH 23/47] PATCH 4: Use a dedicated user for the Systemd service Related: #1982642 --- galera.spec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/galera.spec b/galera.spec index 1a6cf7e..0af7fe6 100644 --- a/galera.spec +++ b/galera.spec @@ -18,6 +18,7 @@ Source2: garbd-wrapper Patch0: cmake_paths.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel +Requires(pre): /usr/sbin/useradd Requires: nmap-ncat %{?systemd_requires} @@ -78,6 +79,33 @@ sed -i 's;/usr/bin/garb-systemd;/usr/sbin/garb-systemd;g' %{buildroot}/usr/lib/s # In the wrapper script: sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd +# PATCH 4: +# Use a dedicated user for the Systemd service +# To fix an security issue reported by Systemd: +# +## systemd[1]: /usr/lib/systemd/system/garb.service:14: Special user nobody configured, this is not safe! +## Subject: Special user nobody configured, this is not safe! +## Defined-By: systemd +## Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel +## Documentation: https://systemd.io/UIDS-GIDS +## +## The unit garb.service is configured to use User=nobody. +## +## This is not safe. The nobody user's main purpose on Linux-based +## operating systems is to be the owner of files that otherwise cannot be mapped +## to any local user. It's used by the NFS client and Linux user namespacing, +## among others. By running a unit's processes under the identity of this user +## they might possibly get read and even write access to such files that cannot +## otherwise be mapped. +## +## It is strongly recommended to avoid running services under this user identity, +## in particular on systems using NFS or running containers. Allocate a user ID +## specific to this service, either statically via systemd-sysusers or dynamically +## via the DynamicUser= service setting. +sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.service + +%pre +/usr/sbin/useradd -M -r -d /dev/null -s /sbin/nologin -c "Galera Arbitrator Daemon" garb >/dev/null 2>&1 || : %post /sbin/ldconfig From 93225eef30bc198d04c7b60d9993059439187f69 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 15 Jul 2021 11:50:27 +0200 Subject: [PATCH 24/47] Release bump for: Switch from SCONS build tooling to CMAKE build tooling Related: #1982642 --- galera.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 0af7fe6..438480a 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -146,6 +146,10 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Thu Jul 15 2021 Michal Schorm - 26.4.8-2 +- Switch from SCONS build tooling to CMAKE build tooling +- Use upstream variants of Systemd service file and Systemd service file wrapper srcipt + * Thu Jun 03 2021 Lukas Javorsky - 26.4.8-1 - Rebase to 26.4.8 From 6c5d7e79739c3246a9e41545c698650eab4a5afe Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 15 Jul 2021 16:25:56 +0200 Subject: [PATCH 25/47] Add gating.yaml --- gating.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gating.yaml 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} From efa3dd41a5e008568ee5ccedcddefa20f0ad4663 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Mon, 9 Aug 2021 20:06:33 +0000 Subject: [PATCH 26/47] Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 Signed-off-by: Mohan Boddu --- galera.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 438480a..bb7387b 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -146,6 +146,10 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Mon Aug 09 2021 Mohan Boddu +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + * Thu Jul 15 2021 Michal Schorm - 26.4.8-2 - Switch from SCONS build tooling to CMAKE build tooling - Use upstream variants of Systemd service file and Systemd service file wrapper srcipt From 57780a24daaa2b365d99365fd7815097756003bc Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 17 Aug 2021 16:48:35 +0200 Subject: [PATCH 27/47] Rebase to 26.4.9 Related: #1982642 --- galera.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/galera.spec b/galera.spec index bb7387b..a82e044 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera -Version: 26.4.8 -Release: 3%{?dist} +Version: 26.4.9 +Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -146,6 +146,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Tue Aug 17 2021 Michal Schorm - 26.4.9-1 +- Rebase to 26.4.9 + * Mon Aug 09 2021 Mohan Boddu - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/sources b/sources index aa29765..c27c18c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.8.tar.gz) = 9ae72b7fcef5efde8349179e5a0d0759959d1b90923ec2830f05c570b37b5d514dd638fff6b7e94bb36dd4058260db71b83f64e072d1d6d8dedc8584bc562723 +SHA512 (galera-26.4.9.tar.gz) = a67f89e71d4635a634a6a4eb138a4a3fd6a8f1444dd0ba7bd46a2c1342e815da2ebd1df56a111cddf4470ad51a5b0a8e2153357c6066d8ba99aa3aec8761a857 From 49c275a55816e5c3de38cc4cbaa48777f2263dec Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Fri, 19 Nov 2021 17:09:07 +0100 Subject: [PATCH 28/47] Explicitly require the 'procps-ng' package Resolves: BZ#2024974 This is required in case of lightweight systems like containers, which don't install these requirments by default. Galera won't work properly without the 'procps-ng' package. --- galera.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index a82e044..7ee4abd 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -20,6 +20,7 @@ Patch0: cmake_paths.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel Requires(pre): /usr/sbin/useradd Requires: nmap-ncat +Requires: procps-ng %{?systemd_requires} @@ -146,6 +147,11 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Fri Nov 19 2021 Lukas Javorsky - 26.4.9-2 +- Explicitly require the 'procps-ng' package +- Otherwise it will not require it in the lightweight systems (e.g. containers) +- and Galera won't work properly + * Tue Aug 17 2021 Michal Schorm - 26.4.9-1 - Rebase to 26.4.9 From bf27698d4dbe682f6cf17a2d6ad44208c1925f2a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 24 Feb 2022 01:43:54 +0100 Subject: [PATCH 29/47] Rebase to 26.4.11 -- Related: #2092371 #2092370 --- cmake_paths.patch | 16 ++++++++-------- galera.spec | 7 +++++-- sources | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cmake_paths.patch b/cmake_paths.patch index e341b09..f194ee0 100644 --- a/cmake_paths.patch +++ b/cmake_paths.patch @@ -1,8 +1,8 @@ 1) Documentation files ---- galera-26.4.8/CMakeLists.txt 2021-04-08 08:05:44.000000000 +0200 -+++ galera-26.4.8/CMakeLists.txt_patched 2021-06-10 01:40:26.886770832 +0200 -@@ -106,14 +106,19 @@ add_subdirectory(galera) +--- 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) @@ -13,12 +13,12 @@ + if (NOT ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD") install(FILES - ${CMAKE_SOURCE_DIR}/AUTHORS - ${CMAKE_SOURCE_DIR}/COPYING - ${CMAKE_SOURCE_DIR}/README + ${PROJECT_SOURCE_DIR}/AUTHORS + ${PROJECT_SOURCE_DIR}/COPYING + ${PROJECT_SOURCE_DIR}/README - DESTINATION doc) + DESTINATION ${INSTALL_DOCDIR} ) - install(FILES ${CMAKE_SOURCE_DIR}/asio/LICENSE_1_0.txt + install(FILES ${PROJECT_SOURCE_DIR}/asio/LICENSE_1_0.txt - DESTINATION doc + DESTINATION ${INSTALL_DOCDIR} RENAME LICENSE.asio) @@ -83,7 +83,7 @@ + endif() + install(FILES - ${CMAKE_SOURCE_DIR}/man/garbd.8 + ${PROJECT_SOURCE_DIR}/man/garbd.8 - DESTINATION man/man8) + DESTINATION ${INSTALL_MANPAGE}) + diff --git a/galera.spec b/galera.spec index 7ee4abd..b9de0c3 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera -Version: 26.4.9 -Release: 2%{?dist} +Version: 26.4.11 +Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -147,6 +147,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Sun Feb 20 2022 Michal Schorm - 26.4.11-1 +- Rebase to 26.4.11 + * Fri Nov 19 2021 Lukas Javorsky - 26.4.9-2 - Explicitly require the 'procps-ng' package - Otherwise it will not require it in the lightweight systems (e.g. containers) diff --git a/sources b/sources index c27c18c..7fc31ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.9.tar.gz) = a67f89e71d4635a634a6a4eb138a4a3fd6a8f1444dd0ba7bd46a2c1342e815da2ebd1df56a111cddf4470ad51a5b0a8e2153357c6066d8ba99aa3aec8761a857 +SHA512 (galera-26.4.11.tar.gz) = 7f8f6c6633ca3cc782ec5e874303bf9e5343bffb0da5bbda50417750a1d22b4540bfaa2339a75c506214b7aa5ecc253fa4888c2e8e532751d4e904ca50001ecf From 0ddac9b92eb4bf4b7a1b2c7041c6887c98dee38a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sun, 20 Feb 2022 15:15:14 +0100 Subject: [PATCH 30/47] Enable CTest in the %check phase -- Related: #2092371 #2092370 --- galera.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/galera.spec b/galera.spec index b9de0c3..93c8cd4 100644 --- a/galera.spec +++ b/galera.spec @@ -105,6 +105,11 @@ sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd ## via the DynamicUser= service setting. 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 || : From c92a747a654df082608bbba5891c8718fcbf55ae Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 21 Feb 2022 02:45:41 +0100 Subject: [PATCH 31/47] cmake_paths.patch upstreaming efforts started -- Related: #2092371 #2092370 --- cmake_paths.patch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake_paths.patch b/cmake_paths.patch index f194ee0..ec4f06a 100644 --- a/cmake_paths.patch +++ b/cmake_paths.patch @@ -1,3 +1,10 @@ +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 From 4cfc5c0799b04c38ce20a21e0a6b86ec08322d6f Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 28 Apr 2022 11:01:59 +0200 Subject: [PATCH 32/47] Remove the second source path definition from the CMake command The '%cmake' RPM macro in Fedora actually expands to: | ... | /usr/bin/cmake \ | -S "." \ | -B "redhat-linux-build" \ | ... So in this case the source patch was specified twice. First in the macro with the '-S' option and second time outside of the macro, in the SPECfile, without the '-S' option. CMake upstream declares that: | This has never been officially documented or supported, | but older versions accidentally accepted multiple source paths | and used the last path specified. Update scripts to avoid | passing multiple source path arguments. https://cmake.org/cmake/help/v3.23/release/3.23.html#deprecated-and-removed-features This was discovered as CMake upstream implemented a change to the 3.23.0-rc2 release that changed this behavior and it broke many Fedora packages that used this double source path definition. See rhbz#2057738 to see how build behaved After the CMake upstream got aware of what problems it caused in Fedora, they opened a merge request to restore the behavior to the old one, but kept the warnings that that is an unsupported and problematic behavior: https://gitlab.kitware.com/cmake/cmake/-/issues/23334 -- Related: #2092371 #2092370 --- galera.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 93c8cd4..4c09928 100644 --- a/galera.spec +++ b/galera.spec @@ -40,7 +40,7 @@ replication engine see http://www.codership.com. %{set_build_flags} -%cmake . \ +%cmake \ -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \ -DINSTALL_LAYOUT=RPM \ -DCMAKE_RULE_MESSAGES:BOOL=OFF \ From 7bfe3f711eb2f68d8ace3b1db5e47e3ad82f601f Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 31 May 2022 02:02:34 +0200 Subject: [PATCH 33/47] Update the package description Update dead links with current ones Put a word between every URL and a dot ending the sentence, so the dot won't accidentaly get part of the URL That would cause an inconvience in software redering the links "clickable" The description text was brought from an RPM released for RHEL 8 by the project upstream itself, I just added the trailing words after links. Issue originally reported as rhbz#2060416 -- Resolves: #2092371 Related: #2092370 --- galera.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/galera.spec b/galera.spec index 4c09928..dce6473 100644 --- a/galera.spec +++ b/galera.spec @@ -26,10 +26,10 @@ Requires: procps-ng %description -Galera is a fast synchronous multi-master wsrep provider (replication engine) +Galera is a fast synchronous multimaster 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. +about wsrep API see https://github.com/codership/wsrep-API repository. For a +description of Galera replication engine see https://www.galeracluster.com web. %prep From ece8717e9f81d200a0ea7ec2d6379838cba3f8aa Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 27 Sep 2023 20:10:51 +0000 Subject: [PATCH 34/47] Rebase to 26.4.12 Fedora commit: c06e16ff508019f4b95749da1011a47ce5957bc0 Resolves: RHEL-9548 --- galera.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/galera.spec b/galera.spec index dce6473..f5d8af8 100644 --- a/galera.spec +++ b/galera.spec @@ -1,5 +1,5 @@ Name: galera -Version: 26.4.11 +Version: 26.4.12 Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) @@ -152,6 +152,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Wed Aug 24 2022 Michal Schorm - 26.4.12-1 +- Rebase to 26.4.12 + * Sun Feb 20 2022 Michal Schorm - 26.4.11-1 - Rebase to 26.4.11 diff --git a/sources b/sources index 7fc31ea..7886e66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.11.tar.gz) = 7f8f6c6633ca3cc782ec5e874303bf9e5343bffb0da5bbda50417750a1d22b4540bfaa2339a75c506214b7aa5ecc253fa4888c2e8e532751d4e904ca50001ecf +SHA512 (galera-26.4.12.tar.gz) = b0168700f42ac3eecc7116606bdd44faeac43072f7763d25957c2b226b294fde5021023a3e26369c51d4dbb359eeb1878693888716e1ed9cdf0e64b84c1f8082 From 1bb05c6888355213c9af3a203e9bbc85f9f54f94 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 27 Sep 2023 20:14:20 +0000 Subject: [PATCH 35/47] Rebase to 26.4.13 Fedora commit: dc48c43a8cbab975f1565bed62a303f99cc2810a Related: RHEL-9548 --- galera.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/galera.spec b/galera.spec index f5d8af8..4ff7a83 100644 --- a/galera.spec +++ b/galera.spec @@ -1,5 +1,5 @@ Name: galera -Version: 26.4.12 +Version: 26.4.13 Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) @@ -152,6 +152,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Tue Nov 15 2022 Michal Schorm - 26.4.13-1 +- Rebase to 26.4.13 + * Wed Aug 24 2022 Michal Schorm - 26.4.12-1 - Rebase to 26.4.12 diff --git a/sources b/sources index 7886e66..d818d9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.12.tar.gz) = b0168700f42ac3eecc7116606bdd44faeac43072f7763d25957c2b226b294fde5021023a3e26369c51d4dbb359eeb1878693888716e1ed9cdf0e64b84c1f8082 +SHA512 (galera-26.4.13.tar.gz) = 63000c8e6504ad29aefd7222e16fef052d72b7b5d8262ce87d0da7637baf010ffbf4baa4dc8044d0b6cfd167c1f6f316d37e013296fb682e082b65feb9e1433a From 94b09a5ea05a8bd66aea0399208af270215dfbeb Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 27 Sep 2023 20:16:55 +0000 Subject: [PATCH 36/47] Rebase to 26.4.14 Fedora commit: da364136d0f42cb2087eb088ffaa586ed1b78fc8 Related: RHEL-9548 --- galera.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/galera.spec b/galera.spec index 4ff7a83..e9a8ed2 100644 --- a/galera.spec +++ b/galera.spec @@ -1,5 +1,5 @@ Name: galera -Version: 26.4.13 +Version: 26.4.14 Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) @@ -152,6 +152,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Sat Apr 29 2023 Michal Schorm - 26.4.14-1 +- Rebase to 26.4.14 + * Tue Nov 15 2022 Michal Schorm - 26.4.13-1 - Rebase to 26.4.13 diff --git a/sources b/sources index d818d9c..5a2a2a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.13.tar.gz) = 63000c8e6504ad29aefd7222e16fef052d72b7b5d8262ce87d0da7637baf010ffbf4baa4dc8044d0b6cfd167c1f6f316d37e013296fb682e082b65feb9e1433a +SHA512 (galera-26.4.14.tar.gz) = c91060fb19de86fd586365ddc6bd0123c51b76b5ec471d0ce27112d2fd22de93553d1d4c87c1ddfc6b10e9fbe6a19a051483bae00e353515c0ab878dc6dc30ef From 8c5f64c7d95fd1a1fc442ff34eb75e4056684a11 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 23 Jan 2024 08:17:03 +0100 Subject: [PATCH 37/47] Fix FTBFS by applying upstream commit from a future version of Galera, which fixes the problem with SSL certificates exipirng, which was causing test failures --- ...4d612359a294312943271abaf40685115fda.patch | 374 ++++++++++++++++++ galera.spec | 2 + 2 files changed, 376 insertions(+) create mode 100644 4e214d612359a294312943271abaf40685115fda.patch diff --git a/4e214d612359a294312943271abaf40685115fda.patch b/4e214d612359a294312943271abaf40685115fda.patch new file mode 100644 index 0000000..b83930d --- /dev/null +++ b/4e214d612359a294312943271abaf40685115fda.patch @@ -0,0 +1,374 @@ +Taken from: + https://github.com/codership/galera/commit/4e214d612359a294312943271abaf40685115fda.patch + +Reson: + The SSL certifactes expired, which resulted in the test failing: + | 85%: Checks: 77, Failures: 0, Errors: 11 + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1019:E:test_ssl_connect:test_ssl_connect:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1031:E:test_ssl_connect_twice:test_ssl_connect_twice:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1046:E:test_ssl_async_read_write:test_ssl_async_read_write:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1058:E:test_ssl_async_read_write_large:test_ssl_async_read_write_large:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:636:E:test_ssl_async_read_write_small_large:test_ssl_async_read_write_small_large:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1083:E:test_ssl_async_read_from_client_write_from_server:test_ssl_async_read_from_client_write_from_server:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1096:E:test_ssl_write_twice_wo_handling:test_ssl_write_twice_wo_handling:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1109:E:test_ssl_close_client:test_ssl_close_client:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1121:E:test_ssl_close_server:test_ssl_close_server:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1133:E:test_ssl_get_tcp_info:test_ssl_get_tcp_info:0: (after this point) Test timeout expired + | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1145:E:test_ssl_compression_option:test_ssl_compression_option:0: (after this point) Test timeout expired + +--- + +From 4e214d612359a294312943271abaf40685115fda Mon Sep 17 00:00:00 2001 +From: Teemu Ollakka +Date: Mon, 2 Oct 2023 20:31:37 +0300 +Subject: [PATCH] codership/galera#647 Generate keys and certificates for SSL + tests + +Relying on static certificates causes several problems: +- Certificates eventually expire, which causes surprises + when tests suddenly stop passing without prior warning. +- Standards change, a certificate created on different + platform long time ago may not be usable on some more + modern platform. +- Lack of fine grained control on test scenarios without + generating and storing several certificates in source + repository. + +In order to work around the problems above, generate +certificates programmatically before the tests are run. +The generated certificates use the same versioning and +extensions as the original ones under tests/conf. +--- + galerautils/tests/CMakeLists.txt | 4 +- + galerautils/tests/gu_asio_test.cpp | 269 ++++++++++++++++++++++++++++- + 3 files changed, 266 insertions(+), 8 deletions(-) + +diff --git a/galerautils/tests/CMakeLists.txt b/galerautils/tests/CMakeLists.txt +index f863ce66b..a44b2d6b3 100644 +--- a/galerautils/tests/CMakeLists.txt ++++ b/galerautils/tests/CMakeLists.txt +@@ -47,7 +47,6 @@ add_test( + # + # C++ galerautils tests. + # +- + add_executable(gu_tests++ + gu_atomic_test.cpp + gu_gtid_test.cpp +@@ -75,7 +74,7 @@ add_executable(gu_tests++ + + target_compile_definitions(gu_tests++ + PRIVATE +- -DGU_ASIO_TEST_CERT_DIR="${PROJECT_SOURCE_DIR}/tests/conf") ++ -DGU_ASIO_TEST_CERT_DIR="${CMAKE_CURRENT_BINARY_DIR}/certs") + + # TODO: These should be eventually fixed. + target_compile_options(gu_tests++ +@@ -93,7 +92,6 @@ add_test( + NAME gu_tests++ + COMMAND gu_tests++ + ) +- + # + # Deqmap micro benchmark. + # +diff --git a/galerautils/tests/gu_asio_test.cpp b/galerautils/tests/gu_asio_test.cpp +index c4c948bda..616902eb1 100644 +--- a/galerautils/tests/gu_asio_test.cpp ++++ b/galerautils/tests/gu_asio_test.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2019-2020 Codership Oy ++ * Copyright (C) 2019-2023 Codership Oy + */ + + +@@ -920,18 +920,276 @@ END_TEST + + #ifdef GALERA_HAVE_SSL + ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + +-// +-// SSL +-// ++#include + + static std::string get_cert_dir() + { +- // This will be set by CMake/preprocessor. ++ static_assert(::strlen(GU_ASIO_TEST_CERT_DIR) > 0); ++ const std::string ret{ GU_ASIO_TEST_CERT_DIR }; ++ auto* dir = opendir(ret.c_str()); ++ if (!dir) ++ { ++ if (mkdir(ret.c_str(), S_IRWXU)) ++ { ++ const auto* errstr = ::strerror(errno); ++ gu_throw_fatal << "Could not create dir " << ret << ": " << errstr; ++ } ++ } ++ else ++ { ++ closedir(dir); ++ } + return GU_ASIO_TEST_CERT_DIR; + } + ++static int password_cb(char*, int, int, void*) { return 0; } ++ ++static void throw_error(const char* msg) ++{ ++ gu_throw_fatal << msg << ": " << ERR_error_string(ERR_get_error(), nullptr); ++} ++ ++static EVP_PKEY* create_key() ++{ ++#if OPENSSL_VERSION_MAJOR < 3 ++ auto* bn = BN_new(); ++ if (!bn) ++ { ++ throw_error("could not create BN"); ++ } ++ BN_set_word(bn, 0x10001); ++ auto* rsa = RSA_new(); ++ if (!rsa) ++ { ++ BN_free(bn); ++ throw_error("could not create RSA"); ++ } ++ RSA_generate_key_ex(rsa, 2048, bn, nullptr); ++ auto* pkey = EVP_PKEY_new(); ++ if (!pkey) ++ { ++ BN_free(bn); ++ RSA_free(rsa); ++ throw_error("could not create PKEY"); ++ } ++ EVP_PKEY_set1_RSA(pkey, rsa); ++ RSA_free(rsa); ++ BN_free(bn); ++ return pkey; ++#else ++ auto* ret = EVP_RSA_gen(2048); ++ if (!ret) ++ { ++ throw_error("could not create RSA"); ++ } ++ return ret; ++#endif /* OPENSSL_VERSION_MAJOR < 3 */ ++} ++ ++static FILE* open_file(const std::string& path, const char* mode) ++{ ++ auto* ret = fopen(path.c_str(), mode); ++ if (!ret) ++ { ++ const auto* errstr = ::strerror(errno); ++ gu_throw_fatal << "Could not open file " << path << ": " ++ << errstr; ++ } ++ return ret; ++} ++ ++static void write_key(EVP_PKEY* pkey, const std::string& filename) ++{ ++ const std::string cert_dir = get_cert_dir(); ++ const std::string key_file_path = cert_dir + "/" + filename; ++ auto* key_file = open_file(key_file_path, "wb"); ++ if (!PEM_write_PrivateKey(key_file, pkey, nullptr, nullptr, 0, password_cb, ++ nullptr)) ++ { ++ throw_error("Could not write key"); ++ } ++ fclose(key_file); ++} ++ ++static void set_x509v3_extensions(X509* x509, X509* issuer) ++{ ++ auto* conf_bio = BIO_new(BIO_s_mem()); ++ std::string ext{ "[extensions]\n" ++ "authorityKeyIdentifier=keyid,issuer\n" ++ "subjectKeyIdentifier=hash\n" }; ++ if (!issuer) ++ { ++ ext += "basicConstraints=critical,CA:TRUE\n"; ++ } ++ else ++ { ++ ext += "keyUsage=digitalSignature,keyEncipherment\n"; ++ ext += "basicConstraints=CA:FALSE\n"; ++ } ++ BIO_printf(conf_bio, "%s", ext.c_str()); ++ auto* conf = NCONF_new(nullptr); ++ long errorline = -1; ++ int err; ++ if ((err = NCONF_load_bio(conf, conf_bio, &errorline)) <= 0) ++ { ++ gu_throw_fatal << "Could not load conf: " << err; ++ } ++ if (errorline != -1) ++ { ++ gu_throw_fatal << "Could not load conf, errorline: " << errorline; ++ } ++ // TODO: V3 extensions ++ X509V3_CTX ctx; ++ X509V3_set_ctx(&ctx, issuer ? issuer : x509, x509, nullptr, nullptr, 0); ++ X509V3_set_nconf(&ctx, conf); ++ if (!X509V3_EXT_add_nconf(conf, &ctx, "extensions", x509)) ++ { ++ throw_error("Could not add extension"); ++ } ++ NCONF_free(conf); ++ BIO_free(conf_bio); ++} ++ ++static X509* create_x509(EVP_PKEY* pkey, X509* issuer, const char* cn) ++{ ++ auto* x509 = X509_new(); ++ /* According to standard, value 2 means version 3. */ ++ X509_set_version(x509, 2); ++ ASN1_INTEGER_set(X509_get_serialNumber(x509), 1); ++ X509_gmtime_adj(X509_get_notBefore(x509), 0); ++ X509_gmtime_adj(X509_get_notAfter(x509), 31536000L); ++ X509_set_pubkey(x509, pkey); ++ ++ auto* name = X509_get_subject_name(x509); ++ X509_NAME_add_entry_by_txt(name, "C", MBSTRING_ASC, (unsigned char*)"FI", ++ -1, -1, 0); ++ X509_NAME_add_entry_by_txt(name, "ST", MBSTRING_ASC, ++ (unsigned char*)"Uusimaa", -1, -1, 0); ++ X509_NAME_add_entry_by_txt(name, "L", MBSTRING_ASC, ++ (unsigned char*)"Helsinki", -1, -1, 0); ++ X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, ++ (unsigned char*)"Codership", -1, -1, 0); ++ X509_NAME_add_entry_by_txt(name, "OU", MBSTRING_ASC, ++ (unsigned char*)"Galera Devel", -1, -1, 0); ++ X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char*)cn, -1, ++ -1, 0); ++ if (!issuer) ++ { ++ /* Self signed */ ++ X509_set_issuer_name(x509, name); ++ } ++ else ++ { ++ X509_set_issuer_name(x509, X509_get_subject_name(issuer)); ++ } ++ ++ set_x509v3_extensions(x509, issuer); ++ ++ X509_sign(x509, pkey, EVP_sha256()); ++ ++ return x509; ++} ++ ++static void write_x509(X509* x509, const std::string& filename) ++{ ++ const std::string cert_dir = get_cert_dir(); ++ const std::string file_path = cert_dir + "/" + filename; ++ auto* file = open_file(file_path, "wb"); ++ if (!PEM_write_X509(file, x509)) ++ { ++ throw_error("Could not write x509"); ++ } ++ fclose(file); ++} ++ ++static void write_x509_list(const std::vector& certs, ++ const std::string& filename) ++{ ++ const std::string cert_dir = get_cert_dir(); ++ const std::string file_path = cert_dir + "/" + filename; ++ auto* file = open_file(file_path, "wb"); ++ for (auto* x509 : certs) ++ { ++ if (!PEM_write_X509(file, x509)) ++ { ++ throw_error("Could not write x509"); ++ } ++ } ++ fclose(file); ++} ++ ++/* Self signed CA + certificate */ ++static void generate_self_signed() ++{ ++ auto* pkey = create_key(); ++ write_key(pkey, "galera_key.pem"); ++ auto* ca = create_x509(pkey, nullptr, "Galera Root"); ++ write_x509(ca, "galera_ca.pem"); ++ ++ auto* cert = create_x509(pkey, ca, "Galera Cert"); ++ write_x509(cert, "galera_cert.pem"); ++ X509_free(cert); ++ X509_free(ca); ++ EVP_PKEY_free(pkey); ++} ++ ++/* ++ ---- Server cert 1 ++ / ++ Root CA - Intermediate CA ++ \---- Server cert 2 ++ ++ Two bundles consisting of intermediate CA and server certificate ++ are created for servers 1 and 2. ++ */ ++static void generate_chains() ++{ ++ auto* root_ca_key = create_key(); ++ auto* root_ca = create_x509(root_ca_key, nullptr, "Galera Root CA"); ++ auto* int_ca_key = create_key(); ++ auto* int_ca = create_x509(int_ca_key, root_ca, "Galera Intermediate CA"); ++ ++ auto* server_1_key = create_key(); ++ auto* server_1_cert = create_x509(server_1_key, int_ca, "Galera Server 1"); ++ auto* server_2_key = create_key(); ++ auto* server_2_cert = create_x509(server_2_key, int_ca, "Galera Server 2"); ++ ++ write_x509(root_ca, "galera-ca.pem"); ++ write_key(server_1_key, "galera-server-1.key"); ++ write_x509_list({ server_1_cert, int_ca }, "bundle-galera-server-1.pem"); ++ write_key(server_2_key, "galera-server-2.key"); ++ write_x509_list({ server_2_cert, int_ca }, "bundle-galera-server-2.pem"); ++ ++ X509_free(server_2_cert); ++ EVP_PKEY_free(server_2_key); ++ X509_free(server_1_cert); ++ EVP_PKEY_free(server_1_key); ++ X509_free(int_ca); ++ EVP_PKEY_free(int_ca_key); ++ X509_free(root_ca); ++ EVP_PKEY_free(root_ca_key); ++} ++ ++static void generate_certificates() ++{ ++ generate_self_signed(); ++ generate_chains(); ++} ++ ++// ++// SSL ++// ++ + static gu::Config get_ssl_config() + { + gu::Config ret; +@@ -2173,6 +2431,7 @@ Suite* gu_asio_suite() + // + // SSL + // ++ generate_certificates(); + + tc = tcase_create("test_ssl_io_service"); + tcase_add_test(tc, test_ssl_io_service); diff --git a/galera.spec b/galera.spec index e9a8ed2..8f17df6 100644 --- a/galera.spec +++ b/galera.spec @@ -16,6 +16,7 @@ Source1: garbd.service Source2: garbd-wrapper Patch0: cmake_paths.patch +Patch1: 4e214d612359a294312943271abaf40685115fda.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel Requires(pre): /usr/sbin/useradd @@ -35,6 +36,7 @@ description of Galera replication engine see https://www.galeracluster.com web. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{set_build_flags} From bd6bf1b5c5bad6201dd3f1ddca170bc45f35145d Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 23 Jan 2024 18:24:56 +0100 Subject: [PATCH 38/47] Bump release for rebuild --- galera.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index 8f17df6..d35ff7e 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera Version: 26.4.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 From f177bacee0b3bac1b0f0003b4a0ba045788a7553 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 17 Nov 2023 01:28:45 +0000 Subject: [PATCH 39/47] Rebase to 26.4.16 - release with MariaDB 10.5.23 - galera 26.4.15 skipped by mariaDB upstream --- galera.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/galera.spec b/galera.spec index d35ff7e..dba5a27 100644 --- a/galera.spec +++ b/galera.spec @@ -1,6 +1,6 @@ Name: galera -Version: 26.4.14 -Release: 2%{?dist} +Version: 26.4.16 +Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) License: GPLv2 @@ -154,6 +154,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Fri Nov 17 2023 Michal Schorm - 26.4.16-1 +- Rebase to 26.4.16 + * Sat Apr 29 2023 Michal Schorm - 26.4.14-1 - Rebase to 26.4.14 diff --git a/sources b/sources index 5a2a2a9..cb04367 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.14.tar.gz) = c91060fb19de86fd586365ddc6bd0123c51b76b5ec471d0ce27112d2fd22de93553d1d4c87c1ddfc6b10e9fbe6a19a051483bae00e353515c0ab878dc6dc30ef +SHA512 (galera-26.4.16.tar.gz) = 72c1e3bf89a40a59a9627bdfeb120d2dbafd018e4f87d433829ba742a0ccc8120956c4ce03077c4c4b444907d2ac38e6cf3d5e853e531ec234ee50229ffecd5c From 8352db7b2627e675ba125ece64b6526bd639897b Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 18 Oct 2024 08:53:08 +0200 Subject: [PATCH 40/47] Rebase to 26.4.18 --- ...4d612359a294312943271abaf40685115fda.patch | 374 ------------------ galera.spec | 7 +- sources | 2 +- 3 files changed, 5 insertions(+), 378 deletions(-) delete mode 100644 4e214d612359a294312943271abaf40685115fda.patch diff --git a/4e214d612359a294312943271abaf40685115fda.patch b/4e214d612359a294312943271abaf40685115fda.patch deleted file mode 100644 index b83930d..0000000 --- a/4e214d612359a294312943271abaf40685115fda.patch +++ /dev/null @@ -1,374 +0,0 @@ -Taken from: - https://github.com/codership/galera/commit/4e214d612359a294312943271abaf40685115fda.patch - -Reson: - The SSL certifactes expired, which resulted in the test failing: - | 85%: Checks: 77, Failures: 0, Errors: 11 - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1019:E:test_ssl_connect:test_ssl_connect:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1031:E:test_ssl_connect_twice:test_ssl_connect_twice:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1046:E:test_ssl_async_read_write:test_ssl_async_read_write:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1058:E:test_ssl_async_read_write_large:test_ssl_async_read_write_large:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:636:E:test_ssl_async_read_write_small_large:test_ssl_async_read_write_small_large:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1083:E:test_ssl_async_read_from_client_write_from_server:test_ssl_async_read_from_client_write_from_server:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1096:E:test_ssl_write_twice_wo_handling:test_ssl_write_twice_wo_handling:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1109:E:test_ssl_close_client:test_ssl_close_client:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1121:E:test_ssl_close_server:test_ssl_close_server:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1133:E:test_ssl_get_tcp_info:test_ssl_get_tcp_info:0: (after this point) Test timeout expired - | /builddir/build/BUILD/galera-26.4.16/galerautils/tests/gu_asio_test.cpp:1145:E:test_ssl_compression_option:test_ssl_compression_option:0: (after this point) Test timeout expired - ---- - -From 4e214d612359a294312943271abaf40685115fda Mon Sep 17 00:00:00 2001 -From: Teemu Ollakka -Date: Mon, 2 Oct 2023 20:31:37 +0300 -Subject: [PATCH] codership/galera#647 Generate keys and certificates for SSL - tests - -Relying on static certificates causes several problems: -- Certificates eventually expire, which causes surprises - when tests suddenly stop passing without prior warning. -- Standards change, a certificate created on different - platform long time ago may not be usable on some more - modern platform. -- Lack of fine grained control on test scenarios without - generating and storing several certificates in source - repository. - -In order to work around the problems above, generate -certificates programmatically before the tests are run. -The generated certificates use the same versioning and -extensions as the original ones under tests/conf. ---- - galerautils/tests/CMakeLists.txt | 4 +- - galerautils/tests/gu_asio_test.cpp | 269 ++++++++++++++++++++++++++++- - 3 files changed, 266 insertions(+), 8 deletions(-) - -diff --git a/galerautils/tests/CMakeLists.txt b/galerautils/tests/CMakeLists.txt -index f863ce66b..a44b2d6b3 100644 ---- a/galerautils/tests/CMakeLists.txt -+++ b/galerautils/tests/CMakeLists.txt -@@ -47,7 +47,6 @@ add_test( - # - # C++ galerautils tests. - # -- - add_executable(gu_tests++ - gu_atomic_test.cpp - gu_gtid_test.cpp -@@ -75,7 +74,7 @@ add_executable(gu_tests++ - - target_compile_definitions(gu_tests++ - PRIVATE -- -DGU_ASIO_TEST_CERT_DIR="${PROJECT_SOURCE_DIR}/tests/conf") -+ -DGU_ASIO_TEST_CERT_DIR="${CMAKE_CURRENT_BINARY_DIR}/certs") - - # TODO: These should be eventually fixed. - target_compile_options(gu_tests++ -@@ -93,7 +92,6 @@ add_test( - NAME gu_tests++ - COMMAND gu_tests++ - ) -- - # - # Deqmap micro benchmark. - # -diff --git a/galerautils/tests/gu_asio_test.cpp b/galerautils/tests/gu_asio_test.cpp -index c4c948bda..616902eb1 100644 ---- a/galerautils/tests/gu_asio_test.cpp -+++ b/galerautils/tests/gu_asio_test.cpp -@@ -1,5 +1,5 @@ - /* -- * Copyright (C) 2019-2020 Codership Oy -+ * Copyright (C) 2019-2023 Codership Oy - */ - - -@@ -920,18 +920,276 @@ END_TEST - - #ifdef GALERA_HAVE_SSL - -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - #include - --// --// SSL --// -+#include - - static std::string get_cert_dir() - { -- // This will be set by CMake/preprocessor. -+ static_assert(::strlen(GU_ASIO_TEST_CERT_DIR) > 0); -+ const std::string ret{ GU_ASIO_TEST_CERT_DIR }; -+ auto* dir = opendir(ret.c_str()); -+ if (!dir) -+ { -+ if (mkdir(ret.c_str(), S_IRWXU)) -+ { -+ const auto* errstr = ::strerror(errno); -+ gu_throw_fatal << "Could not create dir " << ret << ": " << errstr; -+ } -+ } -+ else -+ { -+ closedir(dir); -+ } - return GU_ASIO_TEST_CERT_DIR; - } - -+static int password_cb(char*, int, int, void*) { return 0; } -+ -+static void throw_error(const char* msg) -+{ -+ gu_throw_fatal << msg << ": " << ERR_error_string(ERR_get_error(), nullptr); -+} -+ -+static EVP_PKEY* create_key() -+{ -+#if OPENSSL_VERSION_MAJOR < 3 -+ auto* bn = BN_new(); -+ if (!bn) -+ { -+ throw_error("could not create BN"); -+ } -+ BN_set_word(bn, 0x10001); -+ auto* rsa = RSA_new(); -+ if (!rsa) -+ { -+ BN_free(bn); -+ throw_error("could not create RSA"); -+ } -+ RSA_generate_key_ex(rsa, 2048, bn, nullptr); -+ auto* pkey = EVP_PKEY_new(); -+ if (!pkey) -+ { -+ BN_free(bn); -+ RSA_free(rsa); -+ throw_error("could not create PKEY"); -+ } -+ EVP_PKEY_set1_RSA(pkey, rsa); -+ RSA_free(rsa); -+ BN_free(bn); -+ return pkey; -+#else -+ auto* ret = EVP_RSA_gen(2048); -+ if (!ret) -+ { -+ throw_error("could not create RSA"); -+ } -+ return ret; -+#endif /* OPENSSL_VERSION_MAJOR < 3 */ -+} -+ -+static FILE* open_file(const std::string& path, const char* mode) -+{ -+ auto* ret = fopen(path.c_str(), mode); -+ if (!ret) -+ { -+ const auto* errstr = ::strerror(errno); -+ gu_throw_fatal << "Could not open file " << path << ": " -+ << errstr; -+ } -+ return ret; -+} -+ -+static void write_key(EVP_PKEY* pkey, const std::string& filename) -+{ -+ const std::string cert_dir = get_cert_dir(); -+ const std::string key_file_path = cert_dir + "/" + filename; -+ auto* key_file = open_file(key_file_path, "wb"); -+ if (!PEM_write_PrivateKey(key_file, pkey, nullptr, nullptr, 0, password_cb, -+ nullptr)) -+ { -+ throw_error("Could not write key"); -+ } -+ fclose(key_file); -+} -+ -+static void set_x509v3_extensions(X509* x509, X509* issuer) -+{ -+ auto* conf_bio = BIO_new(BIO_s_mem()); -+ std::string ext{ "[extensions]\n" -+ "authorityKeyIdentifier=keyid,issuer\n" -+ "subjectKeyIdentifier=hash\n" }; -+ if (!issuer) -+ { -+ ext += "basicConstraints=critical,CA:TRUE\n"; -+ } -+ else -+ { -+ ext += "keyUsage=digitalSignature,keyEncipherment\n"; -+ ext += "basicConstraints=CA:FALSE\n"; -+ } -+ BIO_printf(conf_bio, "%s", ext.c_str()); -+ auto* conf = NCONF_new(nullptr); -+ long errorline = -1; -+ int err; -+ if ((err = NCONF_load_bio(conf, conf_bio, &errorline)) <= 0) -+ { -+ gu_throw_fatal << "Could not load conf: " << err; -+ } -+ if (errorline != -1) -+ { -+ gu_throw_fatal << "Could not load conf, errorline: " << errorline; -+ } -+ // TODO: V3 extensions -+ X509V3_CTX ctx; -+ X509V3_set_ctx(&ctx, issuer ? issuer : x509, x509, nullptr, nullptr, 0); -+ X509V3_set_nconf(&ctx, conf); -+ if (!X509V3_EXT_add_nconf(conf, &ctx, "extensions", x509)) -+ { -+ throw_error("Could not add extension"); -+ } -+ NCONF_free(conf); -+ BIO_free(conf_bio); -+} -+ -+static X509* create_x509(EVP_PKEY* pkey, X509* issuer, const char* cn) -+{ -+ auto* x509 = X509_new(); -+ /* According to standard, value 2 means version 3. */ -+ X509_set_version(x509, 2); -+ ASN1_INTEGER_set(X509_get_serialNumber(x509), 1); -+ X509_gmtime_adj(X509_get_notBefore(x509), 0); -+ X509_gmtime_adj(X509_get_notAfter(x509), 31536000L); -+ X509_set_pubkey(x509, pkey); -+ -+ auto* name = X509_get_subject_name(x509); -+ X509_NAME_add_entry_by_txt(name, "C", MBSTRING_ASC, (unsigned char*)"FI", -+ -1, -1, 0); -+ X509_NAME_add_entry_by_txt(name, "ST", MBSTRING_ASC, -+ (unsigned char*)"Uusimaa", -1, -1, 0); -+ X509_NAME_add_entry_by_txt(name, "L", MBSTRING_ASC, -+ (unsigned char*)"Helsinki", -1, -1, 0); -+ X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, -+ (unsigned char*)"Codership", -1, -1, 0); -+ X509_NAME_add_entry_by_txt(name, "OU", MBSTRING_ASC, -+ (unsigned char*)"Galera Devel", -1, -1, 0); -+ X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char*)cn, -1, -+ -1, 0); -+ if (!issuer) -+ { -+ /* Self signed */ -+ X509_set_issuer_name(x509, name); -+ } -+ else -+ { -+ X509_set_issuer_name(x509, X509_get_subject_name(issuer)); -+ } -+ -+ set_x509v3_extensions(x509, issuer); -+ -+ X509_sign(x509, pkey, EVP_sha256()); -+ -+ return x509; -+} -+ -+static void write_x509(X509* x509, const std::string& filename) -+{ -+ const std::string cert_dir = get_cert_dir(); -+ const std::string file_path = cert_dir + "/" + filename; -+ auto* file = open_file(file_path, "wb"); -+ if (!PEM_write_X509(file, x509)) -+ { -+ throw_error("Could not write x509"); -+ } -+ fclose(file); -+} -+ -+static void write_x509_list(const std::vector& certs, -+ const std::string& filename) -+{ -+ const std::string cert_dir = get_cert_dir(); -+ const std::string file_path = cert_dir + "/" + filename; -+ auto* file = open_file(file_path, "wb"); -+ for (auto* x509 : certs) -+ { -+ if (!PEM_write_X509(file, x509)) -+ { -+ throw_error("Could not write x509"); -+ } -+ } -+ fclose(file); -+} -+ -+/* Self signed CA + certificate */ -+static void generate_self_signed() -+{ -+ auto* pkey = create_key(); -+ write_key(pkey, "galera_key.pem"); -+ auto* ca = create_x509(pkey, nullptr, "Galera Root"); -+ write_x509(ca, "galera_ca.pem"); -+ -+ auto* cert = create_x509(pkey, ca, "Galera Cert"); -+ write_x509(cert, "galera_cert.pem"); -+ X509_free(cert); -+ X509_free(ca); -+ EVP_PKEY_free(pkey); -+} -+ -+/* -+ ---- Server cert 1 -+ / -+ Root CA - Intermediate CA -+ \---- Server cert 2 -+ -+ Two bundles consisting of intermediate CA and server certificate -+ are created for servers 1 and 2. -+ */ -+static void generate_chains() -+{ -+ auto* root_ca_key = create_key(); -+ auto* root_ca = create_x509(root_ca_key, nullptr, "Galera Root CA"); -+ auto* int_ca_key = create_key(); -+ auto* int_ca = create_x509(int_ca_key, root_ca, "Galera Intermediate CA"); -+ -+ auto* server_1_key = create_key(); -+ auto* server_1_cert = create_x509(server_1_key, int_ca, "Galera Server 1"); -+ auto* server_2_key = create_key(); -+ auto* server_2_cert = create_x509(server_2_key, int_ca, "Galera Server 2"); -+ -+ write_x509(root_ca, "galera-ca.pem"); -+ write_key(server_1_key, "galera-server-1.key"); -+ write_x509_list({ server_1_cert, int_ca }, "bundle-galera-server-1.pem"); -+ write_key(server_2_key, "galera-server-2.key"); -+ write_x509_list({ server_2_cert, int_ca }, "bundle-galera-server-2.pem"); -+ -+ X509_free(server_2_cert); -+ EVP_PKEY_free(server_2_key); -+ X509_free(server_1_cert); -+ EVP_PKEY_free(server_1_key); -+ X509_free(int_ca); -+ EVP_PKEY_free(int_ca_key); -+ X509_free(root_ca); -+ EVP_PKEY_free(root_ca_key); -+} -+ -+static void generate_certificates() -+{ -+ generate_self_signed(); -+ generate_chains(); -+} -+ -+// -+// SSL -+// -+ - static gu::Config get_ssl_config() - { - gu::Config ret; -@@ -2173,6 +2431,7 @@ Suite* gu_asio_suite() - // - // SSL - // -+ generate_certificates(); - - tc = tcase_create("test_ssl_io_service"); - tcase_add_test(tc, test_ssl_io_service); diff --git a/galera.spec b/galera.spec index dba5a27..b342ca5 100644 --- a/galera.spec +++ b/galera.spec @@ -1,5 +1,5 @@ Name: galera -Version: 26.4.16 +Version: 26.4.18 Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) @@ -16,7 +16,6 @@ Source1: garbd.service Source2: garbd-wrapper Patch0: cmake_paths.patch -Patch1: 4e214d612359a294312943271abaf40685115fda.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel Requires(pre): /usr/sbin/useradd @@ -36,7 +35,6 @@ description of Galera replication engine see https://www.galeracluster.com web. %prep %setup -q %patch0 -p1 -%patch1 -p1 %build %{set_build_flags} @@ -154,6 +152,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %changelog +* Fri Jun 07 2024 Michal Schorm - 26.4.18-1 +- Rebase to 26.4.18 + * Fri Nov 17 2023 Michal Schorm - 26.4.16-1 - Rebase to 26.4.16 diff --git a/sources b/sources index cb04367..0af6a17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.16.tar.gz) = 72c1e3bf89a40a59a9627bdfeb120d2dbafd018e4f87d433829ba742a0ccc8120956c4ce03077c4c4b444907d2ac38e6cf3d5e853e531ec234ee50229ffecd5c +SHA512 (galera-26.4.18.tar.gz) = f386390af0a182620c1f2b1790e5021d0de0947141df6fa59dc86eee2d5c55233c3c56755a5532761d3dd13b991105674a1ab4c9e80d449325ca78a3a701dda2 From 4d25210b84f5e50f25c9b66fedcdcf70c3dc823a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 7 Jun 2024 10:39:23 +0200 Subject: [PATCH 41/47] ExcludeArch: %{ix86} Both to: 1) Save infractsructure resources 2) Workaround FTBFS on i686: On F40 and later, a 100% reproducible following testsuite errors exists in a build on the i686 architecture: 6/7 Test #6: galera_check .....................***Failed 6.64 sec Running suite(s): DataSet 100%: Checks: 2, Failures: 0, Errors: 0 Running suite(s): KeySet galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. 0%: Checks: 4, Failures: 0, Errors: 4 /builddir/build/BUILD/galera-26.4.18/galera/tests/key_set_check.cpp:54:E:KeySet:ver1_3:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/key_set_check.cpp:54:E:KeySet:ver2_3:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/key_set_check.cpp:54:E:KeySet:ver2_4:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/key_set_check.cpp:54:E:KeySet:ver2_5:0: (after this point) Received signal 6 (Aborted) Running suite(s): WriteSet galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. 0%: Checks: 5, Failures: 0, Errors: 5 /builddir/build/BUILD/galera-26.4.18/galera/tests/write_set_ng_check.cpp:34:E:WriteSet basic:ver3_basic_rsv1:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/write_set_ng_check.cpp:34:E:WriteSet basic:ver3_basic_rsv2_wsv3:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/write_set_ng_check.cpp:34:E:WriteSet basic:ver3_basic_rsv2_wsv4:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/write_set_ng_check.cpp:311:E:WriteSet annotation:ver3_annotation_rsv1:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/write_set_ng_check.cpp:311:E:WriteSet annotation:ver3_annotation_rsv2:0: (after this point) Received signal 6 (Aborted) Running suite(s): certification galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. 0%: Checks: 12, Failures: 0, Errors: 12 /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_trx_v3:test_certification_trx_v3:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_trx_v3:test_certification_trx_v3E:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_trx_different_level_v3:test_certification_trx_different_level_v3:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_trx_different_level_v3:test_certification_trx_different_level_v3E:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_toi_v3:test_certification_toi_v3:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_toi_v3:test_certification_toi_v3E:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_nbo:test_certification_nbo:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_nbo:test_certification_nboE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_commit_fragment:test_certification_commit_fragment:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_commit_fragment:test_certification_commit_fragmentE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_zero_level:test_certification_zero_level:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/certification_check.cpp:57:E:certification_zero_level:test_certification_zero_levelE:0: (after this point) Received signal 6 (Aborted) Running suite(s): trx_handle 100%: Checks: 6, Failures: 0, Errors: 0 Running suite(s): service_thd 100%: Checks: 6, Failures: 0, Errors: 0 Running suite(s): ist galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. galera_check: /builddir/build/BUILD/galera-26.4.18/galera/tests/../src/key_set.hpp:323: static size_t galera::KeySet::KeyPart::base_size(galera::KeySet::Version, const gu::byte_t*, size_t): Assertion `0' failed. 38%: Checks: 26, Failures: 0, Errors: 16 /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v7:test_ist_v7PP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v7:test_ist_v7PE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v7:test_ist_v7EP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v7:test_ist_v7EE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v8:test_ist_v8PP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v8:test_ist_v8PE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v8:test_ist_v8EP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v8:test_ist_v8EE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v9:test_ist_v9PP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v9:test_ist_v9PE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v9:test_ist_v9EP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v9:test_ist_v9EE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v10:test_ist_v10PP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v10:test_ist_v10PE:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v10:test_ist_v10EP:0: (after this point) Received signal 6 (Aborted) /builddir/build/BUILD/galera-26.4.18/galera/tests/ist_check.cpp:588:E:test_ist_v10:test_ist_v10EE:0: (after this point) Received signal 6 (Aborted) --- galera.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/galera.spec b/galera.spec index b342ca5..06bb340 100644 --- a/galera.spec +++ b/galera.spec @@ -1,3 +1,6 @@ +# To both save infrastrucutre resources and workaround for i686 FTBFS +ExcludeArch: %{ix86} + Name: galera Version: 26.4.18 Release: 1%{?dist} From 9b202dc9d17d42ce9bf4ec98659c84dd536fa9cc Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sun, 9 Jun 2024 05:32:36 +0200 Subject: [PATCH 42/47] [SPECfile cleanup] Remove no longer used downstream versions of upstream files --- galera.spec | 4 ---- garbd-wrapper | 38 -------------------------------------- garbd.service | 10 ---------- 3 files changed, 52 deletions(-) delete mode 100755 garbd-wrapper delete mode 100644 garbd.service diff --git a/galera.spec b/galera.spec index 06bb340..17f5755 100644 --- a/galera.spec +++ b/galera.spec @@ -15,9 +15,6 @@ URL: http://galeracluster.com/ Source0: http://releases.galeracluster.com/source/%{name}-%{version}.tar.gz -Source1: garbd.service -Source2: garbd-wrapper - Patch0: cmake_paths.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel @@ -135,7 +132,6 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.ser %dir %{_libdir}/galera %{_sbindir}/garbd -#%{_sbindir}/garbd-wrapper # PATCH 3: # Make sure the wrapper script is executable diff --git a/garbd-wrapper b/garbd-wrapper deleted file mode 100755 index ede76f7..0000000 --- a/garbd-wrapper +++ /dev/null @@ -1,38 +0,0 @@ -#!/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 deleted file mode 100644 index 9645fe2..0000000 --- a/garbd.service +++ /dev/null @@ -1,10 +0,0 @@ -[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 From 4838609c6067ade0172aa2879409e46cb55b4251 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sun, 9 Jun 2024 05:38:23 +0200 Subject: [PATCH 43/47] [SPECfile cleanup] start using %{unitdir} macro --- galera.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/galera.spec b/galera.spec index 17f5755..d2094b6 100644 --- a/galera.spec +++ b/galera.spec @@ -70,13 +70,13 @@ cmake -B %_vpath_builddir -LAH # Fedora downstream packaging historically used "garbd" name for the service. # # Let's stick with the Fedora legacy naming, AND provide an alias to the Galera upstream name -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 +mv %{buildroot}%{_unitdir}/garb.service %{buildroot}%{_unitdir}/garbd.service +sed -i 's/Alias=garbd.service/Alias=garb.service/g' %{buildroot}%{_unitdir}/garbd.service # PATCH 2: # Fix the 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/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 @@ -103,7 +103,7 @@ sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd ## in particular on systems using NFS or running containers. Allocate a user ID ## specific to this service, either statically via systemd-sysusers or dynamically ## via the DynamicUser= service setting. -sed -i 's/User=nobody/User=garb/g' %{buildroot}/usr/lib/systemd/system/garbd.service +sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service %check From 55c302e34aeb40d25e026c98f7c9306e3b7967da Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sat, 29 Apr 2023 10:54:37 +0200 Subject: [PATCH 44/47] Fix RPM syntax: '%patchN' has been deprecated https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/VBFDPQHAHF3WG6WBZR2L5GSWMW6CVTJS/ --- galera.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galera.spec b/galera.spec index d2094b6..67d6485 100644 --- a/galera.spec +++ b/galera.spec @@ -34,7 +34,7 @@ description of Galera replication engine see https://www.galeracluster.com web. %prep %setup -q -%patch0 -p1 +%patch -P0 -p1 %build %{set_build_flags} From 4804df7bc753c73c8d82fb880257c3dff31774c7 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sun, 9 Jun 2024 07:08:43 +0200 Subject: [PATCH 45/47] [Documentation enhancement] Stop packing useless documentaion files, start packing useful documentation file --- docs.patch | 21 +++++++++++++++++++++ galera.spec | 6 +++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 docs.patch diff --git a/docs.patch b/docs.patch new file mode 100644 index 0000000..ecaa42c --- /dev/null +++ b/docs.patch @@ -0,0 +1,21 @@ +The CMake prepares file AUTHORS for packing. +It only contains one line, and isn't packed in any upstream-produced packagess. +I don't find it useful and since upstream doesn't pack it either, stop packing it here. + +The README file contains infromation on how to build the project from sources, and thus isn't useful for the end users. + +On the other hand, the README-MySQL isn't prepared for packing by CMake, but contains useful information about the software usage and it is package in upstream-produced packages. + +--- galera-26.4.18/CMakeLists.txt 2024-06-09 04:54:56.281408893 +0200 ++++ galera-26.4.18/CMakeLists.txt_patched 2024-06-09 06:52:58.093217968 +0200 +@@ -118,9 +118,8 @@ endif() + + if (NOT ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD") + install(FILES +- ${PROJECT_SOURCE_DIR}/AUTHORS + ${PROJECT_SOURCE_DIR}/COPYING +- ${PROJECT_SOURCE_DIR}/README ++ ${PROJECT_SOURCE_DIR}/scripts/packages/README-MySQL + DESTINATION ${INSTALL_DOCDIR} ) + install(FILES ${PROJECT_SOURCE_DIR}/asio/LICENSE_1_0.txt + DESTINATION ${INSTALL_DOCDIR} diff --git a/galera.spec b/galera.spec index 67d6485..4cf3502 100644 --- a/galera.spec +++ b/galera.spec @@ -16,6 +16,7 @@ URL: http://galeracluster.com/ Source0: http://releases.galeracluster.com/source/%{name}-%{version}.tar.gz Patch0: cmake_paths.patch +Patch1: docs.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel Requires(pre): /usr/sbin/useradd @@ -35,6 +36,7 @@ description of Galera replication engine see https://www.galeracluster.com web. %prep %setup -q %patch -P0 -p1 +%patch -P1 -p1 %build %{set_build_flags} @@ -143,11 +145,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service %{_libdir}/galera/libgalera_smm.so -%doc %{_docdir}/galera/AUTHORS %doc %{_docdir}/galera/COPYING %doc %{_docdir}/galera/LICENSE.asio -%doc %{_docdir}/galera/README -#%doc %{_docdir}/galera/README-MySQL +%doc %{_docdir}/galera/README-MySQL %changelog From 5b87f8e6fc19e82b870216da45b523805d575b60 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 18 Oct 2024 10:00:08 +0200 Subject: [PATCH 46/47] Rebase to 26.4.19 --- docs.patch | 4 ++++ galera.spec | 7 ++++++- sources | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs.patch b/docs.patch index ecaa42c..7a6bec5 100644 --- a/docs.patch +++ b/docs.patch @@ -6,6 +6,10 @@ The README file contains infromation on how to build the project from sources, a On the other hand, the README-MySQL isn't prepared for packing by CMake, but contains useful information about the software usage and it is package in upstream-produced packages. +Offered upstream: +https://github.com/codership/galera/pull/666 +https://groups.google.com/g/codership-team/c/Cn4UO3MkNQs + --- galera-26.4.18/CMakeLists.txt 2024-06-09 04:54:56.281408893 +0200 +++ galera-26.4.18/CMakeLists.txt_patched 2024-06-09 06:52:58.093217968 +0200 @@ -118,9 +118,8 @@ endif() diff --git a/galera.spec b/galera.spec index 4cf3502..a20bf2a 100644 --- a/galera.spec +++ b/galera.spec @@ -2,7 +2,7 @@ ExcludeArch: %{ix86} Name: galera -Version: 26.4.18 +Version: 26.4.19 Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) @@ -106,6 +106,8 @@ sed -i 's;/usr/bin/garbd;/usr/sbin/garbd;g' %{buildroot}/usr/sbin/garb-systemd ## specific to this service, either statically via systemd-sysusers or dynamically ## via the DynamicUser= service setting. sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service +# Maintainers from other distributions also tries to resolve it on the upstream: +# https://github.com/codership/galera/pull/633 %check @@ -151,6 +153,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service %changelog +* Fri Oct 18 2024 Michal Schorm - 26.4.19-1 +- Rebase to 26.4.19 + * Fri Jun 07 2024 Michal Schorm - 26.4.18-1 - Rebase to 26.4.18 diff --git a/sources b/sources index 0af6a17..26ca78f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.18.tar.gz) = f386390af0a182620c1f2b1790e5021d0de0947141df6fa59dc86eee2d5c55233c3c56755a5532761d3dd13b991105674a1ab4c9e80d449325ca78a3a701dda2 +SHA512 (galera-26.4.19.tar.gz) = 5968d8def9882e30d714399c2c82ade4099e22b5fce3dc6646ad4068fb6e0cf2cf12dd714e8051c3fe7c38b68939892d8411b352ab6c7d302f558eb1d53c1597 From b1f9198997c4dfe33f0d741eaff1f4b979378874 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 19 Nov 2024 15:54:35 +0100 Subject: [PATCH 47/47] Rebase to 26.4.20 --- galera.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/galera.spec b/galera.spec index a20bf2a..8df79e4 100644 --- a/galera.spec +++ b/galera.spec @@ -2,7 +2,7 @@ ExcludeArch: %{ix86} Name: galera -Version: 26.4.19 +Version: 26.4.20 Release: 1%{?dist} Summary: Synchronous multi-master wsrep provider (replication engine) @@ -153,6 +153,9 @@ sed -i 's/User=nobody/User=garb/g' %{buildroot}%{_unitdir}/garbd.service %changelog +* Thu Nov 14 2024 Michal Schorm - 26.4.20-1 +- Rebase to 26.4.20 + * Fri Oct 18 2024 Michal Schorm - 26.4.19-1 - Rebase to 26.4.19 diff --git a/sources b/sources index 26ca78f..a3cd9c7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (galera-26.4.19.tar.gz) = 5968d8def9882e30d714399c2c82ade4099e22b5fce3dc6646ad4068fb6e0cf2cf12dd714e8051c3fe7c38b68939892d8411b352ab6c7d302f558eb1d53c1597 +SHA512 (galera-26.4.20.tar.gz) = d23332f8111b1d39327d50ad2374813fd8c9688a26899c6c30a9426490f1d012f25cc21f4e10c71ae2bfda963f4e656c1b9dd0d7931b00bb14ee9a754772cfa6