Compare commits
No commits in common. "c8s-stream-3.1" and "c8-stream-2.7" have entirely different histories.
c8s-stream
...
c8-stream-
@ -1,22 +0,0 @@
|
|||||||
From cca57b97ad6d1b1b985376be110b89d2b487dea6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
||||||
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
|
|
@ -1,38 +0,0 @@
|
|||||||
From 4dce466f3ff1c90099d3dc1bf610bfab840d3631 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jean Boussier <jean.boussier@gmail.com>
|
|
||||||
Date: Fri, 26 Nov 2021 13:17:05 +0100
|
|
||||||
Subject: [PATCH] Update Mysql2::Result spec for Ruby 3.1
|
|
||||||
|
|
||||||
Ruby 3.1 immediately raise a TypeError if you try to
|
|
||||||
instantiate a class that doesn't have an allocator,
|
|
||||||
which is what we want anyways.
|
|
||||||
---
|
|
||||||
spec/mysql2/result_spec.rb | 17 +++++++++++------
|
|
||||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/spec/mysql2/result_spec.rb b/spec/mysql2/result_spec.rb
|
|
||||||
index 47a4a6de..2af6e609 100644
|
|
||||||
--- a/spec/mysql2/result_spec.rb
|
|
||||||
+++ b/spec/mysql2/result_spec.rb
|
|
||||||
@@ -6,11 +6,16 @@
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should raise a TypeError exception when it doesn't wrap a result set" do
|
|
||||||
- r = Mysql2::Result.new
|
|
||||||
- expect { r.count }.to raise_error(TypeError)
|
|
||||||
- expect { r.fields }.to raise_error(TypeError)
|
|
||||||
- expect { r.size }.to raise_error(TypeError)
|
|
||||||
- expect { r.each }.to raise_error(TypeError)
|
|
||||||
+ if RUBY_VERSION >= "3.1"
|
|
||||||
+ expect { Mysql2::Result.new }.to raise_error(TypeError)
|
|
||||||
+ expect { Mysql2::Result.allocate }.to raise_error(TypeError)
|
|
||||||
+ else
|
|
||||||
+ r = Mysql2::Result.new
|
|
||||||
+ expect { r.count }.to raise_error(TypeError)
|
|
||||||
+ expect { r.fields }.to raise_error(TypeError)
|
|
||||||
+ expect { r.size }.to raise_error(TypeError)
|
|
||||||
+ expect { r.each }.to raise_error(TypeError)
|
|
||||||
+ end
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should have included Enumerable" do
|
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 0.5.3
|
Version: 0.5.3
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/brianmario/mysql2
|
URL: https://github.com/brianmario/mysql2
|
||||||
@ -14,15 +14,6 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|||||||
# git clone --no-checkout https://github.com/brianmario/mysql2.git
|
# 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/
|
# cd mysql2 && git archive -v -o mysql2-0.5.3-tests.txz 0.5.3 spec/
|
||||||
Source1: %{gem_name}-%{version}-tests.txz
|
Source1: %{gem_name}-%{version}-tests.txz
|
||||||
# Ruby 3.1 immediately raises a TypeError if you try to instantiate a class
|
|
||||||
# that doesn't have an allocator, which is desired behaviour anyways.
|
|
||||||
# https://github.com/brianmario/mysql2/pull/1219
|
|
||||||
# https://github.com/brianmario/mysql2/commit/62003225f3b25c36c221f01f7905658848895410
|
|
||||||
# Modified to allow patch application.
|
|
||||||
Patch1: rubygem-mysql2-0.5.3-update-Mysql2_Result-spec.patch
|
|
||||||
# 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
|
# Required in lib/mysql2.rb
|
||||||
Requires: rubygem(bigdecimal)
|
Requires: rubygem(bigdecimal)
|
||||||
@ -61,10 +52,6 @@ Documentation for %{name}
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version} -b 1
|
%setup -q -n %{gem_name}-%{version} -b 1
|
||||||
|
|
||||||
pushd %{_builddir}/spec
|
|
||||||
%patch1 -p2
|
|
||||||
%patch2 -p2
|
|
||||||
popd
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Create the gem as gem install only works on a gem file
|
# Create the gem as gem install only works on a gem file
|
||||||
@ -80,9 +67,8 @@ mkdir -p %{buildroot}%{gem_dir}
|
|||||||
cp -pa .%{gem_dir}/* \
|
cp -pa .%{gem_dir}/* \
|
||||||
%{buildroot}%{gem_dir}/
|
%{buildroot}%{gem_dir}/
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
mkdir -p %{buildroot}%{gem_extdir_mri}
|
||||||
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
|
cp -a .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
|
||||||
cp -a .%{gem_extdir_mri}/%{gem_name}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}
|
|
||||||
|
|
||||||
# Prevent dangling symlink in -debuginfo.
|
# Prevent dangling symlink in -debuginfo.
|
||||||
rm -rf %{buildroot}%{gem_instdir}/ext
|
rm -rf %{buildroot}%{gem_instdir}/ext
|
||||||
@ -186,13 +172,6 @@ kill "$(cat "${MYSQL_TEST_PID_FILE}")"
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Apr 22 2022 Jarek Prokop <jprokop@redhat.com> 0.5.3-2
|
|
||||||
- Update by merging Fedora rawhide branch (commit: 81e2cc9)
|
|
||||||
- Fix Mysql2::Result test for Ruby 3.1.
|
|
||||||
- Remove gem_make.out and mkmf.log files from the binary RPM package.
|
|
||||||
- Fix test assertion for mariadb-connector-c.
|
|
||||||
Related: rhbz#2063772
|
|
||||||
|
|
||||||
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 0.5.3-1
|
* Fri May 29 2020 Jun Aruga <jaruga@redhat.com> - 0.5.3-1
|
||||||
- New upstream release 0.5.3 by merging Fedora master branch (commit: 674d475)
|
- New upstream release 0.5.3 by merging Fedora master branch (commit: 674d475)
|
||||||
Resolves: rhbz#1817135
|
Resolves: rhbz#1817135
|
||||||
|
Loading…
Reference in New Issue
Block a user