Blame SOURCES/find-requires

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