Skip to content

Commit

Permalink
Fix zfs.spec.in defaults
Browse files Browse the repository at this point in the history
Commit 2ee4e7d 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 <[email protected]>
Issue openzfs#2310
  • Loading branch information
behlendorf committed Jun 12, 2014
1 parent 2ee4e7d commit 5d2107d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5d2107d

Please sign in to comment.