diff --git a/SOURCES/rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch b/SOURCES/rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch new file mode 100644 index 0000000..7707d01 --- /dev/null +++ b/SOURCES/rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch @@ -0,0 +1,22 @@ +From cca57b97ad6d1b1b985376be110b89d2b487dea6 Mon Sep 17 00:00:00 2001 +From: Aaron Patterson +Date: Tue, 30 Nov 2021 12:59:43 -0800 +Subject: [PATCH] fix assertion on maria + +downgrade psych +--- + spec/mysql2/client_spec.rb | 2 +- + +diff --git a/spec/mysql2/client_spec.rb b/spec/mysql2/client_spec.rb +index 1519e0f5d..41fb834bf 100644 +--- a/spec/mysql2/client_spec.rb ++++ b/spec/mysql2/client_spec.rb +@@ -573,7 +573,7 @@ def run_gc + end + expect do + @client.query("SELECT SLEEP(1)") +- end.to raise_error(Mysql2::Error, /Lost connection to MySQL server/) ++ end.to raise_error(Mysql2::Error, /Lost connection/) + + if RUBY_PLATFORM !~ /mingw|mswin/ + expect do diff --git a/SPECS/rubygem-mysql2.spec b/SPECS/rubygem-mysql2.spec index 6d100dc..9c912d3 100644 --- a/SPECS/rubygem-mysql2.spec +++ b/SPECS/rubygem-mysql2.spec @@ -6,7 +6,7 @@ Name: rubygem-%{gem_name} Version: 0.5.3 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A simple, fast Mysql library for Ruby, binding to libmysql License: MIT URL: https://github.com/brianmario/mysql2 @@ -14,6 +14,9 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone --no-checkout https://github.com/brianmario/mysql2.git # cd mysql2 && git archive -v -o mysql2-0.5.3-tests.txz 0.5.3 spec/ Source1: %{gem_name}-%{version}-tests.txz +# Fix test assertion for mariadb-connector-c +# https://github.com/brianmario/mysql2/commit/cca57b97ad6d1b1b985376be110b89d2b487dea6 +Patch2: rubygem-mysql2-0.5.3-fix-assertion-mariadb-connector-c.patch # Required in lib/mysql2.rb Requires: rubygem(bigdecimal) @@ -48,6 +51,9 @@ Documentation for %{name} %prep %setup -q -n %{gem_name}-%{version} -b 1 +pushd %{_builddir}/spec +%patch2 -p2 +popd %build # Create the gem as gem install only works on a gem file @@ -178,6 +184,9 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")" %changelog +* Thu Feb 17 2022 Pavel Valena - 0.5.3-11 +- Fix test assertion for mariadb-connector-c + * Tue Aug 10 2021 Mohan Boddu - 0.5.3-10 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688