From 980676fd8b322565b3af48f1083d638ea55d2a91 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 3 Jul 2026 13:50:29 +0200 Subject: [PATCH] find-requires.ksyms: remove /tmp/{find-requires.ksyms,mod_req}.* temporary files The cleanup was just forgotten, it seems. Related: RHEL-113056 Signed-off-by: Denys Vlasenko --- find-requires.ksyms | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/find-requires.ksyms b/find-requires.ksyms index 8ac7c40..f656a5e 100755 --- a/find-requires.ksyms +++ b/find-requires.ksyms @@ -3,7 +3,7 @@ # This script is called during external module building to create dependencies # both upon the RHEL kernel, and on additional external modules. Symbols that # cannot be reconciled against those provided by the kernel are assumed to be -# provided by an external module and "ksym" replaces th regular "kernel" dep. +# provided by an external module and "ksym" replaces the regular "kernel" dep. IFS=$'\n' export LC_ALL=C @@ -165,24 +165,26 @@ if [ ${#modules[@]} -gt 0 ]; then { print $2 ":" $1 } ' \ | sed -r -e 's:$:\t'"$kernel"':' \ - | sort -k1,1 -u > $symvers + | sort -k1,1 -u > "$symvers" # Symbols matching with the kernel get a "kernel" dependency mod_req=$(mktemp -t mod_req.XXXXX) mod_requires "${modules[@]}" > "$mod_req" - join -t $'\t' -j 1 $symvers "$mod_req" | sort -u \ + join -t $'\t' -j 1 "$symvers" "$mod_req" | sort -u \ | awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }' # Symbols from elsewhere get a "ksym" dependency - join -t $'\t' -j 1 -v 2 $symvers "$mod_req" | sort -u \ + join -t $'\t' -j 1 -v 2 "$symvers" "$mod_req" | 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=($(join -t $'\t' -j 1 $symvers "$mod_req" | sort -u \ + kabi_check_symbols=($(join -t $'\t' -j 1 "$symvers" "$mod_req" | sort -u \ | awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print $1 }')) check_kabi "${kabi_check_symbols[@]}" fi + + rm -f -- "$symvers" "$mod_req" fi