[Bug 258108] [exp-run] devel/ruby-gems: Update to 3.2.30 (Fixes for Ruby 3.0)

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 08 Dec 2021 13:03:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258108

--- Comment #47 from Thibault Jouan <tj+freebsd_ports@a13.fr> ---
Created attachment 229977
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=229977&action=edit
potential fix for patching issue

(In reply to Dan Langille from comment #44)

> ERROR:  While executing gem ... (Errno::ENOENT)
>     No such file or directory @ dir_chdir - bundler/lib
> *** Error code 1

  I think that the patch for devel/ruby-gems (which is included in the
patch for the update) did not apply. The only issue I see is that I
made this patch with git, not with `make makepatch`.

  If I `rm devel/ruby-gems/files/patch-bundler-remove.patch`, I get
the same error output. My guess is that the error is from following
chdir:

    class Gem::Commands::SetupCommand < Gem::Command
      […]
      def install_lib(lib_dir)
        libs = { 'RubyGems' => 'lib' }
        libs['Bundler'] = 'bundler/lib' # patch should remove this line
        libs.each do |tool, path|
          […]
          Dir.chdir path do
            […]
          end
        end
      end
    end

  It can be checked by modifying `RUBY_SETUP_OPTIONS' in
`devel/ruby-gems/Makefile' by adding two arguments: --backtrace --verbose

    ERROR:  While executing gem ... (Errno::ENOENT)
        No such file or directory @ dir_chdir - bundler/lib
     
/wrkdirs/usr/ports/devel/ruby-gems/work/rubygems-3.2.30/lib/rubygems/commands/setup_command.rb:490:in
`chdir'
      […]
     
/wrkdirs/usr/ports/devel/ruby-gems/work/rubygems-3.2.30/lib/rubygems/commands/setup_command.rb:321:in
`install_lib'


  While I can obtain the same error, I don't know how to fully
reproduce it (if the patch embedded in the patch does not apply, I
don't know why). I'd be interested to see the `patch' target in
poudriere testport output. In the meantime, I'm attaching a patch that
convert the "git" patch to a `make makepatch` one. It need to be
applied after the "main" patch (to avoid being huge).

-- 
You are receiving this mail because:
You are the assignee for the bug.