summaryrefslogtreecommitdiff
path: root/gnu/packages/ntp.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-11-28 10:19:11 +0200
committerEfraim Flashner <efraim@flashner.co.il>2018-03-05 08:46:28 +0200
commit16718b6776b6cb918cddb3abb3bfcf2405b0b297 (patch)
tree9da028eaa620061ef84a7236a21bbd4261f4180f /gnu/packages/ntp.scm
parentac1a9ce8b07f3b80900ee08436ff6e683e8dc195 (diff)
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 (<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.
Diffstat (limited to 'gnu/packages/ntp.scm')
-rw-r--r--gnu/packages/ntp.scm13
1 files changed, 12 insertions, 1 deletions
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 <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; 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/")