From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0EBq-0004YW-3g for guix-patches@gnu.org; Mon, 17 Apr 2017 17:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0EBm-0005p6-Qo for guix-patches@gnu.org; Mon, 17 Apr 2017 17:28:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0EBm-0005p2-N8 for guix-patches@gnu.org; Mon, 17 Apr 2017 17:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0EBm-0001WB-Gn for guix-patches@gnu.org; Mon, 17 Apr 2017 17:28:02 -0400 Subject: bug#26306: exim service patches (including mail-aliases-service-type) Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87fuhvtlko.fsf@zancanaro.id.au> <87a87ruczg.fsf@gnu.org> Date: Mon, 17 Apr 2017 23:27:18 +0200 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") Message-ID: <8760i2pvwp.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Carlo Zancanaro Cc: 26306@debbugs.gnu.org Hi Carlo, Did you have a chance to look into this? Those patches are 90% there! :-) Ludo=E2=80=99. ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Hi Carlo, > > Carlo Zancanaro 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 >> 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 f= ix, >> + ;; so we'll just use string-join below inst= ead. >> + (format #f "~:{~a: ~a\n~}" >> + (map (lambda (entry) >> + (list (car entry) >> + (string-join (cdr entr= y) ","))) > > 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 >> 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 >> 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 > =E2=80=98simple-operating-system=E2=80=99. Apologies! > > With a guix.texi update, it=E2=80=99ll be perfect. > > Could you send updated patches? > > Thanks! > > Ludo=E2=80=99.