diff options
author | Tony Hutter <[email protected]> | 2018-03-25 15:00:47 -0700 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-05-07 17:19:57 -0700 |
commit | a1662ffcaa82d15fe62efd8e266e54809d9ca204 (patch) | |
tree | 1f8f0cafec4ecc82c9b327dd3021caebad075cd8 /config | |
parent | ea921bf6a68c5d884ccad9ef4d5a23f76c4b51c4 (diff) |
Fedora 28: Fix "Macro %_dracutdir has empty body"
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 <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes #7326
Closes #7328
Diffstat (limited to 'config')
-rw-r--r-- | config/zfs-build.m4 | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 8fc3863f4..e6c9c21e0 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -160,7 +160,27 @@ AC_DEFUN([ZFS_AC_RPM], [ ]) RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"' - RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)" --define "_udevdir $(udevdir)" --define "_udevruledir $(udevruledir)" --define "_initconfdir $(DEFAULT_INITCONF_DIR)" $(DEFINE_INITRAMFS) $(DEFINE_SYSTEMD)' + + + 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)' + RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)" --define "require_spldir $(SPL)" --define "require_splobj $(SPL_OBJ)" --define "ksrc $(LINUX)" --define "kobj $(LINUX_OBJ)"' RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"' |