[rescue] UNIX packaging

Barry Keeney barryk at chaoscon.com
Tue Feb 28 15:46:48 CST 2006


On Tue, 28 Feb 2006, Joshua Boyd wrote:

> On Tue, Feb 28, 2006 at 01:18:27PM -0600, Jonathan C. Patschke wrote:
> > On Tue, 28 Feb 2006, Kevin Loch wrote:
> > 
> > >> IRIX is a great example.  Yes, your paths rapidly get very, very weird.
> > >> That's just SysV brain damage.  Standards (practically) mandate that
> > >> your $PATH be fifteen lines long :P
> > >
> > > Diddn't /opt die a quick and violent death?  Surely people aren't
> > > still using that?
> > 
> > I tend to use /opt for unbundled software (ie: commercial software) and
> > /usr/local for the software I compile site-local.  So much commercial
> > software -assumes- a SysV path layout ($someroot/$application), so I
> > root that software in /opt.
> 
> Increasingly I'm using /opt for the software I build myself since I keep
> finding myself needing or wanting to keep multiple versions of various
> packages.  /opt/package-x.xx seems to be more convienient than
> /usr/local/package-x.xx to me.

  I started running into that same kind of problems with several
versions of the same software.  

  I use "/usr/local/packages/<software & version>" and creating 
symbolic links from "/usr/local/(bin,lib,man, etc)/<file>" to 
"packages/<software & version>/(bin,lib,man, etc)/<file>"

   For example when I built 5.8.3 of perl some time ago, I 
installed it in:

/usr/local/packages/perl-5.8.3

so the in /usr/local it looks like:

/usr/local/bin/perl -> ../packages/perl-5.8.3/bin/perl

  To switch to a new version, search for the symbolic links
to "packages/perl-5.8.3" and delete them, then create links
for the new version. You've got to create a lot of links to
make it work, but you can just add "/usr/local/bin" to your
path to find everything I've added. You could also link to
installs in "/opt" from "/usr/local" just as easily.

  If the new version doesn't work or I need to go back just 
change the links again. 

  Also helps the problem with software that has a program/file 
in one version but it's removed in newer versions. If you 
just install over the last version these files remain from
the previous version. 

  I'm not going to say it's the best way to handle this,
but I like it. 

  If someone has a better idea, I'd like to here it. I'm 
open to new ideas for doing this. 

Barry Keeney
Chaos Consulting
email barryk at chaoscon.com

"Rap is Square Dancing gone terribly, terribly Wrong...." 



More information about the rescue mailing list