From f93afdebdd045891fa0b723ea2330f5fcfd027b0 Mon Sep 17 00:00:00 2001 From: Jarek Prokop Date: Mon, 11 Jul 2022 13:02:25 +0200 Subject: [PATCH] Fix Ruby build failing due to unremovable tmp subdirectory. RPM 4.18.0-beta1 or later versions remove the build directory automatically, the build fails on removing temporary directories with the missing 'w' bit. RubyGems contain this patch since version 3.3.8. This was merged to ruby_3_1 branch in upstream ruby, but it is not included in the v3_1_2 tag, so new Ruby 3.1 release should contain this change. Relevant RPM upstream PR: https://github.com/rpm-software-management/rpm/pull/2080 Relevant bug: https://bugzilla.redhat.com/show_bug.cgi?id=2105393 --- ...aned-up-error-with-temporary-gemhome.patch | 22 +++++++++++++++++++ ruby.spec | 11 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ruby-rubygems-3.3.8-Resolve-cleaned-up-error-with-temporary-gemhome.patch diff --git a/ruby-rubygems-3.3.8-Resolve-cleaned-up-error-with-temporary-gemhome.patch b/ruby-rubygems-3.3.8-Resolve-cleaned-up-error-with-temporary-gemhome.patch new file mode 100644 index 0000000..66c3382 --- /dev/null +++ b/ruby-rubygems-3.3.8-Resolve-cleaned-up-error-with-temporary-gemhome.patch @@ -0,0 +1,22 @@ +From 623162ad2bb3b589bddcc32616492a2bc4651726 Mon Sep 17 00:00:00 2001 +From: Hiroshi SHIBATA +Date: Tue, 22 Feb 2022 11:58:54 +0900 +Subject: [PATCH] Resolve cleaned-up error with temporary gemhome + +--- + test/rubygems/test_gem_commands_setup_command.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb +index 5cf94a1dc99..934c76b1d1a 100644 +--- a/test/rubygems/test_gem_commands_setup_command.rb ++++ b/test/rubygems/test_gem_commands_setup_command.rb +@@ -274,6 +274,8 @@ def test_install_default_bundler_gem_with_destdir_flag + spec.executables.each do |e| + assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e + end ++ ensure ++ FileUtils.chmod "+w", @gemhome + end + + def test_install_default_bundler_gem_with_destdir_and_prefix_flags diff --git a/ruby.spec b/ruby.spec index 0d4cb8c..3176d99 100644 --- a/ruby.spec +++ b/ruby.spec @@ -192,6 +192,13 @@ Patch23: ruby-3.2.0-define-unsupported-gc-compaction-methods_generated-files.pat # https://github.com/ruby/ruby/pull/6019 # https://github.com/ruby/ruby/commit/2c190863239bee3f54cfb74b16bb6ea4cae6ed20 Patch24: ruby-3.2.0-Detect-compaction-support-during-runtime.patch +# RPM 4.18.0-beta1 or later versions remove the build directory automatically +# on successful build, the build then fails on removing temporary directories +# that are missing the 'w' bit. +# https://bugzilla.redhat.com/show_bug.cgi?id=2105393 +# 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 Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -667,6 +674,7 @@ find .bundle/gems -name '*-[0-9]*.gemspec' -exec cp -t .bundle/specifications/ { %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1523,6 +1531,9 @@ mv test/fiddle/test_import.rb{,.disable} %changelog +* Mon Jul 25 2022 Jarek Prokop - 3.1.2-167 +- Fix directory permissions in one of the rubygems tests. + * Sat Jul 23 2022 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild