Blame SOURCES/0001-kabi-stablelists.patch

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