Minor fixes for SUSE builds
@@ -39,6 +39,7 @@ Conflicts: warewulf-provision
Conflicts: warewulf-ipmi
BuildRequires: make
+BuildRequires: /etc/os-release
%if 0%{?suse_version} || 0%{?sle_version}
BuildRequires: systemd-rpm-macros
@@ -98,6 +99,13 @@ make
export NO_BRP_STALE_LINK_ERROR=yes
make install DESTDIR=%{buildroot}
+# For SUSE, move dhcp.conf.ww to replace symlink
+%if 0%{?suse_version} || 0%{?sle_version}
+rm %{buildroot}%{statedir}/warewulf/overlays/host/etc/dhcpd.conf
+mv %{buildroot}%{statedir}/warewulf/overlays/host/etc/dhcp/dhcpd.conf.ww \
+ %{buildroot}%{statedir}/warewulf/overlays/host/etc/
+%endif
+
%pre
getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
