40474999ce
- Add support for compressed kernel modules to find-provides.ksyms, find-requires.ksyms, firmware.prov (#1622019) * find-provides.ksyms: Try to process files whose names end with something else than "*.ko" by guessing a decompressor and uncompressing it in a temporary file and parsing it instead. * find-requires.ksyms (all_provides): Likewise. Add "(\.gz|\.bz2|\.xz)?" to the end of the module path matching regular expression. * firmware.prov: Add "(\.gz|\.bz2|\.xz)?" to the end of the module path matching regular expression. Resolves: #1942537 Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
15 lines
354 B
Bash
15 lines
354 B
Bash
#!/bin/sh
|
|
#
|
|
# firmware.prov - Automatically extract any and all firmware dependencies from
|
|
# kernel object (.ko) files and add to RPM deps.
|
|
|
|
IFS=$'\n'
|
|
|
|
for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz)?$') $*;
|
|
do
|
|
for firmware in `/sbin/modinfo -F firmware $module`;
|
|
do
|
|
echo "firmware($firmware)"
|
|
done
|
|
done
|