From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecgTR-0001sT-Ux for guix-patches@gnu.org; Fri, 19 Jan 2018 18:54:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecgT1-0000lr-9e for guix-patches@gnu.org; Fri, 19 Jan 2018 18:53:29 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecgT1-0000l4-2d for guix-patches@gnu.org; Fri, 19 Jan 2018 18:53:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecgT0-0004Cc-H4 for guix-patches@gnu.org; Fri, 19 Jan 2018 18:53:02 -0500 Subject: [bug#29483] [PATCH] services: Add openntpd service. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20171128090443.15544-1-efraim@flashner.co.il> <87lgimiwc2.fsf@gnu.org> Date: Sat, 20 Jan 2018 00:52:15 +0100 In-Reply-To: <87lgimiwc2.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 01 Dec 2017 11:19:57 +0100") Message-ID: <87k1wdh0eo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Efraim Flashner Cc: 29483@debbugs.gnu.org Ping again! :-) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Hello! > > Efraim Flashner 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 (): New record typ= e. >> (openntpd-shepherd-service, openntpd-service-activation): New procedures. >> (openntpd-service-type): New variable. >> * doc/guix.texi (Networking Services): Add openntpd documentation. > > Nice! > >> +@cindex Openntpd > > =E2=80=9COpenNTPD=E2=80=9D maybe? Or all lower case? > >> +@deffn {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 >> +@uref{http://www.openntpd.org, OpenNTPD package}. The daemon will >> +keep the system clock synchronized with that of @var{servers}. >> +@var{allow-large-adjustment?} determines whether @command{ntpd} is allo= wed to >> +make an initial adjustment of more than 180 seconds." >> +@end deffn > > The convention now is to expose and document the configuration record > type and the service type, and to not provide a =E2=80=9Cfoo-service=E2= =80=9D procedure. > > Could you adjust accordingly? > >> +(define-record-type* >> + 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 =E2=80=98ntpd=E2=80=99 so that it conflicts w= ith 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 (NT= P) >> +daemon of the @uref{http://www.ntp.org, Network Time Foundation}, as > ^---- remove -------------------------------------------^ >> +implemented by OpenNTPD. The daemon will keep the system clock synchro= nized >> +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=E2=80=99.