diff --git a/SOURCES/0001-Stop-nitpicking-tzdata.patch b/SOURCES/0001-Stop-nitpicking-tzdata.patch new file mode 100644 index 0000000..8336481 --- /dev/null +++ b/SOURCES/0001-Stop-nitpicking-tzdata.patch @@ -0,0 +1,36 @@ +From 2b79aad9b898f1dfd8d79d158af770d9692b741c Mon Sep 17 00:00:00 2001 +From: Sergey Cherevko +Date: Tue, 18 Jul 2023 13:47:49 +0300 +Subject: [PATCH 1/3] Stop nitpicking tzdata + +--- + test/ruby/test_time_tz.rb | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index fdc9e11..49f7e8c 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -140,9 +140,7 @@ class TestTimeTZ < Test::Unit::TestCase + + def test_asia_singapore + with_tz(tz="Asia/Singapore") { +- assert_time_constructor(tz, "1981-12-31 23:59:59 +0730", :local, [1981,12,31,23,59,59]) +- assert_time_constructor(tz, "1982-01-01 00:30:00 +0800", :local, [1982,1,1,0,0,0]) +- assert_time_constructor(tz, "1982-01-01 00:59:59 +0800", :local, [1982,1,1,0,29,59]) ++ assert_time_constructor(tz, "1982-01-01 00:29:59 +0800", :local, [1982,1,1,0,29,59]) + assert_time_constructor(tz, "1982-01-01 00:30:00 +0800", :local, [1982,1,1,0,30,0]) + } + end +@@ -450,7 +448,7 @@ America/Managua Fri Jan 1 06:00:00 1993 UTC = Fri Jan 1 01:00:00 1993 EST isd + America/Managua Wed Jan 1 04:59:59 1997 UTC = Tue Dec 31 23:59:59 1996 EST isdst=0 gmtoff=-18000 + America/Managua Wed Jan 1 05:00:00 1997 UTC = Tue Dec 31 23:00:00 1996 CST isdst=0 gmtoff=-21600 + Asia/Singapore Sun Aug 8 16:30:00 1965 UTC = Mon Aug 9 00:00:00 1965 SGT isdst=0 gmtoff=27000 +-Asia/Singapore Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000 ++Asia/Singapore Thu Dec 31 15:59:59 1981 UTC = Thu Dec 31 23:29:59 1981 SGT isdst=0 gmtoff=27000 + Asia/Singapore Thu Dec 31 16:30:00 1981 UTC = Fri Jan 1 00:30:00 1982 SGT isdst=0 gmtoff=28800 + End + gen_zdump_test CORRECT_TOKYO_DST_1951 ? <<'End' + (CORRECT_TOKYO_DST_1951 < "2018f" ? <<'2018e' : <<'2018f') : <<'End' +-- +2.39.2 + diff --git a/SOURCES/0002-Allow-use-file-protocol-when-update-submodule.patch b/SOURCES/0002-Allow-use-file-protocol-when-update-submodule.patch new file mode 100644 index 0000000..8c4001f --- /dev/null +++ b/SOURCES/0002-Allow-use-file-protocol-when-update-submodule.patch @@ -0,0 +1,25 @@ +From 84d385904686a708d92c072297eacfe87256e73e Mon Sep 17 00:00:00 2001 +From: Sergey Cherevko +Date: Tue, 18 Jul 2023 16:18:30 +0300 +Subject: [PATCH 2/3] Allow use file protocol when update submodule + +--- + test/rubygems/test_gem_source_git.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb +index 73ed8dd..518daf6 100644 +--- a/test/rubygems/test_gem_source_git.rb ++++ b/test/rubygems/test_gem_source_git.rb +@@ -63,6 +63,8 @@ class TestGemSourceGit < Gem::TestCase + end + + def test_checkout_submodules ++ system @git, 'config', '--global', 'protocol.file.allow', 'always' ++ + source = Gem::Source::Git.new @name, @repository, 'master', true + + git_gem 'b' +-- +2.39.2 + diff --git a/SOURCES/0003-Fix-tests-with-Europe-Amsterdam-pre-1970-time-on-tzd.patch b/SOURCES/0003-Fix-tests-with-Europe-Amsterdam-pre-1970-time-on-tzd.patch new file mode 100644 index 0000000..17ca95d --- /dev/null +++ b/SOURCES/0003-Fix-tests-with-Europe-Amsterdam-pre-1970-time-on-tzd.patch @@ -0,0 +1,30 @@ +From 3a1ae154fb886a443c4a150e3443a9e2832db9ca Mon Sep 17 00:00:00 2001 +From: Sergey Cherevko +Date: Wed, 19 Jul 2023 10:40:54 +0300 +Subject: [PATCH 3/3] Fix tests with Europe/Amsterdam pre-1970 time on tzdata + version 2023c + +--- + spec/ruby/core/time/shared/local.rb | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/spec/ruby/core/time/shared/local.rb b/spec/ruby/core/time/shared/local.rb +index 43f331c..bd33fa0 100644 +--- a/spec/ruby/core/time/shared/local.rb ++++ b/spec/ruby/core/time/shared/local.rb +@@ -10,8 +10,10 @@ describe :time_local, shared: true do + describe "timezone changes" do + it "correctly adjusts the timezone change to 'CEST' 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"] ++ [ ++ [0, 40, 1, 16, 5, 1940, 4, 137, true, "CEST"], ++ [0, 0, 0, 16, 5, 1940, 4, 137, true, "WEST"] ++ ].should include(Time.send(@method, 1940, 5, 16).to_a) + end + end + end +-- +2.39.2 + diff --git a/SOURCES/0004-Added-assertion-values-for-Amazon-Linux-2023.patch b/SOURCES/0004-Added-assertion-values-for-Amazon-Linux-2023.patch new file mode 100644 index 0000000..77d4798 --- /dev/null +++ b/SOURCES/0004-Added-assertion-values-for-Amazon-Linux-2023.patch @@ -0,0 +1,39 @@ +From 2adb6039725230a64b8c4250c0c54f380c6dbdc0 Mon Sep 17 00:00:00 2001 +From: Sergey Cherevko +Date: Wed, 19 Jul 2023 17:46:18 +0300 +Subject: [PATCH 4/4] Added assertion values for Amazon Linux 2023 + +--- + spec/ruby/core/file/utime_spec.rb | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/spec/ruby/core/file/utime_spec.rb b/spec/ruby/core/file/utime_spec.rb +index 59eef20..852fbe2 100644 +--- a/spec/ruby/core/file/utime_spec.rb ++++ b/spec/ruby/core/file/utime_spec.rb +@@ -79,17 +79,19 @@ describe "File.utime" do + + platform_is :linux do + platform_is wordsize: 64 do +- it "allows Time instances in the far future to set mtime and atime (but some filesystems limit it up to 2446-05-10 or 2038-01-19)" do ++ it "allows Time instances in the far future to set mtime and atime (but some filesystems limit it up to 2446-05-10 or 2038-01-19 or 2486-07-02)" do + # https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Inode_Timestamps + # "Therefore, timestamps should not overflow until May 2446." + # https://lwn.net/Articles/804382/ + # "On-disk timestamps hitting the y2038 limit..." + # The problem seems to be being improved, but currently it actually fails on XFS on RHEL8 + # https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201112T123004Z.fail.html.gz ++ # Amazon Linux 2023 returns 2486-07-02 in this example ++ # http://rubyci.s3.amazonaws.com/amazon2023/ruby-master/log/20230322T063004Z.fail.html.gz + time = Time.at(1<<44) + File.utime(time, time, @file1) +- [559444, 2446, 2038].should.include? File.atime(@file1).year +- [559444, 2446, 2038].should.include? File.mtime(@file1).year ++ [559444, 2486, 2446, 2038].should.include? File.atime(@file1).year ++ [559444, 2486, 2446, 2038].should.include? File.mtime(@file1).year + end + end + end +-- +2.39.2 + diff --git a/SPECS/ruby.spec b/SPECS/ruby.spec index 0353b41..a582d98 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -95,7 +95,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} -Release: %{release_string} +Release: %{release_string}.inferit # Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... # MIT and CCO: ccan/* # zlib: ext/digest/md5/md5.*, ext/nkf/nkf-utf8/nkf.c @@ -197,6 +197,12 @@ Patch25: ruby-3.2.0-define-unsupported-gc-compaction-methods_generated-files.pat # https://github.com/ruby/ruby/commit/2c190863239bee3f54cfb74b16bb6ea4cae6ed20 Patch26: ruby-3.2.0-Detect-compaction-support-during-runtime.patch +# MSVSphere +Patch1000: 0001-Stop-nitpicking-tzdata.patch +Patch1001: 0002-Allow-use-file-protocol-when-update-submodule.patch +Patch1002: 0003-Fix-tests-with-Europe-Amsterdam-pre-1970-time-on-tzd.patch +Patch1003: 0004-Added-assertion-values-for-Amazon-Linux-2023.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick Recommends: ruby(rubygems) >= %{rubygems_version} @@ -664,6 +670,12 @@ find .bundle/gems -name '*-[0-9]*.gemspec' -exec cp -t .bundle/specifications/ { %patch25 -p1 %patch26 -p1 +# MSVSphere +%patch1000 -p1 +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 + # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1531,6 +1543,10 @@ mv test/fiddle/test_import.rb{,.disable} %changelog +* Wed Jul 19 2023 Sergey Cherevko - 3.1.2-141.inferit +- Fixed test crashes after build +- Rebuilt for MSVSphere 9.2 + * Wed Mar 29 2023 MSVSphere Packaging Team - 3.1.2-141 - Rebuilt for MSVSphere 9.1.