From 8af4c335e32fbed7556a4cd7f26f93bc66afaace Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 31 Dec 2018 00:39:02 +0100 Subject: services: Add docker. * gnu/services/docker.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document the service. --- gnu/services/docker.scm | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 gnu/services/docker.scm (limited to 'gnu/services') diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm new file mode 100644 index 0000000000..6d270831b3 --- /dev/null +++ b/gnu/services/docker.scm @@ -0,0 +1,94 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services docker) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:use-module (gnu packages docker) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + + #:export (docker-configuration + docker-service-type)) + +(define-configuration docker-configuration + (docker + (package docker) + "Docker daemon package.") + (containerd + (package containerd) + "containerd package.")) + +(define %docker-accounts + (list (user-group (name "docker") (system? #t)))) + +(define (%containerd-activation config) + (let ((state-dir "/var/lib/containerd")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (%docker-activation config) + (%containerd-activation config) + (let ((state-dir "/var/lib/docker")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (containerd-shepherd-service config) + (let* ((package (docker-configuration-containerd config))) + (shepherd-service + (documentation "containerd daemon.") + (provision '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/containerd")))) + (stop #~(make-kill-destructor))))) + +(define (docker-shepherd-service config) + (let* ((docker (docker-configuration-docker config))) + (shepherd-service + (documentation "Docker daemon.") + (provision '(dockerd)) + (requirement '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$docker "/bin/dockerd") + "-p" "/var/run/docker.pid") + #:pid-file "/var/run/docker.pid" + #:log-file "/var/log/docker.log")) + (stop #~(make-kill-destructor))))) + +(define docker-service-type + (service-type (name 'docker) + (description "Provide capability to run Docker application +bundles in Docker containers.") + (extensions + (list + (service-extension activation-service-type + %docker-activation) + (service-extension shepherd-root-service-type + (lambda args + (list (apply containerd-shepherd-service args) + (apply docker-shepherd-service args)))) + (service-extension account-service-type + (const %docker-accounts)))) + (default-value (docker-configuration)))) -- cgit v1.2.3 From f0bfd0fc217a9af44b122f4e3cdf389a74594096 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 10 Jan 2019 03:54:28 +0100 Subject: services: docker: Specify log file for containerd. * gnu/services/docker.scm (containerd-shepherd-service): Specify log file for containerd. --- gnu/services/docker.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 6d270831b3..c88fc342e8 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -61,7 +61,8 @@ (documentation "containerd daemon.") (provision '(containerd)) (start #~(make-forkexec-constructor - (list (string-append #$package "/bin/containerd")))) + (list (string-append #$package "/bin/containerd")) + #:log-file "/var/log/containerd.log")) (stop #~(make-kill-destructor))))) (define (docker-shepherd-service config) -- cgit v1.2.3 From f946a370edbf65baab41e8373e25157da5029a88 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 10 Jan 2019 05:14:43 +0100 Subject: services: docker: Depend on elogind. * gnu/services/docker.scm (docker-shepherd-service)[requirement]: Add elogind. --- gnu/services/docker.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index c88fc342e8..9e24bcd950 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -70,7 +70,8 @@ (shepherd-service (documentation "Docker daemon.") (provision '(dockerd)) - (requirement '(containerd)) + ;; Note: elogind is required because it's mounting the cgroups. + (requirement '(containerd elogind)) (start #~(make-forkexec-constructor (list (string-append #$docker "/bin/dockerd") "-p" "/var/run/docker.pid") -- cgit v1.2.3 From 01b3625df6721d27c0b224ee9e58d8edf2cbc4ce Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 9 Jan 2019 22:52:16 +0100 Subject: services: gdm: Add default value. * gnu/services/xorg.scm ()[x-server]: Add default value. (gdm-service-type)[default-value, description]: New fields. (gdm-service): Mark as deprecated. --- gnu/services/xorg.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index b3c24746d1..4d1674f063 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Andy Wingo -;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2018 Timothy Sample ;;; @@ -628,7 +628,8 @@ makes the good ol' XlockMore usable." (allow-empty-passwords? gdm-configuration-allow-empty-passwords? (default #t)) (auto-login? gdm-configuration-auto-login? (default #f)) (default-user gdm-configuration-default-user (default #f)) - (x-server gdm-configuration-x-server)) + (x-server gdm-configuration-x-server + (default (xorg-wrapper)))) (define (gdm-etc-service config) (define gdm-configuration-file @@ -719,12 +720,17 @@ makes the good ol' XlockMore usable." (service-extension etc-service-type gdm-etc-service) (service-extension dbus-root-service-type - (compose list gdm-configuration-gdm)))))) + (compose list + gdm-configuration-gdm)))) + (default-value (gdm-configuration)) + (description + "Run the GNOME Desktop Manager (GDM), a program that allows +you to log in in a graphical session, whether or not you use GNOME."))) ;; This service isn't working yet; it gets as far as starting to run the ;; greeter from gnome-shell but doesn't get any further. It is here because ;; it doesn't hurt anyone and perhaps it inspires someone to fix it :) -(define* (gdm-service #:key (gdm gdm) +(define* (gdm-service #:key (gdm gdm) ;deprecated (allow-empty-passwords? #t) (x-server (xorg-wrapper))) "Return a service that spawns the GDM graphical login manager, which in turn -- cgit v1.2.3 From 65a67bf711b14bc7200f6730c0f173375ca12974 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 10 Jan 2019 14:50:09 +0100 Subject: services: Use 'define-deprecated' for service procedures. * gnu/services/base.scm (urandom-seed-service, gpm-service): Define using 'define-deprecated'. * gnu/services/messaging.scm (bitlbee-service): Likewise. * gnu/services/networking.scm (dhcp-client-service): Likewise. (ntp-service): Likewise. * gnu/services/xorg.scm (slim-service): Likewise. (gdm-service): Likewise. --- gnu/services/base.scm | 13 ++++++++----- gnu/services/messaging.scm | 10 ++++++---- gnu/services/networking.scm | 13 ++++++++----- gnu/services/xorg.scm | 25 ++++++++++++++----------- 4 files changed, 36 insertions(+), 25 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 67bdaef18c..6e99cbfec4 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2015, 2016 Alex Kost ;;; Copyright © 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Sou Bunnbu @@ -25,6 +25,7 @@ (define-module (gnu services base) #:use-module (guix store) + #:use-module (guix deprecation) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system pam) @@ -614,8 +615,9 @@ file systems, as well as corresponding @file{/etc/fstab} entries."))) generator (RNG) with the value recorded when the system was last shut down."))) -(define (urandom-seed-service) ;deprecated - (service urandom-seed-service-type #f)) +(define-deprecated (urandom-seed-service) + urandom-seed-service-type + (service urandom-seed-service-type)) ;;; @@ -2078,8 +2080,9 @@ command-line options. GPM allows users to use the mouse in the console, notably to select, copy, and paste text. The default options use the @code{ps2} protocol, which works for both USB and PS/2 mice."))) -(define* (gpm-service #:key (gpm gpm) ;deprecated - (options %default-gpm-options)) +(define-deprecated (gpm-service #:key (gpm gpm) + (options %default-gpm-options)) + gpm-service-type "Run @var{gpm}, the general-purpose mouse daemon, with the given command-line @var{options}. GPM allows users to use the mouse in the console, notably to select, copy, and paste text. The default value of @var{options} diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 92f86a1b83..e70f1b70ef 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018 Clément Lassieur ;;; Copyright © 2017 Mathieu Othacehe -;;; Copyright © 2015, 2017, 2018 Ludovic Courtès +;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; ;;; This file is part of GNU Guix. @@ -32,6 +32,7 @@ #:use-module (guix modules) #:use-module (guix records) #:use-module (guix packages) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (srfi srfi-35) #:use-module (ice-9 match) @@ -882,9 +883,10 @@ string, you could instantiate a prosody service like this: "Run @url{http://bitlbee.org,BitlBee}, a daemon that acts as a gateway between IRC and chat networks."))) -(define* (bitlbee-service #:key (bitlbee bitlbee) ;deprecated - (interface "127.0.0.1") (port 6667) - (extra-settings "")) +(define-deprecated (bitlbee-service #:key (bitlbee bitlbee) + (interface "127.0.0.1") (port 6667) + (extra-settings "")) + bitlbee-service-type "Return a service that runs @url{http://bitlbee.org,BitlBee}, a daemon that acts as a gateway between IRC and chat networks. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index bfa6e297e6..2f49bf28dd 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016, 2018 Efraim Flashner ;;; Copyright © 2016 John Darrington @@ -45,6 +45,7 @@ #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) @@ -206,7 +207,8 @@ fe80::1%lo0 apps.facebook.com\n") (stop #~(make-kill-destructor)))) isc-dhcp)) -(define* (dhcp-client-service #:key (dhcp isc-dhcp)) ;deprecated +(define-deprecated (dhcp-client-service #:key (dhcp isc-dhcp)) + dhcp-client-service-type "Return a service that runs @var{dhcp}, a Dynamic Host Configuration Protocol (DHCP) client, on all the non-loopback network interfaces." (service dhcp-client-service-type dhcp)) @@ -374,9 +376,10 @@ daemon of the @uref{http://www.ntp.org, Network Time Foundation}. The daemon will keep the system clock synchronized with that of the given servers.") (default-value (ntp-configuration)))) -(define* (ntp-service #:key (ntp ntp) ;deprecated - (servers %ntp-servers) - allow-large-adjustment?) +(define-deprecated (ntp-service #:key (ntp ntp) + (servers %ntp-servers) + allow-large-adjustment?) + ntp-service-type "Return a service that runs the daemon from @var{ntp}, the @uref{http://www.ntp.org, Network Time Protocol package}. The daemon will keep the system clock synchronized with that of @var{servers}. diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 4d1674f063..2f91619219 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -40,6 +40,7 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix records) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) @@ -521,14 +522,15 @@ reboot_cmd " shepherd "/sbin/reboot\n" (const (list xterm))))) (default-value (slim-configuration)))) -(define* (slim-service #:key (slim slim) ;deprecated - (allow-empty-passwords? #t) auto-login? - (default-user "") - (theme %default-slim-theme) - (theme-name %default-slim-theme-name) - (xauth xauth) (shepherd shepherd) - (auto-login-session #f) - (startx (xorg-start-command))) +(define-deprecated (slim-service #:key (slim slim) + (allow-empty-passwords? #t) auto-login? + (default-user "") + (theme %default-slim-theme) + (theme-name %default-slim-theme-name) + (xauth xauth) (shepherd shepherd) + (auto-login-session #f) + (startx (xorg-start-command))) + slim-service-type "Return a service that spawns the SLiM graphical login manager, which in turn starts the X display server with @var{startx}, a command as returned by @code{xorg-start-command}. @@ -730,9 +732,10 @@ you to log in in a graphical session, whether or not you use GNOME."))) ;; This service isn't working yet; it gets as far as starting to run the ;; greeter from gnome-shell but doesn't get any further. It is here because ;; it doesn't hurt anyone and perhaps it inspires someone to fix it :) -(define* (gdm-service #:key (gdm gdm) ;deprecated - (allow-empty-passwords? #t) - (x-server (xorg-wrapper))) +(define-deprecated (gdm-service #:key (gdm gdm) + (allow-empty-passwords? #t) + (x-server (xorg-wrapper))) + gdm-service-type "Return a service that spawns the GDM graphical login manager, which in turn starts the X display server with @var{X}, a command as returned by @code{xorg-wrapper}. -- cgit v1.2.3 From d3a0e74d6a303cd46b0761b5a84c8e8b290e3797 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 10 Jan 2019 14:50:47 +0100 Subject: services: docker: Clarify service-extension shepherd-root-service-type. * gnu/services/docker.scm (docker-service-type)[extensions]: Clarify service-extension shepherd-root-service-type. --- gnu/services/docker.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 9e24bcd950..87931f83f5 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -88,9 +88,9 @@ bundles in Docker containers.") (service-extension activation-service-type %docker-activation) (service-extension shepherd-root-service-type - (lambda args - (list (apply containerd-shepherd-service args) - (apply docker-shepherd-service args)))) + (lambda (config) + (list (containerd-shepherd-service config) + (docker-shepherd-service config)))) (service-extension account-service-type (const %docker-accounts)))) (default-value (docker-configuration)))) -- cgit v1.2.3 From 8b0c1744154f0e9a008c4e4586bfdb0876749139 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 10 Jan 2019 19:16:06 +0100 Subject: services: docker: Use more minimal service requrements. * gnu/services/docker.scm (docker-service-type)[requirement]: Add file-system-/sys/fs/cgroup/blkio, file-system-/sys/fs/cgroup/cpu, file-system-/sys/fs/cgroup/cpuset, file-system-/sys/fs/cgroup/devices, file-system-/sys/fs/cgroup/memory. Remove elogind. --- gnu/services/docker.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 87931f83f5..c84c887612 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -71,7 +71,14 @@ (documentation "Docker daemon.") (provision '(dockerd)) ;; Note: elogind is required because it's mounting the cgroups. - (requirement '(containerd elogind)) + (requirement '(containerd + file-system-/sys/fs/cgroup/blkio + file-system-/sys/fs/cgroup/cpu + file-system-/sys/fs/cgroup/cpuset + file-system-/sys/fs/cgroup/devices + file-system-/sys/fs/cgroup/memory + ; TODO: file-system-/sys/fs/cgroup/pids + )) (start #~(make-forkexec-constructor (list (string-append #$docker "/bin/dockerd") "-p" "/var/run/docker.pid") -- cgit v1.2.3 From 9757b57f4efd13b2fcf5277145231288770d46d0 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Fri, 11 Jan 2019 02:53:28 +0100 Subject: services: docker: Update comment. * gnu/services/docker.scm (docker-shepherd-service): Update comment. --- gnu/services/docker.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index c84c887612..09fe3cc1c3 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -70,7 +70,6 @@ (shepherd-service (documentation "Docker daemon.") (provision '(dockerd)) - ;; Note: elogind is required because it's mounting the cgroups. (requirement '(containerd file-system-/sys/fs/cgroup/blkio file-system-/sys/fs/cgroup/cpu -- cgit v1.2.3 From 84a2de36a10dc2ab80f86e16721cbd228c85279e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 10 Jan 2019 23:33:36 +0100 Subject: services: Deprecate a few more service procedures. These procedures were already either undocumented (and de facto deprecated) or documented as deprecated or redundant. * gnu/services/base.scm (guix-service, guix-publish-service): Mark as deprecated. * gnu/services/mcron.scm (mcron-service): Likewise. * gnu/services/networking.scm (tor-service): Likewise. * doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and adjust example. (Networking Services): Remove 'tor-service'. * gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of 'mcron-service'. * gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of 'tor-service'. * tests/guix-system.sh: Likewise. --- doc/guix.texi | 25 +++++-------------------- gnu/services/base.scm | 8 ++++++-- gnu/services/mcron.scm | 6 ++++-- gnu/services/networking.scm | 7 ++++--- gnu/system/install.scm | 3 ++- gnu/tests/base.scm | 5 +++-- gnu/tests/networking.scm | 2 +- tests/guix-system.sh | 6 ++++-- 8 files changed, 29 insertions(+), 33 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index c0cc8d4169..ed7723c00b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11684,9 +11684,11 @@ gexps to introduce job definitions that are passed to mcron (operating-system ;; @dots{} - (services (cons (mcron-service (list garbage-collector-job - updatedb-job - idutils-job)) + (services (cons (service mcron-service-type + (mcron-configuration + (jobs (list garbage-collector-job + updatedb-job + idutils-job)))) %base-services))) @end lisp @@ -11709,17 +11711,6 @@ also specify the number of tasks to display: # herd schedule mcron 10 @end example -@deffn {Scheme Procedure} mcron-service @var{jobs} [#:mcron @var{mcron}] -Return an mcron service running @var{mcron} that schedules @var{jobs}, a -list of gexps denoting mcron job specifications. - -This is a shorthand for: -@example -(service mcron-service-type - (mcron-configuration (mcron mcron) (jobs jobs))) -@end example -@end deffn - @defvr {Scheme Variable} mcron-service-type This is the type of the @code{mcron} service, whose value is an @code{mcron-configuration} object. @@ -12313,12 +12304,6 @@ Tor} anonymous networking daemon. The service is configured using a @end defvr -@deffn {Scheme Procedure} tor-service [@var{config-file}] [#:tor @var{tor}] -This procedure is deprecated and will be removed in a future release. Return -a service of the @code{tor-service-type} type. @var{config-file} and -@var{tor} have the same meaning as in @code{}. -@end deffn - @deftp {Data Type} tor-configuration @table @asis @item @code{tor} (default: @code{tor}) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 6e99cbfec4..8395a856fc 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1688,7 +1688,9 @@ failed to register public key '~a': ~a~%" key status))))))) (description "Run the build daemon of GNU@tie{}Guix, aka. @command{guix-daemon}."))) -(define* (guix-service #:optional (config %default-guix-configuration)) +(define-deprecated (guix-service #:optional + (config %default-guix-configuration)) + guix-service-type "Return a service that runs the Guix build daemon according to @var{config}." (service guix-service-type config)) @@ -1789,7 +1791,9 @@ failed to register public key '~a': ~a~%" key status))))))) "Add a Shepherd service running @command{guix publish}, a command that allows you to share pre-built binaries with others over HTTP."))) -(define* (guix-publish-service #:key (guix guix) (port 80) (host "localhost")) +(define-deprecated (guix-publish-service #:key (guix guix) + (port 80) (host "localhost")) + guix-publish-service-type "Return a service that runs @command{guix publish} listening on @var{host} and @var{port} (@pxref{Invoking guix publish}). diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 120b663e3e..e4b652b3d4 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017, 2018 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +21,7 @@ #:use-module (gnu services base) #:use-module (gnu services shepherd) #:autoload (gnu packages guile) (mcron) + #:use-module (guix deprecation) #:use-module (guix records) #:use-module (guix gexp) #:use-module (srfi srfi-1) @@ -142,7 +143,8 @@ files." jobs))))) (default-value (mcron-configuration)))) ;empty job list -(define* (mcron-service jobs #:optional (mcron mcron)) +(define-deprecated (mcron-service jobs #:optional (mcron mcron)) + mcron-service-type "Return an mcron service running @var{mcron} that schedules @var{jobs}, a list of gexps denoting mcron job specifications. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 2f49bf28dd..cab129e0c3 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -755,9 +755,10 @@ HiddenServicePort ~a ~a~%" "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define* (tor-service #:optional - (config-file (plain-file "empty" "")) - #:key (tor tor)) +(define-deprecated (tor-service #:optional + (config-file (plain-file "empty" "")) + #:key (tor tor)) + tor-service-type "Return a service to run the @uref{https://torproject.org, Tor} anonymous networking daemon. diff --git a/gnu/system/install.scm b/gnu/system/install.scm index c345ba0626..19a6f6a038 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -253,7 +253,8 @@ You have been warned. Thanks for being so brave.\x1b[0m ;; The build daemon. Register the official server keys as trusted. ;; This allows the installation process to use substitutes by ;; default. - (guix-service (guix-configuration (authorize-key? #t))) + (service guix-service-type + (guix-configuration (authorize-key? #t))) ;; Start udev so that useful device nodes are available. ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 8d4e218a8f..2b20aac1dc 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017, 2018 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2018 Clément Lassieur ;;; ;;; This file is part of GNU Guix. @@ -627,7 +627,8 @@ non-ASCII names from /tmp.") (job3 #~(job next-second-from ;to test $PATH "touch witness-touch"))) (simple-operating-system - (mcron-service (list job1 job2 job3))))) + (service mcron-service-type + (mcron-configuration (jobs (list job1 job2 job3))))))) (define (run-mcron-test name) (define os diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm index 9f12a4ae8d..a97b29bc4b 100644 --- a/gnu/tests/networking.scm +++ b/gnu/tests/networking.scm @@ -351,7 +351,7 @@ subnet 192.168.1.0 netmask 255.255.255.0 { (define %tor-os (simple-operating-system - (tor-service))) + (service tor-service-type))) (define %tor-os/unix-socks-socket (simple-operating-system diff --git a/tests/guix-system.sh b/tests/guix-system.sh index 23d2da4903..adb623d244 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès +# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès # Copyright © 2017 Tobias Geerinckx-Rice # Copyright © 2018 Chris Marusich # @@ -258,7 +258,9 @@ cat > "$tmpdir/config.scm"<