From 5db71370048d5a4e293ab21e5b22f3a8f3c97146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 24 Oct 2023 13:56:04 +0200 Subject: [PATCH] Disable "Defaulting to user installation" RubyGems message This restores `gem spec` command output and therefore fixes build of rubygem- packages. https://github.com/rubygems/rubygems/issues/7082 --- ...sable-user-installation-info-message.patch | 24 +++++++++++++++++++ ruby.spec | 6 +++++ 2 files changed, 30 insertions(+) create mode 100644 ruby-3.3.0-Disable-user-installation-info-message.patch diff --git a/ruby-3.3.0-Disable-user-installation-info-message.patch b/ruby-3.3.0-Disable-user-installation-info-message.patch new file mode 100644 index 0000000..3e1b9e4 --- /dev/null +++ b/ruby-3.3.0-Disable-user-installation-info-message.patch @@ -0,0 +1,24 @@ +From f0b10ff12a6de98b8e1f787f79d4a0f0e995bf40 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 24 Oct 2023 12:57:32 +0200 +Subject: [PATCH] Disable "user installation" info message. + +This is reported by every command (at least in build root), pollutes +their output and therefore breaks things. +--- + lib/rubygems/command.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb +index 01deac6890..4f82a2755a 100644 +--- a/lib/rubygems/command.rb ++++ b/lib/rubygems/command.rb +@@ -324,7 +324,7 @@ def invoke_with_build_args(args, build_args) + @when_invoked.call options + else + if Gem.paths.auto_user_install && !options[:install_dir] && !options[:user_install] +- self.ui.say "Defaulting to user installation because default installation directory (#{Gem.default_dir}) is not writable." ++ # self.ui.say "Defaulting to user installation because default installation directory (#{Gem.default_dir}) is not writable." + end + + execute diff --git a/ruby.spec b/ruby.spec index dbf2a48..44f56bf 100644 --- a/ruby.spec +++ b/ruby.spec @@ -228,6 +228,11 @@ Patch6: ruby-2.7.0-Initialize-ABRT-hook.patch # Disable syntax_suggest test suite, which tries to download its dependencies. # https://bugs.ruby-lang.org/issues/19297 Patch9: ruby-3.3.0-Disable-syntax-suggest-test-case.patch +# The "Defaulting to user installation" message pollutes output various gem +# commands, including `gem spec` output. This in turn break build of rubygem- +# packages. Disable the message for now. +# https://github.com/rubygems/rubygems/issues/7082 +Patch10: ruby-3.3.0-Disable-user-installation-info-message.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?with_rubypick:Suggests: rubypick} @@ -647,6 +652,7 @@ analysis result in RBS format, a standard type description format for Ruby %patch 4 -p1 %patch 6 -p1 %patch 9 -p1 +%patch 10 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} .