https://fedoraproject.org/wiki/User:Vondruch/Draft_RubyGuidelines
https://fedoraproject.org/w/index.php?title=User%3AVondruch%2FDraft_RubyGuidelines&diff=501566&oldid=500202
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
We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2017-09-14/fpc.2017-09-14-16.00.txt):
Here is the update for F25+ compatibility:
https://fedoraproject.org/w/index.php?title=User:Vondruch/Draft_RubyGuidelines&diff=501565&oldid=500216
And I changed one more nit, so this should be the entire diff:
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 :-)
TL;DR 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
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
Metadata Update from @ignatenkobrain: - Issue untagged with: meeting - Issue assigned to ignatenkobrain - Issue tagged with: committee
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):
Also:
Just FTR, the guidelines are F25+ compatible as noted here:
https://pagure.io/packaging-committee/issue/710#comment-466654
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.
%prep
Using %gemspec_remove_dep and %gemspec_add_dep doesn't work as advertised anymore:
%gemspec_remove_dep
%gemspec_add_dep
%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.
%gemspec_remove_dep -g GEM VERSION
%gemspec_remove_dep -s ../%{gem_name}-%{version}.gemspec -g GEM VERSION
.gemspec
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.
-s
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:
https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org/message/XXLG3EACTWGPQBMSQF7K5URGLGLHSPAE/
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:
rubygem-activesupport rubygem-shoulda-context rubygem-prawn-manual_builder rubygem-occi-cli rubygem-capillary rubygem-pkgwat rubygem-haml-rails rubygem-net-ssh rubygem-fog rubygem-ascii_binder rubygem-occi-api rubygem-scruffy rubygem-ferret rubygem-gettext-setup rubygem-aws-sdk rubygem-cucumber-rails rubygem-coveralls
[2] List of packages using '-s' option:
rubygem-activesupport rubygem-shoulda-context rubygem-haml-rails rubygem-net-ssh rubygem-ascii_binder rubygem-scruffy
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):
Metadata Update from @tibbs: - Issue untagged with: committee, hasdraft - Issue assigned to tibbs (was: ignatenkobrain)
Metadata Update from @james: - Issue tagged with: writeup
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
Hi @tibbs, thx for writeup. Few notes:
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.
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.
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)
Log in to comment on this ticket.