From 79d75fdcddac78d2c73000a6ae7569eabb05f7bc Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Wed, 2 Nov 2022 18:30:04 +0100 Subject: [PATCH] Bypass git submodule test failure on Git >= 2.38.1. --- ruby-3.2.0-git-2.38.1-fix-rubygems-test.patch | 27 +++++++++++++++++++ ruby.spec | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 ruby-3.2.0-git-2.38.1-fix-rubygems-test.patch diff --git a/ruby-3.2.0-git-2.38.1-fix-rubygems-test.patch b/ruby-3.2.0-git-2.38.1-fix-rubygems-test.patch new file mode 100644 index 0000000..73f9a02 --- /dev/null +++ b/ruby-3.2.0-git-2.38.1-fix-rubygems-test.patch @@ -0,0 +1,27 @@ +From dae843f6b7502f921a7e66f39e3714a39d860181 Mon Sep 17 00:00:00 2001 +From: Hiroshi SHIBATA +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 +--- + 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' diff --git a/ruby.spec b/ruby.spec index ff1d6da..565a547 100644 --- a/ruby.spec +++ b/ruby.spec @@ -204,6 +204,9 @@ 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 +# 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 @@ -686,6 +689,7 @@ find .bundle/gems -name '*-[0-9]*.gemspec' -exec cp -t .bundle/specifications/ { %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} .