|
|
71db66 |
Index: ddiskit-de1f6847223085dcdd177e02a7298c835fae12a3/templates/spec
|
|
|
71db66 |
===================================================================
|
|
|
71db66 |
--- ddiskit-de1f6847223085dcdd177e02a7298c835fae12a3.orig/templates/spec 2019-07-11 06:00:36.000000000 +0200
|
|
|
71db66 |
+++ ddiskit-de1f6847223085dcdd177e02a7298c835fae12a3/templates/spec 2022-02-15 01:18:40.875578229 +0100
|
|
|
71db66 |
@@ -21,12 +21,19 @@
|
|
|
71db66 |
%endif
|
|
|
71db66 |
|
|
|
71db66 |
%if "%{kmod_dist_build_deps}" == ""
|
|
|
71db66 |
+%if (0%{?rhel} > 8) || (0%{?centos} > 8)
|
|
|
71db66 |
+%define abi_list stablelist
|
|
|
71db66 |
+%define kmod_dist_build_deps redhat-rpm-config kernel-abi-stablelists elfutils-libelf-devel kernel-rpm-macros kmod
|
|
|
71db66 |
+%else
|
|
|
71db66 |
%if (0%{?rhel} > 7) || (0%{?centos} > 7)
|
|
|
71db66 |
+%define abi_list whitelist
|
|
|
71db66 |
%define kmod_dist_build_deps redhat-rpm-config kernel-abi-whitelists elfutils-libelf-devel kernel-rpm-macros kmod
|
|
|
71db66 |
%else
|
|
|
71db66 |
+%define abi_list whitelist
|
|
|
71db66 |
%define kmod_dist_build_deps redhat-rpm-config kernel-abi-whitelists
|
|
|
71db66 |
%endif
|
|
|
71db66 |
%endif
|
|
|
71db66 |
+%endif
|
|
|
71db66 |
|
|
|
71db66 |
Source0: %{kmod_name}-%{kmod_vendor}-%{kmod_driver_version}.tar.bz2
|
|
|
71db66 |
%{SOURCE_PATCHES}
|
|
|
71db66 |
@@ -210,7 +217,7 @@
|
|
|
71db66 |
# mark modules executable so that strip-to-file can strip them
|
|
|
71db66 |
find obj/%{kmod_kbuild_dir} -name "*.ko" -type f -exec chmod u+x '{}' +
|
|
|
71db66 |
|
|
|
71db66 |
-whitelist="/lib/modules/kabi-current/kabi_whitelist_%{_target_cpu}"
|
|
|
71db66 |
+kabilist="/lib/modules/kabi-current/kabi_%{abi_list}_%{_target_cpu}"
|
|
|
71db66 |
for modules in $( find obj/%{kmod_kbuild_dir} -name "*.ko" -type f -printf "%{findpat}\n" | sed 's|\.ko$||' | sort -u ) ; do
|
|
|
71db66 |
# update depmod.conf
|
|
|
71db66 |
module_weak_path=$(echo "$modules" | sed 's/[\/]*[^\/]*$//')
|
|
|
71db66 |
@@ -227,7 +234,7 @@
|
|
|
71db66 |
|
|
|
71db66 |
# update greylist
|
|
|
71db66 |
nm -u obj/%{kmod_kbuild_dir}/$modules.ko | sed 's/.*U //' | sed 's/^\.//' | sort -u | while read -r symbol; do
|
|
|
71db66 |
- grep -q "^\s*$symbol\$" $whitelist || echo "$symbol" >> source/greylist
|
|
|
71db66 |
+ grep -q "^\s*$symbol\$" $kabilist || echo "$symbol" >> source/greylist
|
|
|
71db66 |
done
|
|
|
71db66 |
done
|
|
|
71db66 |
sort -u source/greylist | uniq > source/greylist.txt
|