Hey Philip,

On 06/29/2013 01:09 AM, Philip Rhoades wrote:
Vít,


On 2013-02-26 19:42, Vít Ondruch wrote:
Dne 25.2.2013 22:01, Philip Rhoades napsal(a):
People,

A while ago I posted a note on the Devise forum asking if anyone was
going to build an RPM for Fedora but didn't get any responses at all
- no-one even viewed the post!  What happens with Gems in this
category?  Am I supposed to do anything?  Add a request somewhere?

This will get probably the same attention as the post on Devise forum.
Sorry.

Use the Gem instead of an RPM while I wait for someone to do the work
for creating the RPM?

This is definitely option.



The devise gem is on the TODO list of the packaging process about GitLab. I was planning to get it done this week. I see that one of its dependencies (orm_adapter) is not yet packaged for Fedora so, you'll have to package it too. If you could wait one day or two that's fine otherwise this is a nice chance to start and learn about the packaging process :)

Should I bite the bullet and see how to produce the RPM myself?

And this is the best possibility. You can start here [1] and I'll be
happy to sponsor you.


OK, I bit the bullet - after having to sort out a problem with
installing the dev tools on F18, I got gem2rpm to produce the spec file
for devise and following the instructions at:

   http://fedoraproject.org/wiki/How_to_create_an_RPM_package

produced a lot of stuff but no SRPMS or RPMS - the issue seems to be:


error: Installed (but unpackaged) file(s) found:
/usr/share/gems/gems/devise-2.2.4/.gitignore
/usr/share/gems/gems/devise-2.2.4/.travis.yml
/usr/share/gems/gems/devise-2.2.4/.yardopts
/usr/share/gems/gems/devise-2.2.4/CHANGELOG.rdoc
/usr/share/gems/gems/devise-2.2.4/CONTRIBUTING.md
/usr/share/gems/gems/devise-2.2.4/Gemfile
/usr/share/gems/gems/devise-2.2.4/Gemfile.lock
/usr/share/gems/gems/devise-2.2.4/MIT-LICENSE
/usr/share/gems/gems/devise-2.2.4/README.md
/usr/share/gems/gems/devise-2.2.4/Rakefile
/usr/share/gems/gems/devise-2.2.4/app/controllers/devise/confirmations_controller.rb


Now, running gem2rpm you have a nice template to start working on, but it needs further tinkering to get it working.

Here's what I have learned these past months.

After the %prep, %build, %install and %check macros there is one called %files. According to the rpm-guide [0], the %files list indicates to RPM which files on the build system are to be packaged.

On the other hand, the section `%files doc` denotes what the subpackage -doc will include as well. In there you can put everything the gem owns except for the lib/ dir and the LICENSE l(icense should always be declared in `%files` macro). But again that is not a strict rule and is under the packager's discretion if he wants to include files like the Rakefile/Gemfile. These should not be marked as documentation files (%doc).

So, in your case these sections would be like:

----------

%files
%dir %{gem_instdir}
%{gem_libdir}
%{gem_spec}
%doc %{gem_instdir}/MIT-LICENSE
%exclude %{gem_cache}
%exclude %{gem_instdir}/.*

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.rdoc
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/Gemfile
%{gem_instdir}/Gemfile.lock
%{gem_instdir}/gemfiles/
%{gem_instdir}/test/
%{gem_instdir}/%{gem_name}.gemspec

----------

But again, maybe devise should be packaged as an app[1] since it contains an app folder. Unfortunately I haven't packaged an app before to know how to proceed from here. Someone with greater experience care to elaborate on that?


[0] http://www.rpm.org/max-rpm/s1-rpm-inside-files-list.html
[1] https://fedoraproject.org/wiki/Packaging:Ruby#Applications


--
GPG : 0xABF99BE5
Blog: http://axilleas.github.io
_______________________________________________
ruby-sig mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig

Reply via email to