Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2002 15:15:46 -0700
From:      John E Hein <jhein@timing.com>
To:        Brad Huntting <huntting@glarp.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: ports & DESTDIR (was: STLPORT and gcc3 (openoffice porting)) 
Message-ID:  <15510.26386.681362.683997@brain.timing.com>
In-Reply-To: <200203182150.g2ILo5s60026@hunkular.glarp.com>
References:  <15510.8721.546546.172867@brain.timing.com> <200203182150.g2ILo5s60026@hunkular.glarp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Brad Huntting wrote at 14:50 -0700 on Mar 18:
 > Along these lines, we have a rather twisted setup at our shop.  We
 > put 3d party software such as ports in directories with pathnames
 > like:
 > 
 > 	/nfs/i386+OpenBSD2/teTeX-1.0.7/{bin/,etc/,share/,...}

We do, too.  We call it /site.


 > Using symlinks (and amd) it appears to the users as if it were
 > 
 > 	/nfs/teTeX -> teTeX-1.0.7
 > 	/nfs/teTeX-1.0.7/{bin/,etc/,share/,...}


We go one step further... make sym links in /site/bin, /site/lib, etc.
 that point into the "default" distribution dir.

Using your example,

/site/bin/latex -> /site/dist/teTeX/bin/latex

Then just make sure /site/bin is in your path (and /site/lib is in your
 ldconfig search path, etc.).

If we want to allow users to run older versions, I usually have a
 wrapper script that allows them to invoke latex-1.0.7, for instance.
 Invoking latex would just give the default (usually most recent) version.


 > Since these are mounted read-only, we have to install the port in
 > another directory e.g:
 > 
 > 	/mnt/foo/nfs/teTeX-1.0.7/
 > 
 > In a perfect world this would just mean using
 > 
 > 	DESTDIR=/mnt/foo
 > 	PREFIX=/nfs/teTeX-1.0.7

That's exactly what we do.  But we added a .mk file which makes the
 sym links described above, too, at install time.  It's not perfect
 yet, but with the 28155 patch what you suggested above works most of
 the time.  On occasion, I have to hack a makefile to, for instance,
 define GLIB_CONFIG=/site/dist/glib-1.2.10/bin/glib12-config or some
 other trickery since the Makefile and/or bsd.ports.mk system isn't quite
 flexible enough.  We have some patches for this, but have been waiting
 (a while) for 28155 to be committed.


 > But, this will cause the port to look for all it's _dependencies_
 > in /nfs/teTeX-1.0.7 when they are really in /nfs/some-port-name.
 > It is ugly, but we have such a large environment that we usually
 > have to keep different versions of the same software online for
 > different users on the same machine.

Yep, as I described above, sometimes you have to hack the makefile.
 But most times, if /site/bin is in your path and /site/lib is in your
 ldconfig search path, configure will find the right version and do the
 right thing.  If it doesn't work, it currently requires hunting down
 which part of configure failed and why.  That's a pain... it would be
 nice if the ports tree supported non-default installation locations better
 (i.e., not /usr/local).


 > Is there any way to specify a different PREFIX for each port+version?
 > <queue the rotten vegetables>

Another thing that seems to work okay (if a port supports it - not too
 many do - yet?) is pkgconfig (see devel/pkgconfig).  It's kind of like the
 *-config that some packages use (glib12-config, etc.) except more generic.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15510.26386.681362.683997>