all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: 26306@debbugs.gnu.org
Subject: bug#26306: exim service patches (including mail-aliases-service-type)
Date: Mon, 17 Apr 2017 23:27:18 +0200	[thread overview]
Message-ID: <8760i2pvwp.fsf@gnu.org> (raw)
In-Reply-To: <87a87ruczg.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 07 Apr 2017 23:25:23 +0200")

Hi Carlo,

Did you have a chance to look into this?  Those patches are 90% there!
:-)

Ludo’.

ludo@gnu.org (Ludovic Courtès) skribis:

> Hi Carlo,
>
> Carlo Zancanaro <carlo@zancanaro.id.au> skribis:
>
>> I've wanted to fix up the exim service given Ludo's comments on my last
>> few patches (see #25789), so here are some patches to introduce a
>> mail-aliases-service-type, to change exim-service-type to use it
>> (instead of doing its own thing), and to add a system test for
>> exim-service-type.
>>
>> I haven't yet written the updates necessary to the documentation, but I
>> thought I'd send these now to get feedback before I do the work to fix
>> up the docs.
>
> This all LGTM.
>
> Minor comments:
>
>> From 11a5223f4a9487d3a9a17925488e18e80baec843 Mon Sep 17 00:00:00 2001
>> From: Carlo Zancanaro <carlo@zancanaro.id.au>
>> Date: Thu, 30 Mar 2017 15:25:58 +1100
>> Subject: [PATCH 1/3] services: Add mail-aliases-service-type.
>>
>> * gnu/services/mail.scm (mail-aliases-etc): New procedure.
>> (mail-aliases-service-type): New variable.
>
> [...]
>
>> +(define (mail-aliases-etc aliases)
>> +  `(("aliases" ,(plain-file "aliases"
>> +                            ;; Ideally we'd use a format string like
>> +                            ;; "~:{~a: ~{~a~^,~}\n~}", but it gives a
>> +                            ;; warning that I can't figure out how to fix,
>> +                            ;; so we'll just use string-join below instead.
>> +                            (format #f "~:{~a: ~a\n~}"
>> +                                    (map (lambda (entry)
>> +                                           (list (car entry)
>> +                                                 (string-join (cdr entry) ",")))
>
> Please avoid car/cdr:
>
>   (match-lambda
>     ((user aliases ...)
>      (list user (string-joint aliases ","))))
>
>> +(define mail-aliases-service-type
>> +  (service-type
>> +   (name 'mail-aliases)
>> +   (extensions
>> +    (list (service-extension etc-service-type mail-aliases-etc)))
>> +   (compose concatenate)
>> +   (extend append)))
>
> If you add it to guix.texi (which would be nice) please leave a note as
> to what the values are (a list of user/addresses lists, right?).
>
>> From 8ac4f5fba3420ba5525cd7dff93d30f7fed8b0ae Mon Sep 17 00:00:00 2001
>> From: Carlo Zancanaro <carlo@zancanaro.id.au>
>> Date: Thu, 30 Mar 2017 15:28:26 +1100
>> Subject: [PATCH 2/3] services: Make exim-service-type use
>>  mail-aliases-service-type
>>
>> * gnu/services/mail.scm (exim-configuration)[aliases]: Remove field.
>> (exim-activation, exim-shepherd-service): Remove alias from matches.
>> (exim-etc): Remove procedure.
>> (exim-service-type): Extend mail-aliases-service-type instead of
>> etc-service-type.
>
> OK.
>
>> From 984298f4cea4ac3bff530a4a767bf96567ec284f Mon Sep 17 00:00:00 2001
>> From: Carlo Zancanaro <carlo@zancanaro.id.au>
>> Date: Thu, 30 Mar 2017 15:13:56 +1100
>> Subject: [PATCH 3/3] tests: mail: Add test for exim
>>
>> * gnu/tests/mail.scm (%exim-os, %test-exim): New variables.
>> (run-exim-test): New procedure.
>
> Nice test!
>
>> +(define %exim-os
>> +  (operating-system
>> +    (host-name "komputilo")
>
> Due to 892d9089a88abaa2ef1127f16308d03f4f08a4ce, this should use
> ‘simple-operating-system’.  Apologies!
>
> With a guix.texi update, it’ll be perfect.
>
> Could you send updated patches?
>
> Thanks!
>
> Ludo’.

  parent reply	other threads:[~2017-04-17 21:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  4:50 bug#26306: exim service patches (including mail-aliases-service-type) Carlo Zancanaro
2017-04-07 21:25 ` Ludovic Courtès
2017-04-07 21:29   ` Ludovic Courtès
2017-04-17 21:27   ` Ludovic Courtès [this message]
2017-04-18  0:57     ` Carlo Zancanaro
2017-04-18  8:10       ` Ludovic Courtès
2017-04-19 14:46   ` Carlo Zancanaro
2017-04-19 20:13     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760i2pvwp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=26306@debbugs.gnu.org \
    --cc=carlo@zancanaro.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.