From 5d2107d82b21e81d718f3381d8eb572429b72e61 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 12 Jun 2014 13:11:26 -0700 Subject: [PATCH] Fix zfs.spec.in defaults Commit 2ee4e7da accidentally introduced two issues which only occur when rebuilding the ZFS source rpm outside the ZFS build system. 1) The _dracutdir, _udevdir, and _udevruledir macros must be checked using the 'undefined' keyword. This was just overlooked in the patch review and does not cause a failure when using 'make pkg' because the values are provided by the make target. 2) The default _udevruledir path included a typo. Signed-off-by: Brian Behlendorf Issue #2310 --- rpm/generic/zfs.spec.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index 0e7efbf3e7..cd167202ad 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -2,7 +2,7 @@ %global _libdir /%{_lib} # Set the default udev directory based on distribution. -%if 0%{!?_udevdir} +%if %{undefined _udevdir} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 %global _udevdir %{_prefix}/lib/udev %else @@ -11,16 +11,16 @@ %endif # Set the default udevrule directory based on distribution. -%if 0%{!?_udevruledir} +%if %{undefined _udevruledir} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 -%global _udevruledir %{_prefix}/lib/udevrule/rules.d +%global _udevruledir %{_prefix}/lib/udev/rules.d %else -%global _udevruledir /lib/udevrule/rules.d +%global _udevruledir /lib/udev/rules.d %endif %endif # Set the default dracut directory based on distribution. -%if 0%{!?_dracutdir} +%if %{undefined _dracutdir} %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7 %global _dracutdir %{_prefix}/lib/dracut %else