GNU bug report logs - #26203
[PATCH] gnu: Add swaks.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Tue, 21 Mar 2017 12:05:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26203 in the body.
You can then email your comments to 26203 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Tue, 21 Mar 2017 12:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 21 Mar 2017 12:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 17:33:39 +0530
* gnu/packages/mail.scm (swaks): New variable.
---
 gnu/packages/mail.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 3bf0e6647..b31cf0252 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2016 Troy Sankey <sankeytms <at> gmail.com>
 ;;; Copyright © 2016, 2017 <contact.ng0 <at> cryptolab.net>
 ;;; Copyright © 2016 Clément Lassieur <clement <at> lassieur.org>
-;;; Copyright © 2016 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2016, 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2016 John Darrington <jmd <at> gnu.org>
 ;;; Copyright © 2016 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
@@ -2093,3 +2093,55 @@ indexed mbox files.  There are two programs: @code{bindex} and @code{bit}.
 are supported).  @code{bit} is a CGI/SSI program that generates web pages
 on the fly.  Both programs are written in C and are very fast.")
     (license license:expat)))
+
+(define-public swaks
+  (package
+    (name "swaks")
+    (version "20170101.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://jetmore.org/john/code/swaks/files/swaks-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
+    (build-system perl-build-system)
+    (inputs
+     `(("perl-net-dns" ,perl-net-dns)
+       ("perl-net-ssleay" ,perl-net-ssleay)))
+    (arguments
+     `(#:tests? #f ; No tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+                  (lambda _
+                    (zero? (system* "pod2man" "doc/ref.pod" "swaks.1"))))
+         (replace 'install
+                  (lambda _
+                    (let* ((out (assoc-ref %outputs "out"))
+                           (bin (string-append out "/bin"))
+                           (man (string-append out "/share/man/man1")))
+                      (mkdir-p bin)
+                      (install-file "swaks" bin)
+                      (mkdir-p man)
+                      (install-file "swaks.1" man))))
+         (add-after 'install 'wrap-program
+                    (lambda _
+                      (wrap-program (string-append (assoc-ref %outputs "out")
+                                                   "/bin/swaks")
+                        `("PERL5LIB" ":" = (,(getenv "PERL5LIB")))))))))
+    (home-page "http://jetmore.org/john/code/swaks/")
+    (synopsis "Featureful, flexible, scriptable, transaction-oriented SMTP
+test tool")
+    (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
+test tool.  It handles SMTP features and extensions such as TLS,
+authentication, and pipelining; multiple version of the SMTP protocol
+including SMTP, ESMTP, and LMTP; and multiple transport methods including
+unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
+Options can be specified in environment variables, configuration files, and
+the command line allowing maximum configurability and ease of use for
+operators and scripters.")
+    (license gpl2+)))
-- 
2.11.0





Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Tue, 21 Mar 2017 13:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>, 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 14:12:30 +0100
[Message part 1 (text/plain, inline)]
Arun Isaac <arunisaac <at> systemreboot.net> writes:

> * gnu/packages/mail.scm (swaks): New variable.

Thanks!

[...]

> +    (arguments
> +     `(#:tests? #f ; No tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'build
> +                  (lambda _
> +                    (zero? (system* "pod2man" "doc/ref.pod" "swaks.1"))))

You can install 'emacs-guix' and activate 'guix-devel-mode', then
indentation should work properly.

> +         (replace 'install
> +                  (lambda _
> +                    (let* ((out (assoc-ref %outputs "out"))
> +                           (bin (string-append out "/bin"))
> +                           (man (string-append out "/share/man/man1")))
> +                      (mkdir-p bin)
> +                      (install-file "swaks" bin)
> +                      (mkdir-p man)
> +                      (install-file "swaks.1" man))))

'install-file' from (guix build utils) will create the directory if it
does not exist, so the mkdir-p is redundant. In addition, 'install-file'
(or actually 'copy-file') has an unspecified return value, so we end
such phases with an explicit '#t'.

> +         (add-after 'install 'wrap-program
> +                    (lambda _
> +                      (wrap-program (string-append (assoc-ref %outputs "out")
> +                                                   "/bin/swaks")

Please use the (lambda* (#:key outputs ...)) form here, instead of
looking up %outputs directly.

> +                        `("PERL5LIB" ":" = (,(getenv "PERL5LIB")))))))))

This phase should also end on a #t for the same reason as above.

> +    (home-page "http://jetmore.org/john/code/swaks/")
> +    (synopsis "Featureful, flexible, scriptable, transaction-oriented SMTP
> +test tool")

I would shorten synopsis to something like "Featureful SMTP test tool",
since the other details are mentioned in the description.

Otherwise this LGTM, sorry for the nit-picks! Can you send an updated
patch? :)

> +    (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
> +test tool.  It handles SMTP features and extensions such as TLS,
> +authentication, and pipelining; multiple version of the SMTP protocol
> +including SMTP, ESMTP, and LMTP; and multiple transport methods including
> +unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
> +Options can be specified in environment variables, configuration files, and
> +the command line allowing maximum configurability and ease of use for
> +operators and scripters.")
> +    (license gpl2+)))
> -- 
> 2.11.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Tue, 21 Mar 2017 13:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 19:13:42 +0530
[Message part 1 (text/plain, inline)]
>> +         (add-after 'install 'wrap-program
>> +                    (lambda _
>> +                      (wrap-program (string-append (assoc-ref %outputs "out")
>> +                                                   "/bin/swaks")

It would be nice if the perl-build-system did this wrapping
automatically just like the python-build-system does. Is there some
reason the perl-build-system doesn't do wrapping automatically?

> Otherwise this LGTM, sorry for the nit-picks! Can you send an updated
> patch? :)

No problem. :-) "Nitpicking" and critical feedback is part of the patch
review process.

I'll send a new patch soon.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Tue, 21 Mar 2017 13:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 26203 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 19:24:23 +0530
* gnu/packages/mail.scm (swaks): New variable.
---
 gnu/packages/mail.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 3bf0e6647..9e2eaad68 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2016 Troy Sankey <sankeytms <at> gmail.com>
 ;;; Copyright © 2016, 2017 <contact.ng0 <at> cryptolab.net>
 ;;; Copyright © 2016 Clément Lassieur <clement <at> lassieur.org>
-;;; Copyright © 2016 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2016, 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2016 John Darrington <jmd <at> gnu.org>
 ;;; Copyright © 2016 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
@@ -2093,3 +2093,52 @@ indexed mbox files.  There are two programs: @code{bindex} and @code{bit}.
 are supported).  @code{bit} is a CGI/SSI program that generates web pages
 on the fly.  Both programs are written in C and are very fast.")
     (license license:expat)))
+
+(define-public swaks
+  (package
+    (name "swaks")
+    (version "20170101.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://jetmore.org/john/code/swaks/files/swaks-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
+    (build-system perl-build-system)
+    (inputs
+     `(("perl-net-dns" ,perl-net-dns)
+       ("perl-net-ssleay" ,perl-net-ssleay)))
+    (arguments
+     `(#:tests? #f ; No tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'build
+           (lambda _
+             (zero? (system* "pod2man" "doc/ref.pod" "swaks.1"))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (install-file "swaks" (string-append out "/bin"))
+               (install-file "swaks.1" (string-append out "/share/man/man1")))
+             #t))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/swaks")
+               `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
+             #t)))))
+    (home-page "http://jetmore.org/john/code/swaks/")
+    (synopsis "Featureful SMTP test tool")
+    (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
+test tool.  It handles SMTP features and extensions such as TLS,
+authentication, and pipelining; multiple version of the SMTP protocol
+including SMTP, ESMTP, and LMTP; and multiple transport methods including
+unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
+Options can be specified in environment variables, configuration files, and
+the command line allowing maximum configurability and ease of use for
+operators and scripters.")
+    (license gpl2+)))
-- 
2.11.0





Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Tue, 21 Mar 2017 13:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 19:27:20 +0530
[Message part 1 (text/plain, inline)]
> You can install 'emacs-guix' and activate 'guix-devel-mode', then
> indentation should work properly.

Ah, I didn't know about `guix-devel-mode'. It helps a lot!

I have send a new patch. Please feel free to let me know if there are
any further changes to be made or if I missed something. I won't be
annoyed or offended. :-)

Cheers!
[signature.asc (application/pgp-signature, inline)]

Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Tue, 21 Mar 2017 14:44:01 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Tue, 21 Mar 2017 14:44:02 GMT) Full text and rfc822 format available.

Message #22 received at 26203-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>, 26203-done <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 15:43:29 +0100
[Message part 1 (text/plain, inline)]
Arun Isaac <arunisaac <at> systemreboot.net> writes:

> I have send a new patch. Please feel free to let me know if there are
> any further changes to be made or if I missed something. I won't be
> annoyed or offended. :-)

The patch is great, thanks!

>> +         (add-after 'install 'wrap-program
>> +                    (lambda _
>> +                      (wrap-program (string-append (assoc-ref %outputs "out")
>> +                                                   "/bin/swaks")
>
> It would be nice if the perl-build-system did this wrapping
> automatically just like the python-build-system does. Is there some
> reason the perl-build-system doesn't do wrapping automatically?

I agree this would be nice. Would you like to work on it? :)

By the way, my email client says your PGP signature is bad. Is your
email client incorrectly configured, or is my key out of date? I fetched
0x2E25EE8B61802BB3 from "keys.gnupg.net".

The fingerprint is:
7F73 0343 F2F0 9F3C 77BF  79D3 2E25 EE8B 6180 2BB3

Closing this bug, but feel free to continue the conversation!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Tue, 21 Mar 2017 18:03:01 GMT) Full text and rfc822 format available.

Message #25 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 26203 <at> debbugs.gnu.org, mbakke <at> fastmail.com, arunisaac <at> systemreboot.net
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Tue, 21 Mar 2017 14:02:54 -0400
[Message part 1 (text/plain, inline)]
On Tue, Mar 21, 2017 at 03:43:29PM +0100, Marius Bakke wrote:
> By the way, my email client says your PGP signature is bad. Is your
> email client incorrectly configured, or is my key out of date? I fetched
> 0x2E25EE8B61802BB3 from "keys.gnupg.net".
> 
> The fingerprint is:
> 7F73 0343 F2F0 9F3C 77BF  79D3 2E25 EE8B 6180 2BB3

I see the same thing in Mutt, which is using gpgme 1.8.0 for PGP.

I notice your key does not have an expiration date; many clients
interpret signatures with expired keys as "bad" signatures. Perhaps
that's what's going happening here.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Wed, 22 Mar 2017 04:38:02 GMT) Full text and rfc822 format available.

Message #28 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Wed, 22 Mar 2017 10:07:35 +0530
[Message part 1 (text/plain, inline)]
>>> +         (add-after 'install 'wrap-program
>>> +                    (lambda _
>>> +                      (wrap-program (string-append (assoc-ref %outputs "out")
>>> +                                                   "/bin/swaks")
>>
>> It would be nice if the perl-build-system did this wrapping
>> automatically just like the python-build-system does. Is there some
>> reason the perl-build-system doesn't do wrapping automatically?
>
> I agree this would be nice. Would you like to work on it? :)

Sure, I'd like to try. I have only packaged for Guix so far, and have
not worked on any build systems or other code. But, I guess this is a
good time to start.

> By the way, my email client says your PGP signature is bad.

Thank you for reporting this.

> Is your email client incorrectly configured, or is my key out of date?
> I fetched 0x2E25EE8B61802BB3 from "keys.gnupg.net".
>
> The fingerprint is:
> 7F73 0343 F2F0 9F3C 77BF  79D3 2E25 EE8B 6180 2BB3

Leo Famulari writes:

> I see the same thing in Mutt, which is using gpgme 1.8.0 for PGP.
>
> I notice your key does not have an expiration date; many clients
> interpret signatures with expired keys as "bad" signatures. Perhaps
> that's what's going happening here.

I finally figured out the problem. It turns out that my outgoing SMTP
relay (the mailjet smarthost service) is adding a
"Content-Transfer-Encoding: quoted-printable" header to my content
headers and is thus corrupting my email signature. I have to figure out
some way to work around this.

email is such a pain. I have to use smarthosts because my self-hosted
mail server is on a dynamic IP address. (Most?) mail servers accept mail
only from static IP addresses with reverse DNS records. Are there any
good free (as in gratis) smarthost services that you can recommend?
Which smarthost, if any, do you use?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Wed, 22 Mar 2017 12:00:02 GMT) Full text and rfc822 format available.

Message #31 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Catonano <catonano <at> gmail.com>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Wed, 22 Mar 2017 12:59:43 +0100
[Message part 1 (text/plain, inline)]
2017-03-22 5:37 GMT+01:00 Arun Isaac <arunisaac <at> systemreboot.net


> email is such a pain. I have to use smarthosts because my self-hosted
> mail server is on a dynamic IP address. (Most?) mail servers accept mail
> only from static IP addresses with reverse DNS records. Are there any
> good free (as in gratis) smarthost services that you can recommend?
> Which smarthost, if any, do you use?
>

I'm interested in this too

But this is a closed ticket.

In order to give more visibility to this question, I suggest you to post it
on the help mailing list

In fact, a proper email setup is required in order to contribute to Guix
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Wed, 22 Mar 2017 13:15:02 GMT) Full text and rfc822 format available.

Message #34 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Catonano <catonano <at> gmail.com>
Cc: 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Wed, 22 Mar 2017 18:44:20 +0530
[Message part 1 (text/plain, inline)]
>> email is such a pain. I have to use smarthosts because my self-hosted
>> mail server is on a dynamic IP address. (Most?) mail servers accept mail
>> only from static IP addresses with reverse DNS records. Are there any
>> good free (as in gratis) smarthost services that you can recommend?
>> Which smarthost, if any, do you use?
>>
> I'm interested in this too
>
> But this is a closed ticket.
>
> In order to give more visibility to this question, I suggest you to post it
> on the help mailing list

> In fact, a proper email setup is required in order to contribute to Guix

Apart from the specific issue of smarthosts, I don't know what I would
ask for. Why don't you go ahead and start a thread with what's on your
mind, and I'll join in on the conversation?

I think this question is more about email self hosting than about the
Guix project. I don't know if it would be relevant on the help mailing
list. Email is admittedly not the best system for Guix development, but
this question has been discussed rather extensively on this thread (
https://lists.gnu.org/archive/html/guix-devel/2016-08/msg00854.html
). No satisfactory consensus was reached, as far as I can tell.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26203; Package guix-patches. (Thu, 23 Mar 2017 14:11:01 GMT) Full text and rfc822 format available.

Message #37 received at 26203 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: Catonano <catonano <at> gmail.com>, 26203 <at> debbugs.gnu.org
Subject: Re: bug#26203: [PATCH] gnu: Add swaks.
Date: Thu, 23 Mar 2017 15:09:56 +0100
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> I think this question is more about email self hosting than about the
> Guix project. I don't know if it would be relevant on the help mailing
> list. Email is admittedly not the best system for Guix development, but
> this question has been discussed rather extensively on this thread (
> https://lists.gnu.org/archive/html/guix-devel/2016-08/msg00854.html
> ). No satisfactory consensus was reached, as far as I can tell.

Yeah, I’m personally rather happy with email + Debbugs, but others would
prefer something with a Web interface.

At FOSDEM there were discussions to improve the Web interface to Debbugs
to try and satisfy both parties, but that hasn’t happened yet.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Apr 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.