GNU bug report logs - #70706
[PATCH] gnu: services: dns: Escape hatch for dnsmasq-configuration.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Wed, 1 May 2024 20:45: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 70706 in the body.
You can then email your comments to 70706 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 guix-patches <at> gnu.org:
bug#70706; Package guix-patches. (Wed, 01 May 2024 20:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 01 May 2024 20:45:02 GMT) Full text and rfc822 format available.

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

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: guix-patches <at> gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: services: dns: Escape hatch for dnsmasq-configuration.
Date: Wed,  1 May 2024 22:43:31 +0200
* gnu/service/dns.scm: (<dnsmasq-configuration>)[extra-options]: Add.
* doc/guix.texi: Document (<dnsmasq-configuration>)[extra-options].
---
 doc/guix.texi        | 4 ++++
 gnu/services/dns.scm | 7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 749d689ac1..17798becd5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -33498,6 +33498,10 @@ DNS Services
 resolving MAC addresses is only possible if the client is in the local
 network or obtained a DHCP lease from dnsmasq.
 
+@item @code{extra-options} (default: @code{'()})
+This option provides an ``escape hatch'' for the user to provide arbitrary
+command-line arguments to @command{dnsmasq} as a list of strings.
+
 @end table
 @end deftp
 
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 6608046909..043c34599c 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -739,6 +739,8 @@ (define-record-type* <dnsmasq-configuration>
                     (default #t))       ;boolean
   (listen-addresses dnsmasq-configuration-listen-address
                     (default '()))      ;list of string
+  (extra-options    dnsmasq-configuration-extra-options
+                    (default '()))      ;list of string
   (resolv-file      dnsmasq-configuration-resolv-file
                     (default "/etc/resolv.conf")) ;string
   (no-resolv?       dnsmasq-configuration-no-resolv?
@@ -798,7 +800,7 @@ (define (dnsmasq-shepherd-service config)
      tftp-single-port? tftp-secure?
      tftp-max tftp-mtu tftp-no-blocksize?
      tftp-lowercase? tftp-port-range
-     tftp-root tftp-unique-root)
+     tftp-root tftp-unique-root extra-options)
     (shepherd-service
      (provision '(dnsmasq))
      (requirement '(networking))
@@ -877,7 +879,8 @@ (define (dnsmasq-shepherd-service config)
                         (if (> (length tftp-unique-root) 0)
                             (format #f "--tftp-unique-root=~a" tftp-unique-root)
                             (format #f "--tftp-unique-root")))
-                       '()))
+                       '())
+                #$@extra-options)
                #:pid-file "/run/dnsmasq.pid"))
      (stop #~(make-kill-destructor)))))
 

base-commit: 5c13ab50b9c7d44238c64e5337027f04ae1d9223
--
2.41.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 13 Jun 2024 20:44:01 GMT) Full text and rfc822 format available.

Notification sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
bug acknowledged by developer. (Thu, 13 Jun 2024 20:44:02 GMT) Full text and rfc822 format available.

Message #10 received at 70706-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: 70706-done <at> debbugs.gnu.org
Subject: Re: [bug#70706] [PATCH] gnu: services: dns: Escape hatch for
 dnsmasq-configuration.
Date: Thu, 13 Jun 2024 22:43:42 +0200
Sergey Trofimov <sarg <at> sarg.org.ru> skribis:

> * gnu/service/dns.scm: (<dnsmasq-configuration>)[extra-options]: Add.
> * doc/guix.texi: Document (<dnsmasq-configuration>)[extra-options].

Applied, thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Jul 2024 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 29 days ago.

Previous Next


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