From owner-freebsd-hackers Mon Mar 18 14:17: 8 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by hub.freebsd.org (Postfix) with ESMTP id C473B37B402 for ; Mon, 18 Mar 2002 14:17:02 -0800 (PST) Received: from brain.timing.com (brain.timing.com [206.168.13.195]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id g2IMFlW42178; Mon, 18 Mar 2002 15:15:47 -0700 (MST) (envelope-from jhein@timing.com) Received: from brain.timing.com (localhost [127.0.0.1]) by brain.timing.com (8.12.2/8.12.2) with ESMTP id g2IMFlM8007331; Mon, 18 Mar 2002 15:15:47 -0700 (MST) (envelope-from jhein@brain.timing.com) Received: (from jhein@localhost) by brain.timing.com (8.12.2/8.12.2/Submit) id g2IMFkFS007328; Mon, 18 Mar 2002 15:15:46 -0700 (MST) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15510.26386.681362.683997@brain.timing.com> Date: Mon, 18 Mar 2002 15:15:46 -0700 From: John E Hein To: Brad Huntting Cc: hackers@FreeBSD.ORG Subject: Re: ports & DESTDIR (was: STLPORT and gcc3 (openoffice porting)) In-Reply-To: <200203182150.g2ILo5s60026@hunkular.glarp.com> References: <15510.8721.546546.172867@brain.timing.com> <200203182150.g2ILo5s60026@hunkular.glarp.com> X-Mailer: VM 7.03 under Emacs 21.1.1 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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? > 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