diff mbox

: opensmtpd, opensmtpd-extras, libasr.

Message ID 87mvjg3g1q.fsf@we.make.ritual.n0.is
State New
Headers show

Commit Message

non such Sept. 9, 2016, 9:43 p.m. UTC
Hi,

Eric Bavier <ericbavier@openmailbox.org> writes:

> On Thu, 08 Sep 2016 11:15:37 +0000
> ng0 <ng0@n0.is> wrote:
>
>> From 43b89c0b548e1bca2ff59271ac15b1fbe6e7ca6e Mon Sep 17 00:00:00 2001
>> From: ng0 <ng0@we.make.ritual.n0.is>
>> Date: Tue, 6 Sep 2016 18:23:15 +0000
>> Subject: [PATCH 2/3] gnu: Add opensmtpd.
>> 
>> * gnu/packages/mail.scm (opensmtpd): New variable.
>> ---
> [...]
>> +    (synopsis "Lightweight but fully featured SMTP daemon from OpenBSD")
>
> This sounds too much like marketing.  Considering the "Synopses and
> Descriptions" section in the manual, perhaps "Lightweight SMTP daemon".
>
> Considering Efraim and Marius's comments, LGTM.
>
> `~Eric
>

I commented mariadb + postgresql for now. I want some feedback first if
you think we should provide it this way, or if we should add both to
different outputs.
It would not make much difference in the size of the dependency graph
unless one creates a opensmtpd-extras-postgresql package for example
which just builds the postgresql related things.

What do you think?

Comments

non such Sept. 19, 2016, 7:07 p.m. UTC | #1
Hi,

can I get some feedback on my questions about the databases?

Thanks.
ng0 <ng0@we.make.ritual.n0.is> writes:

> [ Unknown signature status ]
>
> Hi,
>
> Eric Bavier <ericbavier@openmailbox.org> writes:
>
>> On Thu, 08 Sep 2016 11:15:37 +0000
>> ng0 <ng0@n0.is> wrote:
>>
>>> From 43b89c0b548e1bca2ff59271ac15b1fbe6e7ca6e Mon Sep 17 00:00:00 2001
>>> From: ng0 <ng0@we.make.ritual.n0.is>
>>> Date: Tue, 6 Sep 2016 18:23:15 +0000
>>> Subject: [PATCH 2/3] gnu: Add opensmtpd.
>>> 
>>> * gnu/packages/mail.scm (opensmtpd): New variable.
>>> ---
>> [...]
>>> +    (synopsis "Lightweight but fully featured SMTP daemon from OpenBSD")
>>
>> This sounds too much like marketing.  Considering the "Synopses and
>> Descriptions" section in the manual, perhaps "Lightweight SMTP daemon".
>>
>> Considering Efraim and Marius's comments, LGTM.
>>
>> `~Eric
>>
>
> I commented mariadb + postgresql for now. I want some feedback first if
> you think we should provide it this way, or if we should add both to
> different outputs.
> It would not make much difference in the size of the dependency graph
> unless one creates a opensmtpd-extras-postgresql package for example
> which just builds the postgresql related things.
>
> What do you think?
>
> From 9f6f6761751ca5d057b91167b302767aba4638be Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Tue, 6 Sep 2016 17:10:18 +0000
> Subject: [PATCH 1/3] gnu: Add libasr.
>
> * gnu/packages/dns.scm (libasr): New variable.
> ---
>  gnu/packages/dns.scm | 34 ++++++++++++++++++++++++++++++++++
>  gnu/packages/web.scm |  1 +
>  2 files changed, 35 insertions(+)
>
> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
> index 819343a..35d7052 100644
> --- a/gnu/packages/dns.scm
> +++ b/gnu/packages/dns.scm
> @@ -3,6 +3,7 @@
>  ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
>  ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
> +;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -20,9 +21,12 @@
>  ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
>  
>  (define-module (gnu packages dns)
> +  #:use-module (gnu packages autotools)
>    #:use-module (gnu packages databases)
> +  #:use-module (gnu packages groff)
>    #:use-module (gnu packages linux)
>    #:use-module (gnu packages perl)
> +  #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages tls)
>    #:use-module (gnu packages xml)
>    #:use-module ((guix licenses) #:prefix license:)
> @@ -116,3 +120,33 @@ and BOOTP/TFTP for network booting of diskless machines.")
>       "These tools, included with ISC BIND, are useful for analysis of DNS
>  issues or verification of configuration.")
>      (license (list license:isc))))
> +
> +(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.")
> +    (license (list license:isc
> +                   license:bsd-2 ; last part of getrrsetbyname_async.c
> +                   license:bsd-3
> +                   (license:non-copyleft "file://LICENSE") ; includes.h
> +                   license:openssl))))
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 70bfd9e..ed0a453 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)
> -- 
> 2.10.0
>
> From 7f5e30bc0f0ae1689db1876edac6bbffe39a2e88 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> 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 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 54 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index c2fc1a9..e80a5c1 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -45,6 +45,7 @@
>    #:use-module (gnu packages cyrus-sasl)
>    #:use-module (gnu packages databases)
>    #:use-module (gnu packages dejagnu)
> +  #:use-module (gnu packages dns)
>    #:use-module (gnu packages emacs)
>    #:use-module (gnu packages enchant)
>    #:use-module (gnu packages ghostscript)
> @@ -56,6 +57,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 +82,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 +1391,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
> +     `(("bdb" ,bdb)
> +       ("libressl" ,libressl)
> +       ("libevent" ,libevent)
> +       ("libasr" ,libasr)
> +       ("linux-pam" ,linux-pam)
> +       ("zlib" ,zlib)))
> +    (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/")))
> +               (for-each (lambda (cmd)
> +                           (symlink "smtpctl" (string-append sbin cmd)))
> +                         '("makemap" "sendmail" "send-mail"
> +                           "newaliases" "mailq")))
> +             #t)))))
> +    (synopsis "Lightweight SMTP daemon")
> +    (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 87cf35ef0e5e78e9cdf05ab025d7151dd92e1902 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> 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 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 72 insertions(+)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index e80a5c1..fd03d1e 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -52,6 +52,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)
> @@ -60,6 +61,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)
> @@ -1441,3 +1443,73 @@ 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) ; split this
> +       ;; ("mariadb" ,mariadb) ; split this
> +       ("sqlite" ,sqlite)
> +       ("linux-pam" ,linux-pam)))
> +    (native-inputs
> +     `(("bison" ,bison)
> +       ("pkg-config" ,pkg-config)
> +       ("groff" ,groff)
> +       ("automake" ,automake)
> +       ("autoconf" ,autoconf)))
> +    (arguments
> +     `(;; We have to configure it like this because the default checks for for example
> +       ;; python in /usr/local/bin, /usr/bin and fails otherwise.
> +       #: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))
> +    (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
Leo Famulari Sept. 20, 2016, 9:48 p.m. UTC | #2
On Fri, Sep 09, 2016 at 09:43:29PM +0000, ng0 wrote:
> I commented mariadb + postgresql for now. I want some feedback first if
> you think we should provide it this way, or if we should add both to
> different outputs.
> It would not make much difference in the size of the dependency graph
> unless one creates a opensmtpd-extras-postgresql package for example
> which just builds the postgresql related things.

Is it even possible to split the package up like that? I don't think
it's necessary anyways. I think we should pick a database (I'd choose
postgresql) and add the package. If somebody wants to use mariadb, we
can add it when they request it.
non such Sept. 21, 2016, 8:35 a.m. UTC | #3
Leo Famulari <leo@famulari.name> writes:

> [ Unknown signature status ]
> On Fri, Sep 09, 2016 at 09:43:29PM +0000, ng0 wrote:
>> I commented mariadb + postgresql for now. I want some feedback first if
>> you think we should provide it this way, or if we should add both to
>> different outputs.
>> It would not make much difference in the size of the dependency graph
>> unless one creates a opensmtpd-extras-postgresql package for example
>> which just builds the postgresql related things.
>
> Is it even possible to split the package up like that? I don't think
> it's necessary anyways. I think we should pick a database (I'd choose
> postgresql) and add the package. If somebody wants to use mariadb, we
> can add it when they request it.

Okay, I agree. Can the committer makes the change locally, or should I
send in new versions?
diff mbox

Patch

From 87cf35ef0e5e78e9cdf05ab025d7151dd92e1902 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
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 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index e80a5c1..fd03d1e 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -52,6 +52,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)
@@ -60,6 +61,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)
@@ -1441,3 +1443,73 @@  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) ; split this
+       ;; ("mariadb" ,mariadb) ; split this
+       ("sqlite" ,sqlite)
+       ("linux-pam" ,linux-pam)))
+    (native-inputs
+     `(("bison" ,bison)
+       ("pkg-config" ,pkg-config)
+       ("groff" ,groff)
+       ("automake" ,automake)
+       ("autoconf" ,autoconf)))
+    (arguments
+     `(;; We have to configure it like this because the default checks for for example
+       ;; python in /usr/local/bin, /usr/bin and fails otherwise.
+       #: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))
+    (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