unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lukas Gradl <lgradl@openmailbox.org>
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Add procmail
Date: Mon, 29 Feb 2016 22:35:39 -0600	[thread overview]
Message-ID: <20160301043539.GA607@serenity.lan> (raw)
In-Reply-To: <87povffwqm.fsf@igalia.com>

On Mon, Feb 29, 2016 at 02:54:09PM +0100, Andy Wingo wrote:
> Hi Lukas,
> 
> On Sat 27 Feb 2016 10:16, Lukas Gradl <lgradl@openmailbox.org> writes:
> 
> > I am new to Guix and Scheme, so I would very much welcome any comments
> > you might have.
> 
> Welcome :)

Thank you!

> 
> > +       ;; the following patch fixes an ambiguous definition of
> > +       ;; getline() in formail.c. The patch is provided by Debian as
> > +       ;; patch 24
> 
> We tend to prefer full sentences in comments like this one, including
> ending punctuation.  Also as a GNU-ism, we are in the church of
> two-spaces-after-full-stops :)
>

OK, sounds good. Fixed.

> > +    (arguments
> > +     `(#:phases (alist-replace
> > +                 'configure
> > +                 (lambda _
> > +                   (substitute* "Makefile"
> > +                     (("/bin/sh")
> > +                      (which "sh")))
> > +                   (substitute* "Makefile"
> > +                     (("/usr")
> > +                      (assoc-ref %outputs "out")))
> > +                   (substitute* "Makefile"
> > +                     (("/bin/rm")
> > +                      (which "rm"))))
> > +                 %standard-phases)
> 
> There are many packages that still use this syntax, but the current
> Best Practice™ is to use `modify-phases'.  Search Guix for some
> examples.

I changed the patch to use 'modify-phases'. Thanks for pointing this
out, I like this much better than the 'alist-replace'!

> Also, substitute* can do all these clauses in one:
> 
>   (substitute* "Makefile"
>     (("/bin/sh")
>      (which "sh"))
>     (("/usr")
>      (assoc-ref %outputs "out"))
>     (("/bin/rm")
>      (which "rm")))
> 
> The * in substitute* is like the * in let*, meaning the substitutions
> will be done in order.  Also, the return value of substitute* is
> unspecified (see the Guile manual for more), so be sure to return a true
> value from this lambda by just ending the lambda with #t.
>

I updated this. Thank you for the explanation!

> > +       #:tests? #f)) ; no tests
> 
> Please mention why the tests are disabled.

I think procmail comes without tests.  There are no targets like 'tests'
or 'check' in the Makefile.  However, it does perform some test during
'make install' to verify if the filesystem has locking
capabilities.  These are performed before the actual build, so they do
not check if the build was successful.  I changed the comment to better
explain the situation.

> 
> > +    (build-system gnu-build-system)
> > +    (inputs `(("glibc" ,glibc)
> > +              ("exim" ,exim)))
> > +    (home-page "http://www.procmail.org/")
> > +    (synopsis "Versatile mail delivery agent (MDA)")
> > +    (description "Procmail is a mail delivery agent (MDA) featuring support
> > +for a variety of mailbox formats such as mbox, mh and maildir.  Incoming mail
> > +can be sorted into separate files/directories and arbitrary commands can be
> > +executed on mail arrival.  Procmail is considered stable, but is no longer
> > +maintained.")
> > +    (license gpl2+))) ; procmail allows to choose the
> > +                      ; nonfree Artistic License 1.0
> > +                      ; as alternative to the GPL2+.
> > +                      ; This option is not listed here.
> 
> This sort of a comment is best done as a two-semicolon comment, I think.
> 
> Looking pretty good!
>

Thank you! This was the last thing keeping me from switching to GuixSD.

I will send an updated patch shortly.

Thank you for your review!

Best,
Lukas

  reply	other threads:[~2016-03-01  4:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27  9:16 [PATCH] Add procmail Lukas Gradl
2016-02-29 13:54 ` Andy Wingo
2016-03-01  4:35   ` Lukas Gradl [this message]
2016-02-29 19:50 ` Leo Famulari
2016-03-01  4:41   ` Lukas Gradl
2016-03-03  1:46     ` Leo Famulari
2016-03-03  2:59       ` Lukas Gradl

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20160301043539.GA607@serenity.lan \
    --to=lgradl@openmailbox.org \
    --cc=guix-devel@gnu.org \
    --cc=wingo@igalia.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).