I'm working on building out Puppet on Ruby 1.9 for my day job at Puppet Labs. I also recently took over ruby-shadow since it was orphaned. Upstream has moved to github and they now only distribute as a gem. So, the package will be renamed to rubygem-ruby-shadow.
I *think* I've follwed the new proposed ruby 1.9 guidelines, but I am sure I've missed a couple things. I'm also curious if there is a way I could use the same spec for packages still on Ruby 1.8 (Fedora < 17 and EL)
Anyway, I'd appreciate Feedback. If it's too early to be attempting Ruby 1.9 reviews, that's fine too. :)
https://bugzilla.redhat.com/show_bug.cgi?id=782560
stahnma
Hi Michael, I'd recommend waiting until we get the new guidelines approved by FPC. Anyway, your spec looks pretty good, the only thing that comes to my mind right now is that you don't need to define all the macros, they are defined in macros.rubygems in rubygems-devel package. Because you BR: rubygems-devel, there is no need to BR: ruby(rubygems), as the -devel package will draw them in. When we get the guidelines approved, I'll be happy to do a complete review for you.
Regards, Bohuslav.
----- Original Message -----
I'm working on building out Puppet on Ruby 1.9 for my day job at Puppet Labs. I also recently took over ruby-shadow since it was orphaned. Upstream has moved to github and they now only distribute as a gem. So, the package will be renamed to rubygem-ruby-shadow.
I *think* I've follwed the new proposed ruby 1.9 guidelines, but I am sure I've missed a couple things. I'm also curious if there is a way I could use the same spec for packages still on Ruby 1.8 (Fedora < 17 and EL)
Anyway, I'd appreciate Feedback. If it's too early to be attempting Ruby 1.9 reviews, that's fine too. :)
https://bugzilla.redhat.com/show_bug.cgi?id=782560
stahnma _______________________________________________ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Hello stahnma,
Good to see this review. I was thinking about gemification myself, but you were faster.
As of timing of this review, the earliest possibility to build in Koji will be as soon as we will get the promised tag [1]. We were supposed to get it yesterday, but unfortunately it did not happened yet :/
Regarding the spec, of course Bohuslav's notes applies and I had some more:
* One of the biggest changes in packaging guidelines and folder structure is the move of binary gem libraries into dedicated folder under /usr/lib{,64}. For this purpose, there is "%gem_extdir" macro [2] defined in macros.rubygems. So according to the guidelines [3] you should replace:
pushd %{buildroot}%{gem_instdir} ln -s lib/shadow.so . popd
by
mkdir -p %{buildroot}%{gem_dir}/lib mv %{buildroot}%{gem_instdir}/lib/shadow.so %{buildroot}%{gem_extdir}/lib
and you need to adjust the %files section appropriately, so change:
%{gem_instdir}/*so
to
%exclude %{gem_instdir}/lib %dir %{gem_extdir} %{gem_extdir}/lib
* We have new "%gem_spec" macro, so you should use it:
%{gem_dir}/specifications/%{gem_name}-%{version}.gemspec => %{gem_spec}
* We have new "%gem_docdir" macro:
%doc %{gem_dir}/doc/%{gem_name}-%{version} => %doc %{gem_docdir}
* I would move %{gem_instdir}/*gemspec into -doc subpackage, since it is not runtime dependency. * I would use %exclude in %files section instead of the "rm", but it's more of personal preference. * You have specified wrong license (at least it differs from the original package, I did not checked it further).
BTW, are you aware about Bohuslav's work [4, 5], where he published all changes needed for all Ruby 1.9.3 packages, including Puppet?
Vit
[1] https://fedorahosted.org/rel-eng/ticket/5016 [2] https://github.com/voxik/ruby.spec/commit/ab15bdaa728f11ea2e9adb570b305ef943... [3] https://fedoraproject.org/wiki/PackagingDrafts/Ruby#RubyGem_with_extension_l... [4] http://lists.fedoraproject.org/pipermail/ruby-sig/2011-December/000729.html [5] http://lists.fedoraproject.org/pipermail/ruby-sig/2011-December/000735.html
Dne 17.1.2012 18:30, Michael Stahnke napsal(a):
I'm working on building out Puppet on Ruby 1.9 for my day job at Puppet Labs. I also recently took over ruby-shadow since it was orphaned. Upstream has moved to github and they now only distribute as a gem. So, the package will be renamed to rubygem-ruby-shadow.
I *think* I've follwed the new proposed ruby 1.9 guidelines, but I am sure I've missed a couple things. I'm also curious if there is a way I could use the same spec for packages still on Ruby 1.8 (Fedora< 17 and EL)
Anyway, I'd appreciate Feedback. If it's too early to be attempting Ruby 1.9 reviews, that's fine too. :)
https://bugzilla.redhat.com/show_bug.cgi?id=782560
stahnma _______________________________________________ ruby-sig mailing list ruby-sig@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
Thanks for the feedback.
When building, I don't have
%global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}
as a macro. If I take that out, I get an error in mock. The rest of the macros seem to be ok.
Other changes are being incorporated. I do appreciate the feedback, even it is a bit early. As I said, getting packaging working with Ruby 1.9 is a priority at Puppet Labs, so I figured I'd share my work. :)
On Wed, Jan 18, 2012 at 1:16 PM, Michael Stahnke mastahnke@gmail.com wrote:
Thanks for the feedback.
When building, I don't have
%global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}
as a macro. If I take that out, I get an error in mock. The rest of the macros seem to be ok.
Just saw that the commit looked to be fairly recent. I'm rebasing my build of ruby.spec and I imagine that will fix it.
Other changes are being incorporated. I do appreciate the feedback, even it is a bit early. As I said, getting packaging working with Ruby 1.9 is a priority at Puppet Labs, so I figured I'd share my work. :)
ruby-sig@lists.fedoraproject.org