[PUP-9395] provider gem in package type doesn't work anymore when rubygems is >= 3.0.0 Created: 2019/01/03  Updated: 2019/05/14  Resolved: 2019/05/07

Status: Closed
Project: Puppet
Component/s: Types and Providers
Affects Version/s: PUP 5.5.2
Fix Version/s: PUP 5.5.14, PUP 6.0.9, PUP 6.4.2

Type: Bug Priority: Major
Reporter: Luca Zecca Assignee: Branan Riley
Resolution: Fixed Votes: 0
Labels: gem, package, resolved-issue-added, sadness, type_and_provider
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by PUP-9701 Gem provider uses --no-rdoc Closed
Relates
Template: PUP Bug Template
Team: Skeletor
Story Points: 1
Sprint: Platform OS Kanban, Skeletor Kanban, Skeletor Kanban, Skeletor Kanban, Skeletor Kanban
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary:
- Puppet now uses the `--no-document` option to exclude documentation when installing gems, instead of the deprecated `--no-rdoc` and `--no-ri` options. This change allows compatibility with `rubygems` 3.0 and greater.
QA Risk Assessment: Needs Assessment

 Description   

Since version 3.x, gem will not have anymore the 2 params --no-ri and --no-rdoc, that currently are the default params.(https://github.com/puppetlabs/puppet/blob/24ead48f617cd3912491fe419ac7b67cda53a320/lib/puppet/provider/package/gem.rb#L131) when is used the provider gem in the type package. This should be addressed by adding an option to disable them or override them through the parameter `install_options` already existing in the type package. The version 3.x of rubygems is a constraint since the new bundler major version 2.0.0 dropped support for rubygem older than 3.0.0 : https://github.com/bundler/bundler/releases/tag/v2.0.0 .

 



 Comments   
Comment by Josh Cooper [ 2019/01/03 ]

The alternative way to exclude documentation is to specify the --no-document option.

Comment by Andreas Ntaflos [ 2019/01/03 ]

We ran into the same issue today, with Puppet 5.5.6 on Ubuntu 16.04 and 18.04:

Error: Could not update: Execution of '/usr/bin/gem install -v 2.7.7 --no-rdoc --no-ri rubygems-update' returned 1: ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --no-rdoc

Comment by Branan Riley [ 2019/01/03 ]

It looks like --no-document has been around long enough that we should be able to just switch to it in all supported streams (5.5, 6.0, and master). I'll get this scheduled so it will go out in the upcoming set of releases.

EDIT: actually, even though we don't support it for running puppet itself, the gem provider probably needs to support the system rubygems on all supported platforms. We probably need to version-sniff here.

Comment by Thomas Kishel [ 2019/01/03 ]

Yes: https://github.com/puppetlabs/puppet/blob/099ab2efb8b1bd7649586a3a79312166dfb62e90/lib/puppet/provider/package/gem.rb#L135

Comment by Rob Braden [ 2019/01/03 ]

We still need to address this, but fwiw bundler has dropped the rubygems 3.0.0 hard requirement: https://github.com/bundler/bundler/pull/6867

Comment by Thomas Kishel [ 2019/01/03 ]

https://github.com/puppetlabs/puppet/pull/7320 targets 5.5.x

Comment by Thomas Kishel [ 2019/04/24 ]

Done!

Comment by Jean Bond [ 2019/04/24 ]

Branan Riley, is this fix also going into 6.0.9?

Comment by Thomas Kishel [ 2019/04/25 ]

Jean Bond The release notes I suggested have been replaced with the release notes for PUP-9565

 

?

Comment by Jean Bond [ 2019/04/26 ]

Thomas Kishel, I'm sorry about that! When I learned that this was not going into Tuesday's release (afaict), I pasted in the drafted release note, but I grabbed the wrong one. I've recovered and added the correct one.

Comment by Thomas Kishel [ 2019/04/26 ]

No problem!

Comment by Josh Cooper [ 2019/04/30 ]

It appears this change was released in the recent z's:

$ git show 5c578c99ed6ea414f1905e1d1cb934e0a4fa2bb2
commit 5c578c99ed6ea414f1905e1d1cb934e0a4fa2bb2 (5.5.x)
Merge: 00dcdf2fdb cecb8ab91f
Author: Sebastian Miclea <sebastian.miclea@puppet.com>
Date:   Mon Apr 15 13:52:57 2019 +0300
 
    Merge pull request #7320 from tkishel/PUP-9395_no_documentation_5
 
    (PUP-9395) specify version-specific documentation params with install
 
$ git --no-pager tag --contains 5c578c99ed6ea414f1905e1d1cb934e0a4fa2bb2
5.5.14
6.0.9
6.4.2

Branan Riley can you confirm and resolve the ticket?

Generated at Sun Jul 21 02:19:20 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.