Skip to content

Commit 5d2107d

Browse files
committed
Fix zfs.spec.in defaults
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 #2310
1 parent 2ee4e7d commit 5d2107d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rpm/generic/zfs.spec.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%global _libdir /%{_lib}
33

44
# Set the default udev directory based on distribution.
5-
%if 0%{!?_udevdir}
5+
%if %{undefined _udevdir}
66
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
77
%global _udevdir %{_prefix}/lib/udev
88
%else
@@ -11,16 +11,16 @@
1111
%endif
1212

1313
# Set the default udevrule directory based on distribution.
14-
%if 0%{!?_udevruledir}
14+
%if %{undefined _udevruledir}
1515
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
16-
%global _udevruledir %{_prefix}/lib/udevrule/rules.d
16+
%global _udevruledir %{_prefix}/lib/udev/rules.d
1717
%else
18-
%global _udevruledir /lib/udevrule/rules.d
18+
%global _udevruledir /lib/udev/rules.d
1919
%endif
2020
%endif
2121

2222
# Set the default dracut directory based on distribution.
23-
%if 0%{!?_dracutdir}
23+
%if %{undefined _dracutdir}
2424
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
2525
%global _dracutdir %{_prefix}/lib/dracut
2626
%else

0 commit comments

Comments
 (0)