!11 【openEuler-22.03-LTS-Next】修复rubygem-sqlite3编译失败问题
From: @wu-leilei Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
c3457fb91d
62
rubygem-sqlite3-1.4.2-Fix-sqlite-3.37.0-compatibility.patch
Normal file
62
rubygem-sqlite3-1.4.2-Fix-sqlite-3.37.0-compatibility.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
From 5173d19aa7042daed4f20a2e6367f83b28687fbf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Orgad Shaneh <orgad.shaneh@audiocodes.com>
|
||||||
|
Date: Wed, 8 Dec 2021 10:31:34 +0200
|
||||||
|
Subject: [PATCH] Fix unit tests
|
||||||
|
|
||||||
|
---
|
||||||
|
test/test_database.rb | 4 ++--
|
||||||
|
test/test_integration.rb | 4 ++--
|
||||||
|
test/test_integration_resultset.rb | 2 +-
|
||||||
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_database.rb b/test/test_database.rb
|
||||||
|
index fe44b59..cd59852 100644
|
||||||
|
--- a/test/test_database.rb
|
||||||
|
+++ b/test/test_database.rb
|
||||||
|
@@ -284,7 +284,7 @@ def test_table_info
|
||||||
|
"name" => "a",
|
||||||
|
"pk" => 1,
|
||||||
|
"notnull" => 0,
|
||||||
|
- "type" => "integer",
|
||||||
|
+ "type" => "INTEGER",
|
||||||
|
"dflt_value" => nil,
|
||||||
|
"cid" => 0
|
||||||
|
},
|
||||||
|
@@ -292,7 +292,7 @@ def test_table_info
|
||||||
|
"name" => "b",
|
||||||
|
"pk" => 0,
|
||||||
|
"notnull" => 0,
|
||||||
|
- "type" => "text",
|
||||||
|
+ "type" => "TEXT",
|
||||||
|
"dflt_value" => nil,
|
||||||
|
"cid" => 1
|
||||||
|
}]
|
||||||
|
diff --git a/test/test_integration.rb b/test/test_integration.rb
|
||||||
|
index d5ea3a5..641d9eb 100644
|
||||||
|
--- a/test/test_integration.rb
|
||||||
|
+++ b/test/test_integration.rb
|
||||||
|
@@ -36,9 +36,9 @@ def test_table_info_without_defaults_for_version_3_3_8_and_higher
|
||||||
|
@db.transaction do
|
||||||
|
@db.execute "create table no_defaults_test ( a integer default 1, b integer )"
|
||||||
|
data = @db.table_info( "no_defaults_test" )
|
||||||
|
- assert_equal({"name" => "a", "type" => "integer", "dflt_value" => "1", "notnull" => 0, "cid" => 0, "pk" => 0},
|
||||||
|
+ assert_equal({"name" => "a", "type" => "INTEGER", "dflt_value" => "1", "notnull" => 0, "cid" => 0, "pk" => 0},
|
||||||
|
data[0])
|
||||||
|
- assert_equal({"name" => "b", "type" => "integer", "dflt_value" => nil, "notnull" => 0, "cid" => 1, "pk" => 0},
|
||||||
|
+ assert_equal({"name" => "b", "type" => "INTEGER", "dflt_value" => nil, "notnull" => 0, "cid" => 1, "pk" => 0},
|
||||||
|
data[1])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
diff --git a/test/test_integration_resultset.rb b/test/test_integration_resultset.rb
|
||||||
|
index ad89c2e..0ea1d58 100644
|
||||||
|
--- a/test/test_integration_resultset.rb
|
||||||
|
+++ b/test/test_integration_resultset.rb
|
||||||
|
@@ -118,7 +118,7 @@ def test_enumerable
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_types
|
||||||
|
- assert_equal [ "integer", "text" ], @result.types
|
||||||
|
+ assert_equal [ "INTEGER", "TEXT" ], @result.types
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_columns
|
||||||
@ -1,11 +1,12 @@
|
|||||||
%global gem_name sqlite3
|
%global gem_name sqlite3
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.4.2
|
Version: 1.4.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Allows Ruby scripts to interface with a SQLite3 database
|
Summary: Allows Ruby scripts to interface with a SQLite3 database
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/sparklemotion/sqlite3-ruby
|
URL: https://github.com/sparklemotion/sqlite3-ruby
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
Patch0: rubygem-sqlite3-1.4.2-Fix-sqlite-3.37.0-compatibility.patch
|
||||||
BuildRequires: ruby(release) rubygems-devel ruby-devel sqlite-devel rubygem(minitest) >= 5.0.0
|
BuildRequires: ruby(release) rubygems-devel ruby-devel sqlite-devel rubygem(minitest) >= 5.0.0
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
%description
|
%description
|
||||||
@ -22,6 +23,7 @@ Documentation for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version}
|
%setup -q -n %{gem_name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build ../%{gem_name}-%{version}.gemspec
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
@ -65,6 +67,9 @@ popd
|
|||||||
%{gem_instdir}/test
|
%{gem_instdir}/test
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 12 2033 wulei wulei80@h-partners.com - 1.4.2-2
|
||||||
|
- Fix compatibility with SQLite 3.37.0+
|
||||||
|
|
||||||
* Thu Mar 03 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.2-1
|
* Thu Mar 03 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.4.2-1
|
||||||
- update to 1.4.2
|
- update to 1.4.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user