unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: John Darrington <john@darrington.wattle.id.au>
To: Alex Vong <alexvong1995@gmail.com>
Cc: guix-devel@gnu.org, John Darrington <jmd@gnu.org>
Subject: Re: [PATCH] gnu: Add sendmail
Date: Sat, 17 Sep 2016 12:11:07 +0200	[thread overview]
Message-ID: <20160917101107.GA24303@jocasta.intra> (raw)
In-Reply-To: <87d1k2c1d9.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3469 bytes --]

On Sat, Sep 17, 2016 at 05:38:26PM +0800, Alex Vong wrote:
     Hi,
     
     John Darrington <john@darrington.wattle.id.au> writes:
     
     > They need more than that.  They need the binary to be installed
     > setuid.  So these
     > cannot be run as package tests.  They must be tested after the
     > as-yet-to-be-written
     > service is installed.  But I'll update the comment to make it more clear.
     >
     I see, so this is a circular dependency problem here. The service
     depends on this package, but the test depends on the service. Am I
     right?

More or less :)  
     
     >      > +       #:phases
     >      > +       (modify-phases %standard-phases
     >      > +         (add-before 'build 'replace-/bin/sh
     >      > +           (lambda _
     >      > +             (substitute*
     >      > +                 (append
     >      > + (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
     >      > +                        "contrib/mmuegel" "devtools/bin/configure.sh")
     >      > +                  (find-files "." ".*\\.m4")
     >      > +                  (find-files "." ".*\\.cf"))
     >      I think this can be simplified to:
     >      `("smrsh/smrsh.c" "sendmail/conf.c"
     >         "contrib/mailprio" "contrib/mmuegel"
     >         "devtools/bin/configure.sh"
     >         .@(find-files "." ".*\\.m4")
     >         ,@(find-files "." ".*\\.cf"))
     >      using the quasi-quote quasi-unquote-splicing notation, which is similar
     >      to string interpolation in shell "foo bar $(CAR) $(TAR)".
     >
     > Is that simpler?  It has more characters?
     >
     Hmmm, it is more of a style thing. You can ask how others think about
     it.

I don't have any strong opinions on either style.
     
     >      > +                        "contrib/mmuegel" "devtools/bin/configure.sh")
     >      > +               (("/bin/sh") (which "bash")))
     >      > +
     >      > +             (substitute* "devtools/bin/Build"
     >      > + (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"))))
     >      > +             #t))
     >      I think the `#t' is not neccessary here, since `substitute*' uses
     >      `substitute', which will either return #t or throw an exception.
     >
     > WTF??  Didn't you complain earlier this week when I *didn't* put #t in
     > exactly this
     > scenario??
     >
     Yes, I am a different Alex :)
     Also, it seems we are not being consistent here, sometimes we put `#t'
     after `substitute*', sometimes we don't. Anyone has an idea?

I did raise some suggestions in my earlier posts.  But again I don't have any strong
opinion.
     
     > Would that make any difference? Since only the last expression would
     > get returned from lambda ?
     >      
     You are right. The following should chain things up correctly:
     
     (and (zero? (system* "sh" "Build"))
          (with-directory-excursion "cf/cf"
            (begin
              (copy-file "generic-linux.mc" "sendmail.mc")
              (zero? (system* "sh" "Build" "sendmail.cf")))))

You're right.  I'll do it that way.
     

Thanks,

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-09-17 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 16:21 [PATCH] gnu: Add sendmail John Darrington
2016-09-17  4:51 ` Alex Vong
2016-09-17  8:50   ` John Darrington
2016-09-17  9:03     ` John Darrington
2016-09-17  9:38     ` Alex Vong
2016-09-17 10:11       ` John Darrington [this message]
2016-09-18 19:14         ` Alex Kost
2016-09-24  8:22           ` Alex Vong
2016-09-24 17:50             ` Alex Kost

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=20160917101107.GA24303@jocasta.intra \
    --to=john@darrington.wattle.id.au \
    --cc=alexvong1995@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=jmd@gnu.org \
    /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).