kabi: handle symvers.xz
Check for symvers.xz support in addition to symvers.gz, due to unnanounced unilateral change[1][2] in the kernel packaging. [1]2644665657
[2]2db77a072a
* kabi.attr: Add xz extension to the file matching pattern * kabi.sh: Add xz extension to the matching pattern; determine catenation program based on extension. Resolves: #2209253 Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
parent
dc499f2b3a
commit
3770b4674a
@ -1,2 +1,2 @@
|
|||||||
%__kabi_provides %{_rpmconfigdir}/kabi.sh
|
%__kabi_provides %{_rpmconfigdir}/kabi.sh
|
||||||
%__kabi_path ^(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.gz$
|
%__kabi_path ^(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.(gz|xz)$
|
||||||
|
10
kabi.sh
10
kabi.sh
@ -7,10 +7,16 @@
|
|||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
||||||
for symvers in $(grep -E '(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.gz') "$@";
|
for symvers in $(grep -E '(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.(gz|xz)') "$@";
|
||||||
do
|
do
|
||||||
|
cat_prog="cat"
|
||||||
|
case "$symvers" in
|
||||||
|
*.gz) cat_prog="zcat" ;;
|
||||||
|
*.xz) cat_prog="xzcat" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# We generate dependencies only for symbols exported by vmlinux itself
|
# We generate dependencies only for symbols exported by vmlinux itself
|
||||||
# and not for kmods here as they are spread across subpackages,
|
# and not for kmods here as they are spread across subpackages,
|
||||||
# so Provides: generation for kmods is handled by find-provides.ksyms.
|
# so Provides: generation for kmods is handled by find-provides.ksyms.
|
||||||
zcat $symvers | awk '/[^ ]* [^ ]* vmlinux .*/ { print "kernel(" $2 ") = " $1 }'
|
"$cat_prog" "$symvers" | awk '/[^ ]* [^ ]* vmlinux .*/ { print "kernel(" $2 ") = " $1 }'
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user