GNU bug report logs -
#77204
[PATCH 0/3] dnsmasq service changes
Previous Next
Reported by: Alexey Abramov <levenson <at> mmer.org>
Date: Sun, 23 Mar 2025 10:27:04 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 77204 <at> debbugs.gnu.org (full text, mbox):
* doc/guix.texi: Document the change.
* gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: Rename the field to
[shepherd-provision] for consistency with other services.
* gnu/services/dns.scm (<dnsmasq-configuration>)[shepherd-requirement]: New field.
* gnu/services/dns.scm (dnsmasq-shepherd-service): Use newly-created fields.
---
doc/guix.texi | 11 ++++++++---
gnu/services/dns.scm | 12 ++++++++----
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index eecc0aec52c..fd6a0176348 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35172,9 +35172,14 @@ DNS Services
@item @code{package} (default: @var{dnsmasq})
Package object of the dnsmasq server.
-@item @code{provision} (default: @code{'(dnsmasq)})
-A list of symbols for the Shepherd service corresponding to this dnsmasq
-configuration.
+@item @code{shepherd-provision} (default: @code{'(dnsmasq)})
+@itemx @code{shepherd-requirement} (default: @code{'(user-processes networking)})
+This option can be used to provide a list of Shepherd service names
+(symbols) provided by this service. You might want to change the default
+value if you intend to run several @command{dnsmasq} instances.
+
+Likewise, @code{shepherd-requirement} is a list of Shepherd service names
+(symbols) that this service will depend on.
@item @code{no-hosts?} (default: @code{#f})
When true, don't read the hostnames in /etc/hosts.
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 05291eb65d9..9276504ffd0 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -742,8 +742,10 @@ (define-record-type* <dnsmasq-configuration>
dnsmasq-configuration?
(package dnsmasq-configuration-package
(default dnsmasq)) ;file-like
- (provision dnsmasq-provision
- (default '(dnsmasq)))
+ (shepherd-provision dnsmasq-configuration-shepherd-provision
+ (default '(dnsmasq)))
+ (shepherd-requirement dnsmasq-configuration-shepherd-requirement
+ (default '(user-processes networking)))
(no-hosts? dnsmasq-configuration-no-hosts?
(default #f)) ;boolean
(port dnsmasq-configuration-port
@@ -802,6 +804,8 @@ (define-record-type* <dnsmasq-configuration>
(define (dnsmasq-shepherd-service config)
(match-record config <dnsmasq-configuration>
(package
+ shepherd-provision
+ shepherd-requirement
no-hosts?
port local-service? listen-addresses
resolv-file no-resolv?
@@ -815,8 +819,8 @@ (define (dnsmasq-shepherd-service config)
tftp-lowercase? tftp-port-range
tftp-root tftp-unique-root extra-options)
(shepherd-service
- (provision (dnsmasq-provision config))
- (requirement '(user-processes networking))
+ (provision shepherd-provision)
+ (requirement shepherd-requirement)
(documentation "Run the dnsmasq DNS server.")
(start #~(make-forkexec-constructor
(list
--
2.48.1
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.