|
|
936cd0 |
#!/bin/bash +x
|
|
|
936cd0 |
#
|
|
|
936cd0 |
# kabi.sh - Automatically extract any kernel symbol checksum from the
|
|
|
936cd0 |
# symvers file and add to RPM deps. This is used to move the
|
|
|
936cd0 |
# checksum checking from modprobe to rpm install for 3rd party
|
|
|
936cd0 |
# modules (so they can fail during install and not at load).
|
|
|
936cd0 |
|
|
|
936cd0 |
IFS=$'\n'
|
|
|
936cd0 |
|
|
|
936cd0 |
for symvers in $(grep -E '(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.gz') "$@";
|
|
|
936cd0 |
do
|
|
|
936cd0 |
# We generate dependencies only for symbols exported by vmlinux itself
|
|
|
936cd0 |
# and not for kmods here as they are spread across subpackages,
|
|
|
936cd0 |
# so Provides: generation for kmods is handled by find-provides.ksyms.
|
|
|
936cd0 |
zcat $symvers | awk '/[^ ]* [^ ]* vmlinux .*/ { print "kernel(" $2 ") = " $1 }'
|
|
|
936cd0 |
done
|