[PATCH 0/2] Fix tftp-unique-root option for service dnsmasq

  • Open
  • quality assurance status badge
One participant
  • Jean-Baptiste Note
Submitted by
Jean-Baptiste Note
Jean-Baptiste Note wrote on 30 Apr 14:57 +0200
(address . guix-patches@gnu.org)(name . Jean-Baptiste Note)(address . jean-baptiste.note@m4x.org)
The tftp-unique-root option, though well-documented, currently does not work
for me when passing it a string. Fix the option and try to improve the
documentation related to it.

Jean-Baptiste Note (2):
services: dnsmasq: Fix tftp-unique-root option.
doc: Augment dnsmasq-service-type documentation.

doc/guix.texi | 7 ++++++-
gnu/services/dns.scm | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)

Jean-Baptiste Note wrote on 30 Apr 15:04 +0200
[PATCH 1/2] services: dnsmasq: Fix tftp-unique-root option.
(address . 70670@debbugs.gnu.org)(name . Jean-Baptiste Note)(address . jean-baptiste.note@m4x.org)
* gnu/services/dns.scm (dnsmasq-shepherd-service): tftp-unique-root is a
string and its length is taken with string-length.
gnu/services/dns.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 6608046909..ff169f4e8d 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -874,7 +874,7 @@ (define (dnsmasq-shepherd-service config)
#$@(if tftp-unique-root
- (if (> (length tftp-unique-root) 0)
+ (if (> (string-length tftp-unique-root) 0)
(format #f "--tftp-unique-root=~a" tftp-unique-root)
(format #f "--tftp-unique-root")))
Jean-Baptiste Note wrote on 30 Apr 15:04 +0200
[PATCH 2/2] doc: Augment dnsmasq-service-type documentation.
(address . 70670@debbugs.gnu.org)(name . Jean-Baptiste Note)(address . jean-baptiste.note@m4x.org)
doc/guix.texi: Fix typo in --tftp-root logic description. Add paragraph about
the precise behaviour of the tftp-unique-root parameter.
doc/guix.texi | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (25 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3f5d4e7f0d..3a9afcd814 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -33463,12 +33463,17 @@ format).
For instance, if @option{--tftp-root} is @samp{/tftp} and client
@samp{} requests file @file{myfile} then the effective path will
be @file{/tftp/} if @file{/tftp/} exists or
-@file{/tftp/myfile} otherwise. When @samp{=mac} is specified it will
+@file{/tftp/myfile} otherwise. When @samp{mac} is specified it will
append the MAC address instead, using lowercase zero padded digits
separated by dashes, e.g.: @samp{01-02-03-04-aa-bb}. Note that
resolving MAC addresses is only possible if the client is in the local
network or obtained a DHCP lease from dnsmasq.
+The empty string yields a naked @option{--tftp-unique-root} argument to
+@command{dnsmasq}; any other string @samp{str} will yield
+@option{--tftp-unique-root=str}. Currently admissible values for
+@command{dnsmasq} are @samp{mac} and @samp{ip}.
@end table
@end deftp
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 70670@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70670
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch