From owner-freebsd-questions@FreeBSD.ORG Sat Apr 19 09:21:32 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6975D106564A for ; Sat, 19 Apr 2008 09:21:32 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id DB8C18FC16 for ; Sat, 19 Apr 2008 09:21:31 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 2A71D1CC91; Sat, 19 Apr 2008 01:21:29 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Sat, 19 Apr 2008 11:21:25 +0200 User-Agent: KMail/1.9.7 References: <480938D0.8040100@crackmonkey.us> <48093BA9.1050800@gmail.com> <20080418184728.0cb51e60@epia-2.farid-hajji.net> In-Reply-To: <20080418184728.0cb51e60@epia-2.farid-hajji.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804191121.26955.fbsd.questions@rachie.is-a-geek.net> Cc: cpghost Subject: Re: Where to have my .so files install? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2008 09:21:32 -0000 On Saturday 19 April 2008 02:47:28 cpghost wrote: > On Fri, 18 Apr 2008 20:24:09 -0400 > > "Aryeh M. Friedman" wrote: > > Adam J Richardson wrote: > > > Hi all. > > > > > > I'm writing a program which uses .so files as plugins. Now I need > > > to decide where on the filesystem to install the plugins. I don't > > > want to clutter the system locations like /lib and /usr/lib. Can > > > anyone suggest a decent install location? Google doesn't help much > > > with this. > > > > > > TiA, > > > Adam J Richardson > > > > /usr/local/lib > > To expand a bit: don't put your own stuff in /lib or /usr/lib, > since this is used by FreeBSD's userland itself. On FreeBSD, > third party stuff goes into /usr/local/{lib,bin,etc,...}. > See hier(7). I actually put my own stuff in /opt, which follows /usr/local layout, because ports use /usr/local and I don't want to risk some port installing over or deleting (part of) my apps. It's easy to set up: mkdir /opt mtree -ude -f /etc/mtree/BSD.local.dist -p /opt Add /opt/bin, /opt/sbin to path in /etc/login.conf. Add /opt/man to OPTIONAL_MANPATH in /etc/manpath.config Add a MANPATH_MAP in there too. Delete the users' .profile line that overrides the PATH variable (I really wish they'd take that outof the skel). Add /opt/etc/rc.d to local_startup in /etc/rc.conf Add /opt/lib to ldconfig_paths in /etc/rc.conf -- Mel Problem with today's modular software: they start with the modules and never get to the software part.