Date: Tue, 23 Oct 2018 08:38:18 -0700 (PDT) From: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net> To: Stefan Esser <se@freebsd.org> Cc: "Julian H. Stacey" <jhs@berklix.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: careless commits disrupt Message-ID: <201810231538.w9NFcIrf021281@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <3736ed03-e849-fb14-daac-2653d86f6202@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Am 22.10.18 um 23:09 schrieb Julian H. Stacey: > > Hi, Reference: > >> From: Stefan Esser <se@freebsd.org> > >> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810231538.w9NFcIrf021281>