From 16718b6776b6cb918cddb3abb3bfcf2405b0b297 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 28 Nov 2017 10:19:11 +0200 Subject: services: Add openntpd service. * gnu/packages/ntp.scm (openntpd)[arguments]: Add 'configure-flags to set openntpd daemon's user and localstatedir. Add a custom phase to not try to create said directory at install time. * gnu/services/networking.scm (): New record type. (openntpd-shepherd-service, openntpd-service-activation): New procedures. (openntpd-service-type): New variable. * doc/guix.texi (Networking Services): Add openntpd documentation. --- gnu/packages/ntp.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/packages/ntp.scm') diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm index d270f513dc..1c3b8cd313 100644 --- a/gnu/packages/ntp.scm +++ b/gnu/packages/ntp.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Ludovic Courtès -;;; Copyright © 2016, 2017 Efraim Flashner +;;; Copyright © 2016, 2017, 2018 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -107,6 +107,17 @@ computers over a network.") (base32 "0fn12i4kzsi0zkr4qp3dp9bycmirnfapajqvdfx02zhr4hanj0kv")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--with-privsep-user=ntpd" + "--localstatedir=/var") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'modify-install-locations + (lambda _ + ;; Don't try to create /var/run or /var/db + (substitute* "src/Makefile.in" + (("DESTDIR\\)\\$\\(localstatedir") "TMPDIR")) + #t))))) (inputs `(("libressl" ,libressl))) ; enable TLS time constraints. See ntpd.conf(5). (home-page "http://www.openntpd.org/") -- cgit v1.2.3