[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/23: services: mail: Deprecate 'dovecot-service' procedure.
From: |
guix-commits |
Subject: |
19/23: services: mail: Deprecate 'dovecot-service' procedure. |
Date: |
Fri, 3 Mar 2023 12:07:27 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit c6cbce9ad8ee5fa7b51d8abea83ddc3dd07fa3c6
Author: Bruno Victal <mirai@makinata.eu>
AuthorDate: Sat Feb 25 18:58:08 2023 +0000
services: mail: Deprecate 'dovecot-service' procedure.
* doc/guix.texi (Mail Services): Replace 'dovecot-service' with
'dovecot-service-type'.
* gnu/services/mail.scm (dovecot-service-type): Set default value.
(dovecot-service): Deprecate procedure.
* gnu/tests/mail.scm (%dovecot-os): Use dovecot-service-type.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
doc/guix.texi | 13 +++++++------
gnu/services/mail.scm | 9 ++++++---
gnu/tests/mail.scm | 20 ++++++++++----------
3 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index dabd71f18c..af15894d49 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -24709,9 +24709,10 @@ in the subsections below.
@subsubheading Dovecot Service
-@deffn {Scheme Procedure} dovecot-service [#:config (dovecot-configuration)]
-Return a service that runs the Dovecot IMAP/POP3/LMTP mail server.
-@end deffn
+@defvar dovecot-service-type
+Type for the service that runs the Dovecot IMAP/POP3/LMTP mail server,
+whose value is a @code{<dovecot-configuration>} object.
+@end defvar
By default, Dovecot does not need much configuration; the default
configuration object created by @code{(dovecot-configuration)} will
@@ -24726,9 +24727,9 @@ For example, to specify that mail is located at
@code{maildir~/.mail},
one would instantiate the Dovecot service like this:
@lisp
-(dovecot-service #:config
- (dovecot-configuration
- (mail-location "maildir:~/.mail")))
+(service dovecot-service-type
+ (dovecot-configuration
+ (mail-location "maildir:~/.mail")))
@end lisp
The available configuration parameters follow. Each parameter
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 6f588679b1..bf4948dcfb 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -35,6 +35,7 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages dav)
#:use-module (gnu packages tls)
+ #:use-module (guix deprecation)
#:use-module (guix modules)
#:use-module (guix records)
#:use-module (guix packages)
@@ -42,7 +43,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 format)
#:use-module (srfi srfi-1)
- #:export (dovecot-service
+ #:export (dovecot-service ; deprecated
dovecot-service-type
dovecot-configuration
opaque-dovecot-configuration
@@ -1601,9 +1602,11 @@ greyed out, instead of only later giving \"not
selectable\" popup error.
(service-extension activation-service-type
%dovecot-activation)))
(description "Run Dovecot, a mail server that can run POP3,
-IMAP, and LMTP.")))
+IMAP, and LMTP.")
+ (default-value (dovecot-configuration))))
-(define* (dovecot-service #:key (config (dovecot-configuration)))
+(define-deprecated (dovecot-service #:key (config (dovecot-configuration)))
+ dovecot-service-type
"Return a service that runs @command{dovecot}, a mail server that can run
POP3, IMAP, and LMTP. @var{config} should be a configuration object created
by @code{dovecot-configuration}. @var{config} may also be created by
diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm
index f13751b72f..dc1f18b3f1 100644
--- a/gnu/tests/mail.scm
+++ b/gnu/tests/mail.scm
@@ -293,16 +293,16 @@ acl_check_data:
(define %dovecot-os
(simple-operating-system
(service dhcp-client-service-type)
- (dovecot-service #:config
- (dovecot-configuration
- (disable-plaintext-auth? #f)
- (ssl? "no")
- (auth-mechanisms '("anonymous"))
- (auth-anonymous-username "alice")
- (mail-location
- (string-append "maildir:~/Maildir"
- ":INBOX=~/Maildir/INBOX"
- ":LAYOUT=fs"))))))
+ (service dovecot-service-type
+ (dovecot-configuration
+ (disable-plaintext-auth? #f)
+ (ssl? "no")
+ (auth-mechanisms '("anonymous"))
+ (auth-anonymous-username "alice")
+ (mail-location
+ (string-append "maildir:~/Maildir"
+ ":INBOX=~/Maildir/INBOX"
+ ":LAYOUT=fs"))))))
(define (run-dovecot-test)
"Return a test of an OS running Dovecot service."
- 05/23: doc: kmscon-service-type: Use @defvar @-command., (continued)
- 05/23: doc: kmscon-service-type: Use @defvar @-command., guix-commits, 2023/03/03
- 03/23: services: base: Deprecate 'mingetty-service' procedure., guix-commits, 2023/03/03
- 09/23: services: base: Deprecate 'rngd-service' procedure., guix-commits, 2023/03/03
- 11/23: services: ssh: Deprecate 'dropbear-service' procedure., guix-commits, 2023/03/03
- 06/23: services: base: Deprecate 'nscd-service' procedure., guix-commits, 2023/03/03
- 08/23: services: base: Deprecate 'udev-service' procedure., guix-commits, 2023/03/03
- 10/23: services: ssh: Deprecate 'lsh-service' procedure., guix-commits, 2023/03/03
- 13/23: services: elogind-configuration: Do not ignore 'handle-hibernate-key' by default., guix-commits, 2023/03/03
- 15/23: services: dbus: Deprecate 'polkit-service' procedure., guix-commits, 2023/03/03
- 16/23: services: desktop: Deprecate 'udisks-service' procedure., guix-commits, 2023/03/03
- 19/23: services: mail: Deprecate 'dovecot-service' procedure.,
guix-commits <=
- 20/23: services: vpn: Deprecate 'openvpn-client-service' & 'openvpn-server-service' procedures., guix-commits, 2023/03/03
- 21/23: services: lirc: Deprecate 'lirc-service' procedure., guix-commits, 2023/03/03
- 23/23: services: dbus: Deprecate 'dbus-service' procedure., guix-commits, 2023/03/03
- 22/23: services: spice: Deprecate 'spice-vdagent-service' procedure., guix-commits, 2023/03/03
- 12/23: services: desktop: Deprecate 'elogind-service' procedure., guix-commits, 2023/03/03
- 18/23: services: desktop: Deprecate 'bluetooth-service' procedure., guix-commits, 2023/03/03
- 07/23: services: base: Deprecate 'syslog-service' procedure., guix-commits, 2023/03/03
- 14/23: services: desktop: Deprecate 'accountsservice-service' procedure., guix-commits, 2023/03/03
- 17/23: services: desktop: Deprecate 'geoclue-service' procedure., guix-commits, 2023/03/03