!10 修复由于rubygem-dalli升级至3.2.2导致的编译失败
From: @lyn1001 Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
690f006a81
45
Add-support-dalli-3.2.2.patch
Normal file
45
Add-support-dalli-3.2.2.patch
Normal file
@ -0,0 +1,45 @@
|
||||
diff -Nur a/cache/stores/mem_cache_store_test.rb b/cache/stores/mem_cache_store_test.rb
|
||||
--- a/cache/stores/mem_cache_store_test.rb 2021-08-20 00:25:04.000000000 +0800
|
||||
+++ b/cache/stores/mem_cache_store_test.rb 2022-07-05 11:22:22.774850776 +0800
|
||||
@@ -17,8 +17,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
-class UnavailableDalliServer < Dalli::Server
|
||||
- def alive?
|
||||
+class UnavailableDalliServer < Dalli::Protocol::Binary
|
||||
+ def alive? # before https://github.com/petergoldstein/dalli/pull/863
|
||||
+ false
|
||||
+ end
|
||||
+
|
||||
+ def ensure_connected! # after https://github.com/petergoldstein/dalli/pull/863
|
||||
false
|
||||
end
|
||||
end
|
||||
@@ -263,17 +267,21 @@
|
||||
end
|
||||
|
||||
def emulating_unavailability
|
||||
- old_server = Dalli.send(:remove_const, :Server)
|
||||
- Dalli.const_set(:Server, UnavailableDalliServer)
|
||||
+ old_server = Dalli::Protocol.send(:remove_const, :Binary)
|
||||
+ Dalli::Protocol.const_set(:Binary, UnavailableDalliServer)
|
||||
|
||||
yield ActiveSupport::Cache::MemCacheStore.new
|
||||
ensure
|
||||
- Dalli.send(:remove_const, :Server)
|
||||
- Dalli.const_set(:Server, old_server)
|
||||
+ Dalli::Protocol.send(:remove_const, :Binary)
|
||||
+ Dalli::Protocol.const_set(:Binary, old_server)
|
||||
end
|
||||
|
||||
def servers(cache = @cache)
|
||||
- client(cache).instance_variable_get(:@servers)
|
||||
+ if client(cache).instance_variable_defined?(:@normalized_servers)
|
||||
+ client(cache).instance_variable_get(:@normalized_servers)
|
||||
+ else
|
||||
+ client(cache).instance_variable_get(:@servers)
|
||||
+ end
|
||||
end
|
||||
|
||||
def client(cache = @cache)
|
||||
@ -2,13 +2,14 @@
|
||||
Name: rubygem-%{gem_name}
|
||||
Epoch: 1
|
||||
Version: 6.1.4.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A support libraries and Ruby core extensions extracted from the Rails framework
|
||||
License: MIT
|
||||
URL: http://rubyonrails.org
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: %{gem_name}-%{version}-tests.txz
|
||||
Source2: rails-%{version}-tools.txz
|
||||
Patch0: Add-support-dalli-3.2.2.patch
|
||||
Requires: rubygem(bigdecimal) rubygem(json)
|
||||
BuildRequires: ruby(release) rubygems-devel ruby >= 2.2.2 rubygem(bigdecimal) rubygem(builder)
|
||||
BuildRequires: rubygem(concurrent-ruby) rubygem(connection_pool) rubygem(dalli)
|
||||
@ -29,6 +30,9 @@ Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{gem_name}-%{version} -b1 -b2
|
||||
pushd %{_builddir}/test
|
||||
%patch0 -p1
|
||||
popd
|
||||
|
||||
%build
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
@ -72,6 +76,9 @@ popd
|
||||
%doc %{gem_instdir}/README.rdoc
|
||||
|
||||
%changelog
|
||||
* Tue Jul 05 2022 liyanan <liyanan32@h-partners.com> - 6.1.4.1-2
|
||||
- Add support dalli 3.2.2
|
||||
|
||||
* Wed Mar 02 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 6.1.4.1-1
|
||||
- update to 6.1.4.1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user