[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building a Debian package out of a Rubygems' .gem file



On Oct 18, 2010, at 7:31 AM, Lucas Nussbaum wrote:
> 
> On 17/10/10 at 23:00 -0700, Clint Byrum wrote:
>> Antonio, I think we may have been doing some parallel work.
>> 
>> My focus is on making it easy to go from gem -> .dsc with Debigem
>> 
>> https://launchpad.net/debigem
> 
> I think that it's important to do:
> .gem -> (.tgz + metadata) -> .dsc
> to accomodate for all the use cases
> 

Agreed, it would be a rather simple ask to modify dh-make-gem to
stop at the metadata+tarball step or to take a tarball+metadata.
It actually will also work with just a gemspec file from inside a
tarball already.  I think. I designed it that way at first, but
have only tested with .gem files for some time now. (... cursing 
myself for not writing unit tests to begin with ;)

>> I just released a version which no longer uses 'gem install' to put
>> the files down on the disk, but rather users setup.rb.
>> 
>> My next challenge is in handling new versions gracefully by extracting
>> the yaml spec file properly, as the program I wrote, dh_rubygems,
>> tries to do the ruby dependencies based on the gemspec dependencies.
>> 
>> Anyway, I hope its of some use and would be thrilled if you chose
>> to lift some code from it for what you're doing. I find that most
>> well written gems work without modification just by go dh-make-gem
>> file.gem and then debuild'ing in the source dir.
>> 
>> If you think my time would be better spent working on your tool, let
>> me know, I would love to collaborate on this.
> 
> Do you see your tool as something that will be used by end users to
> generate debs from gems, or by debian packagers to generate
> archive-quality debian packages ?

I'd like to see it in Debian and actively used for maintaining
packages in Debian. My goal is to make it easier to bring mature
gems into debian as people start to write more mature ruby apps.

I'm thinking of things like Chef and puppet where people might write
extensions to them in ruby but require a gem to enable that
functionality. It should be easy for us to go ahead and drop that
gem into Debian.

I know that there are some apps & libs not in rubygems. I just don't
know of any, so its not my focus.

> I think that the Debian Perl way is the right way: have a dh-make-ruby
> script that generates a clean source, using the gem metadata as a basis
> for as many things as possible, and provide a way to update the debian
> package from an updated upstream version.
> Copying what they did also has the advantage of not confusing people
> with two different workflows.
> 

Agreed 100% on copying the workflow.


Reply to: