Details
Description
In pre-AIO packages, the rbconfig.rb came courtesy of the RubyInstaller workflow and was published to puppet-win32-ruby at https://github.com/puppetlabs/puppet-win32-ruby/blob/2.1.x-x64/ruby/lib/ruby/2.1.0/x64-mingw32/rbconfig.rb
Of particular importance, the build_os value was set to mingw32 at https://github.com/puppetlabs/puppet-win32-ruby/blob/2.1.x-x64/ruby/lib/ruby/2.1.0/x64-mingw32/rbconfig.rb#L191
With the DevKit installed (necessary to build gems with native code like the pry debugging tools), Ruby uses build_os to determine if it should use Cygwin tools on Windows - for instance at https://github.com/ruby/ruby/blob/v2_1_9/lib/mkmf.rb#L1801-L1817
In AIO packages produced by Vanagon, the rbconfig.rb is built automatically based on the platform Ruby is compiled on, which sets build_os to cygwin instead. This causes gem installation to fail with the DevKit installed alongside / configured to use the Puppet Agent vendored Ruby, as described in https://gist.github.com/Iristyle/000a80a98ce73590896a
The fix here is to audit the newly produced rbconfig.rb and ship one that, at the very least, does not specify CONFIG["build_os"] = "cygwin"
A diff of the old pre-AIO and AIO rbconfig.rb is at https://gist.github.com/Iristyle/aeda4c717a2ee48af1176db3bd9dac9a which should be audited.
Note that both the Ruby 2.1.9 and Ruby 2.3.3 rbconfig.rb files should be updated accordingly in the puppet-agent repo.
Attachments
Issue Links
- links to