From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: [PATCH] gnu: Add sendmail Date: Sat, 17 Sep 2016 12:11:07 +0200 Message-ID: <20160917101107.GA24303@jocasta.intra> References: <1474042893-9690-1-git-send-email-jmd@gnu.org> <87d1k3t9h3.fsf@gmail.com> <20160917085035.GA23691@jocasta.intra> <87d1k2c1d9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blCai-0004BA-2p for guix-devel@gnu.org; Sat, 17 Sep 2016 06:11:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blCag-0005zJ-OG for guix-devel@gnu.org; Sat, 17 Sep 2016 06:11:23 -0400 Content-Disposition: inline In-Reply-To: <87d1k2c1d9.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Alex Vong Cc: guix-devel@gnu.org, John Darrington --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 17, 2016 at 05:38:26PM +0800, Alex Vong wrote: Hi, =20 John Darrington writes: =20 > 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 c= lear. > 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 :) =20 =20 > > + #: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/conf= igure.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. =20 > > + "contrib/mmuegel" "devtools/bin/conf= igure.sh") > > + (("/bin/sh") (which "bash"))) > > + > > + (substitute* "devtools/bin/Build" > > + (("SHELL=3D/bin/sh") (string-append "SHELL=3D" (which "bash= ")))) > > + #t)) > I think the `#t' is not neccessary here, since `substitute*' us= es > `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 a= ny strong opinion. =20 > Would that make any difference? Since only the last expression would > get returned from lambda ? > =20 You are right. The following should chain things up correctly: =20 (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. =20 Thanks, J' --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlfdFrsACgkQimdxnC3oJ7OcmACeNXVv/mwyx+htHEjGxE2nPwzp SV0AnR7Bv9W2aoNiKPzmCITe0pUFzrGT =gZEf -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--