2002-06-12 12:59:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# Auto-generate requirements for executables (both ELF and a.out) and library
|
|
|
|
# sonames, script interpreters, and perl modules.
|
|
|
|
#
|
|
|
|
|
|
|
|
ulimit -c 0
|
|
|
|
|
2002-11-14 12:48:21 +00:00
|
|
|
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
|
2002-06-12 12:59:50 +00:00
|
|
|
|
2014-04-10 12:20:54 +00:00
|
|
|
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && \
|
|
|
|
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
|
2002-06-12 12:59:50 +00:00
|
|
|
|
2006-10-12 03:33:42 +00:00
|
|
|
#
|
|
|
|
# --- Kernel module imported symbols
|
|
|
|
#
|
|
|
|
# Since we don't (yet) get passed the name of the package being built, we
|
|
|
|
# cheat a little here by looking first for a kernel, then for a kmod.
|
|
|
|
#
|
|
|
|
|
2007-06-19 15:18:25 +00:00
|
|
|
unset is_kmod
|
|
|
|
|
2006-10-12 03:33:42 +00:00
|
|
|
for f in $filelist; do
|
|
|
|
if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ]
|
|
|
|
then
|
2007-06-19 15:18:25 +00:00
|
|
|
is_kmod=1;
|
|
|
|
elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ]
|
2006-10-12 03:33:42 +00:00
|
|
|
then
|
2007-06-19 15:18:25 +00:00
|
|
|
unset is_kmod;
|
|
|
|
break;
|
2006-10-12 03:33:42 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2008-04-03 07:11:24 +00:00
|
|
|
# Disabling for now while the Fedora kernel doesn't produce kABI deps.
|
|
|
|
#[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] &&
|
|
|
|
# printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms
|
2006-10-12 03:33:42 +00:00
|
|
|
|
2002-06-12 12:59:50 +00:00
|
|
|
exit 0
|