Blame SOURCES/find-requires

f9efe2
#!/bin/bash
f9efe2
f9efe2
#
f9efe2
# Auto-generate requirements for executables (both ELF and a.out) and library
f9efe2
# sonames, script interpreters, and perl modules.
f9efe2
#
f9efe2
f9efe2
ulimit -c 0
f9efe2
f9efe2
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
f9efe2
f9efe2
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && \
f9efe2
    echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
f9efe2
f9efe2
#
f9efe2
# --- Kernel module imported symbols
f9efe2
#
f9efe2
# Since we don't (yet) get passed the name of the package being built, we
f9efe2
# cheat a little here by looking first for a kernel, then for a kmod.
f9efe2
#
f9efe2
f9efe2
unset is_kmod
f9efe2
f9efe2
for f in $filelist; do
f88404
    if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*)\.ko(\.gz|\.bz2|\.xz)?$:\2:p') ]
f9efe2
    then
f9efe2
        is_kmod=1;
f9efe2
    elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ]
f9efe2
    then
f9efe2
	unset is_kmod;
f9efe2
	break;
f9efe2
    fi
f9efe2
done
f9efe2
f9efe2
# Disabling for now while the Fedora kernel doesn't produce kABI deps.
f9efe2
#[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] &&
f9efe2
#    printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms
f9efe2
f9efe2
exit 0