all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#37295] [PATCHv3] services: ntp: Support different NTP server types and options.
  2019-09-05  7:09     ` Efraim Flashner
@ 2019-09-03  8:04       ` Maxim Cournoyer
  2019-09-06 10:46         ` Efraim Flashner
  0 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2019-09-03  8:04 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 37295

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

Hello Efraim,

Efraim Flashner <efraim@flashner.co.il> writes:

> Can you check how this affects the openntpd service? It currently also
> uses %ntp-servers

I had overlooked this important detail; thanks for pointing it out!

I made the simplest change possible, by introducing a %openntpd-servers
variable that holds a list of addresses (strings), which is defined as
(map ntp-server-address %ntp-servers).  This variable is used as the new
default value for the "servers" field of the openntpd-configuration
record.  See the attached patch for details.


[-- Attachment #2: 0001-services-ntp-Support-different-NTP-server-types-and-.patch --]
[-- Type: text/x-patch, Size: 13603 bytes --]

From 98d246ba9c0119e6a2441c635193cc34b7218b4e Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 3 Sep 2019 10:14:59 +0900
Subject: [PATCH] services: ntp: Support different NTP server types and
 options.

* gnu/services/networking.scm (ntp-server-types): New enum.
(<ntp-server>): New record type.
(ntp-server->string): New procedure.
(%ntp-servers): Define in terms of <htp-server> records.  Use the first
entrypoint server as a pool instead of a list of static servers.  This is more
resilient since a new server of the pool can be interrogated on every
request.  Add the 'iburst' options.
(ntp-configuration-servers): Define a custom accessor that warns but honors
the now deprecated server format.
(<ntp-configuration>): Use it.
(%openntpd-servers): New variable,
(<openntpd-configuration>): Use it, as a pool ('servers' field) instead of a
regular server.
* tests/networking.scm: New file.
* Makefile.am (SCM_TESTS): Register it.
* doc/guix.texi: Update documentation.
---
 Makefile.am                 |   1 +
 doc/guix.texi               |  40 +++++++++++--
 gnu/services/networking.scm | 108 ++++++++++++++++++++++++++++++------
 tests/networking.scm        |  50 +++++++++++++++++
 4 files changed, 177 insertions(+), 22 deletions(-)
 create mode 100644 tests/networking.scm

diff --git a/Makefile.am b/Makefile.am
index fa6bf8fe80..32d518acbd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -399,6 +399,7 @@ SCM_TESTS =					\
   tests/modules.scm				\
   tests/monads.scm				\
   tests/nar.scm				\
+  tests/networking.scm				\
   tests/opam.scm				\
   tests/packages.scm				\
   tests/pack.scm				\
diff --git a/doc/guix.texi b/doc/guix.texi
index 9de0957d14..12bb1c18e2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12988,8 +12988,9 @@ This is the data type for the NTP service configuration.
 
 @table @asis
 @item @code{servers} (default: @code{%ntp-servers})
-This is the list of servers (host names) with which @command{ntpd} will be
-synchronized.
+This is the list of servers (@code{<ntp-server>} records) with which
+@command{ntpd} will be synchronized.  See the @code{ntp-server} data type
+definition below.
 
 @item @code{allow-large-adjustment?} (default: @code{#t})
 This determines whether @command{ntpd} is allowed to make an initial
@@ -13005,6 +13006,32 @@ List of host names used as the default NTP servers.  These are servers of the
 @uref{https://www.ntppool.org/en/, NTP Pool Project}.
 @end defvr
 
+@deftp {Data Type} ntp-server
+The data type representing the configuration of a NTP server.
+
+@table @asis
+@item @code{type} (default: @code{'server})
+The type of the NTP server, given as a symbol. One of @code{'pool},
+@code{'server}, @code{'peer}, @code{'broadcast} or @code{'manycastclient}.
+
+@item @code{address}
+The address of the server, as a string.
+
+@item @code{options}
+NTPD options to use with that specific server, given as a list of option names
+and/or of option names and values tuples. The following example define a server
+to use with the options @option{iburst} and @option{prefer}, as well as
+@option{version} 3 and a @option{maxpoll} time of 16 seconds.
+
+@example
+(ntp-server
+ (type 'server)
+ (address "some.ntp.server.org")
+ (options `(iburst (version 3) (maxpoll 16) prefer))))
+@end example
+@end table
+@end deftp
+
 @cindex OpenNTPD
 @deffn {Scheme Procedure} openntpd-service-type
 Run the @command{ntpd}, the Network Time Protocol (NTP) daemon, as implemented
@@ -13024,6 +13051,11 @@ clock synchronized with that of the given servers.
 @end example
 @end deffn
 
+@defvr {Scheme Variable} %openntpd-servers
+This variable is a list of the server addresses defined in
+@var{%ntp-servers}.
+@end defvr
+
 @deftp {Data Type} openntpd-configuration
 @table @asis
 @item @code{openntpd} (default: @code{(file-append openntpd "/sbin/ntpd")})
