Silence 'old_umask' uninit variable warning
[zfs.git] / rpm / generic / zfs-kmod.spec.in
index 8b2dcd1..9c427f7 100644 (file)
@@ -15,7 +15,7 @@ License:        @ZFS_META_LICENSE@
 URL:            http://zfsonlinux.org/
 Source0:        %{module}-%{version}.tar.gz
 Source10:       kmodtool
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
 
 # The developments headers will conflict with the dkms packages.
 Conflicts:      %{module}-dkms
@@ -26,7 +26,8 @@ Conflicts:      %{module}-dkms
 %{?suse_version:BuildRequires: kernel-source}
 
 %if 0%{?rhel}%{?fedora}%{?suse_version}
-%global KmodsBuildRequires kmod-spl-devel
+BuildRequires:             spl-devel-kmod = %{version}
+%global KmodsBuildRequires spl-devel-kmod
 %global KmodsRequires      kmod-spl
 %endif
 
@@ -89,12 +90,12 @@ for kernel_version in %{?kernel_versions}; do
         --with-linux="${kernel_version##*___}" \
         --with-linux-obj="${kernel_version##*___}" \
 %else
-        --with-linux=\
-        %(if [ -e /lib/modules/${kernel_version%%___*}/source ]; then \
-            echo "/lib/modules/${kernel_version%%___*}/source" \
+        --with-linux="$( \
+        if [ -e "/lib/modules/${kernel_version%%___*}/source" ]; then \
+            echo "/lib/modules/${kernel_version%%___*}/source"; \
         else \
-            echo "/lib/modules/${kernel_version%%___*}/build" \
-        fi) \
+            echo "/lib/modules/${kernel_version%%___*}/build"; \
+        fi)" \
         --with-linux-obj="/lib/modules/${kernel_version%%___*}/build" \
 %endif
         --with-spl="/usr/src/spl-%{version}" \
@@ -126,5 +127,5 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
-* Tue Mar 12 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.0-1
-- Initial kmods2 packaging.
+* Fri Mar 22 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.1-1
+- First official stable release.