From d7902c1dbdff34dfe653a4ab917c91169511cc6a Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Mon, 26 Sep 2022 10:38:50 +0800 Subject: [PATCH] fix tests with Europe/Amsterdam pre-1970 time Signed-off-by: Bo Ren --- ...sts-with-Europe-Amsterdam-pre-1970-time.patch | 16 ++++++++++++++++ ruby.spec | 11 ++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 fix-tests-with-Europe-Amsterdam-pre-1970-time.patch 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 0000000..6179337 --- /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:32:38.075652214 +0800 ++++ spec/ruby/core/time/shared/local.rb 2022-09-26 10:34:00.754949846 +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 5b92e33..01e1865 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global major_version 3 %global minor_version 0 %global teeny_version 4 @@ -23,7 +24,7 @@ %global release 141 -%{!?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 @@ Patch21: ruby-3.1.0-Properly-exclude-test-cases.patch # https://github.com/rubygems/rubygems/pull/5154 Patch22: rubygems-3.2.33-Fix-loading-operating_system-rb-customizations-too-late.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} @@ -609,6 +613,8 @@ rm -rf ext/fiddle/libffi* %patch21 -p1 %patch22 -p1 +%patch1000 -p0 + # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1363,6 +1369,9 @@ MSPECOPTS="" %changelog +* Mon Sep 26 2022 Bo Ren - 3.0.4-141.0.1 +- fix tests with Europe/Amsterdam pre-1970 time + * Tue Jul 26 2022 Jarek Prokop - 3.0.4-141 - Upgrade to Ruby 3.0.4. Resolves: rhbz#2109431 -- Gitee