diff --git a/fix-tests-with-Europe-Amsterdam-pre-1970-time.patch b/fix-tests-with-Europe-Amsterdam-pre-1970-time.patch new file mode 100644 index 0000000000000000000000000000000000000000..50380f7cf568683a1d58d3a3fbbabf569f33b1df --- /dev/null +++ b/fix-tests-with-Europe-Amsterdam-pre-1970-time.patch @@ -0,0 +1,16 @@ +--- spec/ruby/core/time/shared/local.rb.orig 2022-09-26 10:44:47.789453721 +0800 ++++ spec/ruby/core/time/shared/local.rb 2022-09-26 10:46:10.090755075 +0800 +@@ -8,10 +8,10 @@ + + platform_is_not :windows do + describe "timezone changes" do +- it "correctly adjusts the timezone change to 'CEST' on 'Europe/Amsterdam'" do ++ it "correctly adjusts the timezone change to 'CET' on 'Europe/Amsterdam'" do + with_timezone("Europe/Amsterdam") do +- Time.send(@method, 1940, 5, 16).to_a.should == +- [0, 40, 1, 16, 5, 1940, 4, 137, true, "CEST"] ++ Time.send(@method, 1970, 5, 16).to_a.should == ++ [0, 0, 0, 16, 5, 1970, 6, 136, false, "CET"] + end + end + end diff --git a/ruby.spec b/ruby.spec index 509673d4d7adf7553c22ab62bbfed63b5b436bdd..0f7daf08f400d0c516a5f8376a7b3fefd19bbf82 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global major_version 2 %global minor_version 7 %global teeny_version 6 @@ -23,7 +24,7 @@ %global release 138 -%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} +%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{anolis_release}%{?dist}} # The RubyGems library has to stay out of Ruby directory tree, since the # RubyGems should be share by all Ruby implementations. @@ -170,6 +171,9 @@ Patch22: rubygems-3.2.13-test-gem-message.patch # https://github.com/ruby/ruby/commit/c082c6eb7c786a432bea23cf78839f64585cb630 Patch23: rubygems-3.2.22-fix-requirement-equals.patch +# https://github.com/ruby/spec/pull/939/commits/63f899d00e9d38d7f5175bc028f218241262dc7a +Patch1000: fix-tests-with-Europe-Amsterdam-pre-1970-time.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick Recommends: ruby(rubygems) >= %{rubygems_version} @@ -593,6 +597,8 @@ cp -a %{_builddir}/rubygems/bundler/tool/bundler tool/bundler %patch22 -p1 %patch23 -p1 +%patch1000 -p0 + # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1298,6 +1304,9 @@ MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to %changelog +* Mon Sep 26 2022 Bo Ren - 2.7.6-138.0.1 +- fix tests with Europe/Amsterdam pre-1970 time + * Tue Jul 19 2022 Jarek Prokop - 2.7.6-138 - Upgrade to Ruby 2.7.6. Resolves: rhbz#2109424