From b5c5e639de320acecc636dc08e58268b74a4d2e3 Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Fri, 11 Nov 2022 14:27:21 +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 | 10 +++++++++- 2 files changed, 25 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..50380f7 --- /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 2f405d7..9058ee0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global major_version 2 %global minor_version 6 %global teeny_version 10 @@ -22,7 +23,7 @@ %global release 109 -%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} +%{!?release_string:%global 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. @@ -179,6 +180,9 @@ Patch29: ruby-2.7.0-bundler-use-bundle-gem-instead-of-gem-command.patch # https://github.com/rubygems/rubygems/pull/5029 Patch30: ruby-bundler-raise-error-in-dependency-confusion.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} @@ -575,6 +579,7 @@ rm -rf ext/fiddle/libffi* %patch26 -p1 %patch27 -p1 %patch30 -p1 +%patch1000 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1244,6 +1249,9 @@ make test-bundler V=1 RSPECOPTS="--format d" BUNDLER_SPECS=bundler/definition_de %{_mandir}/man5/gemfile.5* %changelog +* Fri Nov 11 2022 Bo Ren - 2.6.10-109.0.1 +- fix tests with Europe/Amsterdam pre-1970 time + * Thu May 19 2022 Vít Ondruch - 2.6.10-109 - Upgrade to Ruby 2.6.10. Resolves: rhbz#2088415 -- Gitee