On RHEL8 kmodtool and kernel_module_package_buildreqs are not
installed with kernel-devel.
kernel_module_package_buildreqs is defined in kernel-rpm-marcos.
If kernel-rpm-macros is not installed, the Lustre RPM build will
report:
"Dependency tokens must begin with alpha-numeric, '_' or '/':
BuildRequires: %kernel_module_package_buildreqs"
This patch helps the developer understanding the detailed
information for the required packages when kernel-rpm-macros is
not installed.
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Id9b855eeac97d780d9c572d306da3c3a1fa95ea6
Reviewed-on: https://review.whamcloud.com/36557
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
%endif
%if %{with lustre_modules}
-%if 0%{?rhel} >= 8
-%if %{undefined kernel_module_package_buildreqs}
+%if 0%{?rhel} >= 8 && %{undefined kernel_module_package_buildreqs}
BuildRequires: redhat-rpm-config kernel-rpm-macros elfutils-libelf-devel kmod
-%endif
-%endif
-
+%else
BuildRequires: %kernel_module_package_buildreqs
+%endif
%if %{_vendor}=="redhat"
BuildRequires: redhat-rpm-config
%endif