Skip to content

Commit

Permalink
Fedora 28: Fix "Macro %_dracutdir has empty body"
Browse files Browse the repository at this point in the history
If you run ./configure --with-config=srpm, it will not trigger
the user m4 scripts to populate the dracut and udev directories.
This causes a build error on Fedora 28.  Make the dracut and
udev lines conditional to get around this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #7326
Closes #7328
  • Loading branch information
tonyhutter authored and behlendorf committed Mar 25, 2018
1 parent 157ef7f commit 9ea6c3d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,23 @@ AC_DEFUN([ZFS_AC_RPM], [
RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"'
RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"'
RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
RPM_DEFINE_UTIL+=' --define "_udevruledir $(udevruledir)"'
RPM_DEFINE_UTIL+=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
dnl # their values may not be set when running:
dnl #
dnl # ./configure --with-config=srpm
dnl #
AS_IF([test -n "$dracutdir" ], [
RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
])
AS_IF([test -n "$udevdir" ], [
RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
])
AS_IF([test -n "$udevruledir" ], [
RPM_DEFINE_UTIL+=' --define "_udevdir $(udevruledir)"'
])
RPM_DEFINE_UTIL+=' $(DEFINE_INITRAMFS)'
RPM_DEFINE_UTIL+=' $(DEFINE_SYSTEMD)'
Expand Down

0 comments on commit 9ea6c3d

Please sign in to comment.