guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: opensmtpd, opensmtpd-extras, libasr.


From: ng0
Subject: Re: [PATCH]: opensmtpd, opensmtpd-extras, libasr.
Date: Thu, 08 Sep 2016 23:41:51 +0000

Hi,

thanks for reviewing. I'll apply and send changed later.
Efraim Flashner <address@hidden> writes:

> [ Unknown signature status ]
> On Thu, Sep 08, 2016 at 11:15:37AM +0000, ng0 wrote:
>> This adds opensmtpd. I'll write a service as this is obviously
>> not very functional without a service on Guix.
>> 
>> 
>> OT: So far I hope I can just change the email address I am subscribed to
>> the list with back, I'm waiting for the hosting problem to be
>> solved. Might even be that I stick with this one, you'll see. I hope
>> this was the last change, I have not updated any copyrights and commit
>> email accounts, hoping that it just continues to work.
>> 
>
>> From 30c8260a039d4c8d7cddbfd92341afa65577d680 Mon Sep 17 00:00:00 2001
>> From: ng0 <address@hidden>
>> Date: Tue, 6 Sep 2016 17:10:18 +0000
>> Subject: [PATCH 1/3] gnu: Add libasr.
>> 
>> * gnu/packages/web.scm (libasr): New variable.
>> ---
>>  gnu/packages/web.scm | 33 +++++++++++++++++++++++++++++++++
>>  1 file changed, 33 insertions(+)
>> 
>> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
>> index 70bfd9e..59ae049 100644
>> --- a/gnu/packages/web.scm
>> +++ b/gnu/packages/web.scm
>> @@ -61,6 +61,7 @@
>>    #:use-module (gnu packages gnome)
>>    #:use-module (gnu packages gperf)
>>    #:use-module (gnu packages gtk)
>> +  #:use-module (gnu packages groff)
>>    #:use-module (gnu packages icu4c)
>>    #:use-module (gnu packages image)
>>    #:use-module (gnu packages lua)
>> @@ -3609,3 +3610,35 @@ tools they trust (e.g. wget).")
>>  rendering engine entirely written from scratch.  It is small and capable of
>>  handling many of the web standards in use today.")
>>      (license l:gpl2+)))
>> +
>> +(define-public libasr
>> +  (package
>> +    (name "libasr")
>> +    (version "201602131606")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (string-append "https://www.opensmtpd.org/archives/";
>> +                           name "-" version ".tar.gz"))
>> +       (sha256
>> +        (base32
>> +         "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
>> +    (build-system gnu-build-system)
>> +    (native-inputs
>> +     `(("autoconf" ,autoconf)
>> +       ("automake" ,automake)
>> +       ("pkg-config" ,pkg-config)
>> +       ("groff" ,groff)))
>> +    (home-page "https://www.opensmtpd.org";)
>> +    (synopsis "Asynchronous resolver library by the OpenBSD project")
>> +    (description
>> +     "libasr is a free, simple and portable asynchronous resolver library.
>> +It allows to run dns queries and perform hostname resolutions in a fully
>> +asynchronous fashion.  The implementation is thread-less, fork-less, and
>> +does not make use of signals or other 'tricks' that might get in the
>> +developer's way.")
>> +    (license (list l:isc
>> +                   l:bsd-2 ; last part of getrrsetbyname_async.c
>> +                   l:bsd-3
>> +                   (l:non-copyleft "file://COPYING") ; includes.h
>> +                   l:openssl))))
>> -- 
>> 2.10.0
>> 
>
> I agree that libasr fits better in a dns file. I'll leave it up to you
> if you want dns.scm, or to follow my logic that adns is for asynchronous
> dns and put it there ;).
>
>> From 43b89c0b548e1bca2ff59271ac15b1fbe6e7ca6e Mon Sep 17 00:00:00 2001
>> From: ng0 <address@hidden>
>> Date: Tue, 6 Sep 2016 18:23:15 +0000
>> Subject: [PATCH 2/3] gnu: Add opensmtpd.
>> 
>> * gnu/packages/mail.scm (opensmtpd): 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 c2fc1a9..0ea6455 100644
>> --- a/gnu/packages/mail.scm
>> +++ b/gnu/packages/mail.scm
>> @@ -56,6 +56,7 @@
>>    #:use-module (gnu packages guile)
>>    #:use-module (gnu packages flex)
>>    #:use-module (gnu packages libcanberra)
>> +  #:use-module (gnu packages libevent)
>>    #:use-module (gnu packages libidn)
>>    #:use-module (gnu packages linux)
>>    #:use-module (gnu packages m4)
>> @@ -80,7 +81,8 @@
>>    #:use-module ((guix licenses)
>>                  #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
>>                             non-copyleft (expat . license:expat) bsd-3
>> -                           public-domain))
>> +                           public-domain bsd-4 isc (openssl . 
>> license:openssl)
>> +                           bsd-2))
>>    #:use-module (guix packages)
>>    #:use-module (guix download)
>>    #:use-module (guix git-download)
>> @@ -1388,3 +1390,53 @@ to mbox files, maildir folders or a Mail Delivery 
>> Agent (MDA),
>>  TLS/SSL, several authentication methods, Internationalized Domain
>>  Names (IDN) and SOCKS proxies.")
>>      (license gpl3+)))
>> +
>> +(define-public opensmtpd
>> +  (package
>> +    (name "opensmtpd")
>> +    (version "5.9.2p1")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://www.opensmtpd.org/archives/";
>> +                                  name "-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "07d7f1m5sxyz6mkk228rcm7fsf7350994ayvmhgph333q5rz48im"))))
>> +    (build-system gnu-build-system)
>> +    (inputs
>> +     `(("libressl" ,libressl)
>> +       ("zlib" ,zlib)
>> +       ("libevent" ,libevent)
>> +       ("libasr" ,libasr)
>> +       ("bdb" ,bdb)
>> +       ("linux-pam" ,linux-pam)))
>
> This makes my need for lexographical orderliness cringe.

I agree to change this only because I need to apply changes to the
package anyway. Just sorting from A-Z is nothing I see as an
improvement.

>> +    (native-inputs
>> +     `(("bison" ,bison)))
>> +    (arguments
>> +     `(#:configure-flags (list "--with-table-db" "--localstatedir=/var"
>> +                               "--with-user-smtpd=smtpd" 
>> "--with-user-queue=smtpq"
>> +                               "--with-group-queue=smtpq")
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         ;; OpenSMTPD provides a single utility smtpctl to control the 
>> daemon and
>> +         ;; the local submission subsystem.  To accomodate systems that 
>> require
>> +         ;; historical interfaces such as sendmail, newaliases or makemap, 
>> the
>> +         ;; smtpctl utility can operate in compatibility mode if called 
>> with the
>> +         ;; historical name.
>> +         (add-after 'install 'install-compabilitymode
>> +           (lambda _
>> +             (let* ((out (assoc-ref %outputs "out"))
>> +                    (sbin (string-append out "/sbin/")))
>
> can we make this a for-each loop? maybe:
>
>                   (for-each (lambda (cmd))
>                               (symlink "smtpctl" (string-append sbin cmd))
>                             '("makemap" "sendmail" "send-mail" "newaliases" 
> "mailq"))
>                   #t))))))

I haven't written for-each before, I'll change it to one. Thanks.

>> +               (symlink "smtpctl" (string-append sbin "makemap"))
>> +               (symlink "smtpctl" (string-append sbin "sendmail"))
>> +               (symlink "smtpctl" (string-append sbin "send-mail"))
>> +               (symlink "smtpctl" (string-append sbin "newaliases"))
>> +               (symlink "smtpctl" (string-append sbin "mailq"))))))))
>> +    (synopsis "Lightweight but fully featured SMTP daemon from OpenBSD")
>> +    (description
>> +     "OpenSMTPD is an implementation of the server-side SMTP protocol, with
>> +some additional standard extensions.  It allows ordinary machines to 
>> exchange
>> +e-mails with other systems speaking the SMTP protocol.")
>> +    (home-page "https://www.opensmtpd.org";)
>> +    (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
>> +                   public-domain isc openssl))))
>> -- 
>> 2.10.0
>> 
>
>> From a34853ce011b4f34d7116f9efe611d3fce6187c3 Mon Sep 17 00:00:00 2001
>> From: ng0 <address@hidden>
>> Date: Tue, 6 Sep 2016 20:12:00 +0000
>> Subject: [PATCH 3/3] gnu: Add opensmtpd-extras.
>> 
>> * gnu/packages/mail.scm (opensmtpd-extras): New variable.
>> ---
>>  gnu/packages/mail.scm | 70 
>> +++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 70 insertions(+)
>> 
>> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
>> index 0ea6455..5fbc55c 100644
>> --- a/gnu/packages/mail.scm
>> +++ b/gnu/packages/mail.scm
>> @@ -51,6 +51,7 @@
>>    #:use-module (gnu packages glib)
>>    #:use-module (gnu packages gnome)
>>    #:use-module (gnu packages gnupg)
>> +  #:use-module (gnu packages groff)
>>    #:use-module (gnu packages gsasl)
>>    #:use-module (gnu packages gtk)
>>    #:use-module (gnu packages guile)
>> @@ -59,6 +60,7 @@
>>    #:use-module (gnu packages libevent)
>>    #:use-module (gnu packages libidn)
>>    #:use-module (gnu packages linux)
>> +  #:use-module (gnu packages lua)
>>    #:use-module (gnu packages m4)
>>    #:use-module (gnu packages ncurses)
>>    #:use-module (gnu packages pcre)
>> @@ -1440,3 +1442,71 @@ e-mails with other systems speaking the SMTP 
>> protocol.")
>>      (home-page "https://www.opensmtpd.org";)
>>      (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
>>                     public-domain isc openssl))))
>> +
>> +(define-public opensmtpd-extras
>> +  (package
>> +    (name "opensmtpd-extras")
>> +    (version "5.7.1")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://www.opensmtpd.org/archives/";
>> +                                  name "-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
>> +    (build-system gnu-build-system)
>> +    (inputs
>> +     `(("libressl" ,libressl)
>> +       ("libevent" ,libevent)
>> +       ("libasr" ,libasr)
>> +       ("python-2" ,python-2)
>> +       ("opensmtpd" ,opensmtpd)
>> +       ("perl" ,perl)
>> +       ("lua" ,lua)
>> +       ("postgresql" ,postgresql)
>> +       ("mariadb" ,mariadb)
>
> I would remove postgresql and mariadb in an attempt to keep the closure
> size smaller.

Why? It should provide all the extra features. Do you want me to move
them to different outputs if possible? I see no reason to leave
postgresql and mariadb out just to make the the graph smaller.

>> +       ("sqlite" ,sqlite)
>> +       ("linux-pam" ,linux-pam)))
>> +    (native-inputs
>> +     `(("bison" ,bison)
>> +       ("pkg-config" ,pkg-config)
>> +       ("groff" ,groff)
>> +       ("automake" ,automake)
>> +       ("autoconf" ,autoconf)))
>> +    (arguments
>> +     `(#:configure-flags (list
>> +                          "--with-filter-clamav"    
>> "--with-filter-dkim-signer"
>> +                          "--with-filter-dnsbl"     "--with-filter-lua"
>> +                          "--with-filter-monkey"    "--with-filter-pause"
>> +                          "--with-filter-perl"      "--with-filter-python"
>> +                          "--with-filter-regex"     
>> "--with-filter-spamassassin"
>> +                          "--with-filter-stub"      "--with-filter-trace"
>> +                          "--with-filter-void"
>> +     
>> +                          "--with-queue-null"       "--with-queue-python"
>> +                          "--with-queue-ram"        "--with-queue-stub"
>> +
>> +                          "--with-scheduler-python" "--with-scheduler-ram"
>> +                          "--with-scheduler-stub"
>> +
>> +                          "--with-table-ldap"       "--with-table-mysql"
>> +                          "--with-table-passwd"     "--with-table-postgres"
>> +                          "--with-table-python"     "--with-table-socketmap"
>> +                          "--with-table-sqlite"     "--with-table-stub"
>> +                          ;;"--with-table-redis"    ; TODO: package hiredis
>> +
>> +                          "--with-user=smtpd"       
>> "--with-privsep-user=smtpd"
>> +                          "--localstatedir=/var"    "--sysconfdir=/etc"
>> +                          "--with-lua-type=lua"     ; can use lua or luajit
>> +     
>> +                          (string-append "--with-python="
>> +                                         (assoc-ref %build-inputs 
>> "python-2"))
>> +                          (string-append "--with-lua="
>> +                                         (assoc-ref %build-inputs "lua")))))
>> +    (license (list bsd-2 bsd-3 bsd-4 non-copyleft
>> +                   public-domain isc openssl))
>
> what a list! Care to elaborate?

Can you be more precise, what do you think needs comments in the code?
There is a chance that because I use 5.7.1 and not one of the YMD
versions that there are 2-3 settings which are not yet available or have
been changed otherwise. In general, this is how you configure this software.

It would be good for opensmtpd if someone later could prevent the
copying of files to /etc when /etc is set as confdir or what it
was. Just using what dovecot packaged used was not enough.

>> +    (synopsis "Extra tables, filters, and various other addons for 
>> OpenSMTPD")
>> +    (description
>> +     "This package provides extra tables, filters, and various other addons
>> +for OpenSMTPD to extend its functionality.")
>> +    (home-page "https://www.opensmtpd.org";)))
>> -- 
>> 2.10.0
>> 
>
>> 
>> -- 
>> ng0
>> For non-prism friendly talk find me on http://www.psyced.org
>
>
> -- 
> Efraim Flashner   <address@hidden>   אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]