#710 Ruby packaging guidelines update
Closed: accepted 4 years ago Opened 4 years ago by vondruch.

Link to the draft


Link to diff



It is quite some time Ruby packaging guidelines were updated. Since RPM 4.14+ can expand the .gem packages, I am taking the opportunity to propose refresh of the guidelines.

I proposed the draft to Ruby SIG [1]. Although there was not feedback, to this specific thread, the modified use of %setup macro was welcome previously [2].

Please note that the top box referring to the older guidelines should be updates once the official guidelines are edited.

Metadata Update from @tibbs:
- Issue tagged with: hasdraft, meeting

4 years ago

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2017-09-14/fpc.2017-09-14-16.00.txt):

  • x710 Ruby packaging guidelines update (geppetto, 16:26:49)
  • LINK: https://fedoraproject.org/wiki/Packaging:Ruby (vondruch,
  • These guidlines only work on F27+ (geppetto, 16:37:49)
  • ACTION: vondruch Will change guideline to apply to F25+, via. split
    setup section. (geppetto, 16:46:41)

I'd just like one clarification: Last time we discussed this, you said the about the admon that "it should be modified to Different Guidelines for Fedora up to including 26 and EPEL6/7"

But in your latest draft, the admon says "Different Guidelines for Fedora 26 and older" -- did the situation on EPEL change?

Otherwise I'm happy with it :-)

But in your latest draft, the admon says "Different Guidelines for Fedora 26 and older" -- did the situation on EPEL change?

I give it thought and decided that it would just complicate everything.

Honestly, I am unhappy with the current approach "have one guidelines which fits everything". IMO, the guidelines should be branched with every Fedora release and every RHEL release. There is nothing like single EPEL guidelines, there is nothing like EPEL6 or EPEL7 guidelines. There might be RHEL 6.x and 7.x guidelines and even that might not be necessarily precise, since RHEL have Z-stream and async erratas.

Just to give you and example, Ruby in RHEL 7.4 adds support for %gemspec_{add,remove}_dep macros, but these macros are not available on RHEL 7.3, while RHEL 7.3 is still supported. Should they be documented for EPEL? Should they be prohibited, since they does not work on RHEL 7.0?

I don't want to see guidelines full of exceptions similarly as I don't want to see .spec files full of conditions for different releases ....

We discussed this at this weeks meeting (https://meetbot-raw.fedoraproject.org/fedora-meeting-2/2017-10-04/fpc.2017-10-04-17.00.txt:

Metadata Update from @james:
- Issue tagged with: needinfo

4 years ago

Just to be sure, my response to the Q from the meeting is the comment above the meeting output ...

Is there something missing? I would appreciate seeing this approved. Thx

Metadata Update from @ignatenkobrain:
- Issue untagged with: needinfo

4 years ago

Metadata Update from @ignatenkobrain:
- Issue untagged with: meeting
- Issue assigned to ignatenkobrain
- Issue tagged with: committee

4 years ago

We discussed this at this weeks meeting (https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2018-04-19/fpc.2018-04-19-16.00.txt):

  • x710 Ruby packaging guidelines update (geppetto, 16:57:43)
  • ACTION: ignatenkobrain will review guidelines and write summary in
    the ticket. (geppetto, 17:01:31)


  • Open Floor (geppetto, 17:02:04)
  • ACTION: mhroncok will review guidelines and write summary in the
    ticket as well (mhroncok, 17:02:04)

I updated the initial message with the final diff. I hope that will help avoid confusion.

I've looked over the diff and the new version, and it's looking good from my perspective. I've also tried to create two new packages and to adapt and update an old package following the proposed guidelines, and both worked fine as far as I can tell.

I came across one issue with the proposed changes right now: The #Patching_required_gem_versions section isn't up to date with the changes to %prep described further up in the document.

Using %gemspec_remove_dep and %gemspec_add_dep doesn't work as advertised anymore:

%gemspec_remove_dep -g GEM VERSION expects the generated .gemspec file at the old location, and to get it to work, I had to use %gemspec_remove_dep -s ../%{gem_name}-%{version}.gemspec -g GEM VERSION to point it to the correct .gemspec file.

Either the Guidelines must reflect that using the -s parameter is no longer optional, or the macros have to be adapted to the new file name and location.

Ups sorry, I accidentally edited my message instead of quoting it :((

Yes, you are right. I almost forget about this. The plan is to change the macros so the '-s' option won't be needed:


There is just 17 packages in Rawhide using these macros [1] and from these just 6 using the '-s' option. Also, at the same time, the packages needs to used the %setup macro to expand the .gem to be impacted, so the impact should be minimal.

Actually, looking at rubygem-haml-rails for example, it is using the "-s" option for different reasons, so there is chance that just 5 or less packages were broken.

[1] List of packages using %gemspec_{add,remove}_dep:


[2] List of packages using '-s' option:


It seems that the '-s' parameter change in macro is issue just for rubygem-activesupport and rubygem-asciibinder, so the impact of the change will be rather small.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2018-04-26/fpc.2018-04-26-16.00.txt):

  • x710 Ruby packaging guidelines update (geppetto, 16:28:53)
  • ACTION: VOTE: Ruby packaging guidelines update (+1:6, 0:0, -1:0)
    (geppetto, 16:48:19)

Metadata Update from @tibbs:
- Issue untagged with: committee, hasdraft
- Issue assigned to tibbs (was: ignatenkobrain)

4 years ago

Metadata Update from @james:
- Issue tagged with: writeup

4 years ago

Thank you! :two_hearts:

I've gone ahead and written these up. Please double check my changes. I will hold off making an announcement about it until you let me know that the macro changes needed are in place, or at least submitted with corresponding buildroot overrides in place.

Announcement text:

Many changes have been made to the Ruby packaging guidelines to reflect the current state of Ruby packaging.

Metadata Update from @tibbs:
- Issue untagged with: writeup
- Issue tagged with: announce

4 years ago

Hi @tibbs, thx for writeup. Few notes:

  1. You omitted Bundler and code coverage frameworks note [1]. I think it should really be there. They typically just complicates everything, mainly because they pulling in too many dependencies, which are not needed.

  2. We used to recommend to remove the tests suite [2] but nowadays, I don't think it makes sense to keep this note. On one hand, it typically really is just waste of disk space, but OTOH a) a lot less gems are shipping their test suite nowadays b) this does not reflect the reality, where majority of packages ships the test files in their -doc subpackage anyway. Leaving this note out will align the guidelines with the reality and leaves the decision to package maintainers.

  3. There is excessive period in this [3] patch. Search for "or ."

But these are just minor nits.

Testing the macro changes in Ruby right now. Will let you know when builds are ready.

I did fix those issues, but am, still holding off on announcing anything because of the macros.

I'm going to go ahead and announce this tomorrow with any writeups from tomorrow's meeting. I'll just note in the announcement that some of the enabling macros might not yet have made it out to all released versions of Fedora.

Sorry for late reply. This was hold on by work on by work on one additional macro [1] we wanted to land, but the work took longer then expected. But the changes are now in Rawhide [2] and we will backport them into stable branches ASAP.

Metadata Update from @tibbs:
- Issue untagged with: announce
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.