[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29483] [PATCH] services: Add openntpd service.
From: |
Ludovic Courtès |
Subject: |
[bug#29483] [PATCH] services: Add openntpd service. |
Date: |
Fri, 01 Dec 2017 11:19:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello!
Efraim Flashner <address@hidden> skribis:
> * gnu/packages/ntp.scm (openntpd)[arguments]: Add 'configure-flags to
> set openntpd daemon's user and protected path. Add a custom phase to not
> try to create said directory at install time.
> * gnu/services/networking.scm (<openntpd-configuration>): New record type.
> (openntpd-shepherd-service, openntpd-service-activation): New procedures.
> (openntpd-service-type): New variable.
> * doc/guix.texi (Networking Services): Add openntpd documentation.
Nice!
> address@hidden Openntpd
“OpenNTPD” maybe? Or all lower case?
> address@hidden {Scheme Procedure} openntpd-service [#:openntpd
> @var{openntpd}] @
> + [#:servers @var{%ntp-servers}] @
> + [#:allow-large-adjustment? #f]
> +Return a service that runs the daemon from @var{openntpd}, the
> address@hidden://www.openntpd.org, OpenNTPD package}. The daemon will
> +keep the system clock synchronized with that of @var{servers}.
> address@hidden determines whether @command{ntpd} is allowed to
> +make an initial adjustment of more than 180 seconds."
> address@hidden deffn
The convention now is to expose and document the configuration record
type and the service type, and to not provide a “foo-service” procedure.
Could you adjust accordingly?
> +(define-record-type* <openntpd-configuration>
> + openntpd-configuration make-openntpd-configuration
> + openntpd-configuration?
> + (openntpd openntpd-configuration-openntpd
> + (default openntpd))
> + (servers openntpd-configuration-servers)
Probably with: (default %ntp-servers).
> +# Only listen on localhost
> +listen on 127.0.0.1
> +listen on ::1
> +
> +# Query the 'Date' from trusted HTTPS servers via TLS.
> +constraint from www.gnu.org\n"))
It would be nice to make that constraint server configurable too (not a
blocker though).
> + (list (shepherd-service
> + (provision '(openntpd))
Perhaps we should make that ‘ntpd’ so that it conflicts with the other
ntpd.
> +(define openntpd-service-type
> + (service-type (name 'openntpd)
> + (extensions
> + (list (service-extension shepherd-root-service-type
> + openntpd-shepherd-service)
> + (service-extension account-service-type
> + (const %ntp-accounts))
Are you sure that it uses those accounts?
> + "Run the @command{ntpd}, the Network Time Protocol (NTP)
> +daemon of the @uref{http://www.ntp.org, Network Time Foundation}, as
^---- remove -------------------------------------------^
> +implemented by OpenNTPD. The daemon will keep the system clock synchronized
> +with that of the given servers.")))
> +
> +(define* (openntpd-service #:key (openntpd openntpd)
> + (servers %ntp-servers)
> + allow-large-adjustment?)
Remove.
Could you send an updated patch?
Thank you!
Ludo’.
- [bug#29483] [PATCH] services: Add openntpd service.,
Ludovic Courtès <=