From patchwork Sat Feb 25 18:58:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47317 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F1F9416BA5; Sat, 25 Feb 2023 19:00:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CF7A116AF4 for ; Sat, 25 Feb 2023 19:00:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzmB-0002ai-E5; Sat, 25 Feb 2023 14:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm9-0002X2-2R for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm8-00011M-Mv for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm8-00081u-Jq for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 22/27] services: mail: Deprecate 'dovecot-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156630729 (code B ref 61789); Sat, 25 Feb 2023 19:00:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:26 +0000 Received: from localhost ([127.0.0.1]:41502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlV-0007zT-Ds for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:25 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkv-0007v7-0c for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:49 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id EDF7020D5C for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 8DF718009E; Sat, 25 Feb 2023 19:58:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XBkOs2YILeSb; Sat, 25 Feb 2023 19:58:25 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 52021800A3; Sat, 25 Feb 2023 19:58:24 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:08 +0000 Message-Id: <2bfcd388d8f900b67d95f5e0708d5c9bc406e899.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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. --- 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 7bae5717df..282c6ce276 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24701,9 +24701,10 @@ Mail Services @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{} object. +@end defvar By default, Dovecot does not need much configuration; the default configuration object created by @code{(dovecot-configuration)} will @@ -24718,9 +24719,9 @@ Mail Services 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 @@ (define-module (gnu services mail) #: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 @@ (define-module (gnu services mail) #: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 @@ (define dovecot-service-type (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 @@ (define %test-exim (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."