guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: knot: Add configuration fields.


From: guix-commits
Subject: 01/01: gnu: knot: Add configuration fields.
Date: Sat, 27 Apr 2019 07:03:48 -0400 (EDT)

roptat pushed a commit to branch master
in repository guix.

commit 6cd7b1be7ea2b675e369c6cbb35b31b3c496648b
Author: Julien Lepiller <address@hidden>
Date:   Sat Apr 27 12:56:25 2019 +0200

    gnu: knot: Add configuration fields.
    
    * gnu/services/dns.scm (knot-zone-configuration)[zonefile-load]
    [journal-content, max-journal-usage, max-journal-depth, max-zone-size]:
    New fields.
    (knot-zone-config): Serialize them.
    * doc/guix.texi (DNS Services): Document them.
---
 doc/guix.texi        | 39 +++++++++++++++++++++++++
 gnu/services/dns.scm | 80 ++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 95 insertions(+), 24 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index e3bd991..d9473a1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19829,6 +19829,45 @@ When set, this forbids queries of the ANY type.
 The delay between a modification in memory and on disk.  0 means immediate
 synchronization.
 
address@hidden @code{zonefile-load} (default: @code{#f})
+The way the zone file contents are applied during zone load.  Possible values
+are:
+
address@hidden
address@hidden @code{#f} for using the default value from Knot,
address@hidden @code{'none} for not using the zone file at all,
address@hidden @code{'difference} for computing the difference between already 
available
+contents and zone contents and applying it to the current zone contents,
address@hidden @code{'difference-no-serial} for the same as @code{'difference}, 
but
+ignoring the SOA serial in the zone file, while the server takes care of it
+automatically.
address@hidden @code{'whole} for loading zone contents from the zone file.
address@hidden itemize
+
address@hidden @code{journal-content} (default: @code{#f})
+The way the journal is used to store zone and its changes.  Possible values
+are @code{'none} to not use it at all, @code{'changes} to store changes and
address@hidden'all} to store contents.  @code{#f} does not set this option, so 
the
+default value from Knot is used.
+
address@hidden @code{max-journal-usage} (default: @code{#f})
+The maximum size for the journal on disk.  @code{#f} does not set this option,
+so the default value from Knot is used.
+
address@hidden @code{max-journal-depth} (default: @code{#f})
+The maximum size of the history.  @code{#f} does not set this option, so the
+default value from Knot is used.
+
address@hidden @code{max-zone-size} (default: @code{#f})
+The maximum size of the zone file.  This limit is enforced for incoming
+transfer and updates.  @code{#f} does not set this option, so the default
+value from Knot is used.
+
address@hidden @code{dnssec-policy} (default: @code{#f})
+A reference to a @code{knot-policy-configuration} record, or the special
+name @code{"default"}.  If the value is @code{#f}, there is no dnssec signing
+on this zone.
+
 @item @code{serial-policy} (default: @code{'increment})
 A policy between @code{'increment} and @code{'unixtime}.
 
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 3aa9768..0d660de 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -163,30 +163,40 @@
 (define-record-type* <knot-zone-configuration>
   knot-zone-configuration make-knot-zone-configuration
   knot-zone-configuration?
-  (domain           knot-zone-configuration-domain
-                    (default ""))
-  (file             knot-zone-configuration-file
-                    (default "")) ; the file where this zone is saved.
-  (zone             knot-zone-configuration-zone
-                    (default (zone-file))) ; initial content of the zone file
-  (master           knot-zone-configuration-master
-                    (default '()))
-  (ddns-master      knot-zone-configuration-ddns-master
-                    (default #f))
-  (notify           knot-zone-configuration-notify
-                    (default '()))
-  (acl              knot-zone-configuration-acl
-                    (default '()))
-  (semantic-checks? knot-zone-configuration-semantic-checks?
-                    (default #f))
-  (disable-any?     knot-zone-configuration-disable-any?
-                    (default #f))
-  (zonefile-sync    knot-zone-configuration-zonefile-sync
-                    (default 0))
-  (dnssec-policy    knot-zone-configuration-dnssec-policy
-                    (default #f))
-  (serial-policy    knot-zone-configuration-serial-policy
-                    (default 'increment)))
+  (domain            knot-zone-configuration-domain
+                     (default ""))
+  (file              knot-zone-configuration-file
+                     (default "")) ; the file where this zone is saved.
+  (zone              knot-zone-configuration-zone
+                     (default (zone-file))) ; initial content of the zone file
+  (master            knot-zone-configuration-master
+                     (default '()))
+  (ddns-master       knot-zone-configuration-ddns-master
+                     (default #f))
+  (notify            knot-zone-configuration-notify
+                     (default '()))
+  (acl               knot-zone-configuration-acl
+                     (default '()))
+  (semantic-checks?  knot-zone-configuration-semantic-checks?
+                     (default #f))
+  (disable-any?      knot-zone-configuration-disable-any?
+                     (default #f))
+  (zonefile-sync     knot-zone-configuration-zonefile-sync
+                     (default 0))
+  (zonefile-load     knot-zone-configuration-zonefile-load
+                     (default #f))
+  (journal-content   knot-zone-configuration-journal-content
+                     (default #f))
+  (max-journal-usage knot-zone-configuration-max-journal-usage
+                     (default #f))
+  (max-journal-depth knot-zone-configuration-max-journal-depth
+                     (default #f))
+  (max-zone-size     knot-zone-configuration-max-zone-size
+                     (default #f))
+  (dnssec-policy     knot-zone-configuration-dnssec-policy
+                     (default #f))
+  (serial-policy     knot-zone-configuration-serial-policy
+                     (default 'increment)))
 
 (define-record-type* <knot-remote-configuration>
   knot-remote-configuration make-knot-remote-configuration
@@ -494,6 +504,12 @@
                 (acl (list #$@(knot-zone-configuration-acl zone)))
                 (semantic-checks? #$(knot-zone-configuration-semantic-checks? 
zone))
                 (disable-any? #$(knot-zone-configuration-disable-any? zone))
+                (zone-file-sync #$(knot-zone-configuration-zonefile-sync zone))
+                (zone-file-load #$(knot-zone-configuration-zonefile-load zone))
+                (journal-content #$(knot-zone-configuration-journal-content 
zone))
+                (max-journal-usage 
#$(knot-zone-configuration-max-journal-usage zone))
+                (max-journal-depth 
#$(knot-zone-configuration-max-journal-depth zone))
+                (max-zone-size #$(knot-zone-configuration-max-zone-size zone))
                 (dnssec-policy #$(knot-zone-configuration-dnssec-policy zone))
                 (serial-policy '#$(knot-zone-configuration-serial-policy 
zone)))
             (format #t "    - domain: ~a\n" domain)
@@ -520,6 +536,22 @@
                           (knot-zone-configuration-acl zone))))
             (format #t "      semantic-checks: ~a\n" (if semantic-checks? "on" 
"off"))
             (format #t "      disable-any: ~a\n" (if disable-any? "on" "off"))
+            (if zonefile-sync
+              (format #t "      zonefile-sync: ~a\n" zonefile-sync))
+            (if zonefile-load
+              (format #t "      zonefile-load: ~a\n"
+                      (symbol->string zonefile-load)))
+            (if journal-content
+              (format #t "      journal-content: ~a\n"
+                      (symbol->string journal-content)))
+            (if max-journal-usage
+              (format #t "      max-journal-usage: ~a\n" max-journal-usage))
+            (if max-journal-depth
+              (format #t "      max-journal-depth: ~a\n" max-journal-depth))
+            (if max-zone-size
+              (format #t "      max-zone-size: ~a\n" max-zone-size))
+            (if 
+              (format #t "      : ~a\n" ))
             (if dnssec-policy
                 (begin
                   (format #t "      dnssec-signing: on\n")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]