GNU bug report logs - #75140
[PATCH] services: dnsmasq: Allow custom Shepherd provision

Previous Next

Package: guix-patches;

Reported by: 45mg <45mg.writes <at> gmail.com>

Date: Fri, 27 Dec 2024 13:31:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75140 in the body.
You can then email your comments to 75140 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to ludo <at> gnu.org, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#75140; Package guix-patches. (Fri, 27 Dec 2024 13:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 45mg <45mg.writes <at> gmail.com>:
New bug report received and forwarded. Copy sent to ludo <at> gnu.org, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org. (Fri, 27 Dec 2024 13:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 45mg <45mg.writes <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: 45mg <45mg.writes <at> gmail.com>
Subject: [PATCH] services: dnsmasq: Allow custom Shepherd provision
Date: Fri, 27 Dec 2024 08:29:52 -0500
Allow users to have multiple dnsmasq instances by specifying different
`provision` values for the corresponding Shepherd services, similar to
what is done with `static-networking-service-type`.

* gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: new option.
(dnsmasq-shepherd-service): Use supplied provision value.
* doc/guix.texi (DNS Services)[dnsmasq-configuration]: Document it.

Change-Id: I78c7f015cb1db239a600bc5373b2fd80e8b9b9f4
---
 doc/guix.texi        | 4 ++++
 gnu/services/dns.scm | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index da4d2f5ebc..e9547ea8f2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34129,6 +34129,10 @@ 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{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 043c34599c..532e20e38a 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -731,6 +731,8 @@ (define-record-type* <dnsmasq-configuration>
   dnsmasq-configuration?
   (package          dnsmasq-configuration-package
                     (default dnsmasq))  ;file-like
+  (provision        dnsmasq-provision
+                    (default '(dnsmasq)))
   (no-hosts?        dnsmasq-configuration-no-hosts?
                     (default #f))       ;boolean
   (port             dnsmasq-configuration-port
@@ -802,7 +804,7 @@ (define (dnsmasq-shepherd-service config)
      tftp-lowercase? tftp-port-range
      tftp-root tftp-unique-root extra-options)
     (shepherd-service
-     (provision '(dnsmasq))
+     (provision (dnsmasq-provision config))
      (requirement '(networking))
      (documentation "Run the dnsmasq DNS server.")
      (start #~(make-forkexec-constructor

base-commit: 831b94a1efcea8f793afc949b5123a6235c9bb1a
-- 
2.47.1





Information forwarded to guix-patches <at> gnu.org:
bug#75140; Package guix-patches. (Sat, 28 Dec 2024 05:37:02 GMT) Full text and rfc822 format available.

Message #8 received at 75140 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 45mg <45mg.writes <at> gmail.com>
Cc: 75140 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#75140] [PATCH] services: dnsmasq: Allow custom Shepherd
 provision
Date: Sat, 28 Dec 2024 14:35:07 +0900
45mg <45mg.writes <at> gmail.com> writes:

> Allow users to have multiple dnsmasq instances by specifying different
> `provision` values for the corresponding Shepherd services, similar to
> what is done with `static-networking-service-type`.
>
> * gnu/services/dns.scm (<dnsmasq-configuration>)[provision]: new option.
> (dnsmasq-shepherd-service): Use supplied provision value.
> * doc/guix.texi (DNS Services)[dnsmasq-configuration]: Document it.
>
> Change-Id: I78c7f015cb1db239a600bc5373b2fd80e8b9b9f4

Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

-- 
Thanks,
Maxim




bug closed, send any further explanations to 75140 <at> debbugs.gnu.org and 45mg <45mg.writes <at> gmail.com> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 04 Jan 2025 22:39:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Feb 2025 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 39 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.