Am 22.10.18 um 23:09 schrieb Julian H. Stacey:
> Hi, Reference:
>> From:                Stefan Esser <s...@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
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to