Blame SOURCES/symset-table

837a2d
#! /bin/sh
837a2d
837a2d
# Create a table of all symbol sets defined in all /boot/symsets*.tar.gz
837a2d
# files.
837a2d
#
837a2d
# Format:
837a2d
#   kernelrelease/modver/symbol <tab> symset <tab> symset_hash
837a2d
#
837a2d
# This table is needed for computing the appropriate Requires: tags for
837a2d
# kernel module packages.
837a2d
837a2d
tmpdir=$(mktemp -t -d ${0##*/}.XXXXXX)
837a2d
trap "cd / ; rm -rf $tmpdir" EXIT
837a2d
cd $tmpdir
837a2d
837a2d
shopt -s nullglob
837a2d
for symsets in /boot/symsets-*.tar.gz; do
837a2d
    zcat $symsets \
837a2d
    | tar xf -
837a2d
done
837a2d
837a2d
for symsets in /usr/src/kernels/*/symsets-*.tar.gz; do
837a2d
    zcat $symsets \
837a2d
    | tar xf -
837a2d
done
837a2d
837a2d
for symsets in *; do
837a2d
    krel=${symsets#symsets-}
837a2d
    for symset in $symsets/*; do
837a2d
	class=${symset##*/} ; class=${class%.*}
837a2d
	hash=${symset##*.}
837a2d
	awk '
837a2d
	BEGIN { FS = "\t" ; OFS = "\t" }
837a2d
	{ sub(/0x0*/, "", $1)
837a2d
	  print krel "/" $1 "/" $2, class, hash }
837a2d
	' krel="$krel" class="$class" hash="$hash" $symset
837a2d
    done
837a2d
done
837a2d
837a2d
# vim:shiftwidth=4 softtabstop=4