find-requires.ksyms: perform kABI check only on RHEL

It does not make sense to check for kABI in Fedora.

* find-requires.ksyms (os_id): New variable.
[os_id != "rhel"]: Do not call check_kabi.
This commit is contained in:
Eugene Syromiatnikov 2021-11-18 17:52:07 +01:00
parent 5785e58c40
commit fbb2188fca

View File

@ -150,9 +150,12 @@ if [ ${#modules[@]} -gt 0 ]; then
LC_ALL=C join -t $'\t' -j 1 -v 2 $symvers "$mod_req" | LC_ALL=C sort -u \
| awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print "ksym(" $1 ") = " $2 }'
os_id=$(sed -nr '/^ID[[:space:]]*=/{ s/ID[[:space:]]*=[[:space:]]*//; s/^"(.*)"$/\1/; p }' /etc/os-release)
if [ "rhel" = "$os_id" ]; then
# Check kABI if the kabi-stablelists package is installed
# Do this last so we can try to output this error at the end
kabi_check_symbols=($(LC_ALL=C join -t $'\t' -j 1 $symvers "$mod_req" | LC_ALL=C sort -u \
| awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print $1 }'))
check_kabi "${kabi_check_symbols[@]}"
fi
fi