From fbb2188fca90dd7bc2a5e6e8b762c9b78d899b5c Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Thu, 18 Nov 2021 17:52:07 +0100 Subject: [PATCH] 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. --- find-requires.ksyms | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/find-requires.ksyms b/find-requires.ksyms index 533fac0..105a458 100755 --- a/find-requires.ksyms +++ b/find-requires.ksyms @@ -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 }' - # 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[@]}" + 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