On Sun, 2008-01-20 at 12:08 -0600, why the lucky stiff wrote:
> On Sun, Jan 20, 2008 at 02:34:32PM +0100, Bram Senders wrote:
> > It seems that Shoes is designed to be run from a directory with all
> > files in the same place, i.e. in the way that the dist/ dir is created
> > and filled with stuff.  However, it is not possible to do it this way on
> > a Debian system, because it must adhere to the filesystem hierarchy
> > standard (FHS); according to the FHS, the binary and wrapper (shoes and
> > shoes-bin) should go in /usr/bin; libshoes.so should go in /usr/lib, and
> > the ruby library files (lib/shoes.rb and lib/shoes/*.rb) should go
> > in /usr/lib/ruby/1.8.
> 
> Can the libs all go in /usr/lib/shoes?  How does Debian package Firefox?

I looked at Firefox (or, as it is known in Debian, Iceweasel), and lo!
they have a symlink in /usr/bin linking to a shell script
in /usr/lib/iceweasel that in turn starts a binary, which is also
in /usr/lib/iceweasel...  Sounds awfully familiar to the way Shoes could
work in Debian. ;-)  So I'm going to try that approach!  Firefox should
at least be a good precedent (people deciding whether packages are
allowed into the main Debian archive (and the official policy by which
these decisions are backed) can be very strict sometimes -- which can be
necessary, of course, considering all the wild and mixed stuff that is
in there), thank you for that idea.

> I have mixed feelings about referencing Debian's ruby 1.8 package.
> For one, how am I going to include a sandboxed Ruby with Shoes on
> distros like Debian?  Debian prefers to slice everything up, whereas
> I can really control the bundle on OS X and Windows.

If you want to create something like a "bundle" that just works on any
Linux distribution, somewhat like the bundles on OS X, I suggest you
take a look at Autopackage, at autopackage.org.  I have no experience in
making bundles like these, but I have installed some of them, and they
work pretty nicely.  I think they might be suited for Shoes.

> I like that traditional Ruby is separate from Shoes on these
> platforms, though I'm still trying to decide if it's necessary.
> I definitely don't want to share gems with plain Ruby, though that
> is solved by lib/shoes/cache.rb.
> 
> > Now, I can put all of those files there in the package, but then the
> > binary or wrapper script can't find the Ruby library files, because you
> > explicitly set the Ruby load path based on argv[0], which only works of
> > course when the script and the libs are in the same dir.  I could patch
> > this out, but I really don't know whether this would be the right way to
> > go (because I don't know the motivation for altering the Ruby load path
> > in the first place), and when I patch this, then Shoes' Debian source
> > would differ from the upstream source, and that is not so nice.
> 
> A variable could be added to the Makefile that would control this.
> The Makefile is for the Linux/BSDs only.

Well, I'm going to try dumping as most of the stuff as policy allowes
into /usr/lib/shoes, and I'll see where I end up. :-)  I'll keep you
posted.

Bram

Reply via email to