Blame SOURCES/symset-table

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