Re: careless commits disrupt

From: Stefan Esser <se_at_freebsd.org>
Date: Tue, 23 Oct 2018 14:03:21 +0200
Am 22.10.18 um 23:09 schrieb Julian H. Stacey:
> Hi, Reference:
>> From:		Stefan Esser <se_at_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
Received on Tue Oct 23 2018 - 10:03:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC