kabi: handle symvers.zst

Check for symvers.zst in addition to gz and xz.

The automotive configuration selects zstd as compression alg[1], which
is used for the symvers[2] file as well.

[1] https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template?ref_type=heads#L489
[2] https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template?ref_type=heads#L2514

Add the zst extension to kabi.attr and kabi.sh pattern and add zstdcat
to kabi.sh catenation tool.

Resolves: RHEL-124727

Signed-off-by: Eric Chanudet <echanude@redhat.com>
This commit is contained in:
Eric Chanudet 2025-10-28 19:12:53 -04:00
parent 970304d45d
commit 9fc01f0ddf
2 changed files with 3 additions and 2 deletions

View File

@ -1,2 +1,2 @@
%__kabi_provides %{_rpmconfigdir}/kabi.sh
%__kabi_path ^(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.(gz|xz)$
%__kabi_path ^(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.(gz|xz|zst)$

View File

@ -7,12 +7,13 @@
IFS=$'\n'
for symvers in $(grep -E '(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.(gz|xz)') "$@";
for symvers in $(grep -E '(/boot/symvers-.*|/lib/modules/[1-9].*/symvers)\.(gz|xz|zst)') "$@";
do
cat_prog="cat"
case "$symvers" in
*.gz) cat_prog="zcat" ;;
*.xz) cat_prog="xzcat" ;;
*.zst) cat_prog="zstdcat" ;;
esac
# We generate dependencies only for symbols exported by vmlinux itself