|
|
6081af |
--- redhat-rpm-config-9.1.0/find-requires.ksyms.old 2017-07-24 13:41:12.836294124 +0200
|
|
|
6081af |
+++ redhat-rpm-config-9.1.0/find-requires.ksyms 2017-07-24 13:42:09.445228749 +0200
|
|
|
6081af |
@@ -25,17 +25,15 @@ all_requires() {
|
|
|
6081af |
{printf("0x%08x\t%s\n", $1, $2)}' \
|
|
|
6081af |
| sed -r -e 's:$:\t'"$1"':'
|
|
|
6081af |
done \
|
|
|
6081af |
- | LANG=C sort -k2,2 -u
|
|
|
6081af |
+ | LC_ALL=C sort -k2,2 -u
|
|
|
6081af |
}
|
|
|
6081af |
|
|
|
6081af |
# Filter out requirements fulfilled by the module itself.
|
|
|
6081af |
mod_requires() {
|
|
|
6081af |
- module=$1
|
|
|
6081af |
-
|
|
|
6081af |
- LANG=C join -t $'\t' -j 2 -v 1 \
|
|
|
6081af |
- <(all_requires "$module") \
|
|
|
6081af |
- <(all_provides "$module") \
|
|
|
6081af |
- | LANG=C sort -k1,1 -u
|
|
|
6081af |
+ LC_ALL=C join -t $'\t' -j 2 -v 1 \
|
|
|
6081af |
+ <(all_requires "$@") \
|
|
|
6081af |
+ <(all_provides "$@") \
|
|
|
6081af |
+ | LC_ALL=C sort -k1,1 -u
|
|
|
6081af |
}
|
|
|
6081af |
|
|
|
6081af |
if ! [ -e /sbin/modinfo -a -e /sbin/modprobe ]; then
|
|
|
6081af |
@@ -89,6 +87,8 @@ check_kabi() {
|
|
|
6081af |
modules=($(grep -E '/lib/modules/.+\.ko$'))
|
|
|
6081af |
if [ ${#modules[@]} -gt 0 ]; then
|
|
|
6081af |
kernel=$(/sbin/modinfo -F vermagic "${modules[0]}" | sed -e 's: .*::' -e q)
|
|
|
6081af |
+
|
|
|
6081af |
+ # get all that kernel provides
|
|
|
6081af |
symvers=$(mktemp -t ${0##*/}.XXXXX)
|
|
|
6081af |
|
|
|
6081af |
cat /usr/src/kernels/$kernel/Module.symvers | awk '
|
|
|
6081af |
@@ -96,19 +96,19 @@ if [ ${#modules[@]} -gt 0 ]; then
|
|
|
6081af |
{ print $2 "\t" $1 }
|
|
|
6081af |
' \
|
|
|
6081af |
| sed -r -e 's:$:\t'"$kernel"':' \
|
|
|
6081af |
- | LANG=C sort -k1,1 -u > $symvers
|
|
|
6081af |
+ | LC_ALL=C sort -k1,1 -u > $symvers
|
|
|
6081af |
|
|
|
6081af |
# Symbols matching with the kernel get a "kernel" dependency
|
|
|
6081af |
- LANG=C join -t '\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \
|
|
|
6081af |
+ LC_ALL=C join -t $'\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \
|
|
|
6081af |
| awk '{ FS = "\t" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }'
|
|
|
6081af |
|
|
|
6081af |
# Symbols from elsewhere get a "ksym" dependency
|
|
|
6081af |
- LANG=C join -t '\t' -j 1 -v 2 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \
|
|
|
6081af |
+ LC_ALL=C join -t $'\t' -j 1 -v 2 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \
|
|
|
6081af |
| awk '{ FS = "\t" ; OFS = "\t" } { print "ksym(" $1 ") = " $2 }'
|
|
|
6081af |
|
|
|
6081af |
# Check kABI if the kabi-whitelists package is installed
|
|
|
6081af |
# Do this last so we can try to output this error at the end
|
|
|
6081af |
- kabi_check_symbols=($(LANG=C join -t '\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \
|
|
|
6081af |
+ kabi_check_symbols=($(LC_ALL=C join -t $'\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \
|
|
|
6081af |
| awk '{ FS = "\t" ; OFS = "\t" } { print $1 }'))
|
|
|
6081af |
check_kabi "${kabi_check_symbols[@]}"
|
|
|
6081af |
fi
|