From owner-freebsd-ports@FreeBSD.ORG Fri May 18 14:39:24 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4253F16A400 for ; Fri, 18 May 2007 14:39:24 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id B125213C45A for ; Fri, 18 May 2007 14:39:23 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.13.8/jtpda-5.4) with ESMTP id l4IE4j24023874 ; Fri, 18 May 2007 16:04:45 +0200 (CEST) X-Ids: 164 Received: by parthe.lpthe.jussieu.fr (Postfix, from userid 10096) id 0FEB9BF661; Fri, 18 May 2007 16:04:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on parthe.lpthe.jussieu.fr X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 40856BF661; Fri, 18 May 2007 16:04:41 +0200 (CEST) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id 23B3E88; Fri, 18 May 2007 16:04:41 +0200 (CEST) Date: Fri, 18 May 2007 16:04:41 +0200 From: Michel Talon To: Benjamin Lutz Message-ID: <20070518140441.GA17685@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (shiva.jussieu.fr [134.157.0.164]); Fri, 18 May 2007 16:04:45 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.7/3267/Thu May 17 22:40:58 2007 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at shiva.jussieu.fr with ID 464DB27D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! Cc: freebsd-ports@freebsd.org Subject: Re: Specs for saving old shared libs X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2007 14:39:24 -0000 Benjamin Lutz wrote: > > Benjamin Lutz writes: > > > The last part seems to be the catch here. How about providing a > > > tool that scans all binaries in the standard locations for what > > > libs they depend on, and also allows the user/admin to specify > > > the paths to binaries that he installed on his own, then outputs > > > a list of unused libraries? > > > > Are you aware of "libchk" and "portsclean"? > > Oh. No, I wasn't. Well, I guess that solves this problem then :) Not completely because some programs install shared libraries in very non standard places, notably perl installs perl.so like this: /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so or mozilla installs mozilla libs in another strange place. And there are other ports which make use of such shared libraries, for example Gnome depends on the mozilla libs or inn depends on perl.so. Hence the only correct solution is to scan all files in a port, and determine if any of them is a shared library to keep a copy of it. This is what portupgrade does, as well as Cyrille Szymanski's pkg_save: http://www.lpthe.jussieu.fr/~talon/pkg_save.py The important point is: what do you do with shared libraries you have saved? Either you put them in /usr/local/lib/compat like portupgrade does, and you run ldconfig here, then there is no problem with these libraries but you have no real way to discover which are necessary, which are not (libchk cannot assert that since it looks only in standard places) or you can say like portmaster, i don't want to rely on this mechanism, you keep your copy and use it only in case some library is really missing and you don't know how to solve the problem in another way. -- Michel TALON