From owner-freebsd-current@freebsd.org Tue Oct 23 15:38:23 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFE5CFEA209 for ; Tue, 23 Oct 2018 15:38:23 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217EB827A1; Tue, 23 Oct 2018 15:38:23 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w9NFcIl5021282; Tue, 23 Oct 2018 08:38:18 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w9NFcIrf021281; Tue, 23 Oct 2018 08:38:18 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201810231538.w9NFcIrf021281@pdx.rh.CN85.dnsmgr.net> Subject: Re: careless commits disrupt In-Reply-To: <3736ed03-e849-fb14-daac-2653d86f6202@freebsd.org> To: Stefan Esser Date: Tue, 23 Oct 2018 08:38:18 -0700 (PDT) CC: "Julian H. Stacey" , FreeBSD Current X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 15:38:23 -0000 > Am 22.10.18 um 23:09 schrieb Julian H. Stacey: > > Hi, Reference: > >> From: Stefan Esser > >> Date: Fri, 12 Oct 2018 11:44:59 +0200 > > > > Stefan Esser wrote: > >> I might have mentioned, that I always preserve old shared libraries in > >> /usr/lib/compat before running "make delete-old-libs". > > > > Good idea, are you doing that manually, or do you have a patch to share ? > > I do it manually, but I have a script that checks for programs in the > base system and packages that use any library moved to the lib/compat > directory - see below. > > The base system checks should never give any output (unless there are > old and obsolete binaries). > > I use the package list to identify packages that must be rebuilt to > make the compat libraries obsolete. Since there may be shared library > version conflicts, if some > > Regards, STefan > > ------------------------------------------------------------ > > #!/bin/sh > > find_compat_depend () { > local dir="$1" > local pattern="$2" > > find "$dir" -type f ${pattern:+-name "$pattern"} \ > -exec sh -c "ldd {} 2>/dev/null | grep -lq /compat/ && echo {}" \; > } > > echo "Base system programs referencing compat libraries:" > find_compat_depend /bin "" > find_compat_depend /sbin "" > find_compat_depend /libexec "" > #find_compat_depend /lib "lib*.so.*" > find_compat_depend /usr/bin "" > find_compat_depend /usr/sbin "" > find_compat_depend /usr/libexec "" > #find_compat_depend /usr/lib "lib*.so.*" > > echo > echo "Installed packages referencing compat libraries:" > { > find_compat_depend /usr/local/bin "" > find_compat_depend /usr/local/sbin "" > find_compat_depend /usr/local/libexec "" > find_compat_depend /usr/local/lib "lib*.so.*" > } | xargs pkg which -q | sort -u Could this be added in a more generic way to pkg? pkg finddep $PATH $ALTLIBDIR I see this as "Very Useful" (TM) -- Rod Grimes rgrimes@freebsd.org