From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZkeo-0006nc-Pd for guix-patches@gnu.org; Thu, 11 Jan 2018 16:45:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZkek-0005lA-Vn for guix-patches@gnu.org; Thu, 11 Jan 2018 16:45:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:44669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZkek-0005l4-Rs for guix-patches@gnu.org; Thu, 11 Jan 2018 16:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eZkek-0002uX-KN for guix-patches@gnu.org; Thu, 11 Jan 2018 16:45: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: Thu, 11 Jan 2018 22:44:03 +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: <87tvvsm5p8.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! Let=E2=80=99s not let bitdust settle on this patch! Ludo=E2=80=99. 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.