From 0f6fd32927aa2b9c63d1b527824705924a5a21ca Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 8 Apr 2011 10:22:42 -0700 Subject: [PATCH] Fix rebuildable RPMs for el6/ch5 When rebuilding the source RPM under el5 you need to append the target_cpu. However, under el6/ch5 things are packaged correctly and the arch is already part of kver. For this reason it also needs to be stripped from kver when setting kverpkg. --- zfs-modules.spec.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zfs-modules.spec.in b/zfs-modules.spec.in index 8d96696a29..84d1d52806 100644 --- a/zfs-modules.spec.in +++ b/zfs-modules.spec.in @@ -94,14 +94,18 @@ %endif %define kpkg kernel %define kdevpkg kernel-devel - %if %{defined el6} + %if %{defined el6} || %{defined ch5} %define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g') %else %define kverpkg %{kver} %endif %define koppkg = %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} + %if %{defined el6} || %{defined ch5} + %define kdir %{_usrsrc}/kernels/%{kver} + %else + %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu} + %endif %endif %if %{undefined kobj} %define kobj %{kdir}