#136 f37: Bypass git submodule test failure on Git >= 2.38.1.
Merged a year ago by jaruga. Opened a year ago by jaruga.
rpms/ jaruga/ruby wip/f37-ftbfs-on-git  into  f37

@@ -0,0 +1,27 @@ 

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

+ From: Hiroshi SHIBATA <hsbt@ruby-lang.org>

+ Date: Wed, 19 Oct 2022 19:40:00 +0900

+ Subject: [PATCH] Bypass git submodule add/update with git config

+  protocol.file.allow=always option.

+ 

+ Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

+ ---

+  test/rubygems/test_gem_source_git.rb | 5 +++++

+  1 file changed, 5 insertions(+)

+ 

+ diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb

+ index 5702da05974b6..c3b324771fa4d 100644

+ --- a/test/rubygems/test_gem_source_git.rb

+ +++ b/test/rubygems/test_gem_source_git.rb

+ @@ -63,6 +63,11 @@ def test_checkout_local_cached

+    end

+  

+    def test_checkout_submodules

+ +    # We need to allow to checkout submodules with file:// protocol

+ +    # CVE-2022-39253

+ +    # https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/

+ +    system(@git, *%W"config --global protocol.file.allow always")

+ +

+      source = Gem::Source::Git.new @name, @repository, 'master', true

+  

+      git_gem 'b'

file modified
+8 -5
@@ -22,7 +22,7 @@ 

  %endif

  

  

- %global release 169

+ %global release 170

  %{!?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
@@ -92,10 +92,6 @@ 

  %bcond_without hardening_test

  %endif

  

- # The additional linker flags break binary rubygem- packages.

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

- %undefine _package_note_flags

- 

  Summary: An interpreter of object-oriented scripting language

  Name: ruby

  Version: %{ruby_version}
@@ -208,6 +204,9 @@ 

  # 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

+ # Bypass git submodule test failure on Git >= 2.38.1.

+ # https://github.com/ruby/ruby/pull/6587

+ Patch29: ruby-3.2.0-git-2.38.1-fix-rubygems-test.patch

  

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

  Suggests: rubypick
@@ -690,6 +689,7 @@ 

  %patch26 -p1

  %patch27 -p1

  %patch28 -p1

+ %patch29 -p1

  

  # Provide an example of usage of the tapset:

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

  

  

  %changelog

+ * Thu Sep 29 2022 Vít Ondruch <vondruch@redhat.com> - 3.1.2-170

+ - Re-enable package notes.

+ 

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

  - Disable fiddle tests that use FFI closures.

    Related: rhbz#2040380

This PR is to pass a test failure by coming Git 2.38.1 on Fedora 37.
The Git version is still moving from the testing to the stable state.
https://bodhi.fedoraproject.org/updates/?packages=git

This PR's 2 commits are identical with the rawhide. After this PR is merged, there is no difference between rawhide and f37 branches.

$ git checkout f37
$ git merge rawhide

To test the commit "Re-enable package notes.", I will test to build rubygem-nio4r on the bulit Ruby on local mock environment. The issue should be fixed on the redhat-rpm-config 210-1 or later versions on fc36, fc37, fc38 (rawhide).
https://bugzilla.redhat.com/show_bug.cgi?id=2043092#c66

Build succeeded.

To test the commit "Re-enable package notes.", I will test to build rubygem-nio4r on the bulit Ruby on local mock environment. The issue should be fixed on the redhat-rpm-config 210-1 or later versions on fc36, fc37, fc38 (rawhide).

I confirmed the rubygem-nio4r build works with the newly built ruby: ruby-3.1.2-170.fc37.x86_64 on my mock environment.

Build succeeded.

Pull-Request has been merged by jaruga

a year ago