#132 Backport rawhide to F37
Merged 2 years ago by jackorp. Opened 2 years ago by jackorp.
rpms/ jackorp/ruby backport1  into  f37

@@ -0,0 +1,24 @@ 

+ From 54c8df06ff9e161012f89d19a4e3aa2e0e37e1b0 Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>

+ Date: Tue, 23 Aug 2022 10:41:28 +0200

+ Subject: [PATCH] Drop hard dependency on RDoc.

+ 

+ This has been introduced in 026700499dfd640b2072d7bf0370247a98d5ac40,

+ but it seems that this is just be mistake, otherwise the later handling

+ of `LoadError` would not be needed.

+ ---

+  lib/irb/input-method.rb | 1 -

+  1 file changed, 1 deletion(-)

+ 

+ diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb

+ index fd68239e..a8227caa 100644

+ --- a/lib/irb/input-method.rb

+ +++ b/lib/irb/input-method.rb

+ @@ -14,7 +14,6 @@

+  require_relative 'completion'

+  require 'io/console'

+  require 'reline'

+ -require 'rdoc'

+  

+  module IRB

+    STDIN_FILE_NAME = "(line)" # :nodoc:

@@ -0,0 +1,41 @@ 

+ From b24852058fc87c940252c8a711c60ae2eb298082 Mon Sep 17 00:00:00 2001

+ From: Jun Aruga <jaruga@redhat.com>

+ Date: Thu, 25 Aug 2022 20:11:34 +0200

+ Subject: [PATCH] Require RDoc in `input-method.rb` again in a limited scope.

+ 

+ RDoc is implemented as soft dependency in IRB. See how the rdoc is required in

+ the files. I reverted the commit below.

+ 

+ ```

+ $ grep -ril rdoc lib/

+ lib/irb/cmd/help.rb

+ lib/irb/completion.rb

+ lib/irb/easter-egg.rb

+ lib/irb/input-method.rb

+ ```

+ 

+ ---

+ 

+ Revert "Remove `require` in signal handler to avoid ThreadError"

+ 

+ This reverts commit 5f749c613c895cf1b11b5e4cbd1205363bc58028.

+ ---

+  lib/irb/input-method.rb | 5 +++++

+  1 file changed, 5 insertions(+)

+ 

+ diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb

+ index a8227ca..b77fd32 100644

+ --- a/lib/irb/input-method.rb

+ +++ b/lib/irb/input-method.rb

+ @@ -320,6 +320,11 @@ def auto_indent(&block)

+          [195, 164], # The "ä" that appears when Alt+d is pressed on xterm.

+          [226, 136, 130] # The "∂" that appears when Alt+d in pressed on iTerm2.

+        ]

+ +      begin

+ +        require 'rdoc'

+ +      rescue LoadError

+ +        return nil

+ +      end

+  

+        if just_cursor_moving and completion_journey_data.nil?

+          return nil

@@ -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

+ 

file modified
+33 -1
@@ -22,7 +22,7 @@ 

  %endif

  

  

- %global release 167

+ %global release 169

  %{!?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,15 @@ 

  # 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

+ # Drop hard dependency on RDoc in IRB.

+ # https://github.com/ruby/irb/pull/393

+ Patch27: ruby-irb-1.4.1-drop-rdoc-hard-dep.patch

+ # Set soft dependency on RDoc in input-method.rb in IRB.

+ # https://github.com/ruby/irb/pull/395

+ Patch28: ruby-irb-1.4.1-set-rdoc-soft-dep.patch

  

  Requires: %{name}-libs%{?_isa} = %{version}-%{release}

  Suggests: rubypick
@@ -351,6 +360,7 @@ 

  # ruby-default-gems is required to run irb.

  # https://bugs.ruby-lang.org/issues/16951

  Requires:   ruby-default-gems >= %{ruby_version}

+ Recommends: rubygem(rdoc) >= %{rdoc_version}

  Provides:   irb = %{version}-%{release}

  Provides:   rubygem(irb) = %{version}-%{release}

  # Obsoleted by Ruby 2.6 in F30 timeframe.
@@ -490,6 +500,8 @@ 

  %package bundled-gems

  Summary:    Bundled gems which are part of Ruby StdLib

  Requires:   ruby(rubygems) >= %{rubygems_version}

+ # Runtime dependency of rubygem(debug).

+ Recommends: rubygem(irb) >= %{irb_version}

  Provides:   rubygem(net-ftp) = %{net_ftp_version}

  Provides:   rubygem(net-imap) = %{net_imap_version}

  Provides:   rubygem(net-pop) = %{net_pop_version}
@@ -675,6 +687,9 @@ 

  %patch23 -p1

  %patch24 -p1

  %patch25 -p1

+ %patch26 -p1

+ %patch27 -p1

+ %patch28 -p1

  

  # Provide an example of usage of the tapset:

  cp -a %{SOURCE3} .
@@ -976,6 +991,9 @@ 

  # other components are fixed.

  # https://bugzilla.redhat.com/show_bug.cgi?id=2040380

  mv test/fiddle/test_import.rb{,.disable}

+ mv test/fiddle/test_closure.rb{,.disable}

+ DISABLE_TESTS="$DISABLE_TESTS -n !/Fiddle::TestFunc#test_qsort1/"

+ DISABLE_TESTS="$DISABLE_TESTS -n !/Fiddle::TestFunction#test_argument_count/"

  

  # Give an option to increase the timeout in tests.

  # https://bugs.ruby-lang.org/issues/16921
@@ -1531,6 +1549,20 @@ 

  

  

  %changelog

+ * Fri Sep 02 2022 Jarek Prokop <jprokop@redhat.com> - 3.1.2-169

+ - Disable fiddle tests that use FFI closures.

+   Related: rhbz#2040380

+ 

+ * Mon Aug 29 2022 Jun Aruga <jaruga@redhat.com> - 3.1.2-168

+ - Make RDoc soft dependnecy in IRB.

+   Resolves: rhbz#2119964

+ - Add IRB to ruby-bundled-gems recommends.

+   Resolves: rhbz#2120562

+ 

+ * 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.

  

These are the changes that are going to be backported to F37 and then F36.

There is only a release bump from 167 to 168 as 168 does not yet exist in F37 (F36 would be bumped to 165).

The following was backported:
Disable Fiddle test cases making use of FFI closure.
https://src.fedoraproject.org/rpms/ruby/c/c2026da1750e6d0cc70c7370a0840628bbbfa965?branch=rawhide

Add IRB to ruby-bundled-gems recommends.
https://src.fedoraproject.org/rpms/ruby/c/3f106c188ea6368c950ba7d610594f910773a25f?branch=rawhide

Make RDoc soft dependnecy in IRB.
https://src.fedoraproject.org/rpms/ruby/c/bf921512e288965724353ecf73ca9aa6d4975489?branch=rawhide

Fix tests with Europe/Amsterdam pre-1970 time on tzdata version 2022b.
Older fedoras also received the tzdata update, so Koschei is now failing on that for F36 and F37
https://src.fedoraproject.org/rpms/ruby/c/ad7f78b5c865f3cbf8721d7eecf950a508a6bc5d?branch=rawhide

For F37, I would do just "git merge rawhide" and kept the Rawhide release. For F36, I'd cherry-picked the commits and kept their releases. But this is mostly academic discussion. So LGTM at this form.

rebased onto ad7f78b

2 years ago

Used the simple git merge rawhide.

Pull-Request has been merged by jackorp

2 years ago

Build succeeded.