From owner-freebsd-ports@FreeBSD.ORG Wed Jan 18 02:43:29 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DA1D106564A for ; Wed, 18 Jan 2012 02:43:29 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id F0BEF8FC12 for ; Wed, 18 Jan 2012 02:43:28 +0000 (UTC) Received: by wgbgn7 with SMTP id gn7so3822597wgb.31 for ; Tue, 17 Jan 2012 18:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iLjSusWPCCSkD71jD0Xay7nRJeWdUvsTptqsu/a9+pQ=; b=DBtd53Vs26yIAGAs8PXNf5UGXT2vL5hXNuPzW65YcmTcjQx0wg5EbeqvzFbvtZdT3g SWHVgZSdNMhv9P8cfSKnA+FXd25QMmbjYVm24+Eh97Ahh6AVcRj7h5h3AcRDURcEr2h6 cWjsOFsjGKR7CcEbOn2GCsRV3Vi/WOYj+HsCg= MIME-Version: 1.0 Received: by 10.180.93.132 with SMTP id cu4mr27850626wib.9.1326854607743; Tue, 17 Jan 2012 18:43:27 -0800 (PST) Received: by 10.223.101.196 with HTTP; Tue, 17 Jan 2012 18:43:27 -0800 (PST) In-Reply-To: <20120118020928.GE509@over-yonder.net> References: <20120118020928.GE509@over-yonder.net> Date: Tue, 17 Jan 2012 18:43:27 -0800 Message-ID: From: Kevin Oberman To: "Matthew D. Fuller" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: ports@freebsd.org Subject: Re: Upgrading libs with many dependent ports 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: Wed, 18 Jan 2012 02:43:29 -0000 On Tue, Jan 17, 2012 at 6:09 PM, Matthew D. Fuller wrote: > On Tue, Jan 17, 2012 at 05:51:11PM -0800 I heard the voice of > Kevin Oberman, and lo! it spake thus: > > > > The manual method would be to install sysutils/bsdadminscripts and > > use a command like `pkg_libchk | grep -E "xcb-.+.so" | sort > > > tmpfile` to provide a list of ports that actually are linked to the > > libraries in question. > > FWIW, I some years ago wrote up a quick&dirty perl script to find > missing or out of date libs. It pulls out and warns about missing > libs, stuff in compat/pkg (held over after upgrade by > portupgrade/portmaster), and stuff in the base /usr/lib/compat (handy > when crossing major versions, and potentially other big upheavals). > It's only about a k; I'll attach it. > > I pretty much wind up ldd'ing /usr/local/{bin/*,sbin/*,lib/*.so*} and > running the results through the script. Usually something like `cd > /usr/local/bin ; ldd * > /tmp/ldd.bin ; lddchk.pl < /tmp/ldd.bin`. > That tells me the files; then I can use my brain or pkg_which to tell > me which packages are involved. I'm happy with that level of > automation, because I like keeping my brain firmly in the loop on such > things, but it wouldn't be too hard to extend it to do its own walks > over the filesystem, etc. > Take a look at pkg_chklib. It is quite optimized and runs multiple checks in parallel so that you can run it on 1100 ports in about 1.5 minutes. Here is a sample o this output: %pkg_libchk | grep -E "xcb-.+.so" | sort gok-2.30.1,1: /usr/local/bin/create-branching-keyboard misses libxcb-atom.so.1 gok-2.30.1,1: /usr/local/bin/create-branching-keyboard misses libxcb-aux.so.0 gok-2.30.1,1: /usr/local/bin/create-branching-keyboard misses libxcb-event.so.1 gok-2.30.1,1: /usr/local/bin/gok misses libxcb-atom.so.1 gok-2.30.1,1: /usr/local/bin/gok misses libxcb-aux.so.0 gok-2.30.1,1: /usr/local/bin/gok misses libxcb-event.so.1 nautilus-open-terminal-0.18_4: /usr/local/lib/nautilus/extensions-2.0/libnautilus-open-terminal.so misses libxcb-atom.so.1 nautilus-open-terminal-0.18_4: /usr/local/lib/nautilus/extensions-2.0/libnautilus-open-terminal.so misses libxcb-aux.so.0 nautilus-open-terminal-0.18_4: /usr/local/lib/nautilus/extensions-2.0/libnautilus-open-terminal.so misses libxcb-event.so.1 vlc-1.1.13,3: /usr/local/lib/vlc/plugins/control/libglobalhotkeys_plugin.so misses libxcb-keysyms.so.1 vlc-1.1.13,3: /usr/local/lib/vlc/plugins/video_output/libxcb_window_plugin.so misses libxcb-keysyms.so.1 yelp-2.30.2_1: /usr/local/bin/yelp misses libxcb-atom.so.1 yelp-2.30.2_1: /usr/local/bin/yelp misses libxcb-aux.so.0 yelp-2.30.2_1: /usr/local/bin/yelp misses libxcb-event.so.1 % And it is already in ports. -- R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com