2008-07-18 12:15:21 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
IFS=$'\n'
|
|
|
|
filelist=($(cat))
|
|
|
|
|
|
|
|
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides "$@"
|
|
|
|
|
2008-11-23 08:54:06 +01:00
|
|
|
# these two are updated by the spec file
|
2008-10-28 00:21:37 +01:00
|
|
|
sourcedir=${0%/*}
|
2008-11-23 08:54:06 +01:00
|
|
|
builddir="$sourcedir/../BUILD"
|
|
|
|
|
2008-10-28 00:21:37 +01:00
|
|
|
flavor=${1##*-}
|
|
|
|
|
2008-11-23 08:54:06 +01:00
|
|
|
modlist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
|
|
|
|
trap "rm -rf $modlist" EXIT
|
2008-10-28 00:21:37 +01:00
|
|
|
|
2008-11-23 08:54:06 +01:00
|
|
|
symvers=
|
2008-07-18 12:15:21 +02:00
|
|
|
for file in "${filelist[@]}"; do
|
2008-10-28 00:21:37 +01:00
|
|
|
case "$file" in
|
2008-11-23 08:54:06 +01:00
|
|
|
*/Module.symvers)
|
|
|
|
symvers="--symvers-file=$file"
|
2008-07-18 12:15:21 +02:00
|
|
|
;;
|
2008-10-28 00:21:37 +01:00
|
|
|
*.ko)
|
2008-11-23 08:54:06 +01:00
|
|
|
echo "$file" >>"$modlist"
|
2008-10-28 00:21:37 +01:00
|
|
|
;;
|
|
|
|
esac
|
2008-07-18 12:15:21 +02:00
|
|
|
done
|
2008-11-23 08:54:06 +01:00
|
|
|
|
|
|
|
reference=
|
|
|
|
# TODO
|
|
|
|
# reference="--reference=$builddir/kabi/..."
|
|
|
|
$sourcedir/symsets.pl --list-symsets --modules=$modlist $symvers $reference |\
|
|
|
|
sed -rn 's/^(.+)\.([a-z0-9]{16})/kernel('$flavor':\1) = \2/p'
|
|
|
|
|