@@ -13037,9 +13069,9 @@ Specify a list of timedelta sensor devices ntpd should use.  @code{ntpd}
 will listen to each sensor that actually exists and ignore non-existent ones.
 See @uref{https://man.openbsd.org/ntpd.conf, upstream documentation} for more
 information.
-@item @code{server} (default: @var{%ntp-servers})
+@item @code{server} (default: @code{'()})
 Specify a list of IP addresses or hostnames of NTP servers to synchronize to.
-@item @code{servers} (default: @code{'()})
+@item @code{servers} (default: @var{%openntp-servers})
 Specify a list of IP addresses or hostnames of NTP pools to synchronize to.
 @item @code{constraint-from} (default: @code{'()})
 @code{ntpd} can be configured to query the ‘Date’ from trusted HTTPS servers via TLS.
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 13a5c6c98d..c45bfcdad9 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -51,6 +51,7 @@
   #:use-module (guix records)
   #:use-module (guix modules)
   #:use-module (guix deprecation)
+  #:use-module (rnrs enums)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-26)
@@ -72,13 +73,22 @@
             dhcpd-configuration-pid-file
             dhcpd-configuration-interfaces
 
-            %ntp-servers
-
             ntp-configuration
             ntp-configuration?
+            ntp-configuration-ntp
+            ntp-configuration-servers
+            ntp-allow-large-adjustment?
+
+            %ntp-servers
+            ntp-server
+            ntp-server-type
+            ntp-server-address
+            ntp-server-options
+
             ntp-service
             ntp-service-type
 
+            %openntpd-servers
             openntpd-configuration
             openntpd-configuration?
             openntpd-service-type
@@ -292,31 +302,87 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
     (list (service-extension shepherd-root-service-type dhcpd-shepherd-service)
           (service-extension activation-service-type dhcpd-activation)))))
 
-(define %ntp-servers
-  ;; Default set of NTP servers. These URLs are managed by the NTP Pool project.
-  ;; Within Guix, Leo Famulari <leo@famulari.name> is the administrative contact
-  ;; for this NTP pool "zone".
-  '("0.guix.pool.ntp.org"
-    "1.guix.pool.ntp.org"
-    "2.guix.pool.ntp.org"
-    "3.guix.pool.ntp.org"))
-
 \f
 ;;;
 ;;; NTP.
 ;;;
 
-;; TODO: Export.
+(define ntp-server-types (make-enumeration
+                          '(pool
+                            server
+                            peer
+                            broadcast
+                            manycastclient)))
+
+(define-record-type* <ntp-server>
+  ntp-server make-ntp-server
+  ntp-server?
+  ;; The type can be one of the symbols of the NTP-SERVER-TYPE? enumeration.
+  (type ntp-server-type
+        (default 'server))
+  (address ntp-server-address)    ; a string
+  ;; The list of options can contain single option names or tuples in the form
+  ;; '(name value).
+  (options ntp-server-options
+           (default '())))
+
+(define (ntp-server->string ntp-server)
+  ;; Serialize the NTP server object as a string, ready to use in the NTP
+  ;; configuration file.
+  (define (flatten lst)
+    (reverse
+     (let loop ((x lst)
+                (res '()))
+       (if (list? x)
+           (fold loop res x)
+           (cons (format #f "~s" x) res)))))
+
+  (match ntp-server
+    (($ <ntp-server> type address options)
+     ;; XXX: It'd be neater if fields were validated at the syntax level (for
+     ;; static ones at least).  Perhaps the Guix record type could support a
+     ;; predicate property on a field?
+     (unless (enum-set-member? type ntp-server-types)
+       (error "Invalid NTP server type" type))
+     (string-join (cons* (symbol->string type)
+                         address
+                         (flatten options))))))
+
+(define %ntp-servers
+  ;; Default set of NTP servers. These URLs are managed by the NTP Pool project.
+  ;; Within Guix, Leo Famulari <leo@famulari.name> is the administrative contact
+  ;; for this NTP pool "zone".
+  (list
+   (ntp-server
+    (type 'pool)
+    (address "0.guix.pool.ntp.org")
+    (options '("iburst")))))               ;as recommended in the ntpd manual
+
 (define-record-type* <ntp-configuration>
   ntp-configuration make-ntp-configuration
   ntp-configuration?
   (ntp      ntp-configuration-ntp
             (default ntp))
-  (servers  ntp-configuration-servers
+  (servers  %ntp-configuration-servers   ;list of <ntp-server> objects
             (default %ntp-servers))
   (allow-large-adjustment? ntp-allow-large-adjustment?
                            (default #t))) ;as recommended in the ntpd manual
 
+(define (ntp-configuration-servers ntp-configuration)
+  ;; A wrapper to support the deprecated form of this field.
+  (let ((ntp-servers (%ntp-configuration-servers ntp-configuration)))
+    (match ntp-servers
+      (((? string?) (? string?) ...)
+       (format (current-error-port) "warning: Defining NTP servers as strings is \
+deprecated.  Please use <ntp-server> records instead.\n")
+       (map (lambda (addr)
+              (ntp-server
+               (type 'server)
+               (address addr)
+               (options '()))) ntp-servers))
+      ((($ <ntp-server>) ($ <ntp-server>) ...)
+       ntp-servers))))
+
 (define ntp-shepherd-service
   (match-lambda
     (($ <ntp-configuration> ntp servers allow-large-adjustment?)
@@ -324,8 +390,7 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
        ;; TODO: Add authentication support.
        (define config
          (string-append "driftfile /var/run/ntpd/ntp.drift\n"
-                        (string-join (map (cut string-append "server " <>)
-                                          servers)
+                        (string-join (map ntp-server->string servers)
                                      "\n")
                         "
 # Disable status queries as a workaround for CVE-2013-5211:
@@ -335,7 +400,11 @@ restrict -6 default kod nomodify notrap nopeer noquery limited
 
 # Yet, allow use of the local 'ntpq'.
 restrict 127.0.0.1
-restrict -6 ::1\n"))
+restrict -6 ::1
+
+# This is required to use servers from a pool directive when using the 'nopeer'
+# option by default, as documented in the 'ntp.conf' manual.
+restrict source notrap nomodify noquery\n"))
 
        (define ntpd.conf
          (plain-file "ntpd.conf" config))
@@ -409,6 +478,9 @@ make an initial adjustment of more than 1,000 seconds."
 ;;; OpenNTPD.
 ;;;
 
+(define %openntpd-servers
+  (map ntp-server-address %ntp-servers))
+
 (define-record-type* <openntpd-configuration>
   openntpd-configuration make-openntpd-configuration
   openntpd-configuration?
@@ -422,9 +494,9 @@ make an initial adjustment of more than 1,000 seconds."
   (sensor                  openntpd-sensor
                            (default '()))
   (server                  openntpd-server
-                           (default %ntp-servers))
-  (servers                 openntpd-servers
                            (default '()))
+  (servers                 openntpd-servers
+                           (default %openntpd-servers))
   (constraint-from         openntpd-constraint-from
                            (default '()))
   (constraints-from        openntpd-constraints-from
diff --git a/tests/networking.scm b/tests/networking.scm
new file mode 100644
index 0000000000..001d7df74d
--- /dev/null
+++ b/tests/networking.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (tests networking)
+  #:use-module (gnu services networking)
+  #:use-module (srfi srfi-64))
+
+;;; Tests for the (gnu services networking) module.
+
+(define ntp-server->string (@@ (gnu services networking) ntp-server->string))
+
+(define %ntp-server-sample
+  (ntp-server
+   (type 'server)
+   (address "some.ntp.server.org")
+   (options `(iburst (version 3) (maxpoll 16) prefer))))
+
+(test-begin "networking")
+
+(test-equal "ntp-server->string"
+  (ntp-server->string %ntp-server-sample)
+  "server some.ntp.server.org iburst version 3 maxpoll 16 prefer")
+
+(test-equal "ntp configuration servers deprecated form"
+  (ntp-configuration-servers
+   (ntp-configuration
+    (servers (list (ntp-server
+                    (type 'server)
+                    (address "example.pool.ntp.org")
+                    (options '()))))))
+  (ntp-configuration-servers
+   (ntp-configuration
+    (servers (list "example.pool.ntp.org")))))
+
+(test-end "networking")
-- 
2.23.0


[-- Attachment #3: Type: text/plain, Size: 1874 bytes --]


We could also overhaul the code of the openntpd-service-type so that it'd
be possible to provide different server types and options like for the
'ntp-service-type', but I'm not sure it's worth it, given that OpenNTPD
is more spartan than NTP (it only supports two server types ('server' vs
'servers'), already captured as fields in its configuration record; and
its server directives only support one option, 'weight', which can
currently be included in the server string if desired).

However, I noticed that the configuration file produced by the openntpd
service, while valid, is not very clean.

For the documented following openntpd-service-type definition:

--8<---------------cut here---------------start------------->8---
(openntpd-configuration
            (listen-on '("127.0.0.1" "::1"))
            (sensor '("udcf0 correction 70000"))
            (constraint-from '("www.gnu.org"))
            (constraints-from '("https://www.google.com/"))
            (allow-large-adjustment? #t)))
--8<---------------cut here---------------end--------------->8---

The following configuration file is generated:

--8<---------------cut here---------------start------------->8---
listen on 127.0.0.1
 listen on ::1
constraints from "https://www.google.com/"
constraints from "https://www.google.com/"
sensor udcf0 correction 70000
constraints from "https://www.google.com/"
constraints from "https://www.google.com/"
servers 0.guix.pool.ntp.org
constraints from "https://www.google.com/"
constraint from www.gnu.org
--8<---------------cut here---------------end--------------->8---

This is reproducible when testing without my changes (with the difference
that multiple servers were used instead of a single "pool" entry point).

I've opened an issue so that this issue can be tracked separately here:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37318.

Thank you!

Maxim

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#37295] [PATCH] services: ntp: Support different NTP server types and options.
@ 2019-09-03 12:21 maxim.cournoyer
       [not found] ` <handler.37295.B.15675133271882.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 8+ messages in thread
From: maxim.cournoyer @ 2019-09-03 12:21 UTC (permalink / raw)
  To: 37295


[-- Attachment #1.1: Type: text/plain, Size: 532 bytes --]

Hello!

This patch series aims at improving our NTP service.

While traveling, my date wouldn't be synchronized correctly, due to my
hardware clock (the one configurable through the BIOS) was more than
1000 s off the time queried from the NTP servers, and 'ntpd' was not
configured by default to allow an initial correction larger than 1000 s.

This patch series fixes this use case (travelling across timezones) and
further the ntp-configuration record to allow specifying different types
of NTP servers as well as their options.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-services-ntp-Allow-large-adjustment-by-default.patch --]
[-- Type: text/x-patch, Size: 1859 bytes --]

From 7b86b4c80077690d2bfeed6211d2b52a596d080d Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 3 Sep 2019 00:42:24 +0900
Subject: [PATCH 1/4] services: ntp: Allow large adjustment by default.

This is documented as best practice in `man ntpd', and is required to allow
the date to be set correctly when traveling (without having to manually update
the hardware clock in the BIOS/UEFI).

* gnu/services/networking.scm (<ntp-server>)[allow-large-adjustment?]: Set the
default value to #t.
* doc/guix.texi (Networking Services): Update documentation.
---
 doc/guix.texi               | 2 +-
 gnu/services/networking.scm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 031ee53295..50f800ef61 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12990,7 +12990,7 @@ This is the data type for the NTP service configuration.
 This is the list of servers (host names) with which @command{ntpd} will be
 synchronized.
 
-@item @code{allow-large-adjustment?} (default: @code{#f})
+@item @code{allow-large-adjustment?} (default: @code{#t})
 This determines whether @command{ntpd} is allowed to make an initial
 adjustment of more than 1,000 seconds.
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 376b4ccc4e..e149fe0b69 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -315,7 +315,7 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
   (servers  ntp-configuration-servers
             (default %ntp-servers))
   (allow-large-adjustment? ntp-allow-large-adjustment?
-                           (default #f)))
+                           (default #t))) ;as recommended in the ntpd manual
 
 (define ntp-shepherd-service
   (match-lambda
-- 
2.23.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-services-ntp-Fix-KOD-warning.patch --]
[-- Type: text/x-patch, Size: 1583 bytes --]

From bc2fe08fd6556a50af5a4209c77938d975f62f8f Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 3 Sep 2019 10:05:06 +0900
Subject: [PATCH 2/4] services: ntp: Fix KOD warning.

Otherwise the following messages would be printed by ntpd:

Sep  2 05:18:21 localhost ntpd[15849]: restrict default: KOD does nothing without LIMITE.
Sep  2 05:18:21 localhost ntpd[15849]: restrict ::: KOD does nothing without LIMITED.

Debian uses the same set of "restrict" keywords (see:
https://sources.debian.org/src/ntp/1:4.2.8p13+dfsg-2/debian/ntp.conf).

* gnu/services/networking.scm (ntp-shepherd-service): Add the 'limited'
keyword to both the IPv4 and IPv6 'restrict' directives.
---
 gnu/services/networking.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index e149fe0b69..13a5c6c98d 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -330,8 +330,8 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
                         "
 # Disable status queries as a workaround for CVE-2013-5211:
 # <http://support.ntp.org/bin/view/Main/SecurityNotice#DRDoS_Amplification_Attack_using>.
-restrict default kod nomodify notrap nopeer noquery
-restrict -6 default kod nomodify notrap nopeer noquery
+restrict default kod nomodify notrap nopeer noquery limited
+restrict -6 default kod nomodify notrap nopeer noquery limited
 
 # Yet, allow use of the local 'ntpq'.
 restrict 127.0.0.1
-- 
2.23.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: 0003-doc-Add-index-to-find-ntpd.patch --]
[-- Type: text/x-patch, Size: 785 bytes --]

From 09f98715e4e7795d88c5b02f24c23f6128120a05 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 3 Sep 2019 10:13:26 +0900
Subject: [PATCH 3/4] doc: Add index to find 'ntpd'.

* doc/guix.texi (Networking Services): Add @cindex to find 'ntpd'
---
 doc/guix.texi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 50f800ef61..9de0957d14 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12972,6 +12972,7 @@ objects}).
 @end deftp
 
 @cindex NTP (Network Time Protocol), service
+@cindex ntpd, service for the Network Time Protocol daemon
 @cindex real time clock
 @defvr {Scheme Variable} ntp-service-type
 This is the type of the service running the @uref{http://www.ntp.org,
-- 
2.23.0


[-- Attachment #1.5: 0004-services-ntp-Support-different-NTP-server-types-and-.patch --]
[-- Type: text/x-patch, Size: 10832 bytes --]

From 26e74f556c121f24241c3b7b7df5ae1a93d22b2d Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 3 Sep 2019 10:14:59 +0900
Subject: [PATCH 4/4] services: ntp: Support different NTP server types and
 options.

* gnu/services/networking.scm (ntp-server-types): New enum.
(<ntp-server>): New record type.
(ntp-server->string): New procedure.
(%ntp-servers): Define in terms of <htp-server> records.  Use the first
entrypoint server as a pool instead of a list of static servers.  This is more
resilient since a new server of the pool can be interrogated on every
request.  Add the 'iburst' options.
(ntp-configuration-servers): Define a custom accessor that warns but honors
about the now deprecated server format.
(<ntp-configuration>): Use it.
* tests/networking.scm: Test it.
* doc/guix.texi: Document it.
---
 doc/guix.texi               |  31 ++++++++++-
 gnu/services/networking.scm | 100 ++++++++++++++++++++++++++++++------
 tests/networking.scm        |  50 ++++++++++++++++++
 3 files changed, 163 insertions(+), 18 deletions(-)
 create mode 100644 tests/networking.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 9de0957d14..e76c9322d8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12988,8 +12988,9 @@ This is the data type for the NTP service configuration.
 
 @table @asis
 @item @code{servers} (default: @code{%ntp-servers})
-This is the list of servers (host names) with which @command{ntpd} will be
-synchronized.
+This is the list of servers (@code{<ntp-server>} records) with which
+@command{ntpd} will be synchronized.  See the @code{ntp-server} data type
+definition below.
 
 @item @code{allow-large-adjustment?} (default: @code{#t})
 This determines whether @command{ntpd} is allowed to make an initial
@@ -13005,6 +13006,32 @@ List of host names used as the default NTP servers.  These are servers of the
 @uref{https://www.ntppool.org/en/, NTP Pool Project}.
 @end defvr
 
+@deftp {Data Type} ntp-server
+The data type representing the configuration of a NTP server.
+
+@table @asis
+@item @code{type} (default: @code{'server})
+The type of the NTP server, given as a symbol. One of @code{'pool},
+@code{'server}, @code{'peer}, @code{'broadcast} or @code{'manycastclient}.
+
+@item @code{address}
+The address of the server, as a string.
+
+@item @code{options}
+NTPD options to use with that specific server, given as a list of option names
+and/or of option names and values tuples. The following example define a server
+to use with the options @option{iburst} and @option{prefer}, as well as
+@option{version} 3 and a @option{maxpoll} time of 16 seconds.
+
+@example
+(ntp-server
+ (type 'server)
+ (address "some.ntp.server.org")
+ (options `(iburst (version 3) (maxpoll 16) prefer))))
+@end example
+@end table
+@end deftp
+
 @cindex OpenNTPD
 @deffn {Scheme Procedure} openntpd-service-type
 Run the @command{ntpd}, the Network Time Protocol (NTP) daemon, as implemented
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 13a5c6c98d..752a165941 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -51,6 +51,7 @@
   #:use-module (guix records)
   #:use-module (guix modules)
   #:use-module (guix deprecation)
+  #:use-module (rnrs enums)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-26)
@@ -72,10 +73,18 @@
             dhcpd-configuration-pid-file
             dhcpd-configuration-interfaces
 
-            %ntp-servers
-
             ntp-configuration
             ntp-configuration?
+            ntp-configuration-ntp
+            ntp-configuration-servers
+            ntp-allow-large-adjustment?
+
+            %ntp-servers
+            ntp-server
+            ntp-server-type
+            ntp-server-address
+            ntp-server-options
+
             ntp-service
             ntp-service-type
 
@@ -292,31 +301,87 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
     (list (service-extension shepherd-root-service-type dhcpd-shepherd-service)
           (service-extension activation-service-type dhcpd-activation)))))
 
-(define %ntp-servers
-  ;; Default set of NTP servers. These URLs are managed by the NTP Pool project.
-  ;; Within Guix, Leo Famulari <leo@famulari.name> is the administrative contact
-  ;; for this NTP pool "zone".
-  '("0.guix.pool.ntp.org"
-    "1.guix.pool.ntp.org"
-    "2.guix.pool.ntp.org"
-    "3.guix.pool.ntp.org"))
-
 \f
 ;;;
 ;;; NTP.
 ;;;
 
-;; TODO: Export.
+(define ntp-server-types (make-enumeration
+                          '(pool
+                            server
+                            peer
+                            broadcast
+                            manycastclient)))
+
+(define-record-type* <ntp-server>
+  ntp-server make-ntp-server
+  ntp-server?
+  ;; The type can be one of the symbols of the NTP-SERVER-TYPE? enumeration.
+  (type ntp-server-type
+        (default 'server))
+  (address ntp-server-address)    ; a string
+  ;; The list of options can contain single option names or tuples in the form
+  ;; '(name value).
+  (options ntp-server-options
+           (default '())))
+
+(define (ntp-server->string ntp-server)
+  ;; Serialize the NTP server object as a string, ready to use in the NTP
+  ;; configuration file.
+  (define (flatten lst)
+    (reverse
+     (let loop ((x lst)
+                (res '()))
+       (if (list? x)
+           (fold loop res x)
+           (cons (format #f "~s" x) res)))))
+
+  (match ntp-server
+    (($ <ntp-server> type address options)
+     ;; XXX: It'd be neater if fields were validated at the syntax level (for
+     ;; static ones at least).  Perhaps the Guix record type could support a
+     ;; predicate property on a field?
+     (unless (enum-set-member? type ntp-server-types)
+       (error "Invalid NTP server type" type))
+     (string-join (cons* (symbol->string type)
+                         address
+                         (flatten options))))))
+
+(define %ntp-servers
+  ;; Default set of NTP servers. These URLs are managed by the NTP Pool project.
+  ;; Within Guix, Leo Famulari <leo@famulari.name> is the administrative contact
+  ;; for this NTP pool "zone".
+  (list
+   (ntp-server
+    (type 'pool)
+    (address "0.guix.pool.ntp.org")
+    (options '("iburst")))))               ;as recommended in the ntpd manual
+
 (define-record-type* <ntp-configuration>
   ntp-configuration make-ntp-configuration
   ntp-configuration?
   (ntp      ntp-configuration-ntp
             (default ntp))
-  (servers  ntp-configuration-servers
+  (servers  %ntp-configuration-servers   ;list of <ntp-server> objects
             (default %ntp-servers))
   (allow-large-adjustment? ntp-allow-large-adjustment?
                            (default #t))) ;as recommended in the ntpd manual
 
+(define (ntp-configuration-servers ntp-configuration)
+  ;; A wrapper to support the deprecated form of this field.
+  (let ((ntp-servers (%ntp-configuration-servers ntp-configuration)))
+    (match ntp-servers
+      (((? string?) (? string?) ...)
+       (format (current-error-port) "warning: Defining NTP servers as strings is \
+deprecated.  Please use <ntp-server> records instead.\n")
+       (map (lambda (addr)
+              (ntp-server
+               (type 'server)
+               (address addr)
+               (options '()))) ntp-servers))
+      ((($ <ntp-server>) ($ <ntp-server>) ...)
+       ntp-servers))))
+
 (define ntp-shepherd-service
   (match-lambda
     (($ <ntp-configuration> ntp servers allow-large-adjustment?)
@@ -324,8 +389,7 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
        ;; TODO: Add authentication support.
        (define config
          (string-append "driftfile /var/run/ntpd/ntp.drift\n"
-                        (string-join (map (cut string-append "server " <>)
-                                          servers)
+                        (string-join (map ntp-server->string servers)
                                      "\n")
                         "
 # Disable status queries as a workaround for CVE-2013-5211:
@@ -335,7 +399,11 @@ restrict -6 default kod nomodify notrap nopeer noquery limited
 
 # Yet, allow use of the local 'ntpq'.
 restrict 127.0.0.1
-restrict -6 ::1\n"))
+restrict -6 ::1
+
+# This is required to use servers from a pool directive when using the 'nopeer'
+# option by default, as documented in the 'ntp.conf' manual.
+restrict source notrap nomodify noquery\n"))
 
        (define ntpd.conf
          (plain-file "ntpd.conf" config))
diff --git a/tests/networking.scm b/tests/networking.scm
new file mode 100644
index 0000000000..001d7df74d
--- /dev/null
+++ b/tests/networking.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (tests networking)
+  #:use-module (gnu services networking)
+  #:use-module (srfi srfi-64))
+
+;;; Tests for the (gnu services networking) module.
+
+(define ntp-server->string (@@ (gnu services networking) ntp-server->string))
+
+(define %ntp-server-sample
+  (ntp-server
+   (type 'server)
+   (address "some.ntp.server.org")
+   (options `(iburst (version 3) (maxpoll 16) prefer))))
+
+(test-begin "networking")
+
+(test-equal "ntp-server->string"
+  (ntp-server->string %ntp-server-sample)
+  "server some.ntp.server.org iburst version 3 maxpoll 16 prefer")
+
+(test-equal "ntp configuration servers deprecated form"
+  (ntp-configuration-servers
+   (ntp-configuration
+    (servers (list (ntp-server
+                    (type 'server)
+                    (address "example.pool.ntp.org")
+                    (options '()))))))
+  (ntp-configuration-servers
+   (ntp-configuration
+    (servers (list "example.pool.ntp.org")))))
+
+(test-end "networking")
-- 
2.23.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#37295] [PATCHv2] services: ntp: Support different NTP server types and options.
       [not found] ` <handler.37295.B.15675133271882.ack@debbugs.gnu.org>
@ 2019-09-04  0:25   ` Maxim Cournoyer
  2019-09-05  7:09     ` Efraim Flashner
  0 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2019-09-04  0:25 UTC (permalink / raw)
  To: 37295


[-- Attachment #1.1: Type: text/plain, Size: 116 bytes --]

Hello,

I had forgotten to register the new test module in the file Makefile.am.

Attached is the corrected patch.


[-- Attachment #1.2: 0001-services-ntp-Support-different-NTP-server-types-and-.patch --]
[-- Type: text/x-patch, Size: 11247 bytes --]

From 0287d5c51a0f257cc9c1df4034001d795c155dd7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 3 Sep 2019 10:14:59 +0900
Subject: [PATCH] services: ntp: Support different NTP server types and
 options.

* gnu/services/networking.scm (ntp-server-types): New enum.
(<ntp-server>): New record type.
(ntp-server->string): New procedure.
(%ntp-servers): Define in terms of <htp-server> records.  Use the first
entrypoint server as a pool instead of a list of static servers.  This is more
resilient since a new server of the pool can be interrogated on every
request.  Add the 'iburst' options.
(ntp-configuration-servers): Define a custom accessor that warns but honors
the now deprecated server format.
(<ntp-configuration>): Use it.
* tests/networking.scm: New file.
* Makefile.am (SCM_TESTS): Register it.
* doc/guix.texi: Update documentation.
---
 Makefile.am                 |   1 +
 doc/guix.texi               |  31 ++++++++++-
 gnu/services/networking.scm | 100 ++++++++++++++++++++++++++++++------
 tests/networking.scm        |  50 ++++++++++++++++++
 4 files changed, 164 insertions(+), 18 deletions(-)
 create mode 100644 tests/networking.scm

diff --git a/Makefile.am b/Makefile.am
index fa6bf8fe80..32d518acbd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -399,6 +399,7 @@ SCM_TESTS =					\
   tests/modules.scm				\
   tests/monads.scm				\
   tests/nar.scm				\
+  tests/networking.scm				\
   tests/opam.scm				\
   tests/packages.scm				\
   tests/pack.scm				\
diff --git a/doc/guix.texi b/doc/guix.texi
index 9de0957d14..e76c9322d8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12988,8 +12988,9 @@ This is the data type for the NTP service configuration.
 
 @table @asis
 @item @code{servers} (default: @code{%ntp-servers})
-This is the list of servers (host names) with which @command{ntpd} will be
-synchronized.
+This is the list of servers (@code{<ntp-server>} records) with which
+@command{ntpd} will be synchronized.  See the @code{ntp-server} data type
+definition below.
 
 @item @code{allow-large-adjustment?} (default: @code{#t})
 This determines whether @command{ntpd} is allowed to make an initial
@@ -13005,6 +13006,32 @@ List of host names used as the default NTP servers.  These are servers of the
 @uref{https://www.ntppool.org/en/, NTP Pool Project}.
 @end defvr
 
+@deftp {Data Type} ntp-server
+The data type representing the configuration of a NTP server.
+
+@table @asis
+@item @code{type} (default: @code{'server})
+The type of the NTP server, given as a symbol. One of @code{'pool},
+@code{'server}, @code{'peer}, @code{'broadcast} or @code{'manycastclient}.
+
+@item @code{address}
+The address of the server, as a string.
+
+@item @code{options}
+NTPD options to use with that specific server, given as a list of option names
+and/or of option names and values tuples. The following example define a server
+to use with the options @option{iburst} and @option{prefer}, as well as
+@option{version} 3 and a @option{maxpoll} time of 16 seconds.
+
+@example
+(ntp-server
+ (type 'server)
+ (address "some.ntp.server.org")
+ (options `(iburst (version 3) (maxpoll 16) prefer))))
+@end example
+@end table
+@end deftp
+
 @cindex OpenNTPD
 @deffn {Scheme Procedure} openntpd-service-type
 Run the @command{ntpd}, the Network Time Protocol (NTP) daemon, as implemented
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 13a5c6c98d..752a165941 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -51,6 +51,7 @@
   #:use-module (guix records)
   #:use-module (guix modules)
   #:use-module (guix deprecation)
+  #:use-module (rnrs enums)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-26)
@@ -72,10 +73,18 @@
             dhcpd-configuration-pid-file
             dhcpd-configuration-interfaces
 
-            %ntp-servers
-
             ntp-configuration
             ntp-configuration?
+            ntp-configuration-ntp
+            ntp-configuration-servers
+            ntp-allow-large-adjustment?
+
+            %ntp-servers
+            ntp-server
+            ntp-server-type
+            ntp-server-address
+            ntp-server-options
+
             ntp-service
             ntp-service-type
 
@@ -292,31 +301,87 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
     (list (service-extension shepherd-root-service-type dhcpd-shepherd-service)
           (service-extension activation-service-type dhcpd-activation)))))
 
-(define %ntp-servers
-  ;; Default set of NTP servers. These URLs are managed by the NTP Pool project.
-  ;; Within Guix, Leo Famulari <leo@famulari.name> is the administrative contact
-  ;; for this NTP pool "zone".
-  '("0.guix.pool.ntp.org"
-    "1.guix.pool.ntp.org"
-    "2.guix.pool.ntp.org"
-    "3.guix.pool.ntp.org"))
-
 \f
 ;;;
 ;;; NTP.
 ;;;
 
-;; TODO: Export.
+(define ntp-server-types (make-enumeration
+                          '(pool
+                            server
+                            peer
+                            broadcast
+                            manycastclient)))
+
+(define-record-type* <ntp-server>
+  ntp-server make-ntp-server
+  ntp-server?
+  ;; The type can be one of the symbols of the NTP-SERVER-TYPE? enumeration.
+  (type ntp-server-type
+        (default 'server))
+  (address ntp-server-address)    ; a string
+  ;; The list of options can contain single option names or tuples in the form
+  ;; '(name value).
+  (options ntp-server-options
+           (default '())))
+
+(define (ntp-server->string ntp-server)
+  ;; Serialize the NTP server object as a string, ready to use in the NTP
+  ;; configuration file.
+  (define (flatten lst)
+    (reverse
+     (let loop ((x lst)
+                (res '()))
+       (if (list? x)
+           (fold loop res x)
+           (cons (format #f "~s" x) res)))))
+
+  (match ntp-server
+    (($ <ntp-server> type address options)
+     ;; XXX: It'd be neater if fields were validated at the syntax level (for
+     ;; static ones at least).  Perhaps the Guix record type could support a
+     ;; predicate property on a field?
+     (unless (enum-set-member? type ntp-server-types)
+       (error "Invalid NTP server type" type))
+     (string-join (cons* (symbol->string type)
+                         address
+                         (flatten options))))))
+
+(define %ntp-servers
+  ;; Default set of NTP servers. These URLs are managed by the NTP Pool project.
+  ;; Within Guix, Leo Famulari <leo@famulari.name> is the administrative contact
+  ;; for this NTP pool "zone".
+  (list
+   (ntp-server
+    (type 'pool)
+    (address "0.guix.pool.ntp.org")
+    (options '("iburst")))))               ;as recommended in the ntpd manual
+
 (define-record-type* <ntp-configuration>
   ntp-configuration make-ntp-configuration
   ntp-configuration?
   (ntp      ntp-configuration-ntp
             (default ntp))
-  (servers  ntp-configuration-servers
+  (servers  %ntp-configuration-servers   ;list of <ntp-server> objects
             (default %ntp-servers))
   (allow-large-adjustment? ntp-allow-large-adjustment?
                            (default #t))) ;as recommended in the ntpd manual
 
+(define (ntp-configuration-servers ntp-configuration)
+  ;; A wrapper to support the deprecated form of this field.
+  (let ((ntp-servers (%ntp-configuration-servers ntp-configuration)))
+    (match ntp-servers
+      (((? string?) (? string?) ...)
+       (format (current-error-port) "warning: Defining NTP servers as strings is \
+deprecated.  Please use <ntp-server> records instead.\n")
+       (map (lambda (addr)
+              (ntp-server
+               (type 'server)
+               (address addr)
+               (options '()))) ntp-servers))
+      ((($ <ntp-server>) ($ <ntp-server>) ...)
+       ntp-servers))))
+
 (define ntp-shepherd-service
   (match-lambda
     (($ <ntp-configuration> ntp servers allow-large-adjustment?)
@@ -324,8 +389,7 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
        ;; TODO: Add authentication support.
        (define config
          (string-append "driftfile /var/run/ntpd/ntp.drift\n"
-                        (string-join (map (cut string-append "server " <>)
-                                          servers)
+                        (string-join (map ntp-server->string servers)
                                      "\n")
                         "
 # Disable status queries as a workaround for CVE-2013-5211:
@@ -335,7 +399,11 @@ restrict -6 default kod nomodify notrap nopeer noquery limited
 
 # Yet, allow use of the local 'ntpq'.
 restrict 127.0.0.1
-restrict -6 ::1\n"))
+restrict -6 ::1
+
+# This is required to use servers from a pool directive when using the 'nopeer'
+# option by default, as documented in the 'ntp.conf' manual.
+restrict source notrap nomodify noquery\n"))
 
        (define ntpd.conf
          (plain-file "ntpd.conf" config))
diff --git a/tests/networking.scm b/tests/networking.scm
new file mode 100644
index 0000000000..001d7df74d
--- /dev/null
+++ b/tests/networking.scm
@@ -0,0 +1,50 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (tests networking)
+  #:use-module (gnu services networking)
+  #:use-module (srfi srfi-64))
+
+;;; Tests for the (gnu services networking) module.
+
+(define ntp-server->string (@@ (gnu services networking) ntp-server->string))
+
+(define %ntp-server-sample
+  (ntp-server
+   (type 'server)
+   (address "some.ntp.server.org")
+   (options `(iburst (version 3) (maxpoll 16) prefer))))
+
+(test-begin "networking")
+
+(test-equal "ntp-server->string"
+  (ntp-server->string %ntp-server-sample)
+  "server some.ntp.server.org iburst version 3 maxpoll 16 prefer")
+
+(test-equal "ntp configuration servers deprecated form"
+  (ntp-configuration-servers
+   (ntp-configuration
+    (servers (list (ntp-server
+                    (type 'server)
+                    (address "example.pool.ntp.org")
+                    (options '()))))))
+  (ntp-configuration-servers
+   (ntp-configuration
+    (servers (list "example.pool.ntp.org")))))
+
+(test-end "networking")
-- 
2.23.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#37295] [PATCHv2] services: ntp: Support different NTP server types and options.
  2019-09-04  0:25   ` [bug#37295] [PATCHv2] " Maxim Cournoyer
@ 2019-09-05  7:09     ` Efraim Flashner
  2019-09-03  8:04       ` [bug#37295] [PATCHv3] " Maxim Cournoyer
  0 siblings, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2019-09-05  7:09 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 37295

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

Can you check how this affects the openntpd service? It currently also
uses %ntp-servers


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37295] [PATCHv3] services: ntp: Support different NTP server types and options.
  2019-09-03  8:04       ` [bug#37295] [PATCHv3] " Maxim Cournoyer
@ 2019-09-06 10:46         ` Efraim Flashner
  2019-09-07  4:27           ` Maxim Cournoyer
  0 siblings, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2019-09-06 10:46 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 37295

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

I like the changes to the openntpd service in relation to the other
changes.


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37295] [PATCHv3] services: ntp: Support different NTP server types and options.
  2019-09-06 10:46         ` Efraim Flashner
@ 2019-09-07  4:27           ` Maxim Cournoyer
  2019-09-08  8:06             ` Efraim Flashner
  0 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2019-09-07  4:27 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 37295

Efraim Flashner <efraim@flashner.co.il> writes:

> I like the changes to the openntpd service in relation to the other
> changes.

Great!  I'll be awaiting an OK or let some time pass (2 weeks from now)
before I merge these patches into master.

You may want to check out the fixes I did to the openntp package/service
here as well: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37318.

Thank you,

Maxim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37295] [PATCHv3] services: ntp: Support different NTP server types and options.
  2019-09-07  4:27           ` Maxim Cournoyer
@ 2019-09-08  8:06             ` Efraim Flashner
  2019-09-08 14:19               ` bug#37295: " Maxim Cournoyer
  0 siblings, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2019-09-08  8:06 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 37295

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

On Sat, Sep 07, 2019 at 01:27:15PM +0900, Maxim Cournoyer wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > I like the changes to the openntpd service in relation to the other
> > changes.
> 
> Great!  I'll be awaiting an OK or let some time pass (2 weeks from now)
> before I merge these patches into master.
> 
> You may want to check out the fixes I did to the openntp package/service
> here as well: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37318.
> 

This looks good to me!

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#37295: [PATCHv3] services: ntp: Support different NTP server types and options.
  2019-09-08  8:06             ` Efraim Flashner
@ 2019-09-08 14:19               ` Maxim Cournoyer
  0 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2019-09-08 14:19 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 37295-done

Hi!

Efraim Flashner <efraim@flashner.co.il> writes:

> On Sat, Sep 07, 2019 at 01:27:15PM +0900, Maxim Cournoyer wrote:
>> Efraim Flashner <efraim@flashner.co.il> writes:
>> 
>> > I like the changes to the openntpd service in relation to the other
>> > changes.
>> 
>> Great!  I'll be awaiting an OK or let some time pass (2 weeks from now)
>> before I merge these patches into master.
>> 
>> You may want to check out the fixes I did to the openntp package/service
>> here as well: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37318.
>> 
>
> This looks good to me!

Thanks for the quick feedback; I've merged this into master with commit
5658ae8a0a.

Maxim

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-08 14:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 12:21 [bug#37295] [PATCH] services: ntp: Support different NTP server types and options maxim.cournoyer
     [not found] ` <handler.37295.B.15675133271882.ack@debbugs.gnu.org>
2019-09-04  0:25   ` [bug#37295] [PATCHv2] " Maxim Cournoyer
2019-09-05  7:09     ` Efraim Flashner
2019-09-03  8:04       ` [bug#37295] [PATCHv3] " Maxim Cournoyer
2019-09-06 10:46         ` Efraim Flashner
2019-09-07  4:27           ` Maxim Cournoyer
2019-09-08  8:06             ` Efraim Flashner
2019-09-08 14:19               ` bug#37295: " Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.