[Rubygems-developers] Re: [ANN] dev-utils v1.0

Eivind Eklund eivind at FreeBSD.org
Sun Oct 10 12:29:35 EDT 2004

On Sun, Oct 10, 2004 at 10:50:32AM -0400, Chad Fowler wrote:
> On 08-Oct-04, at 4:09 PM, Aredridel wrote:
> >I'll admit right now to being an "alternate packager" (I maintain RPMs
> >of most of the Ruby stuff in the PLD Linux Distro) -- My biggest
> >concern is making some libraries work right. The one I've been working
> >on hardest is Rails. Even the tarball version requires rubygems -- not
> >the gem command, but the library.
> >
> It looks like he includes the rubygems-enabled code, but you don't use 
> it unless you have rubygems.  I see rubygems stuff in two places:  
> environments/shared_for_gem.rb (which has an alternate non-gem version 
> called shared.rb) and in the active record benchmark.rb, but that has a 
> conditional load.  So there shouldn't actually be any hard rubygems 
> dependencies.  His Rakefiles use the gems lib, because he builds gems 
> from them.  I would guess that wouldn't be a problem for you since 
> they're build-time only.

This would be a slight problem for me (FreeBSD) - as the builds are
usually done on the user's system.  However, I think it is probably OK
to add rubygems as a build dependency.

The process a FreeBSD port works by on install is

* download the archive from the original developer
* extract the archive into work/<portname> in the ports dir (can be other
* do any patches inside work dir
* do build inside work dir
* do install directly into main space
* register install into the local package database
* (optionally) Generate a binary package for use on other machines.

Most cases do NOT include the last stage, though.  Remote-built packages
are usually used only for first-time installs.

> >I'm torn between rewriting to not need the RubyGems library (clean
> >solution dependency-wise, but ugly in that I maintain an alternate
> >version), and packaging RubyGems -- but that's hard, too, since
> >install.rb won't install into an alternate root (RPM traditionally
> >uses /tmp/packagename/usr/lib/ruby/1.8 for libraries, which RPM then
> >relocates into the proper place when installed)
> >
> We have that on the TODO list.  As I mentioned on irc, it's just 
> something that nobody has asked for until you.  Should be pretty 
> straightforward to do, of course.

This is also required for FreeBSD.  Some specific requirements for a
correct port:

Respects DESTDIR - a prefix to install under, not counted as part of the
logical install paths.  That would be /tmp/packagename in the above

Respects PREFIX - this is where to install into, as counted by the
package internally.  Defaults to /usr/local.

Respects LOCALBASE - this is where to get dependencies from.

Respects directory layout under PREFIX.  This include (but is not
limited to):

bin/ - binaries for execution by the user

etc/ - configuration files
etc/rc.d/ - startup files for daemons

lib/ - libraries (platform specific, but we're somewhat lax about that)

libexec/ - daemons

man/ - man pages

share/ - stuff that can be shared between architectures, but we're
  somewhat lax on it.  However, we're not lax on:
share/examples/<packagename> - examples for this package
share/doc/<packagename> - documentation for this package

There's probably some more, but these are the ones that are off the top
of my head.

I'll be back with more info later; I just thought I'd add a quick
overview of the main stuff right here and now.


More information about the Rubygems-developers mailing list