File switched-to-dnsmasq-as-default-dhcp-and-tftp-service.patch of Package warewulf4

From 9e39845bda60e006936c8b6e34a02325d31448b3 Mon Sep 17 00:00:00 2001
From: Christian Goll <cgoll@suse.com>
Date: Fri, 18 Jul 2025 16:29:37 +0200
Subject: [PATCH] switched to dnsmasq as default dhcp and tftp service

---
 CHANGELOG.md                |  1 +
 etc/warewulf.conf           |  4 ++--
 userdocs/server/dnsmasq.rst | 33 ++-------------------------------
 warewulf.spec.in            |  2 +-
 4 files changed, 6 insertions(+), 34 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26c5994c..0c6378e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 - Fixed handling of comma-separated mount options in `fstab` and `ignition` overlays. #1950
 - Fixed a race condition in `wwctl overlay edit`. #1947
 - Fixed a syntax error in the RPM specfile.
+- switched to dnsmasq as default tftp and dhcp service
 
 ## v4.6.2, 2025-07-09
 
diff --git a/etc/warewulf.conf b/etc/warewulf.conf
index 33cec64c..6e68047c 100644
--- a/etc/warewulf.conf
+++ b/etc/warewulf.conf
@@ -10,11 +10,11 @@ dhcp:
   enabled: true
   range start: 10.0.1.1
   range end: 10.0.1.255
-  systemd name: dhcpd
+  systemd name: dnsmasq
   template: default
 tftp:
   enabled: true
-  systemd name: tftp
+  systemd name: dnsmasq
   ipxe:
     00:09: ipxe-snponly-x86_64.efi
     00:00: undionly.kpxe
diff --git a/userdocs/server/dnsmasq.rst b/userdocs/server/dnsmasq.rst
index b182ee8d..ba6037a0 100644
--- a/userdocs/server/dnsmasq.rst
+++ b/userdocs/server/dnsmasq.rst
@@ -2,37 +2,8 @@
 Using dnsmasq
 =============
 
-As an experimental feature, it is possible to use ``dnsmasq`` instead of the ISC
-``dhcpd`` server and ``TFTP`` server.
-
-In order to keep the file ``/etc/dnsmasq.d/ww4-hosts.conf`` is created and must
-be included in the main ``dnsmasq.conf`` via the ``conf-dir=/etc/dnsmasq.d``
-option.
-
-Installation
-============
-
-Before the installation, make sure that ``dhcpd`` and ``tftp`` are disabled.
-You can do that with the commands:
-
-.. code-block:: shell
-
-   systemctl disable --now dhcpd
-   systemctl disable --now tftp
-
-Now you can install ``dnsmasq``.
-
-.. code-block:: shell
-
-   # Rocky Linux
-   dnf install dnsmasq
-
-   # SUSE
-   zypper install dnsmasq
-
-After the installation, instruct ``warewulf`` to use ``dnsmasq`` as its
-``dhcpd`` and ``tftp`` service. This is done in the server configuration file,
-typically at ``/etc/warewulf/warewulf.conf``:
+``dnsmasq`` is the default  ``dhcpd`` and ``tftp`` service. This can be configured
+in the server configuration file, typically at ``/etc/warewulf/warewulf.conf``:
 
 .. code-block:: yaml
 
diff --git a/warewulf.spec.in b/warewulf.spec.in
index f32585db..ae5f098c 100644
--- a/warewulf.spec.in
+++ b/warewulf.spec.in
@@ -69,7 +69,7 @@ Requires: ipxe-bootimgs-aarch64
 Requires: dnsmasq
 %else
 %if 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?fedora}
-Requires: dhcp-server
+Requires: dnsmasq
 %else
 # rhel < 8 and others
 Requires: dhcp
-- 
2.51.0

openSUSE Build Service is sponsored by