diff --git a/rubygem-activesupport-5.1.7-Fix-FileStoreTest-test_filename_max_size-fails.patch b/rubygem-activesupport-5.1.7-Fix-FileStoreTest-test_filename_max_size-fails.patch deleted file mode 100644 index 55c4b74..0000000 --- a/rubygem-activesupport-5.1.7-Fix-FileStoreTest-test_filename_max_size-fails.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ca4be4b7788c90d94beb1e835b7019f809148d08 Mon Sep 17 00:00:00 2001 -From: Andrew White -Date: Mon, 2 Apr 2018 09:34:53 +0100 -Subject: [PATCH] Backport fix for Dir::Tmpname.create from #32386 - -The removal of path separators from the tmpname value affects all four -supported versions of Ruby - 2.2.10, 2.3.7, 2.4.4, and 2.5.1. ---- - activesupport/test/caching_test.rb | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb -index c67ffe69b80a..c138f10c13a5 100644 ---- a/activesupport/test/caching_test.rb -+++ b/activesupport/test/caching_test.rb -@@ -854,7 +854,9 @@ def test_key_transformation_with_pathname - def test_filename_max_size - key = "#{'A' * ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE}" - path = @cache.send(:normalize_key, key, {}) -- Dir::Tmpname.create(path) do |tmpname, n, opts| -+ basename = File.basename(path) -+ dirname = File.dirname(path) -+ Dir::Tmpname.create(basename, Dir.tmpdir + dirname) do |tmpname, n, opts| - assert File.basename(tmpname + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}" - end - end diff --git a/rubygem-activesupport-5.2.0-Fix-FileStoreTest-test_filename_max_size-fails.patch b/rubygem-activesupport-5.2.0-Fix-FileStoreTest-test_filename_max_size-fails.patch new file mode 100644 index 0000000..7b9bca6 --- /dev/null +++ b/rubygem-activesupport-5.2.0-Fix-FileStoreTest-test_filename_max_size-fails.patch @@ -0,0 +1,22 @@ +From 01f20c753e89f75e0031d0853866aaaa68ee1cc7 Mon Sep 17 00:00:00 2001 +From: utilum +Date: Fri, 30 Mar 2018 23:53:23 +0200 +Subject: [PATCH] Fix: FileStoreTest#test_filename_max_size fails in Ruby 2.5.1 + +--- + activesupport/test/cache/stores/file_store_test.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/activesupport/test/cache/stores/file_store_test.rb b/activesupport/test/cache/stores/file_store_test.rb +index c3c35a7bccfe..9aee8239799e 100644 +--- a/activesupport/test/cache/stores/file_store_test.rb ++++ b/activesupport/test/cache/stores/file_store_test.rb +@@ -69,7 +69,7 @@ def test_filename_max_size + key = "#{'A' * ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE}" + path = @cache.send(:normalize_key, key, {}) + Dir::Tmpname.create(path) do |tmpname, n, opts| +- assert File.basename(tmpname + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}" ++ assert File.basename(key + tmpname.split(key).last + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}" + end + end + diff --git a/rubygem-activesupport.spec b/rubygem-activesupport.spec index 9cf078c..098e220 100644 --- a/rubygem-activesupport.spec +++ b/rubygem-activesupport.spec @@ -2,10 +2,9 @@ Name: rubygem-%{gem_name} Epoch: 1 -Version: 5.1.5 -Release: 3%{?dist} +Version: 5.2.0 +Release: 1%{?dist} Summary: A support libraries and Ruby core extensions extracted from the Rails framework -Group: Development/Languages License: MIT URL: http://rubyonrails.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem @@ -14,12 +13,11 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # Rails rpms, you may check it out like so # git clone http://github.com/rails/rails.git # cd rails/activesupport/ -# git checkout v5.1.5 && tar czvf activesupport-5.1.5-tests.tgz test/ +# git checkout v5.2.0 && tar czvf activesupport-5.2.0-tests.tgz test/ Source1: %{gem_name}-%{version}-tests.tgz - -# Fix test suite issue caused by fix of CVE-2018-6914 in Ruby. -# https://github.com/rails/rails/commit/ca4be4b7788c90d94beb1e835b7019f809148d08 -Patch1: rubygem-activesupport-5.1.7-Fix-FileStoreTest-test_filename_max_size-fails.patch +# Fix: file separators removal from tmpname value +# https://github.com/rails/rails/pull/32386/ +Patch0: rubygem-activesupport-5.2.0-Fix-FileStoreTest-test_filename_max_size-fails.patch # ruby package has just soft dependency on rubygem({bigdecimal,json}), while # ActiveSupport always requires them. @@ -33,12 +31,14 @@ BuildRequires: ruby >= 2.2.2 BuildRequires: rubygem(bigdecimal) BuildRequires: rubygem(builder) BuildRequires: rubygem(concurrent-ruby) +BuildRequires: rubygem(connection_pool) BuildRequires: rubygem(dalli) -BuildRequires: rubygem(i18n) >= 0.6.9 +BuildRequires: (rubygem(i18n) >= 0.7 with rubygem(i18n) < 2) BuildRequires: rubygem(minitest) >= 5.0.0 BuildRequires: rubygem(rack) BuildRequires: rubygem(tzinfo) >= 1.1 BuildRequires: rubygem(listen) +BuildRequires: rubygem(redis) BuildRequires: memcached BuildArch: noarch @@ -50,7 +50,6 @@ time zones, and testing. %package doc Summary: Documentation for %{name} -Group: Documentation Requires: %{name} = %{epoch}:%{version}-%{release} BuildArch: noarch @@ -60,10 +59,6 @@ Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -# https://github.com/rails/rails/pull/31991 -%gemspec_remove_dep -s ../%{gem_name}-%{version}.gemspec -g i18n '~> 0.7' -%gemspec_add_dep -s ../%{gem_name}-%{version}.gemspec -g i18n '~> 1.0' - %build gem build ../%{gem_name}-%{version}.gemspec @@ -79,10 +74,13 @@ pushd .%{gem_instdir} # Move the tests into place tar xzvf %{SOURCE1} -cat %{PATCH1} | patch -p2 +cat %{PATCH0} | patch -p2 # These tests are really unstable, but they seems to be passing upstream :/ -for f in test/evented_file_update_checker_test.rb; do +for f in \ + test/evented_file_update_checker_test.rb \ + test/cache/stores/redis_cache_store_test.rb # failed to require "redis/connection/hiredis" +do mv $f{,.disable} done @@ -92,6 +90,7 @@ sed -i '/def test_iso8601_output_and_reparsing$/,/^ end$/ s/^/#/' test/core_ext memcached & mPID=$! +sleep 1 ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' kill -15 $mPID popd @@ -109,6 +108,9 @@ popd %doc %{gem_instdir}/README.rdoc %changelog +* Mon Apr 23 2018 Pavel Valena - 1:5.2.0-1 +- Update to Active Support 5.2.0. + * Mon Apr 16 2018 Vít Ondruch - 1:5.1.5-3 - Fix test suite issue caused by fix of CVE-2018-6914 in Ruby. diff --git a/sources b/sources index e0036ab..3e147b3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (activesupport-5.1.5.gem) = 6e20f069f4e2e20a8ea762e02be9f136a32535b871b4c6f2a59600393201f6d01dbd2696a74024811c168e8d6c223e5a4fa0eda3ba30d87a3c2216fba0aedd05 -SHA512 (activesupport-5.1.5-tests.tgz) = 11be71318b4e9f1365d18d72fc527c87837782b62adb6498c423edd2a40687ad22b43b05e983528b6a4d1690376d64adecad816ec8bfd298d7352307e63acd89 +SHA512 (activesupport-5.2.0-tests.tgz) = 72085a71720d6931f8acedc9d6e20f0ee7910cc7c85ed05bedafd49d730ff6b1f1c19fa7f2faa021c2df5907e4d63aa1af7a7e373a6c55300d53be34ecee437f +SHA512 (activesupport-5.2.0.gem) = 606ea2168abc2c0ac1310c560c22e8d708f586c9cfa1e132ed50069eb61db4e4a16138598d83ff020beb3171236f3ddae25b38c315add03b89a04af578900252