brp-debuginfo.in, process-debuginfo.in: add support for zstd-compressed modules

This commit is contained in:
Gleb Fotengauer-Malinovskiy 2021-11-03 01:55:39 +03:00
parent b07d68eab5
commit b996912c5d
2 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,7 @@ sed -n -e '/ ELF .* shared object, no machine, /d' \
-e 's/\t.* ELF .* \(executable\|shared object\), .*, not stripped.*//p' \
-e 's/^\(\.\/lib\/modules\/[^[:space:]]\+\.ko\)\t.* ELF .* relocatable, .*, not stripped.*/\1/p' \
-e 's/^\(\.\/lib\/modules\/[^[:space:]]\+\.ko\.[gx]z\)\t.* \(gzip\|xz\) compressed data.*/\1/p' \
-e 's/^\(\.\/lib\/modules\/[^[:space:]]\+\.ko\.zst\)\t.* Zstandard compressed data.*/\1/p' \
-e 's/^\(\.\/boot\/vmlinuz-[^[:space:]]\+\)\t.*/\1/p' <.tmp/file_full |
xargs -r --delimiter='\n' stat -c '%h %i %n' >.tmp/flist

View File

@ -36,6 +36,10 @@ elif [ -z "${f##./lib/modules/*.ko.*}" ]; then
unzip='xz --force --decompress'
rezip='xz --force --keep'
;;
zst)
unzip='zstd --quiet --force --rm --decompress'
rezip='zstd --quiet --force'
;;
esac
# Compressed module: uncompress it, and work with uncompressed one.
$unzip "$f"