Fix tests with Europe/Amsterdam pre-1970 time on tzdata version 2022b.
Resolves: rhbz#2120354
This commit is contained in:
parent
f93afdebdd
commit
ad7f78b5c8
40
ruby-spec-Fix-tests-on-tzdata-2022b.patch
Normal file
40
ruby-spec-Fix-tests-on-tzdata-2022b.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 7e9ec8a20b0f7469b415283d2ec0c22087f8eb2b Mon Sep 17 00:00:00 2001
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
Date: Wed, 24 Aug 2022 12:02:56 +0200
|
||||
Subject: [PATCH] Fix tests with Europe/Amsterdam pre-1970 time on tzdata
|
||||
version 2022b.
|
||||
|
||||
The Time Zone Database (tzdata) changed the pre-1970 timestamps in some zones
|
||||
including Europe/Amsterdam on tzdata version 2022b or later.
|
||||
See <https://github.com/eggert/tz/commit/35fa37fbbb152f5dbed4fd5edfdc968e3584fe12>.
|
||||
|
||||
The tzdata RPM package maintainer on Fedora project suggested changing the Ruby
|
||||
test, because the change is intentional.
|
||||
See <https://bugzilla.redhat.com/show_bug.cgi?id=2118259#c1>.
|
||||
|
||||
We use post-1970 time test data to simplify the test.
|
||||
---
|
||||
core/time/shared/local.rb | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/spec/ruby/core/time/shared/local.rb b/spec/ruby/core/time/shared/local.rb
|
||||
index 43f331c4c..c4aa7a7ea 100644
|
||||
--- a/spec/ruby/core/time/shared/local.rb
|
||||
+++ b/spec/ruby/core/time/shared/local.rb
|
||||
@@ -8,10 +8,10 @@ describe :time_local, shared: true do
|
||||
|
||||
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
|
||||
--
|
||||
2.36.1
|
||||
|
10
ruby.spec
10
ruby.spec
@ -22,7 +22,7 @@
|
||||
%endif
|
||||
|
||||
|
||||
%global release 167
|
||||
%global release 168
|
||||
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory tree, since the
|
||||
@ -199,6 +199,9 @@ Patch24: ruby-3.2.0-Detect-compaction-support-during-runtime.patch
|
||||
# https://github.com/rpm-software-management/rpm/pull/2080
|
||||
# https://github.com/rubygems/rubygems/pull/5372
|
||||
Patch25: ruby-rubygems-3.3.8-Resolve-cleaned-up-error-with-temporary-gemhome.patch
|
||||
# Fix tests with Europe/Amsterdam pre-1970 time on tzdata version 2022b.
|
||||
# https://github.com/ruby/spec/pull/939
|
||||
Patch26: ruby-spec-Fix-tests-on-tzdata-2022b.patch
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Suggests: rubypick
|
||||
@ -675,6 +678,7 @@ find .bundle/gems -name '*-[0-9]*.gemspec' -exec cp -t .bundle/specifications/ {
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
|
||||
# Provide an example of usage of the tapset:
|
||||
cp -a %{SOURCE3} .
|
||||
@ -1531,6 +1535,10 @@ mv test/fiddle/test_import.rb{,.disable}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Aug 24 2022 Jun Aruga <jaruga@redhat.com> - 3.1.2-168
|
||||
- Fix tests with Europe/Amsterdam pre-1970 time on tzdata version 2022b.
|
||||
Resolves: rhbz#2120354
|
||||
|
||||
* Mon Jul 25 2022 Jarek Prokop <jprokop@redhat.com> - 3.1.2-167
|
||||
- Fix directory permissions in one of the rubygems tests.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user