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

debian packages for rubygems



Hey everyone, (please reply-all or cc: me)

I just found your rubygems->debian packages project last night.
Creating debian packages is new to me, and as a developer I probably
don't care for them just like any other pure developer, but I was
harassed by some Perl developers recently that they have a "cool CPAN
module -> deb package" script, and we don't. Pooey to them.

Can I ask a whole bunch of questions? Hopefully none of them seem
rude. I have no idea about the debian packaging structure, the debian
community of core developers, package developers and users (though I
have typed 'apt-get' before and have used fink on OS X), nor the
pkg-ruby-extras project. So I don't know what parts of the
pkg-ruby-extras project structure are critical (e.g. do packages have
to go in the packages folder in order to be made available to the
debian universe, or are they made available to the debian package
universe through some other manual rake-task-esque step?)

Why are all the packages called "libGEMNAME-ruby", rather than
something that indicates its original src history (as a gem), like
"gemGEMNAME-ruby" or "libgemGEMNAME-ruby" or "libgem-GEMNAME-ruby"? or
"libGEMNAME-ruby-gem"?

I think I understand that the deb packaging/unpackaging system is
independent of rubygems entirely, and that the code will be stored
somewhere else on the target machines and doesn't assume rubygems
exists at all, so does this mean that your rubygems code should never
ever have 'require "rubygems"' in it? I saw that the helper page
(http://pkg-ruby-extras.alioth.debian.org/upstream-devs.html) that the
Rakefile shouldn't have this, but if the target system for a gem can
no longer be guaranteed to have rubygems installed, then how does it
find the other libs at runtime?

Do we need to have:
begin
  require 'external-lib-or-gem'
rescue LoadError
  require 'rubygems'
  require 'external-lib-or-gem'
end

This idiom used to appear in many projects but seems to be lost to the
ravages of time. With rubygems "winning", and with it being included
in ruby1.9, I'm sure most people assume it is available and that
dependent projects will be available via rubygems and no other
mechanism.

Does your script simply remove 'require "rubygems"' from any src code
or does it just not support this sort of project code?

If the gem has 1+ executable apps in it, does it still get packaged
with "lib" prefix?

The last section of
http://pkg-ruby-extras.alioth.debian.org/upstream-devs.html says to
include a man page with each executable. What do they look like? Does
any rubygem currently do this? Can they be auto-generated from some
other documentation? Where do you store a man page in a rubygem
normally? Does rubygems itself support man pages + their installation
on target machines?

Could we write scripts that:
* tested all gems to see if they are automatically deb packagable?
* automatically created deb packages for any new gem release (from
rubyforge + github gem servers) after doing any necessary massaging if
possible (add the setup.rb file; remove 'require "rubygems" from
Rakefile + src; etc)
* run a cron script to run the above

Or are you guys already doing this?

Does the project have to be on debian's svn server or can it be broken
into code + packages separate git repos, etc? (probably related to
questions above)

More questions about the project's structure:

In the 'tools' subfolder, I assume the following is the main app?

$ svn list svn://svn.debian.org/svn/pkg-ruby-extras/tools/ruby-pkg-tools/trunk
1/
bin/
debian/
man/
pkg-ruby-extras.sh
pkg-ruby-extras.sources
pkg-ruby-extras.team

What is this 1/, bin/, debian/, man/ structure? Is there ruby code +
ruby tests? Do we have any tests for new packages to ensure that they
work?

Is this project written in some special debian structure, rather than
a traditional ruby structure? That is, is it a project by debian
people to bring ruby code into their world, rather than a project by
ruby people helping out the debian world? If its the former, does this
raise the barrier to entry to ruby developers hoping to assist who
can't figure out what is going on in the src code? (that's how I'm
feeling now, hence the question)

Sorry for all these questions.

I guess I just want to know what chunk of the project I can help with,
including education of gem developers, so Ruby devs can be good global
citizens even if they don't know they are (e.g fix newgem/hoe/bones
etc so they generate nice scaffolds)

Cheers
Nic
--
Dr Nic Williams
iPhone and Rails consultants - http://mocra.com
Fun with iPhone/Ruby/Rails/Javascript - http://drnicwilliams.com
* Surf Report for iPhone - http://mocra.com/projects/surfreport/ *



--
Dr Nic Williams
iPhone and Rails consultants - http://mocra.com
Fun with iPhone/Ruby/Rails/Javascript - http://drnicwilliams.com
* Surf Report for iPhone - http://mocra.com/projects/surfreport/ *


Reply to: