diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index 81bae2f9619d..9ec83066f293 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -2720,6 +2720,7 @@ popd if [ -f $DevelDir/vmlinux.h ]; then RPM_VMLINUX_H=$DevelDir/vmlinux.h fi +echo "${RPM_VMLINUX_H}" > ../vmlinux_h_path %if %{with_bpftool} %global bpftool_make \ @@ -2876,6 +2877,9 @@ find Documentation -type d | xargs chmod u+w cd linux-%{KVERREL} +# re-define RPM_VMLINUX_H, because it doesn't carry over from %build +RPM_VMLINUX_H="$(cat ../vmlinux_h_path)" + %if %{with_doc} docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{specversion}-%{pkgrelease}